Results 1 to 15 of 15
  1. #1
    GMcC is offline Novice
    Windows 10 Office 365
    Join Date
    Oct 2020
    Posts
    6

    Rotate linked photos in forms

    I have approximately 500 photos (.jpg) displayed in forms which are linked to a server. For some reason, the photos are rotated 90° the from original.



    It will take forever to change the format and relink all the photos manually. Is there any way to edit these in the form to the original orientation?

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Its a very common problem, particularly with JPGs
    Anyway, yes there is a solution - have a look at my example app: Get Geolocation From Photos
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  3. #3
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    For some reason, the photos are rotated 90° the from original
    What are you using to display the images, an image control? By linked I assume they aren't coming from Access tables as attachments. Did you view them in File Explorer and that is what you're using to determine that they are rotated? If so, first rebuild the icon cache to ensure that isn't the issue - switch to some other view such as 'details' and then back to icons and see if they're the same. It is true that it is a common problem, but it can be caused by using portrait orientation in a camera (which will automatically correct for camera playback display but Access won't) or it can be due to File Explorer icon cache being out of sync.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    GMcC is offline Novice
    Windows 10 Office 365
    Join Date
    Oct 2020
    Posts
    6
    I'm using a linked excel table in access with hyperlinks to the pictures. They're saved on the server in .jpg format in portrait orientation. The pictures appear rotated in access 90° counter clockwise but they are not that orientation in original on the server. If I rotate the original, this does not have an effect on the access photo even though it is hyperlinked.

  5. #5
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Have you looked at the app in my link?
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  6. #6
    GMcC is offline Novice
    Windows 10 Office 365
    Join Date
    Oct 2020
    Posts
    6
    Quote Originally Posted by isladogs View Post
    Have you looked at the app in my link?
    I did but I don't see any reference to access. I can edit the original .jpg photos all day long to no effect in access.

  7. #7
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    They're saved on the server in .jpg format in portrait orientation.
    If you navigate to the folder and open the image in your default app, how is it displayed on screen in that app - and perhaps more importantly, if made with a camera, were they shot in portrait orientation?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  8. #8
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Quote Originally Posted by GMcC View Post
    I did but I don't see any reference to access. I can edit the original .jpg photos all day long to no effect in access.
    Sorry but I don't understand your comment.

    Its an Access app. There is a Rotate Image button.
    It doesn't alter the original photo at all - merely changes how it is displayed in Access.
    Photos are automatically adjusted so that portrait photos are automatically displayed correctly.
    As a result, landscape photos may not be but can be manually rotated 90 degrees using the button

    It would be very easy to add code which identifies the photo orientation and rotates portrait photos but leaves landscape photos.
    I'll leave that bit for you to do
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  9. #9
    GMcC is offline Novice
    Windows 10 Office 365
    Join Date
    Oct 2020
    Posts
    6
    [QUOTE=isladogs;464838]Sorry but I don't understand your comment.

    Its an Access app. There is a Rotate Image button.

    The link you provided is a photo geolocation app. Again, no reference to Access.

  10. #10
    GMcC is offline Novice
    Windows 10 Office 365
    Join Date
    Oct 2020
    Posts
    6
    Quote Originally Posted by Micron View Post
    If you navigate to the folder and open the image in your default app, how is it displayed on screen in that app - and perhaps more importantly, if made with a camera, were they shot in portrait orientation?
    They are displayed in portrait and were shot in portrait, but flipped in access.

  11. #11
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    but flipped in access.
    I presume that means you see portrait orientation as landscape (i.e. the image is rotated sideways 90 degrees). You could help by being more concise because we cannot see what you're seeing. That statement could mean that you're using code to flip the images in Access.

    What we're trying to point out is that if you shoot an image in portrait with a DSLR it's likely that your camera rotates that image when you review it and you are holding the camera in landscape orientation (it is an option to do or not do so in some cameras). The camera reads the meta data and does that automatically. So does Windows File Explorer. Access image control does not. You would need to flip the images in their file folders so that they are oriented for Access. That means they will be dis-oriented for other applications and you will see them in File Explorer as being sideways. Therein lies the rub I was referring to earlier. After rotating that image, if you view in in FE again it just might not show - until you rebuild the icon cache.

    You can use code to loop through a folder and rotate all images. Research by that topic and/or Windows Image Acquisition for VBA.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  12. #12
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    [QUOTE=GMcC;464843]
    Quote Originally Posted by isladogs View Post
    Sorry but I don't understand your comment.

    Its an Access app. There is a Rotate Image button.

    The link you provided is a photo geolocation app. Again, no reference to Access.
    I really don't know how to say this more clearly ...but I'll try once more

    My entire website is Access based (unless otherwise stated)
    I can only assume you looked at the screenshots (cropped for clarity on the webpage) but didn't download it.

    This is a screenshot of the entire screen:

    Click image for larger version. 

Name:	Capture2.jpg 
Views:	21 
Size:	201.6 KB 
ID:	43338
    As I hope you can see, its an app made & run in Access
    It displays photos and automatically rotates portrait photos within Access so they display properly.
    The app is free and all code is provided.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  13. #13
    GMcC is offline Novice
    Windows 10 Office 365
    Join Date
    Oct 2020
    Posts
    6
    Quote Originally Posted by Micron View Post
    I presume that means you see portrait orientation as landscape (i.e. the image is rotated sideways 90 degrees). You could help by being more concise because we cannot see what you're seeing. That statement could mean that you're using code to flip the images in Access.

    What we're trying to point out is that if you shoot an image in portrait with a DSLR it's likely that your camera rotates that image when you review it and you are holding the camera in landscape orientation (it is an option to do or not do so in some cameras). The camera reads the meta data and does that automatically. So does Windows File Explorer. Access image control does not. You would need to flip the images in their file folders so that they are oriented for Access. That means they will be dis-oriented for other applications and you will see them in File Explorer as being sideways. Therein lies the rub I was referring to earlier. After rotating that image, if you view in in FE again it just might not show - until you rebuild the icon cache.

    You can use code to loop through a folder and rotate all images. Research by that topic and/or Windows Image Acquisition for VBA.
    Yes you assume correct in that the portrait photos are shown in access in landscape orientation. I have not used any code in access or in the folders, I've just linked the table in access to the folders.

    I see what you're saying about the camera however, a phone was used and all the photos were taken in portrait orientation.

    Even flipping the photos in the folders does not correct the orientation in access. The only way I've been able to correct this is by changing the format of the original to png files. The effort of reformatting and relinking all the photos will be very tedious and inefficient.

  14. #14
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    I don't think that flipping the images in FE will do anything to the EXIF data even though they might look correct, thus I would not expect it to do anything different in Access. If you have an app like PhotoShop you can batch rotate. I know you can batch rotate and flip with VBA WIA. I would also expect the same behaviours using a phone camera or a DSLR.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  15. #15
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    GmcC,
    Possible option.
    There are free programs irfanview and riot (and I'm sure, others) that could process your image files and convert to png (or even adjust orientation possibly).

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 08-09-2020, 08:09 PM
  2. Linked photos to url on an Access 2013 form
    By guitarzycki in forum Forms
    Replies: 8
    Last Post: 08-13-2018, 04:45 PM
  3. Replies: 7
    Last Post: 11-06-2017, 01:23 PM
  4. Replies: 11
    Last Post: 08-26-2016, 11:51 AM
  5. Replies: 4
    Last Post: 08-29-2011, 12:36 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
  •  
Other Forums: Microsoft Office Forums