From: Carsten H. (T. R. <ra...@ra...> - 2005-02-25 06:27:12
|
On Thu, 24 Feb 2005 08:50:55 +0100 Antonio Larrosa Jim__nez <an...@te...> babbled: > On Wednesday 23 February 2005 23:43, Michel Briand wrote: > > Hello > > > > Hi, > > > maybe you can use int mkfifo (const char *FILENAME, mode_t MODE) to create > > a FIFO in your application. You can then invoke imlib2 with this filename. > > You must feed this FIFO with you data. > > Hmmm, nice idea, but I'm afraid Carsten already said it wouldn't work, it > would have been a quite nice workaround. it MAY work or may NOT - i can't guarantee it :) try and see :) > > Anyway if you explain why you must have your jpeg in memory I can help > > more. > > I just got the file from the network, so the file is initially in memory, and > I need to save a (kind of) thumbnail version of what I got, so it doesn't > make much sense (IMHO) to save the full image to disk, then load it, operate > over it and save the reduced version again. agreed - but then again - it likely sits in the vfs anyway and the MOST expensive part is decoding the jpeg into rgb then doing the scale those are 90% or more of the work anyway :) > > You probably want to decompress your jpeg. You can rip the loader code if > > it quicken your app however. > > I'll try to use epeg to do that. epeg can also do the thumbnail for you - much faster than imlib2.. it takes some massive shortcuts that imlib2 won't... if you are just in the business of generating thumbnails of jpeg's... epeg is the answer :) -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) ra...@ra... 裸好多 ra...@de... Tokyo, Japan (東京 日本) |