image formats

Thomas L. Scofield scofield at calvin.edu
Thu Aug 7 13:35:25 CDT 2008


Currently there is this list

     bmp, gif, jpg, jpeg, pbm, pgm, png, ppm, svg, tiff

of file extensions hard-coded into a cell array in imwrite.  These  
comprise a "starter list" of supported image formats and, to some  
extent, acceptable file extensions for the file you write to.  Any  
list we come up with will be somewhat artificial, as the  
GraphicsMagick library allows writing to many more formats than we  
are ever likely to support.  (For a full list see http:// 
www.graphicsmagick.org/www/formats.html).

First, I think this list should be augmented.  I would immediately  
add tif (not new, but an oft-used extension), ras, perhaps psd, eps,  
and jp2.  What do others think about this list?  How about additional  
formats others think important to support?  Ones not yet mentioned  
but that Matlab supports include hdf (it does not appear  
GraphicsMagick includes that one on its list of supported formats),  
ico, pcx, pnm and xwd.

Matlab, as part of its core, I believe, has the function imformats  
whose output looks like

 >> imformats

EXT       ISA     INFO        READ      WRITE     ALPHA  DESCRIPTION
------------------------------------------------------------------------ 
------------------------
bmp       isbmp   imbmpinfo   readbmp   writebmp  0      Windows  
Bitmap (BMP)
cur       iscur   imcurinfo   readcur             1      Windows  
Cursor resources (CUR)
fts fits  isfits  imfitsinfo  readfits            0      Flexible  
Image Transport System (FITS)
gif       isgif   imgifinfo   readgif   writegif  0      Graphics  
Interchange Format (GIF)
hdf       ishdf   imhdfinfo   readhdf   writehdf  0      Hierarchical  
Data Format (HDF)
ico       isico   imicoinfo   readico             1      Windows Icon  
resources (ICO)
jpg jpeg  isjpg   imjpginfo   readjpg   writejpg  0      Joint  
Photographic Experts Group (JPEG)
pbm       ispbm   impnminfo   readpnm   writepnm  0      Portable  
Bitmap (PBM)
pcx       ispcx   impcxinfo   readpcx   writepcx  0      Windows  
Paintbrush (PCX)
pgm       ispgm   impnminfo   readpnm   writepnm  0      Portable  
Graymap (PGM)
png       ispng   impnginfo   readpng   writepng  1      Portable  
Network Graphics (PNG)
pnm       ispnm   impnminfo   readpnm   writepnm  0      Portable Any  
Map (PNM)
ppm       isppm   impnminfo   readpnm   writepnm  0      Portable  
Pixmap (PPM)
ras       isras   imrasinfo   readras   writeras  1      Sun Raster  
(RAS)
tif tiff  istif   imtifinfo   readtif   writetif  0      Tagged Image  
File Format (TIFF)
xwd       isxwd   imxwdinfo   readxwd   writexwd  0      X Window  
Dump (XWD)

It seems like it would be easy to expand the above-mentioned cell  
array to include all of this kind of information, and move it out of  
imwrite to some more publically-viewable area so we can have an  
imformats command.  I don't know where that should be.  Suggestions?

Thomas L. Scofield
--------------------------------------------------------
Associate Professor
Department of Mathematics and Statistics
Calvin College
--------------------------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.cae.wisc.edu/pipermail/octave-maintainers/attachments/20080807/db149d24/attachment.html 


More information about the Octave-maintainers mailing list