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
 Params modification
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

eballinas

Mexico
37 Posts

Posted - Oct 12 2022 :  14:05:55  Show Profile  Reply
I have tried to modify the parameters of a TIFF image in different parts of my code. I have seen following the debugger, the param modification is done, executed. But, when I save it to a file or a database, the size is the same that the original images.
What am I doing wrong?

xequte

38608 Posts

Posted - Oct 13 2022 :  00:21:44  Show Profile  Reply
Hi

Please email me for an update that adds an OnGetSaveParams event, e.g.

...
fDBMultiBitmap.OnGetSaveParams := DBMultiBitmapGetSaveParams;
...

procedure Tfmain.DBMultiBitmapGetSaveParams(Sender: TObject; const Filename: string; Params: TIOParams);
begin
  // Use JPEG compression when blob is save to database (Assumes ImageFormat is ioTIFF)
  Params.TIFF_Compression := ioTIFF_JPEG;
end;


Nigel
Xequte Software
www.imageen.com
Go to Top of Page

eballinas

Mexico
37 Posts

Posted - Oct 13 2022 :  11:03:51  Show Profile  Reply
I just send an email. But, I would like to know more about the problem. Why the params were not updating?
Go to Top of Page

xequte

38608 Posts

Posted - Oct 13 2022 :  16:06:11  Show Profile  Reply
Hi

This has been sent. Please check your Spam folder if it has not arrived.

The params are not set, because they need to be specified before the image is saved to the database blob.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

eballinas

Mexico
37 Posts

Posted - Oct 14 2022 :  09:32:13  Show Profile  Reply
var Params: TIOParams
Is there an error here?
Go to Top of Page

xequte

38608 Posts

Posted - Oct 14 2022 :  16:03:46  Show Profile  Reply
The code should be:

...
fDBMultiBitmap.OnGetSaveParams := DBMultiBitmapGetSaveParams;
...

procedure Tfmain.DBMultiBitmapGetSaveParams(Sender: TObject; const Filename: string; Params: TIOParams);
begin
  // Use JPEG compression when blob is save to database (Assumes ImageFormat is ioTIFF)
  Params.TIFF_Compression := ioTIFF_JPEG;
end;


Note: The OnGetSaveParams is only called if the image needs to be "saved" to the database. If it does not need to be converted it will just be added to the database without saving.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

eballinas

Mexico
37 Posts

Posted - Oct 14 2022 :  17:00:50  Show Profile  Reply
Can you explain me what do you mean with "Saved"?
Please help me...
This is very important.
Go to Top of Page

xequte

38608 Posts

Posted - Oct 16 2022 :  20:44:36  Show Profile  Reply
Please show me the code you use for adding images to the database.



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