I have a similar problem outlined this post:
http://groups.google.com/group/carrierwave/browse_thread/thread/c83d4ab2b35f08ae?hl=en
I needed a version which keeps the original size from the upload.
I've forked carrierwave and this is a commit that implements what I
needed.
https://github.com/mulder/carrierwave/commit/d098295c0f326a124506ab06b8fc944acdf9dddf
I hate the name I gave it but here is how its used:
class IPhoneImageUploader < CarrierWave::Uploader::Base
include CarrierWave::MiniMagick
storage :file
process :resize => ['50%']
version :retina do
use_pre_processed_file!
end
# Pipes size_string param into an mini_magick resize call.
def resize(size_string)
manipulate! do |img|
img.resize size_string
img = yield(img) if block_given?
img
end
end
end
The use_pre_processed_file! is the method you want. After my commit
using this will make the version use the originally uploaded image to
apply its processing to, instead of building off main version.
I think this is a pretty useful feature. If some one can come up with
a better name i'll move things into a feature branch and wrap things
up with some specs then init a pull request.
Also if someone has a better implementation behind the scenes please
chime in.
On Apr 14, 2:41 pm, mix <
fausto.ga...@email.it> wrote:
> anyone about this? ;)