kimgio + kfile-plugin for SGI images (*.rgb, *.rgba, *.bw, *.sgi) [which mimetype?]

Melchior FRANZ mfranz at kde.org
Tue Mar 9 11:47:57 GMT 2004


I'd like to ask for permission to commit an kimgio module for SGI images.
These are a standard for 3D graphics textures and can be found on most
Unix/Linux workstations[1]. The module has no dependencies and supports
reading and writing[2] uncompressed and RLE encoded images. Only a few, mostly
obsolete formats aren't supported yet, like 1-dimensional(!) images.
(I'd need some example files to implement that.)

http://www.iana.org/assignments/media-types/image/ doesn't mention a
mimetype, but http://www.utoronto.ca/ian/books/html4ed/appb/mimetype.html
suggests:

  image/rgb
  image/x-rgb
  image/x-sgi-bw
  image/x-sgi-rgba

They all describe exactly the same format. The extensions "*.rgba" and "*.bw"
are only used to indicate the color depth. I suggest to use "image/rgb".
Should the other mimetypes be considered somehow, for example by adding
additional *.kimgio or mimetypes/image files for each? Anything else to
consider?


I would add/*modify these files:

  *kdelibs/kio/magic
   kdelibs/kimgio/rgb.{cpp,h,kimgio}
   kdelibs/mimetypes/image/rgb.desktop
   kdegraphics/kfile-plugins/rgb/Makefile.am
   kdegraphics/kfile-plugins/rgb/kfile_rgb.{cpp,h}


/// file: kdelibs/mimetypes/image/rgb.desktop
[Desktop Entry]
Encoding=UTF-8
Type=MimeType
MimeType=image/rgb
Icon=image
Patterns=*.rgb;*.RGB;*.rgba;*.RGBA;*.bw;*.BW;*.sgi;*.SGI
Comment=SGI Image
Comment[de]=SGI-Bild


/// file: kdelibs/kimgio/rgb.kimgio
[Image Format]
Type=RGB
Header=^\x01\xda[\x00|\x01][\x01|\x02][\x01|\x02|\x03]
Name=SGI Image
Name[de]=SGI-Bild
Read=true
Write=true
Suffices=rgb,RGB,rgba,RGBA,bw,BW,sgi,SGI
Mimetype=image/rgb
Library=kimg_rgb.la

m.



[1] for example: FlightGear, mesa-demos, tuxracer, tux_aqfh, tuxkart
[2] of course, writing defaults to normal RLE; uncompressed writing
    is commented out and can be removed later; I'm working on what
    GIMP calls "aggressive RLE" writing




More information about the kde-core-devel mailing list