[cl-gd-devel] Error in function CREATE-IMAGE-FROM-FILE:
I got the following error trying to draw text on an image. The test.png is a valid file, I can view it in browser. Here is the debug dump (I use CMUCL 19b, latest libgd and cl-gd, with-image macro works fine): Error in function CREATE-IMAGE-FROM-FILE: Could not create image from PNG file "/tmp/dir1/test.png" [Condition of type SIMPLE-ERROR] Restarts: 0: [ABORT] Return to SLIME's top level. 1: [ABORT] Return to Top-Level. Backtrace: 0: (CREATE-IMAGE-FROM-FILE "/tmp/dir1/test.png" NIL) 1: (CREATE-TEXT-IMAGE-ON-IMAGE #P"/tmp/dir1/test.png" "Hello!" "arial" 100 ...) 2: ("DEFSLIMEFUN INTERACTIVE-EVAL") Thank you, Andrew
Here I attach the image: On 3/15/07, Andrei Stebakov <lispercat@gmail.com> wrote:
I got the following error trying to draw text on an image. The test.png is a valid file, I can view it in browser. Here is the debug dump (I use CMUCL 19b, latest libgd and cl-gd, with-image macro works fine):
Error in function CREATE-IMAGE-FROM-FILE: Could not create image from PNG file "/tmp/dir1/test.png" [Condition of type SIMPLE-ERROR]
Restarts: 0: [ABORT] Return to SLIME's top level. 1: [ABORT] Return to Top-Level.
Backtrace: 0: (CREATE-IMAGE-FROM-FILE "/tmp/dir1/test.png" NIL) 1: (CREATE-TEXT-IMAGE-ON-IMAGE #P"/tmp/dir1/test.png" "Hello!" "arial" 100 ...) 2: ("DEFSLIMEFUN INTERACTIVE-EVAL")
Thank you, Andrew
On Thu, 15 Mar 2007 00:50:04 -0400, "Andrei Stebakov" <lispercat@gmail.com> wrote:
The test.png is a valid file, I can view it in browser.
Here's the output of "identify" (which is a part of ImageMagick): edi@Groucho:~/desktop$ identify test.png test.png JPEG 400x400 DirectClass 42kb So, maybe you'll have more luck if you rename the file to "test.jpg" - let us know.
On Thu, 15 Mar 2007 12:14:31 +0100, Edi Weitz <edi@agharta.de> wrote:
So, maybe you'll have more luck if you rename the file to "test.jpg" - let us know.
For the sake of completeness: If you insist on calling the file "test.png", there's also the optional TYPE parameter of CREATE-IMAGE-FROM-FILE. http://weitz.de/cl-gd/#create-image-from-file
Oh, I am really sorry... This image came to me named as png and I even didn't think it wasn't that because it's parent (they transformed it) was a png! Shame on me! Andrew On 3/15/07, Edi Weitz <edi@agharta.de> wrote:
On Thu, 15 Mar 2007 12:14:31 +0100, Edi Weitz <edi@agharta.de> wrote:
So, maybe you'll have more luck if you rename the file to "test.jpg" - let us know.
For the sake of completeness: If you insist on calling the file "test.png", there's also the optional TYPE parameter of CREATE-IMAGE-FROM-FILE.
http://weitz.de/cl-gd/#create-image-from-file _______________________________________________ cl-gd-devel site list cl-gd-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/cl-gd-devel
participants (2)
-
Andrei Stebakov -
Edi Weitz