Board index » delphi » jpeg qulity

jpeg qulity


2006-01-26 01:26:54 AM
delphi221
Hello:
I have working with bmp fine, but I have to save this bmp image like jpg I
work with jpeg.pas but the result image not have the same quality to bmp
image, I change PixelFormat, Smoothing and CompressionQuality to 100 but the
result image look like blurred. it is normal? how can I get jpg image with
the same quality of bmp image?
code:
bmp := TBitmap.Create;
jpeg := TJPEGImage.Create;
try
bmp.LoadFromFile('some.bmp');
jpeg.Assign(bmp);
jpeg.SaveToFile(new.jpg');
finally
bmp.Free;
jpeg.Free;
end;
Best regards,
Owen.
 
 

Re:jpeg qulity

Owen writes:
Quote
how can I get jpg image with the same quality of bmp image?
You can't. Jpeg is a lossy format (which explains why it is by magnitudes
smaller than a bitmap).
Jpeg is not suited for every type of image. Eg screenshots are better off
saved as .png while photos are (or should be) fine with jpeg.
--
Ben
 

Re:jpeg qulity

In article <XXXX@XXXXX.COM>, bhoc@tiscali123^H^H^H.ch
says...
Quote
Owen writes:

>how can I get jpg image with the same quality of bmp image?

You can't. Jpeg is a lossy format (which explains why it is by magnitudes
smaller than a bitmap).
Jpeg is not suited for every type of image. Eg screenshots are better off
saved as .png while photos are (or should be) fine with jpeg.

--
Ben

Unless he uses jpeg2000 which has a zero loss method.
 

Re:jpeg qulity

peter writes:
Quote
Unless he uses jpeg2000 which has a zero loss method.
I assumed if he used jpeg2000 he'd have said so. ;-)
But you're correct.
--
Ben
 

Re:jpeg qulity

how can I use the jpeg2000, I use only jpeg.dcu
best regards,
Owen.
"peter" <XXXX@XXXXX.COM>writes
Quote
In article <XXXX@XXXXX.COM>, bhoc@tiscali123^H^H^H.ch
says...
>Owen writes:
>
>>how can I get jpg image with the same quality of bmp image?
>
>You can't. Jpeg is a lossy format (which explains why it is by
magnitudes
>smaller than a bitmap).
>Jpeg is not suited for every type of image. Eg screenshots are better
off
>saved as .png while photos are (or should be) fine with jpeg.
>
>--
>Ben
>

Unless he uses jpeg2000 which has a zero loss method.