GithubHelp home page GithubHelp logo

aoe_amazoncdn's People

Contributors

fbrnc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aoe_amazoncdn's Issues

Images get corrupted when resized/cached

I'm having an issue where images will get "corrupted" when they're resized.

Reproducing the issue:

  • Add an image to a product, and save it. This will upload the original to S3.
  • View the product in the front end (and thus the image). This will download the original from S3, create a resized version, and upload to the media/catalog/product/cache/... folder on S3.
  • The resulting cached and resized image is now corrupted.

For example:
This image shows a corrupted image
Corrupted Image

And this image shows the original image (note how this one has red in it)
Not so corrupted image

While creating these two images, I noticed that they're actually both cached... The difference is only the size. The small (corrupted) ones dimensions are 736x460 while the large one is 940x587.

At first I thought this was an issue of my theme, but I disabled the CDN stuff and tried reuploading a completely different image and the image wasn't corrupted. Re-enabled the CDN stuff and tried again with a new image.. And the image corruption was back.

So somewhere along the lines in this plugin, the image is getting corrupted. Not sure where really.

One other thing I did notice, was that on S3 the original has a Content-Type of image/png, while the cached versions are binary/octet-stream. I've tried changing it to image/jpeg and that doesn't fix it either.

Have you experienced any similar issues to this?

Bug in detecting image type for resizing transparent GIFs or PNGs

The problem begins with reading image parameters from the cache table. All the values (with, height, image_type) are type of string.

This causes type comparison fail in Varien_Image_Adapter_Gd2::_getTransparency() method.
In the following condition:

if ((IMAGETYPE_GIF === $fileType) || (IMAGETYPE_PNG === $fileType)) {
...
}

The solution could be casting the values to int in Aoe_AmazonCdn_Model_Varien_Gd2::open() method.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.