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
 Best way to rotate images?

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
skippix Posted - Sep 16 2022 : 08:34:11
Even though I have EnableAdjustOrientation := True for my TImageMView grid, not all the images are properly oriented.

At the moment, I have a function that allows the user to rotate one/some/all the images in the grid (this function actually rotates the file).

My problem is that I have to reload the entire grid. Is there a way to simply rotate the grid thumbnails without having to reload the grid?

Thanks!
Skip
5   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Sep 21 2022 : 20:40:27
Hi

If your RotateThisJpeg() code uses ImageEnMView.Proc, you should not call UpdateImage() as it will occur internally.

Nigel
Xequte Software
www.imageen.com
skippix Posted - Sep 19 2022 : 04:46:28
Thanks, Nigel! That works perfectly for a single image.

I'm not quite sure about multiple images, though.

I have two lists, one of files to rotate and one of their grid indices. When I use the following code with multiple images selected, the grid only updates the last one on the list.


  for i := 0 to slFilesToRotate.Count-1 do
    begin
      if (TMenuItem(Sender).Tag = 0) then
        RotateThisJPeg270 (slFilesToRotate[i])
      else
        RotateThisJPeg (slFilesToRotate[i]);

      x := StrToInt(slRotatedFileIndexes[i]);
      imgGrid.UpdateImage(x);
    end;


When I embed the above code between imgGrid.LockUpdate and imgGrid.UnlockUpdate, the grid temporarily blanks out. Even though it works, it's not very pretty.

Any ideas as to how I can improve this?

Thanks!

xequte Posted - Sep 19 2022 : 03:19:43
Hi

To update just a single image, use:

http://www.imageen.com/help/TImageEnMView.UpdateImage.html


Nigel
Xequte Software
www.imageen.com
skippix Posted - Sep 16 2022 : 21:56:42
My apologies, I just re-read my question and realize I was not clear.

I have a function that rotates the actual file. I am asking if there is a way to update the grid to show the rotation without having to reload the entire grid? If this isn't clear, I'll create an illustration to show what I'm trying to do.
xequte Posted - Sep 16 2022 : 17:15:20
Hi Skip

EnableAdjustOrientation uses the EXIF data to know whether the image needs to be rotated. If an image does not include the data, it cannot be automatically rotated.

What method are you using to rotate images in the grid?

Nigel
Xequte Software
www.imageen.com