Lossless Jpeg Functions lazarus / 39-Graphics ---------------------------------------------------------------------- sfeinst · 2015-03-06 18:21 I'm looking for the ability to perform lossless jpg functions (like crop and rotation).  Does anyone know of a library that will work with Lazarus/Free Pascal? Thanks for any information ---------------------------------------------------------------------- wp · 2015-03-30 19:12 FreeImage (http://freeimage.sourceforge.net/): Comes with a Delphi wrapper which could work with fpc as well. Not tested by myself, though... Excerpt from their manual: "FreeImage_JPEGTransform() OperationDescriptionFIJPEG_OP_NONENo transformation (nothing is done)FIJPEG_OP_FLIP_HHorizontal flipFIJPEG_OP_FLIP_VVertical flipFIJPEG_OP_TRANSPOSETranspose across upper-left to lower-right axisFIJPEG_OP_TRANSVERSETranspose across upper-right to lower-left axisFIJPEG_OP_ROTATE_9090-degree clockwise rotationFIJPEG_OP_ROTATE_180180-degree rotationFIJPEG_OP_ROTATE_270270-degree clockwise rotation (or 90-degree ccw)" ---------------------------------------------------------------------- sfeinst · 2015-03-30 19:28 Thanks, I'll take a look at it. ---------------------------------------------------------------------- Mike.Cornflake · 2015-04-01 23:08 Imagemagick may also be of use... http://www.imagemagick.org/Usage/formats/#jpg_lossless There are fpc bindings, but I've never used them.  Usually just ship the binary with my app and fire off commands with TProcess. ---------------------------------------------------------------------- sfeinst · 2015-04-02 00:23 Quote from: Mike.Cornflake on April 02, 2015, 01:08:50 amImagemagick may also be of use... http://www.imagemagick.org/Usage/formats/#jpg_lossless There are fpc bindings, but I've never used them.  Usually just ship the binary with my app and fire off commands with TProcess. I am using ImageMagick that way now (for resizing, not jpeg lossless), but wanted a Pascal way to do it.  I forgot about the bindings.  That may be the better option. Thanks. ---------------------------------------------------------------------- sfeinst · 2015-04-02 00:32 Actually, just looked.  IM does not do lossless rotations of jpeg directly.  I would have to use the jpegtrans app to do it.  I don't think there are bindings for that, though I will look for bindings for libjpeg which comes with jpegtrans.