| 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 |
| 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 |
#('ARBase' 'ARPatchs' 'ARAddIns' 'ARMisc' 'PictBase' 'LibJPEG' ) do:[:lib|SmalltalkLibraryBinder bindTo:lib].
"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.
Links to:
The
ObjectShare web site
VisualSmalltalk
Product Support
ObjectShare's
Online Documentation Site