test for portrait image  - Page 1
Forum section: electronics / general

author: Ben321
author_rank: Frequent Contributor
timestamp: August 03, 2025, 10:36:43 pm
content: Previously it seems portrait pics I took and posted here got turned to landscape by the forum upload script. I'm testing it here to see if it happens again.

author: Ben321
author_rank: Frequent Contributor
timestamp: August 03, 2025, 10:37:44 pm
content: Yep. It happened again. Admin, please fix the script so attached portrait orientation photos don't get turned into landscape.

author: Nominal Animal
author_rank: Super Contributor
timestamp: August 06, 2025, 11:02:13 pm
content: That's not what is happening at all.When you take a photo, your phone or camera stores it inEXIF format, which has an orientation attribute included somewhere in the camera settings metadata.The upload scripts convert EXIF format images to JPEG, for a number of reasons. One is that EXIF (and TIFF and other similar formats) can contain non-visible data. Converting to JPEG only keeps the image data, which is safer.The recommended way to upload images is to open them in any photo editor — I useGIMP—, cropping the image to focus on the useful part of the image, and resizing it (the pixel size, not the print size) to minimize the file size. The required size depends on the complexity of the image. Just look at the cropped-and-scaled image at 100% to see if it looks good enough; undoing and trying another size until you're satisfied. (Do not repeatedly resize an image; that loses information. Always "undo", and resize the original, cropped image instead.) Finally, save it in JPEG format. Again, you may wish to experiment with the Quality setting; lower quality produces softer/blockier images, but higher quality increases file size. Adjust until optimal in your opinion.If you don't want to do any of that, and just post images off your phone for a "quick post", I'd wager that your post does not have enough thought in it to be useful to anyone other than yourself anyway, which means it should not be posted at all. Even your "test image" is 4000×3000 pixels, way larger than is necessary, and over 2 Mbytes in size!(If I was on my old, slow-connection phone, it'd take several seconds to load.)Put bluntly, you're asking the admin to paper over the issues in the images you want to post. Please, don't.Going the extra step to make your images useful and lightweight for others shows that you care, and that your post is worth considering answering. Not doing that indicates the opposite. When I post a photo (I rarely do — I usually post diagrams, and those are sharper and better when saved in optimized PNG format, for which I use the "pngcrush" tool to minimize file sizes; or in vector-graphics SVG format, which I store at myown webhostfor security reasons, avoiding any XSS etc. attacks via such images on eevblog.com), I take a few photos, open them all in GIMP, crop them all, then look at 200% to determine which one has best fidelity (least blurring), then resize/rescale that to optimum size, never larger than 2000 pixels in size on the longer edge, and finally save as JPEG in four or five different quality settings. I open them all, and examine at 200%, discarding the ones that got too blurry. I pick the image with the smallest file size left over.It can sound like "extra work", but what it is, isconsideration for others, showing that you care about others, and are not here just to leech from others to minimize any effort needed on your part. All useful discussion is a give-and-take.If this sounds "unfriendly", it is not intentional; this is just what I've learned works best, that I apply to my own output first before asking it from others. You might wish to read my similar advice in the pinnedWhy writing style and grammar matters in posts-post in the Beginners forum; this post expands on that advice, with regard to images and photos in posts.

author: Brumby
author_rank: Unknown
timestamp: August 08, 2025, 06:32:22 am
content: I agree with Nominal Animal - and I'm not being "unfriendly" either.I have found that several of my photos appear in one orientation when viewed one way and appear in the other when posted - just the way you are experiencing. In my case, I have identified a way that I can check my images before posting and apply a remedial process to ensure they are oriented correctly. It's annoying - but that's just one of life's little irritations.It's not something you can expect a site like this to display an image the way youwantit to when it's only doingwhat the data in the imageistellingit to do. Even if were tried, it's likely that the "solution" will get it wrong sometimes and that could make "getting it right" even more painful.It comes down to some of the idiosyncrasies of image data and rendering that is beneficial to understand.

author: magic
author_rank: Super Contributor
timestamp: August 08, 2025, 06:42:46 am
content: Old story.https://www.eevblog.com/forum/news/does-the-forum-support-exif-orientation-tag-in-jpeg-images/

author: RoGeorge
author_rank: Super Contributor
timestamp: August 10, 2025, 02:32:45 pm
content: I don't think attached pics orientation ever worked on this forum.From what I know, pics are stripped from their metadata, and reconverted before storing them into the forum's database. This helps with possible malicious code placed inside pics, plus it avoids unintended saving/sharing of personal user data through pics metadata. I don't know if any steganography ID/marks are still preserved (I assume they are, but I didn't check).Animated attached pics don't work either on this forum, they are turned into a static pic (only the first frame is imported).