Displaying GIF, PNG and JPG images

Chris Double chris at double.co.nz
Mon Jul 27 09:35:57 UTC 2009


webBrowser spawns an external program to convert GIF and JPG images to
Sun raster format before displaying them. I couldn't find the programs
it spawns to install on Linux so I converted the code to use 'convert'
from Image Magick. Using this you can display PNG, GIF and JPG images
from an imageMorph. With a copied imageMorph as the receiver:

  setImage: ui2Image copyFromPNGFile: '/path/to/foo.png'

Unfortunately this doesn't yet work from the web browser to display
images in web pages on Linux due to a crash in an X11 routine. I'll
look into that.

I put a patch with these changes in the 'webbrowser' branch of
git://github.com/doublec/self.git if anyone wants to use it.

Chris.
-- 
http://www.bluishcoder.co.nz



More information about the Self-interest mailing list