I've been playing around with Valentin's conversion of FPDF to Lingo
and so far it has worked well.
(http://staff.dasdeck.de/valentin/lingo/pdf_class/)

I have run into on huge problem though.

When you add an RGB image to the PDF Object using AddImg() it takes a
pretty long time (for the logo we have it takes about 68 seconds). I
have found where the slow down is and I am looking for a solution.

Here's the problem code that is in the AddImg handler:
-- hi is image herght, wi is image width, data = ""
repeat with i=0 to hi-1
repeat with j=0 to wi-1
col=img.getpixel(j,i)
put chr(col.red) & chr(col.green) & chr(col.blue) after data
end repeat
end repeat

Basically, we are traveling through each pixel of the image and adding
the chars to the string. I tried using:

data = data & chr(col.red) & chr(col.green) & chr(col.blue)

since using "put" seemed too old school, even for and old man like me.
But I got the same results.

So, I tried saving that huge-ass string in a file using FileIO then
reading the file string in instead of prcessing the graphic. That
resulted in Acrobat saying it didn't have enough information to show
that graphic (or as we say here, Acrobat gave me "the finger", so I
obviously did something wrong).

Can anyone give me some insight here? Work-arounds and/or hacks gladly
taken under consideration. Thanks!

Leif

Leif Wells
Atlanta Macromedia User Group Manager
[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to