Announcement

Collapse
No announcement yet.

Resize with parameters

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

    Resize with parameters

    Hello,

    I'm trying to resize an image with variables passed from user input:

    $widthbewerk and $heightbewerk are the variables passed.
    Code:
    :\1.jpg /resize=($widthbewerk,$heightbewerk) /convert=C:\temp\1.jpg
    Above code does not work, any idea what I do wrong?

    Thanks in advance.

    Ronnie Dackus

    #2
    See i_options.txt in the IrfanView install folder for details:

    Example for resize:
    i_view32.exe c:\test.jpg /resize=(300,300) /resample
    => Open 'c:\test.jpg' and resample: width=300, height=300
    (Note: Resample uses the the active resample filter from the INI file)
    i_view32.exe c:\test.jpg /resize=(300,300) /aspectratio
    => Open 'c:\test.jpg' and resize: width = max. 300, height = max. 300, proportional
    i_view32.exe c:\test.jpg /resize=(300,0) /aspectratio
    => Open 'c:\test.jpg' and resize: width=300, height=proportional
    i_view32.exe c:\test.jpg /resize_long=300 /aspectratio /resample
    => Open 'c:\test.jpg' and resample: long side=300, short side=proportional
    i_view32.exe c:\test.jpg /resize=(300,0)
    => Open 'c:\test.jpg' and resize: width=300, height=original
    i_view32 c:\test.jpg /resize=(150p,150p)
    => Open 'c:\test.jpg' and resize: width=150%, height=150%
    Before you post ... Edit your profile • IrfanView 4.67 • Windows 10 Home 19045.2486

    Irfan PaintIrfan View HelpIrfanPaint HelpMore SkinsFastStone CaptureUploads

    Comment


      #3
      Hi,

      Thanks for your repley.

      The variables passed are numbers, is my syntax correct? In the example the width and the height are passed in nummers. In my case it would be :

      Code:
      _view32.exe c:\test.jpg /resize=(width,height)
      So I'm doing something wrong, but can bot get the answer myself.

      Regards,

      Ronnie

      Comment


        #4
        Enclose variables in percent signs (%) when you want them expanded in the command interpreter.

        Code:
        i_view32.exe C:\1.jpg /resize=(%$widthbewerk%,%$heightbewerk%) /convert=C:\temp\1.jpg

        Comment

        Working...
        X