Uploaded image for project: 'Lucee Development'
  1. LDEV-898

ImageWrite does not overwrite imageobject unless filepath specified

    Details

    • Type: Bug
    • Status: Deployed
    • Priority: New
    • Resolution: Fixed
    • Affects Version/s: 4.5.3.018
    • Fix Version/s: 5.0.1.20
    • Labels:
      None
    • Environment:

      Windows 7

      Description

      According to the documentation and previous acf behavior calling imageWrite(imageObj) should overwrite the file the original image was read from. However on lucee we have found that it will not do this unless we specify the original filepath. Also the failed operation does not throw any error.

      // read original image file
      var imageObj = imageRead(arguments.filePath);
      
      // Perform a resize
      imageScaleTofit(imageObj,"",arguments.maxheight);
      
      // This should overwrite the source image but does not
      imageWrite(imageObj);
      
      // But this does work
      imageWrite(imageObj,arguments.filePath);
      

        Attachments

          Activity

            People

            • Assignee:
              michaeloffner Michael Offner
              Reporter:
              sneiland Steven Neiland
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: