Comments (5)
png 图片背景会被设置为黑色
from image.
cropping images on rails4 has some trouble
主要涉及到 Rails 4 中 strong parameters 功能,裁剪的参数都需要白名单化
from image.
https://github.com/maxd/jcrop-rails-v2 这个 gem 已经更新到 jcrop 的最新版本,可以使用
from image.
Jcrop 会把 png 图片背景设为黑色,这是由 Jcrop 的默认选项 bgColor: "black"
控制的,若设置 bgColor 的值为空,则图片背景色保持不变。
$(function(){
$('#cropbox').Jcrop({
bgColor: ''
});
});
另外,png 图片裁剪保存之后仍为 png 格式,图片显示正常,不知用 FileReader 操作之后会不会出状况
from image.
使用 RMagick or MiniMagick 在裁剪图片时,使用的接口不一样:
from image.
Related Issues (10)
- 不知道这个有用没有?
- 预览图片 HOT 3
- 自定义文件上传按钮 HOT 2
- 裁剪图片
- Jcrop 实例源码 HOT 1
- colorbox HOT 5
- carrierwave recreate_versions with random filename HOT 2
- 图片上传到骑牛 HOT 8
- update image uploaded with ajax 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 image.