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
 TImageEnMView.MIO.Params[i].JPEG_Quality

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
aleatprog Posted - Apr 04 2019 : 12:28:06
Sorry, do you have additional information about how to change the JPEG quality in TImageEnMView?

In the following example, if JPEG quality got the value 10 or 100, the image quality and size won't change. There should be missing something, but I didn't found a hint in the manual or in the examples.


  for i := 0 to TImageEnMView.MultiSelectedImagesCount - 1 do
  begin
    TImageEnMView.MIO.Params[i].JPEG_Quality := 80;
    TImageEnMView.GetTIEBitmap(i).Write('c:\temp\test_' + IntToStr(i + 1) + '.jpg');
    TImageEnMView.ReleaseBitmap(i);
  end;
3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Apr 07 2019 : 05:47:20
Hi

You should not call SetImage in your code, instead enable the second parameter of ReleaseBitmap:

ImageEnMView1.ReleaseBitmap( i, TRUE );

https://www.imageen.com/help/TImageEnMView.ReleaseBitmap.html


Also, set the params via:

ImageEnMView1.Params[i].TIFF_Compression := ioTIFF_G4FAX;

Also, see:

https://www.imageen.com/help/TImageEnMIO.DuplicateCompressionInfo.html

Nigel
Xequte Software
www.imageen.com
aleatprog Posted - Apr 05 2019 : 16:31:19
Thank you Nigel, I tried both ways and both work fine.

I tried to use the bmp object approach also with multipage TIFF. The following code created an access violation:

bmp := TImageEnMView.GetTIEBitmap(i);
bmp.Resample(Round(bmp.Width*0,5), Round(bmp.Height*0,5), rfLanczos3, True, True);
bmp.ParamsEnabled := True;
bmp.Params.TIFF_Compression := ioTIFF_G4FAX;
TImageEnMView.SetImage(i, bmp);
TImageEnMView.ReleaseBitmap(i);
TImageEnMView.MIO.SaveToFileTIFF(c:\temp\test.tif, True);


Which approach would you suggest in order to resize and convert to BW more than one bitmap and then save them all as multipage TIFF with G4 compression?
xequte Posted - Apr 04 2019 : 19:18:30
Hi

Unfortunately, in that situation, the TIEBitmap you are saving does not have access to the params, either use GetImageToFile:

https://www.imageen.com/help/TImageEnMView.GetImageToFile.html

Or assign the MView bitmap to bmp object, and then enable the params, e.g.

bmp := TImageEnMView.GetTIEBitmap(i);
bmp.ParamsEnabled := True;
bmp.JPEG_Quality := 80;
bmp.Write('c:\temp\test_' + IntToStr(i + 1) + '.jpg');
TImageEnMView.ReleaseBitmap(i);

Nigel
Xequte Software
www.imageen.com