JPEG Image Support 
Description

Support to read, display, and store all versions JPEG images. Images may be displayed in color or grayscale. Performace is insurmountable!

Files

16million.jpg Sample JPEG file.
LibJPEG.POL
LibJPEG.PRJ
LibJPEG.ST
Source files
LibJPEG.DLL Support DLL
LibJPEG.SLL
LibJPEG.SML
JPEG support library and
library source.
LibJPEG Doit.txt Demo expressions

Requirements

VS/VSE 3.1.2 for Win32s. Requires the following libraries:
 
ARBase.sll Alejandro Reimondo base components SLL 
ARPatchs.sll Patches and bug fixes
ARAddins.sll SelfDefinedStructures support
ARMisc.sll  Misc. OS Support
PictBase.sll Image Framework

Installation

Ensure the SLL and DLL libraries above are installed in the VS/VSE library directory or a directory that appears in the Windows PATH statement. To load all needed libraries you may evaluate the following in a workspace:

#('ARBase' 'ARPatchs' 'ARAddIns' 'ARMisc' 'PictBase' 'LibJPEG' )    do:[:lib|SmalltalkLibraryBinder bindTo:lib].

Examples

Open the following in a workspace and evaluate the sample expressions:

"Load an image file and display at screen origin."
image := JPEGImage fromUser.
image displayWith: Display pen.

"Save image"
image saveAs: 'example.jpg'.

"GrayScale decompression"
image := JPEGImage fromUser.
dib := image decompressGrayDIB.
image release.
dib displayAt: 0@0.

Additional sample expressions may be found in the file LibJPEG Doit.txt. Please note that evaluating the following from the file yields an error...

JPEGImage saveDIB: (DIB fromFile: '256.rle') as: 'example.jpg' quality: nil.

The problem is that the file 256.rle is an RLE compressed DIB image and is unsupported when saving JPEG. Also, evaluating the expression

JPEGImage saveDIB: TIFFImage fromUser asDIB as: 'example.jpg' quality: nil.

brings up a warning dialog if 16millzw.tif is chosen. The dialog reads "invalid TIFF directory; tags are not sorted in ascending order". This is because the image 16millzw.tif has been saved in a non-standard way and when reading it the user is warned of this incompatibility.

Contact

Alejandro F. Reimondo
Amenabar 3476 Piso: 2 Dto: B.
Ciudad de Buenos Aires.
Argentina.
Tel: (54)-1-703-5586.
aleReimondo@sugarWeb.com
http://www.sugarweb.com


Links to:
The ObjectShare web site
VisualSmalltalk Product Support
ObjectShare's Online Documentation Site