Comments (8)
Are you sure you're not converting to another format?
from refile-mini_magick.
I can confirm that uploaded transparent PNG's lose their transparency to a white background on Refile 0.6.1
from refile-mini_magick.
Is the MiniMagick version the same? Maybe while updating Refile you also updated MiniMagick (Bundler would do that automatically for you).
from refile-mini_magick.
That could surely be the case.
Gemfile.lock:
mini_magick (4.3.3)
refile (0.6.1)
mime-types
rest-client (~> 1.8)
sinatra (~> 1.4.5)
refile-fog (0.2.0)
fog
refile
refile-mini_magick (0.2.0)
mini_magick (~> 4.0)
refile (~> 0.5)
Please note that I don't have any experience with previous versions of Refile.
from refile-mini_magick.
Could you try to compose a MiniMagick code snippet that reproduces the problem? Just copy paste the code from refile-mini_magick and fill in with specific images. Then we'll know what's the actual and expected outcome and see is the problem in Refile or MiniMagick. Which processing method does this happen on?
from refile-mini_magick.
I think I tracked down the problem while setting up a testcase.
The background stays transparent after resizing with this image, mini_magick 4.3.3
and the following snippet:
require 'mini_magick'
image = MiniMagick::Image.open('in.png')
image.resize '50x50'
image.gravity 'Center'
image.write 'out.png'
However, when adding the ImageMagick extent command (as in https://github.com/refile/refile-mini_magick/blob/master/lib/refile/mini_magick.rb#L81), the background of the output image will be white:
image.extent '50x50'
I'm not too comfortable with ImageMagick so I don't now if this is actually the fix and doesn't break any other stuff in the gem. Let me know if I can help in any other way.
from refile-mini_magick.
I have created a pull request #15 which solves the problem.
from refile-mini_magick.
#15 has been merged, see #15 (comment).
from refile-mini_magick.
Related Issues (15)
- Add support for image auto-orientation HOT 9
- Pad should scale image like `fit`, not like `limit`
- The actions are destructive HOT 2
- Moving forward to v1.0 HOT 4
- Sinatra 2.0 HOT 2
- cant install gem if adding 'gem 'refile-mini_magick'' HOT 2
- 1.2 ImageProcessing gem HOT 1
- Rack dependency needs to be updated to >= 2.0 HOT 2
- Set image quality via options HOT 1
- Release gem HOT 1
- gem 'refile-mini_magick' is not found HOT 4
- Limiting mini_magick memory usage HOT 4
- Video? HOT 1
- Is there support for multiple processors? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from refile-mini_magick.