TJPEGImage doesn't have all same methods as other TGraphic descendants. In particular, it doesn't expose a TCanvas, so you can't modify JPEGs directly. Instead, you need to copy the JPEG into a bitmap, modify that image, and then copy it back into a JPEG. Since all you want to do is resize the image, the copying and modifying can be done in the same step.
However, TJPEGImage also has the Scale property, which you can use to optimise performance if you don't need the full image:
"Use Scale to optimize performance for previewing an image. jsFullSize displays the image as maximum size, whereas jsEight displays an eighth of the image size, but 8 times faster."
Cheers,
David
_______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

