You've already forked lazarus-ccr
fpexif: Add AddOrReplaceTagByID and ..ByName methods to TExifData.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8773 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -345,6 +345,10 @@ begin
|
||||
CheckTrue(lTag <> nil, 'Tag "ExifImageHeight" not found for writing');
|
||||
lTag.AsInteger := 267;
|
||||
|
||||
lTag := imgInfo.ExifData.AddTagByName('EXIF.Artist');
|
||||
Checktrue(lTag <> nil, 'Tag "EXIF.Artist" not found for writing');
|
||||
lTag.AsString := 'fpexif-artist';
|
||||
|
||||
// Save to file;
|
||||
// Takes the image data from WorkFile_WithExif, replaces its EXIF with the
|
||||
// current EXIF structure and writes to WorkFile_NoExif.
|
||||
@ -422,6 +426,10 @@ begin
|
||||
CheckTrue(lTag <> nil, 'Tag "ExifImageHeight" not found');
|
||||
CheckEquals(267, lTag.AsInteger, 'Value mismatch of tag "ExifImageHeight"');
|
||||
|
||||
lTag := ImgInfo.ExifData.TagByName['EXIF.Artist'];
|
||||
CheckTrue(lTag <> nil, 'Tag "EXIF.Artist" not found');
|
||||
CheckEquals('fpexif-artist', lTag.AsString, 'Value mismatch of tag "EXIF.Artist"');
|
||||
|
||||
// No thumbnail in dest file!
|
||||
|
||||
finally
|
||||
|
@ -496,6 +496,10 @@ begin
|
||||
CheckTrue(lTag <> nil, 'Tag "ExifImageHeight" not found for writing');
|
||||
lTag.AsInteger := 150;
|
||||
|
||||
lTag := imgInfo.ExifData.AddTagByName('EXIF.Artist');
|
||||
Checktrue(lTag <> nil, 'Tag "EXIF.Artist" not found for writing');
|
||||
lTag.AsString := 'fpexif-artist';
|
||||
|
||||
// Save to file;
|
||||
// Takes the image data from WorkFile_WithExif, replaces its EXIF with the
|
||||
// current EXIF structure and writes to WorkFile_NoExif.
|
||||
@ -558,6 +562,10 @@ begin
|
||||
CheckTrue(lTag <> nil, 'Tag "ExifImageHeight" not found for reading');
|
||||
CheckEquals('150', lTag.AsString, 'Value mismatch of tag "ExifImageHeight"');
|
||||
|
||||
lTag := ImgInfo.ExifData.TagByName['EXIF.Artist'];
|
||||
CheckTrue(lTag <> nil, 'Tag "EXIF.Artist" not found');
|
||||
CheckEquals('fpexif-artist', lTag.AsString, 'Value mismatch of tag "EXIF.Artist"');
|
||||
|
||||
finally
|
||||
imgInfo.Free;
|
||||
end;
|
||||
|
Reference in New Issue
Block a user