Board index » cppbuilder » TImage and TJPEGimage...
qyte
![]() CBuilder Developer |
TImage and TJPEGimage...2005-04-30 07:45:31 PM cppbuilder109 the following code: jp->Assign(Image1->Picture->Graphic); jp->Compress(); Image2->Picture->Assign(jp); jp is a TJPEGImage that is global. the problem is that image2 displays exactly the same image as Image1. whereas in the following code that does not happen: jp->Assign(Image1->Picture->Graphic); jp->Compress(); jp->SaveToFile("1.jpg"); Image2->Picture->LoadFromFile("1.jpg"); why isn't there a LoadFromStream method in TPicture???? Is There Something i am doing wrong? Just Something else the TJPEGImage's GrayScale Property is set to true and this is how i know if the code will work. Here is what i do inside the contructor of Form1: jp=new TJPEGImage(); jp->GrayScale=true; jp->CompressionQuality=50; |