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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 TImageEnMView.GetImageToFile
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

wesleybobato

Brazil
367 Posts

Posted - Mar 12 2016 :  10:18:52  Show Profile  Reply
Hi Nigel.

Please Add the method
fImageEnIO.Params.UpdateEXIFThumbnail();

in the Unit iemview


procedure TImageEnMView.GetImageToFile(idx: Integer; const FileName: WideString);
var
  bmp: TIEBitmap;
begin
  fImageEnIO.Params.Assign( GetImageEnMIO.Params[idx] );
  bmp := GetTIEBitmap(idx);
  try
    fImageEnIO.AttachedIEBitmap := bmp;
    fImageEnIO.Params.UpdateEXIFThumbnail(); //Here Update Thumbnail.
    fImageEnIO.SaveToFile(FileName);
  finally
    ReleaseBitmap(idx, false);
  end;
end;


Thank you very much

w2m

USA
1990 Posts

Posted - Mar 12 2016 :  11:24:44  Show Profile  Reply
This method is already present:

TIOParams.UpdateEXIFThumbnail

Declaration
procedure UpdateEXIFThumbnail(Width: integer = 160; Height: integer = -1; ResampleFilter: TResampleFilter = rfTriangle);

Description
Updates the EXIF_Bitmap property with the content of current image.
You should call this method just before saving a JPEG so the thumbnail is consistent with the saved image.

Parameter Description

Width Width of the thumbnail.
Height Height of the thumbnail.
ResampleFilter Interpolation filter to use when resampling.

Example
ImageEnView1.IO.LoadFromFile('C:\input.jpg');
ImageEnView1.Proc.Negative;
ImageEnView1.IO.Params.UpdateEXIFThumbnail;
ImageEnView1.IO.SaveToFile('D:\output.jpg');

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

wesleybobato

Brazil
367 Posts

Posted - Mar 12 2016 :  13:09:37  Show Profile  Reply
Hi William

Thank you very much I was actually with a problem in a thread
I my project.

Best regards.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: