Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.

ID: 19723, Enhanced jpeg implementation

by Gabriel Corneanu Email: Anonymous

lossless transformation support for jpeg images; CMYK support; bug fix
Download Details
FTP  download also available
CDN Login Required to Download. (You will be redirected to the login page if you click on the Download Link)
To download this, you must have registered:
A free membership

For Delphi, Version 5.0  to 14.0 3988 downloads
Copyright: No significant restrictions

Size: 1,890,001 bytes
Updated on Sat, 17 May 2014 00:43:20 GMT
Originally uploaded on Sat, 05 Apr 2003 04:13:20 GMT
SHA1 Hash: 10DF92C9D5C760A87A5068379488BE0E7C339D5F
MD5 Hash: 2E1F9D574370FEE8BF4B19DE4F2FA1BF

    Explore the files in this upload

Gabriel Corneanu

The source is published on sourceforge.

Old description.
This unit contains a new jpeg implementation (based on Delphi original)
-fixed bug accessing one pixel height picture
-added lossless transformation support for jpeg images (based on Thomas G. Lane C library - visit )
-added CMYK support (read only)
-compiled for D5-2010 AND BCB5-6
-CMYK to RGB fast MMX conversion (not for Delphi5, lack of MMX ASM)
(fallback to simple pascal implementation if not available)
-fixed bug in Delphi 5 ASM (CMYK to RGB function)

You only need the jpeg.dcu file; it can be copied to program directory or to the LIB directory.
I generated obj and hpp files for use with CBuilder 5 and 6 also.

This is what you need to use it:
- this is just an enum
TJpegTransform = (
jt_FLIP_H, { horizontal flip }
jt_FLIP_V, { vertical flip }
jt_TRANSPOSE, { transpose across UL-to-LR axis }
jt_TRANSVERSE, { transpose across UR-to-LL axis }
jt_ROT_90, { 90-degree clockwise rotation }
jt_ROT_180, { 180-degree rotation }
jt_ROT_270 { 270-degree clockwise (or 90 ccw) }
- procedure Crop(xoffs, yoffs, newwidth, newheight: integer);
this method is cropping the image
- procedure Transform(Operation: TJpegTransform);
this method is applying the specified transformation; read the transupp.h comments about limitations
(my code is using crop option)
- property IsCMYK: boolean read FIsCMYK;
this will indicate if the last jpeg image loaded is CMYK encoded
- property InverseCMYK: boolean read FInverseCMYK write SetInverseCMYK;
if set (default, because I could only find this kind of images), the CMYK image is decoded with inversed CMYK values (I read that Photoshop is doing this).

Fixed error with grayscale images (D2010 only!).

   Latest Comments  View All Add New

Move mouse over comment to see the full text

Could not retrieve comments. Please try again later.

Server Response from: ETNACDC04