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
 exif properties
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

eballinas

Mexico
37 Posts

Posted - Jun 24 2019 :  16:02:56  Show Profile  Reply
I read a database blob field. The exif properties are present.
When I try to save this image to a file, the exif properties are not present...


     fotoprueba:=TIEDBBitmap.Create();
     fotoprueba.ParamsEnabled:=true;
     fotoprueba.DataSource:=extraefotods;
     fotoprueba.ImageBlobField:='foto';
     mifoto:=TImageEnView.Create(self);
     with mifoto do
     begin
          setexternalbitmap(fotoprueba);
          datoscasa:=
          IO.Params.EXIF_GPSLatitude_Str+';'+
          IO.Params.EXIF_GPSLongitude_Str+chr(13)+chr(10)+
          IO.params.EXIF_GPSLatitude.ToString+';'+
          IO.Params.EXIF_GPSLongitude.ToString;
          datospersonales:=cuvsalida+','+nombrebeneficiario+chr(13)+chr(10)+
               etapapedida;
          mifoto.Proc.TextOut(align_text_left,align_text_bottom,
          datoscasa,'Arial', 12, clRed, [fsBold]);
          Proc.TextOut(align_text_right,align_text_bottom,
          datospersonales,'Arial', 12, clRed, [fsBold]);
//	     if not IO.Params.EXIF_HasEXIFData then
 //  	          IO.Params.EXIF_HasEXIFData:=true;
//          IO.Params.EXIF_GPSLatitude:=
//   	          StrToFloat(IO.params.EXIF_GPSLatitude.ToString);
//          IO.Params.EXIF_GPSLongitude:=
//   	          strtofloat(IO.params.EXIF_GPSLatitude.ToString);
     end;
     mifoto.IO.SaveToFileJpeg(cuvsalida+' '+nombrebeneficiario+'.jpg');
     mifoto.IO.InjectJpegEXIF(cuvsalida+' '+nombrebeneficiario+'.jpg');
     mifoto.Free;
     fotoprueba.Free;
    end;

xequte

38608 Posts

Posted - Jun 24 2019 :  22:44:37  Show Profile  Reply
Hi

Firstly, if you are using a TImageEnView do not set of ParamsEnabled = true (let TImageEnView.IO handle the Params, or don't use a TImageEnView at all).

Secondly, you do not need InjectJpegEXIF, as saving to JPEG will always include the EXIF data.


Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: