[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
merging imread and imwrite
From: |
John W. Eaton |
Subject: |
merging imread and imwrite |
Date: |
Mon, 28 Jan 2008 17:56:10 -0500 |
I'd like to get imread and imwrite functions in Octave. I see that
there are functions in Octave Forge, but they will need some work.
The core of imread is
## divert jpegs and pngs to "jpgread" and "pngread"
if ( file_in_loadpath("jpgread.oct") &&
(strcmp(ext, ".JPG") || strcmp(ext, ".JPEG")) )
varargout{1} = jpgread(fn);
break
endif
if ( file_in_loadpath("pngread.oct") && (strcmp(ext, ".PNG")) )
varargout{1} = pngread(fn);
break
endif
## alternately, use imagemagick
if ( file_in_loadpath("__magick_read__.oct") )
[varargout{1:nargout}] = __magick_read__(fn, varargin{:});
break
endif
Why not use ImageMagick to do all the work instead of special-casing
jpg and png files?
Also, is there some other graphics library that we could wrap to
handle reading and writing image files that might be better, or is
ImageMagick a good choice?
I see that the Matlab docs claim the following formats are handled:
imead imwrite
----- -------
bmp bmp
cur
gif gif
hdf hdf
ico
jpg jpg
pbm pbm
pcx pcx
pgm pgm
png png
pnm
ppm ppm
ras ras
tif tif
xwd xwd
Comments?
jwe
- merging imread and imwrite,
John W. Eaton <=
- Re: merging imread and imwrite, Søren Hauberg, 2008/01/29
- Re: merging imread and imwrite, John W. Eaton, 2008/01/30
- Re: merging imread and imwrite, John W. Eaton, 2008/01/31
- Re: merging imread and imwrite, David Bateman, 2008/01/31
- Re: merging imread and imwrite, Thomas Treichl, 2008/01/31
- Re: merging imread and imwrite, John W. Eaton, 2008/01/31
- Re: merging imread and imwrite, Søren Hauberg, 2008/01/31
- Re: merging imread and imwrite, Thomas Treichl, 2008/01/31