<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.lisp.graphics.gd.devel">
    <title>gmane.lisp.graphics.gd.devel</title>
    <link>http://blog.gmane.org/gmane.lisp.graphics.gd.devel</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/184"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/183"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/182"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/181"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/180"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/179"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/178"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/177"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/176"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/175"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/174"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/173"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/172"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/171"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/170"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/169"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/168"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/167"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/166"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/165"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/184">
    <title>Re: FFI error (I assume)</title>
    <link>http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/184</link>
    <description>&lt;pre&gt;Have you compiled the glue library? If not, go inside the cl-gd source  
directory and run make. It should produce cl-gd-glue.so.
If it complains, look close - you probably don't have all the dependencies  
built. You need the gd library 2.x and it has requirements of its own.

Jeff


On Sun, 23 Oct 2011 09:23:32 -0700, Leo Zovic &amp;lt;leo.zovic&amp;lt; at &amp;gt;gmail.com&amp;gt; wrote:

&amp;gt; Any ideas?&lt;/pre&gt;</description>
    <dc:creator>Jeffrey Cunningham</dc:creator>
    <dc:date>2011-10-23T16:23:47</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/183">
    <title>FFI error (I assume)</title>
    <link>http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/183</link>
    <description>&lt;pre&gt;Not sure whether this is a bug, or I don't have a required library set up.
Whenever I try to do

(with-image-from file (img "/my/image/path.jpg")
    (image-size img))

I get an UNDEFINED-ALIEN-FUNCTION-ERROR

trace follows

Attempt to call an undefined alien function.
   [Condition of type SB-KERNEL::UNDEFINED-ALIEN-FUNCTION-ERROR]

Restarts:
 0: [RETRY] Retry SLIME REPL evaluation request.
 1: [*ABORT] Return to SLIME's top level.
 2: [TERMINATE-THREAD] Terminate this thread (#&amp;lt;THREAD "repl-thread" RUNNING
{10032E9BA1}&amp;gt;)

