Announcement

Collapse
No announcement yet.

"Negative Crop" (padding) is it possible?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    "Negative Crop" (padding) is it possible?

    Guys, discovered Irfanview a while ago and like it a lot. One thing I haven't worked out yet though.

    I have a nice new LCD TV that has a memory card reader and can show slideshows from my digital camera. That's the good news. However I have found that the display firmware is very dumb, and does not maintain the aspect ratio of pictures! Everything gets stretched to 16x9 widescreen aspect, which makes portrait photos in particular look pretty silly.

    Irfanview can batch convert images to 1366x768 (the TVs native resolution) and maintain the photo aspect ratio, but it does this by cropping, which often leaves peoples heads and/or feet cut off.

    I need a "maintain aspect ratio and pad" option that scales the whole incoming image to fit the screen, and pads it with "blank" pixels (probably black by default) up to the required image size.

    Is this possible in Irfanview currently, or am I looking at an enhancement request?

    #2
    If I understand your item correctly, I would say, that you can improve this by using 'Canvas size'.
    So first you make the image bigger by adding areas to correct the aspect ratio.
    Then one can resize the image.
    0.6180339887
    Rest In Peace, Sam!

    Comment


      #3
      Unfortunately the "canvas size" option is a misnomer, it should really be called "border width". It sets Irfanview to add a fixed width border to images after conversion.

      What it does NOT allow you to do is set a fixed-size image output canvas (in my case 1366x768, then have IV rescale the image to fit within this (maintaining aspect ratio) then place the image centred on the canvas.

      Sadly looks like I wiull have to hack my own solution using something like ImageMagick to do this :-}

      Comment


        #4
        Originally posted by colin_e View Post
        I have a nice new LCD TV that has a memory card reader and can show slideshows from my digital camera. That's the good news. However I have found that the display firmware is very dumb, and does not maintain the aspect ratio of pictures! Everything gets stretched to 16x9 widescreen aspect, which makes portrait photos in particular look pretty silly.
        I'm not sure about your problem. If you create a slideshow with Irfanview, you should be able to create the effect you want, as long as your destination screen uses squared pixels.

        If not you can do some math and calculate the factor to stretch one side of all your images.
        (Batch convert: set newsize as a percentage of original image). In this way you can simulate rectangular pixels.

        Comment


          #5
          The incoming files are a mixture of sizes. Both landscape and portrait (because of the orientation of the camera when the photo was taken), and some variations within that (e.g. when a specific image is cropped).

          Thus the algorithm isn't so simple. It's something like:

          1) Scale the image, maintaining aspect ratio, so the width<=1366 and the
          height<=768 (just like irfanview's maintain aspect sizing option).

          THEN

          2) Lay the result centred on a 1366x768 background image (probably a black
          rectangle) so the output is always EXACTLY 1366x768.

          It's the second "pad to a fixed size" function that I was really hoping the "canvas size" option would be, but it's not.

          Comment


            #6
            Try, Advanced Slideshow options, play in Windowed mode, and set the size to the size of your monitor of a bit less.
            Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

            Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

            Comment


              #7
              OK, as far as I understand it now, your tv has a build in slideshow feature that takes the pictures from your card and stretchs them to the screen (not respecting aspect ratio).
              That's the reason why you have to resize.

              This may be a feature request to extend the canvas function. Maybe stretch an image to a given rectangle (keeping the aspect ration) and fill the remaining space not covered by the image with the canvas color. A center switch may be fine.

              Comment


                #8
                The TV is not directly connected to the PC. This is why I need to batch resize the images so I can dump them onto a memory card. The TV has a card reader.

                Comment


                  #9
                  2 midora
                  A very nice feature request indeed. And not only for full screen purposes.
                  It would mean a kind of inversion of the canvas function. Now, you can add borders, so the bitmap gets bigger.
                  This feature could mean, that, while adding a border, the bitmap keeps the same size, but the picture is resized a bit smaller within that frame.
                  0.6180339887
                  Rest In Peace, Sam!

                  Comment


                    #10
                    And for Wallpaper Too

                    I'd also like a feature like this.

                    Unlike Colin, my TV's display program will resize and center images. But IV's resize function is much better. So, for viewing on my TV, the current batch conversion almost works. I have to first separate the images into portrait and landscape since the batch resize can make either the horizontal sizes all the same or the vertical. It would be nice to be able to put in a screen size and have IV resize for best fit -- like it does for slideshows.

                    Where I really need the ability to specify border parameters is for wallpaper. I like to put my icons along the left and top edge of the monitor and want the wallpaper to be in the lower right corner. So, I could use the option to specify both overall and border size and where the picture should go within the mat. So the options would be overall height and width in pixels (e.g., 1680 x 1050), minimum border (e.g., 64 pixels left, 64 pixels top, 0 right and 0 bottom), and where to put any extra border (e.g., left:100%, top:100% top, right:0% and bottom:0% for me, 50% all around to center).

                    Comment

                    Working...
                    X