Delphi Save JPeg with comments

Discussions on GFL SDK, the graphic library for reading and writing graphic files

Moderators: XnTriq, helmut, xnview

marcp
Posts: 2
Joined: Wed Sep 14, 2005 10:53 pm

Delphi Save JPeg with comments

Post by marcp »

Hello,

I am trying to embed comments in a jpeg file. I have tried 2 ways but windows doesn't see a comment associated with either. I can't see it in photoshop either. To complicate matters, comments put in with photshop aren't visible by windows explorer and vice versa.

Here is some code:
procedure TImageViewForm.miSaveasClick(Sender: TObject);
var
Params: TGFL_save_Params;
begin
gflGetDefaultSaveParams( Params);
Params.FormatIndex := gflGetFormatIndexByName( 'jpg' );
Params.Quality := 100;
gflSaveBitmap( 'c:\temp\test.jpg', gfl_bmp, Params );
gflJPEGSetComment( 'c:\temp\test.jpg', 'testing' );
end;

I've also tried Params.comment := 'bla', with the same result.

Can someone please explain how jpeg comments should work?

thanks

Marc Pelletier
Goldak Airborne Surveys
User avatar
xnview
Author of XnView
Posts: 43132
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Delphi Save JPeg with comments

Post by xnview »

marcp wrote: I am trying to embed comments in a jpeg file. I have tried 2 ways but windows doesn't see a comment associated with either. I can't see it in photoshop either. To complicate matters, comments put in with photshop aren't visible by windows explorer and vice versa.

Here is some code:
procedure TImageViewForm.miSaveasClick(Sender: TObject);
var
Params: TGFL_save_Params;
begin
gflGetDefaultSaveParams( Params);
Params.FormatIndex := gflGetFormatIndexByName( 'jpg' );
Params.Quality := 100;
gflSaveBitmap( 'c:\temp\test.jpg', gfl_bmp, Params );
gflJPEGSetComment( 'c:\temp\test.jpg', 'testing' );
end;
Do you see the comment in XnView?
I've also tried Params.comment := 'bla', with the same result.
???? There is no field comment in GFL_SAVE_PARAMS
Pierre.