Announcement

Collapse
No announcement yet.

resize and transparency got lost

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

    resize and transparency got lost

    Hi,

    1) I want to resize a png from 80x78 to a 60x78 png, non-proportional. The corners of the original are transparent. After resizing I get always a black boarder. I tried several options already even If I had to pick the transparent colour. I attached the png. What am I doing wrong?
    2) Is it possible to make a transparent canvas boarder?

    I tried the search in advance but I could find an appropriate answer.
    Thanks in advance
    Attached Files

    #2
    You always get a black border because what you see in IrfanView on opening a transparent PNG is the default Windows colour. Change it to yellow and the border will be yellow. Actually, it's transparent and it will be transparent in Web browsers.
    Attached Files
    Before you post ... Edit your profile • IrfanView 4.67 • Windows 10 Home 19045.2486

    Irfan PaintIrfan View HelpIrfanPaint HelpMore SkinsFastStone CaptureUploads

    Comment


      #3
      Thanks for the quick answer. Maybe you noticed that your png has a black boarder. You see it already on your attachment. Can one avoid this?

      Comment


        #4
        I would have expected your search to have found the post I made only a couple of weeks ago (click here)
        Although it is answering a slightly different question, most of what you need to know is there.

        Here are the steps you would need
        1. MENU: Options > Properties/Settings
        2. TAB: Viewing
        3. DIALOG: Main window color - change to a less confusing color e.g red > Tick "Show PNG/TIF/TGA/DDS alpha /transparent color > OK
        4. MENU: Image > Resize/resample
        5. DIALOG: Set New Size (whatever) > Size method "Resize" > OK
        6. MENU: File > Save As
        7. DIALOG: Save as type - PNG > Tick "Show options dialog" if not already ticked
        8. PNG save options DIALOG: Tick "Save transparent color" > Tick "Use main window color for transparency" > Untick "Save Transparency as Alpha channel" > Save

        However you already have an Alpha channel saved on the image you posted, probably because you saved it without unticking that option I have underlined above. So the image is going to be slightly transparent all over and will have a reddish tinge to it. Hopefully you still have your original and can now go back and save it correctly.

        Comment


          #5
          As I said, change the default Window colour, but it makes no difference because the border is transparent when used on web pages.
          Before you post ... Edit your profile • IrfanView 4.67 • Windows 10 Home 19045.2486

          Irfan PaintIrfan View HelpIrfanPaint HelpMore SkinsFastStone CaptureUploads

          Comment


            #6
            Sorry. We seem to have got crossed posts discussing different issues.

            Comment


              #7
              Thanks for your answer. It works almost.
              I get a red boarder (with red background) or I get a white boarder (with white background). The later one is ok however the white in the picture is also transparent. Is there anything which I can improve?
              Attached Files

              Comment


                #8
                So, I found a solution on Linux with: convert "Das Erste HD_org.png" -scale '60x78!' "Das Erste HD.png"
                I attached the result. The complete picture is homogeneously transparent. It would be great, if IrvanView could also support this because I am a real IrvanView fan!
                Thanks for your support
                Attached Files

                Comment


                  #9
                  The command for a transparent border under Linux is: convert "Das Erste HD.png" -bordercolor none -border 10x0 "Das Erste HD_none.png"
                  I have attached the picture with the left and right border.

                  Could you please fix the bug in IrfanView? I would like that these features (resizing transparent png and transparent border) work also under Windows or should I contact Irfan directly?
                  Thanks a lot!
                  Attached Files

                  Comment


                    #10
                    Originally posted by satellit View Post
                    Thanks for your answer. It works almost.
                    I get a red boarder (with red background) or I get a white boarder (with white background). The later one is ok however the white in the picture is also transparent. Is there anything which I can improve?
                    Satellite, that is where the confusion lies. I do not think you have posted the real original image. What you have posted already has transparency which shows up when you have the red main window color which I suggested. I have attached 3 screen captures, all at 100% zoom so that we can see them more clearly. The first is what you posted. It has a pink tinge because it is partially transparent. I saved it again without any transparency and show that as capture 2. That is I think your real original and I can see that it has pure white (255,255,255) corners but also has some other pure white pixels in the picture area and on some edges. If I save this with transparency by clicking on one of the corners to select transparent color, I get what you see in capture 3. The red window color clearly shows where the white pixels are. You can hide these pixels by putting it on a white window background but they will always be apparent over a colored one.

                    If I want to use transparency to hide a frame around an image I would choose a frame color that I am sure does not occur anywhere else in the image and I would resize the original before I applied the transparency because I do not know exactly what will happen when the application tries to resize a transparent one.
                    Attached Files

                    Comment

                    Working...
                    X