|
-
Sep 30th, 2019, 10:50 AM
#20
Re: JPEG Auto Rotate Picture Box
The function could certainly be better designed, but I don't think a missing exif tag is the problem: If pi IsNot Nothing deals with that. But if I were writing the Function now I would leave Image.FromFile out and pass the Image as an argument instead of the file name. Image.FromFile would belong a separate Sub or Function, where it should get some extra care such as checking the file extension first (*.jpg, *.jpeg etc.) and Try...Catch to protect against an incorrect file format. BB
[edit]I just realized I was looking at the wrong code. You added If pi IsNot Nothing yourself, and I agree it's better.
Last edited by boops boops; Sep 30th, 2019 at 08:41 PM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|