Thursday, April 23, 2009

v7.90.0143 - 2009-04-23 12:50

  • + Scripting got a new command (I needed it for my holiday fotos).
      Name:   rotate
      Action: Rotate JPG images. Rotation is lossless for typical
              digital camera images.
      Syntax: rotate [mode=90|180|270|h|v], [jpgfile_src],
                     [jpgfile_trg], [only_if_lossless=01]
        mode        = rotation in degrees (clockwise), or
                      horizontal/vertical flip orientation;
                      defaults to 90
        jpgfile_src = JPG file to rotate
                      defaults to current file if empty
                      relative current path if path missing
        jpgfile_trg = target file name
                      defaults to jpgfile_src if empty
                      relative current path if path missing
        only_if_lossless = 0: [default] rotate always
                           1: error if rotation cannot be done lossless
      - ONLY if the width and height of the image are both multiples of
        16, then indeed the rotation is lossless! Luckily, digital
        camera image dimensions are usually multiples of 16. MS has
        buried some deeper info on this here:

        If the image dimensions are not multiples of 16 then colors and
        sharpness will slightly fade if you do many consecutive
        rotations on the same image.
      - And yes, the function will ONLY work on JPG images.
      - EXIF data are preserved.
        ::rotate;     //rotate current image by 90 degrees (clockwise)
        ::rotate 180; //rotate current image by 180 degrees (clockwise)
        //rotate "E:\my.jpg" by 90, but only if it can be done lossless
        ::rotate , "E:\my.jpg", , 1;
        //flip current image horiz., save to "flipped.jpg" in cur path:
        ::rotate h, , "flipped.jpg";
        //save vertically flipped "D:\pic.jpg" to "E:\pic-v.jpg":
        ::rotate v, "D:\pic.jpg", "E:\pic-v.jpg";
      Example for POM:
          |"Rotate 90° clockwise" jpg>::rotate