'pngread' and 'jpgread' usage?

Søren Hauberg soren at hauberg.org
Mon Jun 8 09:48:21 CDT 2009


man, 08 06 2009 kl. 10:42 -0400, skrev Przemek Klosowski:
> to hear from users about the usage of 'pngread', 'jpgread', and the
>    corresponding 'write' functions. Does anybody actually use these
>    functions? I'm considering removing them in the future as they require
>    external libraries, but I don't see them adding any value as the
>    'imread' and 'imwrite' functions should cover the same use-cases.
> 
> It looks like I am going to ask a stupid question, but if
> im{read,write} read the png/jpeg images, don't they need the same
> external libraries?  

You would think so, but actually they don't. im{read,write} use the
GraphicsMagick library whereas the png/jpg functions use 'libjpeg' and
'libpng'.

> Of course having im* service all the formats is preferable to
> one-routine-per-format, so that alone is a good reason to drop 
> {png,jpg}*() routines.

I agree. However, it might be that some people have use-cases that
require the png/jpg functions. I can't think of such use-cases, but
that's why I'm asking :-)

Søren



More information about the Help-octave mailing list