• Welcome to Vampyre Imaging Library Forum. Please login or sign up.
 

Post reply

Other options

Shortcuts: ALT+S save/post or ALT+P preview

Topic summary

Posted by bunak
 -  2 September 2009, 13:10:09
Sorry.
I find ImagingExtras.pas and all work correctly.

Thanks
Posted by bunak
 -  2 September 2009, 12:58:41
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');
....


I am also tried convert image by this method. And in result also get the black square in jpeg-file.

My be this is because I disable unit ImagingExtras in Imaging unit. I do it because Delphi 7 can not find ImagingExtras.dcu file. ??? And i realy can not find a ImagingExtras files in 0.26.2 package, that was uploaded from hear !!
Posted by bunak
 -  2 September 2009, 12:17:29
I need convert jpeg2000 for a blob field. After converted the image, it need save to file. And I do it like this

// 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


In result - image is a black square.
Help me please.
Posted by bunak
 -  1 September 2009, 12:25:37
Thank you
Posted by Galfar
 - 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');
....
Posted by bunak
 - 31 August 2009, 19:48:43
Hi, all
which function and how i need use it for convert image from jpeg2000 to jpeg. ???
Thanks
SMF spam blocked by CleanTalk