Problem with Displaying PNG Files

If you have any questions regarding Quartam PDF Library for LiveCode, this is the place to get answers from your fellow users - experts and newbies alike.
Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
richh
Posts:1
Joined:Thu May 05, 2011 11:29 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Problem with Displaying PNG Files

Post by richh » Thu May 05, 2011 11:35 pm

I have been using Quartam PDF Library 1.0.0 for a while now and have it successfully running in one of my apps that generates PDF reports. Today, I downloaded version 1.1.0 and found that when I attempt to display my graphics, they appear black. If I display them in the old version they display fine.

I have attached two png files that I am attempting to generate in a pdf report.

the code I am using is the following:

Code: Select all

set thte defaultFolder to specialFolderPath("Desktop")
put "importChart.png" into importChartPath

put qrtPDF_SetImageScale tDocRef, 60
qrtPDF_DrawImage tDocRef, 12,22,0,0 importChartPath
thank you in advance.
Attachments
exportChart.png
(3.99KiB)Not downloaded yet
importChart.png
(2.88KiB)Not downloaded yet

JanSchenkel
Site Admin
Posts:110
Joined:Sun Jul 18, 2010 5:21 pm
Location:Aalst, Belgium
Contact:

Re: Problem with Displaying PNG Files

Post by JanSchenkel » Mon May 09, 2011 2:12 pm

Hi Rich,

Thank you for reporting this problem.
A quick look inside the generated PDF file reveals that 1.1.0 thinks the image's ColorSpace is DeviceGray, instead of Indexed.

I think I have tracked it down to an error in the handler p_qrtPDF_LoadPNG.
Line 3686:

Code: Select all

put byteToNum(it) into tColorSpace
should be:

Code: Select all

put byteToNum(it) into tColorMethod
This fix will be included in version 1.1.1, due sometime this week (I'm also tracking down a problem with image handling on LiveCode Server)

Cheers,

Jan Schenkel.
Quartam Developer Tools for LiveCode
http://www.quartam.com

JanSchenkel
Site Admin
Posts:110
Joined:Sun Jul 18, 2010 5:21 pm
Location:Aalst, Belgium
Contact:

Re: Problem with Displaying PNG Files

Post by JanSchenkel » Sun May 22, 2011 3:37 pm

Just to confirm that this issue was fixed in Quartam PDF Library version 1.1.1 - even if I forgot to include it in the release notes, heh :-)
You can download the latest update here: http://downloads.quartam.com/qrtpdflib_ ... atform.zip

Cheers,

Jan Schenkel.
Quartam Developer Tools for LiveCode
http://www.quartam.com

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable