Home > Back-end >  ImageEN control changes tif file attributes, urgent need! Urgent need! Urgent need!
ImageEN control changes tif file attributes, urgent need! Urgent need! Urgent need!

Time:10-01

I want to modify a tif image attributes: width, height (single to: pixels), and horizontal resolution, mainly is the three attributes, I installed the third-party controls ImageEN, able to read and modify the properties of the tif image, my implementation code is as follows (Delphi7) :
(the most simple, assuming tif image is only one page, change its width and height)
Var
Tags: TIETIFFHandler;
SImgFileName: String;
The begin
Tags:=TIETIFFHandler. Create;
SImgFileName:='F: \ 200. Tif';
Tags. ReadFile (sImgFileName);
Tags. The SetValue (0, 256, ttLong, 2048);
Tags. The SetValue (0, 257, ttLong, 2418);
Tags. The WriteFile (sImgFileName);
end;
The code is simple, and can change the properties implementation purposes, from (1728196) is modified to 8 (2048241), but the problem is that, after I modify success and save, then play the tif image, the image will appear on the right part of the black area, feeling that with the increase of the width of the size, the left is the original image content, this is how to return a responsibility? Need to how to fix it?
Hope your help

CodePudding user response:

You modify the size of the reproduction
  • Related