Re: [E-devel] Imlib2 opening a file from memory

2005-02-25 Thread Antonio Larrosa Jiménez
On Friday 25 February 2005 07:26, Carsten Haitzler wrote:
> you could - it makes sense, but if its just thumbnail creation.. seriously
> look at epeg. it is custom build JUST to do this. and its about as fast as
> it gets. (many times faster than imlib2... which already is many times
> faster than imagemagick...)

In the meantime I already implemented it using imlib2 (saving the file to open 
it, resize and save it) and it seems to be fast enough. But since you say 
epeg does the resizing even faster, I'll try in the following days to modify 
it to use epeg.

Thanks a lot for your help and suggestions,

-- 
Antonio Larrosa
[EMAIL PROTECTED]
TEDIAL - Tecnologías Digitales Audiovisuales, S.L.


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Imlib2 opening a file from memory

2005-02-25 Thread The Rasterman
On Thu, 24 Feb 2005 08:46:08 +0100 Antonio Larrosa Jim__nez <[EMAIL PROTECTED]>
(Bbabbled:
(B
(B> On Wednesday 23 February 2005 13:40, Carsten Haitzler wrote:
(B> > unfortunately (for you) we never provided an api to do that. though
(B> > possible via a loader - no loaders support it :( sorry. epeg does support
(B> > this, BUT it will only give you RGB data... :)
(B> 
(B> H, please correct me if I'm wrong, but since I just need to open jpeg 
(B> files, I could open the file from memory using epeg and then use 
(B> imlib_create_image_using_data to create an image using the decoded RGB data 
(B> from epeg, isn't it? If the format of the pixels is different, I could also 
(B> use imlib_create_image with the correct width and height and then use 
(B> imlib_image_get_data to get a pointer to the pixels and "translate" them from 
(B> the output of epeg to the needed format (DATA32 pixels) for Imlib.
(B> 
(B> Am I making sense?
(B
(Byou could - it makes sense, but if its just thumbnail creation.. seriously look
(Bat epeg. it is custom build JUST to do this. and its about as fast as it gets.
(B(many times faster than imlib2... which already is many times faster than
(Bimagemagick...)
(B
(B-- 
(B- Codito, ergo sum - "I code, therefore I am" --
(BThe Rasterman (Carsten Haitzler)[EMAIL PROTECTED]
$BMg9%B?(B  [EMAIL PROTECTED]
(BTokyo, Japan ($BEl5~(B $BF|K\(B)
(B
(B
(B---
(BSF email is sponsored by - The IT Product Guide
(BRead honest & candid reviews on hundreds of IT Products from real users.
(BDiscover which products truly live up to the hype. Start reading now.
(Bhttp://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
(B___
(Benlightenment-devel mailing list
(Benlightenment-devel@lists.sourceforge.net
(Bhttps://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Re: [E-devel] Imlib2 opening a file from memory

2005-02-24 Thread The Rasterman
On Thu, 24 Feb 2005 08:50:55 +0100 Antonio Larrosa Jim__nez <[EMAIL PROTECTED]>
(Bbabbled:
(B
(B> On Wednesday 23 February 2005 23:43, Michel Briand wrote:
(B> > Hello
(B> >
(B> 
(B> Hi,
(B> 
(B> > maybe you can use int mkfifo (const char *FILENAME, mode_t MODE) to create
(B> > a FIFO in your application. You can then invoke imlib2 with this filename.
(B> > You must feed this FIFO with you data.
(B> 
(B> Hmmm, nice idea, but I'm afraid Carsten already said it wouldn't work, it 
(B> would have been a quite nice workaround.
(B
(Bit MAY work or may NOT - i can't guarantee it :) try and see :)
(B
(B> > Anyway if you explain why you must have your jpeg in memory I can help
(B> > more.
(B> 
(B> I just got the file from the network, so the file is initially in memory, and 
(B> I need to save a (kind of) thumbnail version of what I got, so it doesn't 
(B> make much sense (IMHO) to save the full image to disk, then load it, operate 
(B> over it and save the reduced version again.
(B
(Bagreed - but then again - it likely sits in the vfs anyway and the MOST
(Bexpensive part is decoding the jpeg into rgb then doing the scale those are 90%
(Bor more of the work anyway :)
(B
(B> > You probably want to decompress your jpeg. You can rip the loader code if
(B> > it quicken your app however.
(B> 
(B> I'll try to use epeg to do that.
(B
(Bepeg can also do the thumbnail for you - much faster than imlib2.. it takes some
(Bmassive shortcuts that imlib2 won't... if you are just in the business of
(Bgenerating thumbnails of jpeg's... epeg is the answer :)
(B
(B-- 
(B- Codito, ergo sum - "I code, therefore I am" --
(BThe Rasterman (Carsten Haitzler)[EMAIL PROTECTED]
$BMg9%B?(B  [EMAIL PROTECTED]
(BTokyo, Japan ($BEl5~(B $BF|K\(B)
(B
(B
(B---
(BSF email is sponsored by - The IT Product Guide
(BRead honest & candid reviews on hundreds of IT Products from real users.
(BDiscover which products truly live up to the hype. Start reading now.
(Bhttp://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
(B___
(Benlightenment-devel mailing list
(Benlightenment-devel@lists.sourceforge.net
(Bhttps://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Re: [E-devel] Imlib2 opening a file from memory

2005-02-23 Thread Antonio Larrosa Jiménez
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.

> 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.

> 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.

Thanks,

-- 
Antonio Larrosa
[EMAIL PROTECTED]
TEDIAL - Tecnologías Digitales Audiovisuales, S.L.


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Imlib2 opening a file from memory

2005-02-23 Thread Antonio Larrosa Jiménez
On Wednesday 23 February 2005 13:40, Carsten Haitzler wrote:
> unfortunately (for you) we never provided an api to do that. though
> possible via a loader - no loaders support it :( sorry. epeg does support
> this, BUT it will only give you RGB data... :)

H, please correct me if I'm wrong, but since I just need to open jpeg 
files, I could open the file from memory using epeg and then use 
imlib_create_image_using_data to create an image using the decoded RGB data 
from epeg, isn't it? If the format of the pixels is different, I could also 
use imlib_create_image with the correct width and height and then use 
imlib_image_get_data to get a pointer to the pixels and "translate" them from 
the output of epeg to the needed format (DATA32 pixels) for Imlib.

Am I making sense?

Greetings,

-- 
Antonio Larrosa
[EMAIL PROTECTED]
TEDIAL - Tecnologías Digitales Audiovisuales, S.L.
Parque Tecnológico de Andalucía
C/ Severo Ochoa, nº 10, 1ª planta
29590 Campanillas, Málaga
Tfno. +34 951 012 624
Fax   +34 951 012 610


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Imlib2 opening a file from memory

2005-02-23 Thread The Rasterman
On Wed, 23 Feb 2005 23:43:43 +0100 Michel Briand <[EMAIL PROTECTED]> babbled:
(B
(B> Hello
(B> 
(B> maybe you can use int mkfifo (const char *FILENAME, mode_t MODE) to create a
(B> FIFO in your application. You can then invoke imlib2 with this filename. You
(B> must feed this FIFO with you data.
(B> 
(B> Anyway if you explain why you must have your jpeg in memory I can help more.
(B> 
(B> You probably want to decompress your jpeg. You can rip the loader code if it
(B> quicken your app however.
(B
(Bthe problem is some loaders need to lseek() and u cant seek on a fifo - you will
(Bonly know if u try :) at the end of the day disk cache will work almost as well
(Bas it wont be on disk long enough to get synced to disk thus it will just stay
(Bin ram (most likely) thats why i didnt look at loading from memory as important
(B:(
(B
(B> Regards
(B> 
(B> Michel
(B> 
(B> Carsten Haitzler (The Rasterman) a __crit :
(B> > On Wed, 23 Feb 2005 13:14:25 +0100 Antonio Larrosa Jim__nez
(B<[EMAIL PROTECTED]>
(B> > babbled:
(B> > 
(B> > 
(B> >>Hello,
(B> >>
(B> >>I have the contents of a jpeg file in memory and I'd like to do some 
(B> >>operations on it before writing it to disk, so I'd like to open the file 
(B> >>without having to save it to disk, then use imlib_load_image( filename ) 
(Band
(B> >>then removing the temporary file.
(B> >>
(B> >>The kernel is of course caching the disk, but if I use imlib2 for its speed,
(B
(B> >>then I'd prefer not to introduce a temporary file when the file contents are
(B
(B> >>already loaded in memory. The problem is tht I didn't find how to do it in 
(B> >>the docs.
(B> >>
(B> >>Is there any way to open an image from a memory buffer ?
(B> > 
(B> > 
(B> > unfortunately (for you) we never provided an api to do that. though possible
(Bvia
(B> > a loader - no loaders support it :( sorry. epeg does support this, BUT it
(Bwill
(B> > only give you RGB data... :)
(B> > 
(B> 
(B> 
(B> 
(B> ---
(B> SF email is sponsored by - The IT Product Guide
(B> Read honest & candid reviews on hundreds of IT Products from real users.
(B> Discover which products truly live up to the hype. Start reading now.
(B> http://ads.osdn.com/?ad_ide95&alloc_id396&op__k
(B> ___
(B> enlightenment-devel mailing list
(B> enlightenment-devel@lists.sourceforge.net
(B> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
(B> 
(B
(B
(B-- 
(B- Codito, ergo sum - "I code, therefore I am" --
(BThe Rasterman (Carsten Haitzler)[EMAIL PROTECTED]
$BMg9%B?(B  [EMAIL PROTECTED]
(BTokyo, Japan ($BEl5~(B $BF|K\(B)
(B
(B
(B---
(BSF email is sponsored by - The IT Product Guide
(BRead honest & candid reviews on hundreds of IT Products from real users.
(BDiscover which products truly live up to the hype. Start reading now.
(Bhttp://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
(B___
(Benlightenment-devel mailing list
(Benlightenment-devel@lists.sourceforge.net
(Bhttps://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Re: [E-devel] Imlib2 opening a file from memory

2005-02-23 Thread Michel Briand
Hello

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.

Anyway if you explain why you must have your jpeg in memory I can help more.

You probably want to decompress your jpeg. You can rip the loader code if it
quicken your app however.

Regards

Michel

Carsten Haitzler (The Rasterman) a écrit :
> On Wed, 23 Feb 2005 13:14:25 +0100 Antonio Larrosa Jim__nez <[EMAIL 
> PROTECTED]>
> babbled:
> 
> 
>>Hello,
>>
>>I have the contents of a jpeg file in memory and I'd like to do some 
>>operations on it before writing it to disk, so I'd like to open the file 
>>without having to save it to disk, then use imlib_load_image( filename )  and
>>then removing the temporary file.
>>
>>The kernel is of course caching the disk, but if I use imlib2 for its speed, 
>>then I'd prefer not to introduce a temporary file when the file contents are 
>>already loaded in memory. The problem is tht I didn't find how to do it in 
>>the docs.
>>
>>Is there any way to open an image from a memory buffer ?
> 
> 
> unfortunately (for you) we never provided an api to do that. though possible 
> via
> a loader - no loaders support it :( sorry. epeg does support this, BUT it will
> only give you RGB data... :)
> 



---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Imlib2 opening a file from memory

2005-02-23 Thread The Rasterman
On Wed, 23 Feb 2005 13:14:25 +0100 Antonio Larrosa Jim__nez <[EMAIL PROTECTED]>
(Bbabbled:
(B
(B> Hello,
(B> 
(B> I have the contents of a jpeg file in memory and I'd like to do some 
(B> operations on it before writing it to disk, so I'd like to open the file 
(B> without having to save it to disk, then use imlib_load_image( filename )  and
(B> then removing the temporary file.
(B> 
(B> The kernel is of course caching the disk, but if I use imlib2 for its speed, 
(B> then I'd prefer not to introduce a temporary file when the file contents are 
(B> already loaded in memory. The problem is tht I didn't find how to do it in 
(B> the docs.
(B> 
(B> Is there any way to open an image from a memory buffer ?
(B
(Bunfortunately (for you) we never provided an api to do that. though possible via
(Ba loader - no loaders support it :( sorry. epeg does support this, BUT it will
(Bonly give you RGB data... :)
(B
(B-- 
(B- Codito, ergo sum - "I code, therefore I am" --
(BThe Rasterman (Carsten Haitzler)[EMAIL PROTECTED]
$BMg9%B?(B  [EMAIL PROTECTED]
(BTokyo, Japan ($BEl5~(B $BF|K\(B)
(B
(B
(B---
(BSF email is sponsored by - The IT Product Guide
(BRead honest & candid reviews on hundreds of IT Products from real users.
(BDiscover which products truly live up to the hype. Start reading now.
(Bhttp://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
(B___
(Benlightenment-devel mailing list
(Benlightenment-devel@lists.sourceforge.net
(Bhttps://lists.sourceforge.net/lists/listinfo/enlightenment-devel