mbattyani / cl-pdf

CL-PDF is a cross-platform Common Lisp library for generating PDF files.
Other
115 stars 41 forks source link

more png surport and other image format support by conversion #9

Closed ailisp closed 7 years ago

ailisp commented 8 years ago

When I was trying to run example11, I found cl-pdf can't load some of png files (e.g. f_0 ) and image file formats other than jpg/jpeg. This commit first try to read jpg or png files by original cl-pdf functions, when image-file-parse-error occurs, it try to use imagemagick (command line tool) to convert the image into a jpg file in the temp folder and load the converted version. This doesn't bother if cl-pdf can already load the image but enable it to load any files support by imagemagick (static gif, tif, bmp, etc.). I have tried some more lispy approach, such as try load the file by cl-png or png-read, but after load the example png file, I found its :color-space slot is not supported by cl-pdf's png reader and both cl-png and png-read can't convert :color-space.

mbattyani commented 7 years ago

Almost 1 year! Sorry about that. I was totally convinced I had already merged it when you sent it. Thanks, for the new feature anyway.

ailisp commented 7 years ago

Great, it's my pleasure.