Backtrace:
  0: (SB-KERNEL::UNDEFINED-ALIEN-FUNCTION-ERROR)
  1: ("foreign function: #x422520")
  2: (GD-IMAGE-CREATE-FROM-JPEG-FILE "/my/image.path.jpg"
#&amp;lt;SB-ALIEN-INTERNALS:ALIEN-VALUE :SAP #X7FFFF37AFFF0 :TYPE (*
(SB-ALIEN:SIGNED 32))&amp;gt;)
  3: (CREATE-IMAGE-FROM-FILE #&amp;lt;unavailable argument&amp;gt; NIL)
  4: ((LAMBDA ()))
  5: (SB-INT:SIMPLE-EVAL-IN-LEXENV ..)
  6: (SWANK::EVAL-REGION "(with-image-from-file (img
\"/my/image.path.jpg\")\n   (image-size img))\n")
  7: ((LAMBDA ()))
  8: (SWANK::TRACK-PACKAGE #&amp;lt;CLOSURE (LAMBDA #) {1004B732C9}&amp;gt;)
  9: (SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME REPL evaluation request."
#&amp;lt;CLOSURE (LAMBDA #) {1004B731E9}&amp;gt;)
 10: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL #&amp;lt;CLOSURE (LAMBDA #) {1004B731B9}&amp;gt;)
 11: (SWANK::REPL-EVAL "(with-image-from-file (img \"/my/image.path.jpg\")\n
(image-size img))\n")
 12: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK:LISTENER-EVAL
"(with-image-from-file (img \"/my/image.path.jpg\")\n   (image-size
img))\n") #&amp;lt;NULL-LEXENV&amp;gt;)
 13: (SWANK::EVAL-FOR-EMACS (SWANK:LISTENER-EVAL "(with-image-from-file (img
\"/my/image.path.jpg\")\n   (image-size img))\n") "CL-GD" 172)
 14: (SWANK::PROCESS-REQUESTS NIL)
 15: ((LAMBDA ()))
 16: ((LAMBDA ()))
 17: (SWANK-BACKEND::CALL-WITH-BREAK-HOOK #&amp;lt;FUNCTION
SWANK:SWANK-DEBUGGER-HOOK&amp;gt; #&amp;lt;CLOSURE (LAMBDA #) {10032F3139}&amp;gt;)
 18: ((FLET SWANK-BACKEND:CALL-WITH-DEBUGGER-HOOK) #&amp;lt;FUNCTION
SWANK:SWANK-DEBUGGER-HOOK&amp;gt; #&amp;lt;CLOSURE (LAMBDA #) {10032F3139}&amp;gt;)
 19: (SWANK::CALL-WITH-BINDINGS ((*STANDARD-OUTPUT* . #) (*STANDARD-INPUT* .
#) (*TRACE-OUTPUT* . #) (*ERROR-OUTPUT* . #) (*DEBUG-IO* . #) (*QUERY-IO* .
#) ...) #&amp;lt;CLOSURE (LAMBDA #) {10032F3159}&amp;gt;)
 20: (SWANK::HANDLE-REQUESTS #&amp;lt;SWANK::CONNECTION {1002E87B91}&amp;gt; NIL)
 21: (SWANK::CALL-WITH-BINDINGS NIL #&amp;lt;CLOSURE (LAMBDA #) {10032F30F9}&amp;gt;)
 22: ((FLET #:WITHOUT-INTERRUPTS-BODY-[BLOCK369]374))
 23: ((FLET SB-THREAD::WITH-MUTEX-THUNK))
 24: ((FLET #:WITHOUT-INTERRUPTS-BODY-[CALL-WITH-MUTEX]300))
 25: (SB-THREAD::CALL-WITH-MUTEX ..)
 26: (SB-THREAD::INITIAL-THREAD-FUNCTION)
 27: ("foreign function: #x422520")
 28: ("foreign function: #x419227")

I've tried it running SBCL 1.0.40 from the Debian repos, as well as 1.0.52
from the official SBCL site. I'm using the copy of cl-gb from the latest
quicklisp release, and I've tried it on both a 32 bit and 64 bit system (the
included stack trace is from the 64-bit SBCL 1.0.40).

Any ideas?
&lt;/pre&gt;</description>
    <dc:creator>Leo Zovic</dc:creator>
    <dc:date>2011-10-23T16:23:32</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/182">
    <title>Re: CL-GD on 64-bit Lisp problem</title>
    <link>http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/182</link>
    <description>&lt;pre&gt;Thank you for the help, Hans. That was just an experiment. Normally, I  
load UFFI. But you said something that made me go back and look at my sbcl  
executable. Turns out I somehow built a 32-bit sbcl on this 64-bit  
machine. That explains everything (except why it built sbcl that way).

So it's clearly not a CL-GD issue at all.
Thanks again,

--Jeff



On Thu, 08 Sep 2011 10:29:43 -0700, Hans Hübner &amp;lt;hans.huebner&amp;lt; at &amp;gt;gmail.com&amp;gt;  
wrote:



--

_______________________________________________
cl-gd-devel site list
cl-gd-devel&amp;lt; at &amp;gt;common-lisp.net
http://common-lisp.net/mailman/listinfo/cl-gd-devel&lt;/pre&gt;</description>
    <dc:creator>Jeffrey Cunningham</dc:creator>
    <dc:date>2011-09-08T18:05:12</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/181">
    <title>Re: CL-GD on 64-bit Lisp problem</title>
    <link>http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/181</link>
    <description>&lt;pre&gt;Hi Jeff,

I have just tried :cl-gd on my Ubuntu 64 bit box with CCL.  Things
work as expected.  I have used quicklisp to load it.

The error message that you've pasted indicates that you have loaded
cffi-uffi-compat library.  Don't do that, use UFFI instead.

Anything else we can help with, let us know.
-Hans

On Thu, Sep 8, 2011 at 6:46 PM, Jeffrey Cunningham
&amp;lt;jeffrey&amp;lt; at &amp;gt;jkcunningham.com&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Hans Hübner</dc:creator>
    <dc:date>2011-09-08T17:29:43</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/180">
    <title>Re: CL-GD on 64-bit Lisp problem</title>
    <link>http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/180</link>
    <description>&lt;pre&gt;I just tried coming at it a different way and get a different error  
message:

(require 'cffi-uffi-compat)
(require 'cl-gd)
ASDF could not load cl-gd because
UFFI is a nickname for the package CFFI-UFFI-COMPAT.

UFFI is a nickname for the package CFFI-UFFI-COMPAT
    [Condition of type SB-KERNEL:SIMPLE-PACKAGE-ERROR]

Restarts:
  0: [TRY-RECOMPILING] Recompile package and try loading it again
  1: [RETRY] Retry loading FASL for #&amp;lt;CL-SOURCE-FILE "uffi" "src"  
"package"&amp;gt;.
  2: [ACCEPT] Continue, treating loading FASL for #&amp;lt;CL-SOURCE-FILE "uffi"  
"src" "package"&amp;gt; as having been successful.
  3: [*ABORT] Return to SLIME's top level.
  4: [TERMINATE-THREAD] Terminate this thread (#&amp;lt;THREAD "repl-thread"  
RUNNING {B113561}&amp;gt;)

Backtrace:
   0: (SB-IMPL::UPDATE-PACKAGE-WITH-VARIANCE ..)

So it seems that if cl-gd gets loaded first, it sees the 32/64-bit glue  
problem. But if cffi-uffi-compat is loaded first, cl-gd isn't compatible  
with my unaltered cffi / uffi installation.

--Jeff




On Thu, 08 Sep 2011 09:16:07 -0700, Hans Hübner &amp;lt;hans.huebner&amp;lt; at &amp;gt;gmail.com&amp;gt;  
wrote:



--

_______________________________________________
cl-gd-devel site list
cl-gd-devel&amp;lt; at &amp;gt;common-lisp.net
http://common-lisp.net/mailman/listinfo/cl-gd-devel&lt;/pre&gt;</description>
    <dc:creator>Jeffrey Cunningham</dc:creator>
    <dc:date>2011-09-08T16:46:05</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/179">
    <title>Re: CL-GD on 64-bit Lisp problem</title>
    <link>http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/179</link>
    <description>&lt;pre&gt;Hi Hans,

Yes, that was the first thing I did. If I'm reading that error message  
correctly, it saying that ELFCLASS64 is the wrong ELF class, which would  
imply it is looking for 32-bit glue.

On Thu, 08 Sep 2011 09:16:07 -0700, Hans Hübner &amp;lt;hans.huebner&amp;lt; at &amp;gt;gmail.com&amp;gt;  
wrote:



--

_______________________________________________
cl-gd-devel site list
cl-gd-devel&amp;lt; at &amp;gt;common-lisp.net
http://common-lisp.net/mailman/listinfo/cl-gd-devel&lt;/pre&gt;</description>
    <dc:creator>Jeffrey Cunningham</dc:creator>
    <dc:date>2011-09-08T16:34:00</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/178">
    <title>Re: CL-GD on 64-bit Lisp problem</title>
    <link>http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/178</link>
    <description>&lt;pre&gt;Hi Jeff,

I am using CL-GD on 64 bit systems without problems.  Did you
recompile the glue?  The 32 bit .so will not work.

-Hans

On Thu, Sep 8, 2011 at 6:05 PM, Jeffrey Cunningham
&amp;lt;jeffrey&amp;lt; at &amp;gt;jkcunningham.com&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Hans Hübner</dc:creator>
    <dc:date>2011-09-08T16:16:07</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/177">
    <title>CL-GD on 64-bit Lisp problem</title>
    <link>http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/177</link>
    <description>&lt;pre&gt;Hi,

I've been using CL-GD on 32-bit systems for years without difficulties.  
Now I'm trying to set a Lisp environment up on a fresh 64-bit Debian  
machine and I can't get CL-GD to work. When I try to load it I get this  
error:

Error opening shared object  
"/home/jcunningham/src/lisp/cl-gd-0.5.7/cl-gd-glue.so":
/home/jcunningham/src/lisp/cl-gd-0.5.7/cl-gd-glue.so: wrong ELF class:  
ELFCLASS64..

I remember their being an issue with CL-GD on 64-bit machines a couple  
years ago that involved having to use CFFI-UFFI-COMPAT instead of CFFI. I  
also vaguely remember that there was a problem at the time trying to have  
both CFFI and UFFI working, as the former used the same asd file name as  
the latter or something like that. Quite a number of other libraries I use  
depend on CFFI so I don't want to do anything that would break it. But I  
also need to get CL-GD working again if this machine is to be useful.

My gd lib is 64-bit - actually, everything I can think of is 64-bit. Is  
this still an issue? Is anyone using CL-GD on a 64-bit machine?

If so, mind sharing what it takes to get it working?

Much obliged.

--Jeff Cunningham


--
--&lt;/pre&gt;</description>
    <dc:creator>Jeffrey Cunningham</dc:creator>
    <dc:date>2011-09-08T16:05:01</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/176">
    <title>My open source libraries (aka "ediware")</title>
    <link>http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/176</link>
    <description>&lt;pre&gt;[My apologies if you receive multiple copies of this email.]


Hi everybody!

As some of you will know, I'll start on a new job tomorrow.  This new
job won't involve much hacking, if at all, and thus it doesn't look
like I'll have a lot of time to maintain my open source libraries in
the near future.  I have no plans to suddenly disappear from the CL
world, but don't expect new releases of any of my libs any time soon.
(At least none published by me or on my server.)

Luckily, Hans Hübner - who already did most of the maintenance and
development work for Hunchentoot in the last two years or so - offered
to coordinate further development via github.  See his full
announcement at
&amp;lt;http://netzhansa.blogspot.com/2011/08/ediware-moving-to-github.html&amp;gt;.

I'll continue to read the mailing lists for my libs and I'm still
interested in fixing bugs you might find in the release tarballs
available on my web server.  However, I will likely not bother to
discuss or work on new features or compatibility code for
implementations other than LispWorks (which happens to be the one I'm
using).

Lastly, I hope to see a lot of you in Amsterdam
&amp;lt;http://weitz.de/eclm2011/&amp;gt; in October.  The number of registrations
so far has been pretty disappointing, but you still have three weeks
left to change your mind... :)

Take care,
Edi.

&lt;/pre&gt;</description>
    <dc:creator>Edi Weitz</dc:creator>
    <dc:date>2011-08-31T15:11:30</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/175">
    <title>Re: CL-GD and LispWorks 5.1: Loading images with extended characters in their pathnames?</title>
    <link>http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/175</link>
    <description>&lt;pre&gt;Hi  Chris,

I don't see which of the characters in the file name would not have an
encoding in Latin1.  Is this really the file name you used?

The problem is, though, that UFFI doesn't allow you to specify an
encoding when converting Lisp strings to C strings.  This could
certainly be done in the LispWorks FLI directly and probably (I
haven't looked) in CFFI as well.  A real solution would be to
re-architect CL-GD to use an alternative to UFFI, but I don't have the
time to do it and I haven't used CL-GD for years anyway.

Cheers,
Edi.


On Fri, Sep 17, 2010 at 10:51 PM, Chris Perkins &amp;lt;cperkins&amp;lt; at &amp;gt;medialab.com&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Edi Weitz</dc:creator>
    <dc:date>2010-09-19T11:57:51</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/174">
    <title>CL-GD and LispWorks 5.1: Loading images with extended characters in their pathnames?</title>
    <link>http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/174</link>
    <description>&lt;pre&gt;Hello,

If I have a pathnamewith extended characters in its namestring (like
curly quotes, etc), how do I get that image to load with CL-GD?

Maybe I have to go diving into UFFI or the sources for GD itself, but I
thought I'd ask here first, since it seems like this has probably come
up already.

Thanks for any assistance,

Chris



Example:  f =&amp;gt; #P"/Users/cperkins/Pictures/image file names
testing/Earth “fatter” copy.gif"

(cl-gd:create-image-from-file f)


Error: External format (:LATIN-1 :EOL-STYLE :LF) got error writing
#&amp;lt;Pointer to type (:UNSIGNED :CHAR) = #x0102B008&amp;gt; at position 55: No
encoding exists for character “.
  1 (abort) Return to level 0.
  2 Return to top loop level 0.



&lt;/pre&gt;</description>
    <dc:creator>Chris Perkins</dc:creator>
    <dc:date>2010-09-17T20:51:05</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/173">
    <title>Re: Loading Images from Pointers</title>
    <link>http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/173</link>
    <description>&lt;pre&gt;Hello.


CL-GD works (so far), but the page seems not to be up to date, I have
the package libgd-xpm-dev from ubuntu, and /usr/include/gd.h contains
the line

#define GD_VERSION_STRING "2.0.36"

which is, according to that site, a prerelease, which I cannot really
believe since its in a stable ubuntu release. And it also contains the
line

BGD_DECLARE(gdImagePtr) gdImageCreateFromGifPtr (int size, void *data);

But you are right ... cl-gd is not compatible (I should have done the
tests on the same computer I did the other stuff):

CL-USER&amp;gt; (cl-gd-test:TEST )
Test 1 failed with the following error: Attempt to call an undefined
alien function.
Test 2 failed with the following error: Attempt to call an undefined
alien function.
Test 3 failed with the following error: Attempt to call an undefined
alien function.
(...)

So ... well ... how hard would it be to make it compatible with the
new version? Is it just changing a few naming-strings, or more
complicated? I have lisp-magick working now, its just not very well
maintained, but if cl-gd is outdated, then maybe I will write my own
FFI-Binding for GD directly, or keep working with a patched version of
lisp-magick (or do the image-processing in CL directly).

Regards, Christoph

_______________________________________________
cl-gd-devel site list
cl-gd-devel&amp;lt; at &amp;gt;common-lisp.net
http://common-lisp.net/mailman/listinfo/cl-gd-devel&lt;/pre&gt;</description>
    <dc:creator>Christoph Senjak</dc:creator>
    <dc:date>2010-05-19T21:51:56</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/172">
    <title>Re: Loading Images from Pointers</title>
    <link>http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/172</link>
    <description>&lt;pre&gt;On Wed, May 19, 2010 at 4:18 PM, Christoph Senjak
&amp;lt;christoph.senjak&amp;lt; at &amp;gt;googlemail.com&amp;gt; wrote:


Have you made sure that the version of GD you are using is compatible
with the GD docs you pointed to?  I haven't looked at GD for quite
some time, but judging from the URL in your initial email, current GD
seems to use names which are different from the ones used in CL-GD, so
if CL-GD works for you otherwise, you probably don't have the newest
version of GD.

Edi.

&lt;/pre&gt;</description>
    <dc:creator>Edi Weitz</dc:creator>
    <dc:date>2010-05-19T14:25:28</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/171">
    <title>Re: Loading Images from Pointers</title>
    <link>http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/171</link>
    <description>&lt;pre&gt;Christoph,

can you please post some code that would allow me to try to reproduce
and diagnose the problem in isolation?  Make it a single lisp file
that assumes cl-gd being loaded, attach it to the message that you
send.

Thanks.
Hans

On Wed, May 19, 2010 at 16:18, Christoph Senjak
&amp;lt;christoph.senjak&amp;lt; at &amp;gt;googlemail.com&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Hans Hübner</dc:creator>
    <dc:date>2010-05-19T14:26:10</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/170">
    <title>Re: Loading Images from Pointers</title>
    <link>http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/170</link>
    <description>&lt;pre&gt;
cffi:foreign-alloc seems to have an argument :initial-contents,
according to what lispbuilder-sdl does. So there should be no need to
perform this loop by hand.

The main problem I have now is that I get strange error messages about
"unknown alien functions" when trying to use def-function (which I
found in gd-uffi.lisp). The function is definitely there, but seems
like uffi cannot find it or something (I am not familiar with uffi).

_______________________________________________
cl-gd-devel site list
cl-gd-devel&amp;lt; at &amp;gt;common-lisp.net
http://common-lisp.net/mailman/listinfo/cl-gd-devel&lt;/pre&gt;</description>
    <dc:creator>Christoph Senjak</dc:creator>
    <dc:date>2010-05-19T14:18:26</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/169">
    <title>Re: Loading Images from Pointers</title>
    <link>http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/169</link>
    <description>&lt;pre&gt;Hi Christoph,

I now understand what you're trying to do.  Here is my take on it:

- Accessing a byte vector as C vector is compiler specific.  A
portable solution would allocate some memory using UFFI's interface to
malloc, copy the data to that memory buffer using a lisp loop and
memory accessor functions, call the required gdCreate* function and
finally free the malloced buffer.

- When you want to avoid the copying overhead (which in my opinion
should only be done if you're dealing with a lot of data), you'll need
to find out how you can pin the byte vector so that the garbage
collector does not move it while you're in the FFI.  Then, you'll need
to find out how you can get a pointer to the byte vector in a format
that is understood by UFFI.

I would first go for the first option and see how that performs (i.e.
if it produces a noticeable performance problem).  The copies that
you'll make are only temporary, so the memory footprint of your
application will be roughly identical.  GD will make its own private
copy of the data anyway.

Let us know if that helps.

-Hans

On Wed, May 19, 2010 at 12:28, Christoph Senjak
&amp;lt;christoph.senjak&amp;lt; at &amp;gt;googlemail.com&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Hans Hübner</dc:creator>
    <dc:date>2010-05-19T10:43:14</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/168">
    <title>Re: Loading Images from Pointers</title>
    <link>http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/168</link>
    <description>&lt;pre&gt;2010/5/19 Hans Hübner &amp;lt;hans.huebner&amp;lt; at &amp;gt;gmail.com&amp;gt;:

Hello.

I am loading the files into an array of (unsigned-byte 8):

(defun si (var val)
  (setf (symbol-value (intern var)) val))
(defun init-file (file)
  "Load a file into a Variable. Access with |filename| (without .png
and path)."
  (si (pathname-name file)
      (with-open-file (in file :element-type '(unsigned-byte 8))
        (let* ((length (file-length in))
               (content (make-array (list length)
                                    :element-type '(unsigned-byte 8)
                                    :adjustable nil)))
          (read-sequence content in)
          content))))

The reason I am doing this is that I dont like to have more external
files than necessary, and want them in my core-dump. SDL can load
these byte-arrays with

(sdl-image:load-image x :image-type :PNG :alpha 1)

what it actually does is

(defmethod load-image ((source VECTOR) &amp;amp;key color-key alpha
(image-type nil) (force nil) (free-rwops $
  "Creates and returns a new surface from the image contained in the
byte VECTOR in `SOURCE`."
  (declare (ignore free-rwops))
  (load-image (sdl::create-RWops-from-byte-array source)
              :color-key color-key
              :color-key-at color-key-at
              :alpha alpha
              :image-type image-type
              :force force :free-rwops t))
where
(defun create-RWops-from-byte-array (array)
  "Creates and returns a new `RWOPS` object from the Lisp array `ARRAY`."
  (let ((mem-array (cffi:foreign-alloc :unsigned-char :initial-contents array)))
    (make-instance 'rwops :fp (sdl-cffi::sdl-rw-from-mem mem-array
(length array)))))

which should be about the same lisp-magick does.

Christoph

_______________________________________________
cl-gd-devel site list
cl-gd-devel&amp;lt; at &amp;gt;common-lisp.net
http://common-lisp.net/mailman/listinfo/cl-gd-devel&lt;/pre&gt;</description>
    <dc:creator>Christoph Senjak</dc:creator>
    <dc:date>2010-05-19T10:28:01</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/167">
    <title>Re: Loading Images from Pointers</title>
    <link>http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/167</link>
    <description>&lt;pre&gt;Hi Christoph,

implementing an interface to gdImageCreateFrom.*Ptr shouldn't be hard,
but I wonder where you'd get your pointers from?  If you could supply
some sample code and data, we may be able to help you out.

-Hans

On Wed, May 19, 2010 at 04:37, Christoph Senjak
&amp;lt;christoph.senjak&amp;lt; at &amp;gt;googlemail.com&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Hans Hübner</dc:creator>
    <dc:date>2010-05-19T06:46:42</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/166">
    <title>Loading Images from Pointers</title>
    <link>http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/166</link>
    <description>&lt;pre&gt;Hello.

I have so far been using Lisp-Magick for two reasons: On the one hand,
I didnt know that GD can stretch images, on the other hand, cl-gd
doesnt support reading images from memory. Well, at least according to
[1] there is a function which can do this in libgd, but seems like
this isnt implemented in cl-gd yet. This is in fact the only thing
keeping me from using CL-GD by now. I would like to use it instead of
lisp-magick, since lisp-magick seems not to be well-maintained by now,
and I already have to use a few of my personal patches to it. Anyway,
I am not very familiar with uffi and stuff, I just tried to use
cl-gd::def-function, but didnt really suffice.

Is there any way of getting this function work with CL-GD?

Regards
Christoph Senjak

[1] http://libgd.org/ImageCreation#gdImageCreateFromPngPtr.28int_size.2C_void_.2Adata.29_.28FUNCTION.29

&lt;/pre&gt;</description>
    <dc:creator>Christoph Senjak</dc:creator>
    <dc:date>2010-05-19T02:37:31</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/165">
    <title>Re: [question] change of colors when tiling an image</title>
    <link>http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/165</link>
    <description>&lt;pre&gt;Thank you!
Should have guessed something like that... :)

Kai.


On 19:02 Thu 11 Mar     , Hans Hübner wrote:

&lt;/pre&gt;</description>
    <dc:creator>colimal&lt; at &gt;mails.selgrad.org</dc:creator>
    <dc:date>2010-03-11T20:14:54</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/164">
    <title>Re: [question] change of colors when tiling an image</title>
    <link>http://permalink.gmane.org/gmane.lisp.graphics.gd.devel/164</link>
    <description>&lt;pre&gt;Kai,

I guess your tiles are written in palette mode.  Have a look at the
optional TRUE-COLOR-P argument that WITH-IMAGE provides.

-Hans

On Thu, Mar 11, 2010 at 18:29,  &amp;lt;colimal&amp;lt; at &amp;gt;mails.selgrad.org&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Hans Hübner</dc:creator>
    <dc:date>2010-03-11T18:02:15</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.lisp.graphics.gd.devel">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.lisp.graphics.gd.devel</link>
  </textinput>
</rdf:RDF>

