getProtectedImageURL truncates jpeg on Download

I was just trying to add a download button to get a full sized version of the current image in the image.php file. Simple right?

I just have a link with the code:
`">full size jpeg`
With the Full Image Protection checkbox off, it opens the image in a new tab and when I save it it is perfect.

However, with the "Full Image Protection" set to "Download" (or using `getProtectedImageURL(NULL,'Download')` the image that is saved to the computer is corrupted, basically the end of the image gets truncated or cut off.

I have no idea what might be causing this.

On the latest 1.4.3. version.

Thanks

Comments

  • The difference is in how the image data is provided to the browser. For protection=download opens the file and uses the PHP function fpasstrhu() to read the data and send it to the PHP output buffer. With the protection checkbox off the browser is requesting the image via its URL.

    But I do not have any idea why you would get truncation of the image.
Sign In or Register to comment.