ViperDriver35
New Member
- Joined
- Mar 18, 2018
- Messages
- 7
Hello,
I have searched the internet and these forums pretty extensively trying to come up with an answer to my question. Essentially, I am trying to take an image with an aspect ratio other than 1:1 and crop it to an 8 inch by 8 inch size. I have found that 72 points should correspond to 1 inch but in practice this does not seem to be working. Here is the VBA code I am currently using:
With shp
Width = .Width
Height = .Height
TCrop = Width - Height
Hcrop = TCrop / 2
End With
With .PictureFormat
.CropLeft = Hcrop
.CropTop = 0
.CropBottom = 0
.CropRight = Hcrop
End With
I am trying to crop 1/2 of the excess image from each side of the picture. To me, this code should accomplish it but it is not delivering a final image with a 1:1 aspect ratio. Additionally, it is not delivering consistent results from pictures with different aspect ratios (i.e. 16:9 vs 4:3 do not end up with the same aspect ratio after cropping).
I would appreciate any input on this as I have run out of troubleshooting ideas myself. Thank you!
I have searched the internet and these forums pretty extensively trying to come up with an answer to my question. Essentially, I am trying to take an image with an aspect ratio other than 1:1 and crop it to an 8 inch by 8 inch size. I have found that 72 points should correspond to 1 inch but in practice this does not seem to be working. Here is the VBA code I am currently using:
With shp
Width = .Width
Height = .Height
TCrop = Width - Height
Hcrop = TCrop / 2
End With
With .PictureFormat
.CropLeft = Hcrop
.CropTop = 0
.CropBottom = 0
.CropRight = Hcrop
End With
I am trying to crop 1/2 of the excess image from each side of the picture. To me, this code should accomplish it but it is not delivering a final image with a 1:1 aspect ratio. Additionally, it is not delivering consistent results from pictures with different aspect ratios (i.e. 16:9 vs 4:3 do not end up with the same aspect ratio after cropping).
I would appreciate any input on this as I have run out of troubleshooting ideas myself. Thank you!