ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 ImageEnView PNG TO JPG

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
save0804 Posted - Nov 07 2023 : 19:42:11
ImageEnView1.IO.LoadFromFile(OpenPictureDialog1.FileName);
ImageEnView1.IO.Params.JPEG_Quality := 95;
ImageEnView1.IO.SaveToFile(OpenPictureDialog1.FileName + '.JPG');


ImageEnView2.IO.LoadFromFile(OpenPictureDialog1.FileName + '.JPG');


I load a PNG file into ImageEnView1, save it as a JPG file, and load the JPG file again into ImageEnView2. How do I directly insert the JPG file into ImageEnView2 without saving and reloading?
3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Nov 08 2023 : 02:27:06
Hi

Are you trying display the image as it will appear as a saved JPEG?

In that case you do need to save it. You could save it to a stream if you don't want to use a temporary file.

Something like:

  ms := TMemoryStream.Create();
  try
    ImageEnView1.IO.SaveToStreamJpeg( ms );
    ms.Position := 0;
    ImageEnView2.IO.LoadFromStreamJpeg( ms );
  finally
    ms.Free();
  end;



Nigel
Xequte Software
www.imageen.com
save0804 Posted - Nov 08 2023 : 01:36:30
If you do this, the png file will still be imported. What I want is to bring a converted jpg file.
xequte Posted - Nov 07 2023 : 21:07:23
Hi

Please use:

ImageEnView1.Assign( ImageEnView2 );

http://www.imageen.com/help/TImageEnView.Assign.html

Nigel
Xequte Software
www.imageen.com