Quote from: Galfar on 31 August 2009, 21:49:38
Just load the file and save it in another format:
uses
ImagingClasses;
var
Img: TSingleImage;
begin
Img := TSingleImage.Create;
Img.LoadFromFile('myjpeg2k.jp2');
Img.SaveToFile('myjpeg.jpg');
....
// if field need to convert
if qr.FieldByName('ext').AsString = 'jp2'
then
begin
Img := TSingleImage.Create;
mem_st := TMemoryStream.Create;
// convert
try
TBlobField(qr.FieldByName('img')).SaveToStream(mem_st);
mem_st.Position := 0;
Img.LoadFromStream(mem_st);
str_file_path := qr.FieldByName('img_name').AsString + '.jpg';
Img.SaveToFile(str_file_path);
finally
mem_st.Free;
Img.Free;
end;
end
Page created in 0.023 seconds with 19 queries.