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
 Why is there a unicode string problem DXE4

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
w2m Posted - Jun 18 2014 : 11:58:17
It appears there is a problem with JPEG_MarkerList and Unicode... sometimes...
var
  iImage: PAnsiChar;
  iCreator: PAnsiChar;
  iWebsite: PAnsiChar;
  iMisc: PAnsiChar;
  iNote: PAnsiChar;
begin
  iImage := PAnsiChar('Image: Shuttle324');
  iCreator := PAnsiChar('Creator: NASA');
  iWebsite := PAnsiChar('Website: www.NASA.com');
  iMisc :=  PAnsiChar('October, 1997.  All rights reserved.');
  iNote := PAnsiChar('This is a demo image.');
  { Add the JPEG Markers }
  ImageEnView1.IO.Params.JPEG_MarkerList.AddMarker(JPEG_COM,
      iImage, length(iImage));
    ImageEnView1.IO.Params.JPEG_MarkerList.AddMarker(JPEG_COM,
      iCreator, length(iCreator));
    ImageEnView1.IO.Params.JPEG_MarkerList.AddMarker(JPEG_COM,
      iWebsite, length(iWebsite));
    ImageEnView1.IO.Params.JPEG_MarkerList.AddMarker(JPEG_COM,
      iMisc, length(iMisc));
    ImageEnView1.IO.Params.JPEG_MarkerList.AddMarker(JPEG_COM,
      iNote, length(iNote));
{ Set the info label captions}
  InfoImage1.Caption := string(ImageEnView1.IO.Params.JPEG_MarkerList.MarkerData[0]);
  InfoCreator1.Caption := string(ImageEnView1.IO.Params.JPEG_MarkerList.MarkerData[1]);
  InfoWebsite1.Caption := string(ImageEnView1.IO.Params.JPEG_MarkerList.MarkerData[2]);
  InfoMisc1.Caption := string(ImageEnView1.IO.Params.JPEG_MarkerList.MarkerData[3]);
  InfoNotes1.Caption := string(ImageEnView1.IO.Params.JPEG_MarkerList.MarkerData[4]);

Why is there a problem with the first and last captions with Delphi XE4 but not the 2nd and 3rd and 4th captions?



If the captions are filled without JPEG_MarkerList the captions are correct?
{ Set the info }
InfoImage1.Caption := string(iImage); //string(ImageEnView1.IO.Params.JPEG_MarkerList.MarkerData[0]);
InfoCreator1.Caption := string(iCreator);//string(ImageEnView1.IO.Params.JPEG_MarkerList.MarkerData[1]);
InfoWebsite1.Caption := string(iWebsite);//string(ImageEnView1.IO.Params.JPEG_MarkerList.MarkerData[2]);
InfoMisc1.Caption := string(iMisc); //string(ImageEnView1.IO.Params.JPEG_MarkerList.MarkerData[3]);
InfoNotes1.Caption := string(iNote); //string(ImageEnView1.IO.Params.JPEG_MarkerList.MarkerData[4]);



Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
2   L A T E S T    R E P L I E S    (Newest First)
w2m Posted - Jun 19 2014 : 05:08:57
Thanks Nigel.

I fixed the problem by changing length(iImage) to LStrLenA(iImage).
EXIF may not work because it would overwrite existing EXIF values and some fields do not have a corresponding EXIF field like Website.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
xequte Posted - Jun 18 2014 : 19:03:29
Hi Bill

I don't have the code right in front of me, but do you need to null terminate the values?

Also, why not use the standard EXIF fields for this data?



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com