Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Aspect ratio

Aspect ratio

Scheduled Pinned Locked Moved The Lounge
question
13 Posts 10 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A alex barylski

    When taking pictures, etc...and then making thumbnails out of them... Does anyone happen to know what is considered by most, an ideal aspect ratio for a photorealistic image? Most thumbnails I see on places like eBay, etc often look nasty & pixelated from poor AR calculation to resizing techniques... Just curious? Cheers :)

    It's frustrating being a genius and living the life of a moron!!!

    C Offline
    C Offline
    Christian Graus
    wrote on last edited by
    #2

    I thought photos were 4:3, typically ? I don't see how an aspect ratio can be considered 'ideal' tho, it's more that they look nasty when it gets changed ?

    Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

    1 Reply Last reply
    0
    • A alex barylski

      When taking pictures, etc...and then making thumbnails out of them... Does anyone happen to know what is considered by most, an ideal aspect ratio for a photorealistic image? Most thumbnails I see on places like eBay, etc often look nasty & pixelated from poor AR calculation to resizing techniques... Just curious? Cheers :)

      It's frustrating being a genius and living the life of a moron!!!

      C Offline
      C Offline
      code frog 0
      wrote on last edited by
      #3

      It depends on if it's landscape or portrait. L = 108Wx72H P = 72Wx108H I've had good luck with 108x72 and swapping them around based upon portrait or landscape.

      1 Reply Last reply
      0
      • A alex barylski

        When taking pictures, etc...and then making thumbnails out of them... Does anyone happen to know what is considered by most, an ideal aspect ratio for a photorealistic image? Most thumbnails I see on places like eBay, etc often look nasty & pixelated from poor AR calculation to resizing techniques... Just curious? Cheers :)

        It's frustrating being a genius and living the life of a moron!!!

        E Offline
        E Offline
        El Corazon
        wrote on last edited by
        #4

        Hockey wrote:

        an ideal aspect ratio for a photorealistic image?

        the same aspect ratio as the scene it was taken in. Seriously. If you take a panorama image and you scale it to 4:3 it looks squashed. If you take a digital camera image it is "usually" in the form of 35mm aspect, or 3:2. If you scale that to 4:3 again it looks squashed. So cut out a 4:3 image from within your 3:2 digital camera image, and then upload it for resizing, and it looks much better.

        _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

        J 1 Reply Last reply
        0
        • A alex barylski

          When taking pictures, etc...and then making thumbnails out of them... Does anyone happen to know what is considered by most, an ideal aspect ratio for a photorealistic image? Most thumbnails I see on places like eBay, etc often look nasty & pixelated from poor AR calculation to resizing techniques... Just curious? Cheers :)

          It's frustrating being a genius and living the life of a moron!!!

          B Offline
          B Offline
          brianwelsch
          wrote on last edited by
          #5

          I think it would depend on the aspect ratio of the initial photo. I think this is typically 4:3. Usually when I resize, I either go by percentage and let the software calculate Width and Height, or select keep aspect ratio and define either W or H.

          BW


          If you're not part of the solution, you're part of the precipitate.
          -- Steven Wright

          1 Reply Last reply
          0
          • E El Corazon

            Hockey wrote:

            an ideal aspect ratio for a photorealistic image?

            the same aspect ratio as the scene it was taken in. Seriously. If you take a panorama image and you scale it to 4:3 it looks squashed. If you take a digital camera image it is "usually" in the form of 35mm aspect, or 3:2. If you scale that to 4:3 again it looks squashed. So cut out a 4:3 image from within your 3:2 digital camera image, and then upload it for resizing, and it looks much better.

            _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

            J Offline
            J Offline
            JBurkey
            wrote on last edited by
            #6

            Jeffry J. Brickley wrote:

            the same aspect ratio as the scene it was taken in. Seriously. If you take a panorama image and you scale it to 4:3 it looks squashed.

            Correct, but that would be a stretch not a scale. You should almost never stretch an image, particularly a photo, because it will always look horrible. I think this is a problem with some crappy software painting an image into a predefined rectangle, without regard to the aspect of the image it has loaded. That would be a no-no. Although to be fair - it's not always made easy. If you look at System.Drawing.Graphics.DrawImage, for instance, it doesn't really allow you to maintain aspect - you have to do that yourself. J

            E C 2 Replies Last reply
            0
            • J JBurkey

              Jeffry J. Brickley wrote:

              the same aspect ratio as the scene it was taken in. Seriously. If you take a panorama image and you scale it to 4:3 it looks squashed.

              Correct, but that would be a stretch not a scale. You should almost never stretch an image, particularly a photo, because it will always look horrible. I think this is a problem with some crappy software painting an image into a predefined rectangle, without regard to the aspect of the image it has loaded. That would be a no-no. Although to be fair - it's not always made easy. If you look at System.Drawing.Graphics.DrawImage, for instance, it doesn't really allow you to maintain aspect - you have to do that yourself. J

              E Offline
              E Offline
              El Corazon
              wrote on last edited by
              #7

              JBurkey wrote:

              but that would be a stretch not a scale.

              I stand corrected. :) The problem is often that you have to have previously defined rectangles. Flickr and ebay and others are designed by a third person and you are putting your images in to "their" spots defined for them. Flickr trims the image to match 4:3 but it doesn't really know "how" to trim it, so it just does it.

              _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

              E 1 Reply Last reply
              0
              • A alex barylski

                When taking pictures, etc...and then making thumbnails out of them... Does anyone happen to know what is considered by most, an ideal aspect ratio for a photorealistic image? Most thumbnails I see on places like eBay, etc often look nasty & pixelated from poor AR calculation to resizing techniques... Just curious? Cheers :)

                It's frustrating being a genius and living the life of a moron!!!

                M Offline
                M Offline
                Marc Clifton
                wrote on last edited by
                #8

                You don't change the aspect ratio. You scale both H&V equally. Marc

                Thyme In The Country

                People are just notoriously impossible. --DavidCrow
                There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer
                People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith

                1 Reply Last reply
                0
                • J JBurkey

                  Jeffry J. Brickley wrote:

                  the same aspect ratio as the scene it was taken in. Seriously. If you take a panorama image and you scale it to 4:3 it looks squashed.

                  Correct, but that would be a stretch not a scale. You should almost never stretch an image, particularly a photo, because it will always look horrible. I think this is a problem with some crappy software painting an image into a predefined rectangle, without regard to the aspect of the image it has loaded. That would be a no-no. Although to be fair - it's not always made easy. If you look at System.Drawing.Graphics.DrawImage, for instance, it doesn't really allow you to maintain aspect - you have to do that yourself. J

                  C Offline
                  C Offline
                  Chris Richardson
                  wrote on last edited by
                  #9

                  JBurkey wrote:

                  Correct, but that would be a stretch not a scale.

                  Actually it is a scale. Nobody said anything about 'scaling' meaning 'uniform scaling along each axis'. Maintaining aspect ratio is not that difficult either:

                  int destinationWidth = ???;
                  int destinationHeight = ???;
                  int originalWidth = ???;
                  int originalHeight = ???;
                  double aspect = originalWidth / static_cast<double>(originalHeight);
                  int scaledWidth = destinationWidth;
                  int scaledHeight = static_cast<int>(destinationWidth / aspect);
                   
                  if( scaledHeight > destinationHeight )
                  {
                  scaledHeight = destinationHeight;
                  scaledWidth = static_cast<int>(scaledHeight / aspect);
                  }

                  This stretch prefers filling the width to the destination, rather than the height, but it's easy to swap it around.

                  Chris Richardson

                  1 Reply Last reply
                  0
                  • A alex barylski

                    When taking pictures, etc...and then making thumbnails out of them... Does anyone happen to know what is considered by most, an ideal aspect ratio for a photorealistic image? Most thumbnails I see on places like eBay, etc often look nasty & pixelated from poor AR calculation to resizing techniques... Just curious? Cheers :)

                    It's frustrating being a genius and living the life of a moron!!!

                    C Offline
                    C Offline
                    Chris Losinger
                    wrote on last edited by
                    #10

                    Hockey wrote:

                    Does anyone happen to know what is considered by most, an ideal aspect ratio for a photorealistic image?

                    the best aspect ratio is the one you need in order to best to capture your subject. look at good photographs: almost none of them conform to standard ratios.

                    image processing | blogging

                    1 Reply Last reply
                    0
                    • A alex barylski

                      When taking pictures, etc...and then making thumbnails out of them... Does anyone happen to know what is considered by most, an ideal aspect ratio for a photorealistic image? Most thumbnails I see on places like eBay, etc often look nasty & pixelated from poor AR calculation to resizing techniques... Just curious? Cheers :)

                      It's frustrating being a genius and living the life of a moron!!!

                      E Offline
                      E Offline
                      Ennis Ray Lynch Jr
                      wrote on last edited by
                      #11

                      Retain the original aspect ratio of the image. If you have a crop 4 inches wide by 2 inches high that is a 2:1 aspect. Changing it to a 4:1 would make it look like s*


                      On two occasions I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. - Charles Babbage

                      1 Reply Last reply
                      0
                      • E El Corazon

                        JBurkey wrote:

                        but that would be a stretch not a scale.

                        I stand corrected. :) The problem is often that you have to have previously defined rectangles. Flickr and ebay and others are designed by a third person and you are putting your images in to "their" spots defined for them. Flickr trims the image to match 4:3 but it doesn't really know "how" to trim it, so it just does it.

                        _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

                        E Offline
                        E Offline
                        Ennis Ray Lynch Jr
                        wrote on last edited by
                        #12

                        On a 4:3?


                        On two occasions I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. - Charles Babbage

                        E 1 Reply Last reply
                        0
                        • E Ennis Ray Lynch Jr

                          On a 4:3?


                          On two occasions I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. - Charles Babbage

                          E Offline
                          E Offline
                          El Corazon
                          wrote on last edited by
                          #13

                          Ennis Ray Lynch, Jr. wrote:

                          Ever watched a letterbox movie On a 4:3?

                          I try not to, but yes... of course, not all letterbox movies are the same size, which means anyone who has watched a letterbox movie knows the issues with either trimming to fit, or scrunching... or black/grey borders.

                          _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups