[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: merging imread and imwrite
From: |
John W. Eaton |
Subject: |
Re: merging imread and imwrite |
Date: |
Sat, 02 Feb 2008 00:32:38 -0500 |
On 1-Feb-2008, Daniel J Sebald wrote:
| Looking at "imread" I notice that JPEG and PNG files are actually
| handled separate from ImageMagick, via pngread() and jpgread(). So
| if there is a bug, it is in pngread().
By using Magick++ to read all image files, I would hope to eliminate
most problems like this.
| I see that pngread() is a C++ file. I typed "type pngread" and
| Octave spits out all the ASCII characters in computer hieroglyphics.
| Is it supposed to do that for .cc functions?
No, that's a bug. Thanks for reminding me about it.
| Anyway, as it currently stands, it appears that ImageMagick isn't
| all that would be needed for the port you are discussing. Two of
| the significant formats are handled differently. Does that have any
| significance to the discussion?
They don't have to be handled differently. We can use Magick++ to
read png and jpeg files, though I think it ultimately uses libpng and
libjpeg to actually read them.
I think the original intent of the imread code was to work for jpeg or
png files even if Magick++ libraries were not installed, but the logic
there seems a bit backward. I think I would have had it try Magick++
first.
In any case, I think I'd like to just use Magick++ to read and write
image files when we move this code from the Octave Forge image package
to Octave.
jwe
Re: merging imread and imwrite, Michael Goffioul, 2008/02/01