Giter Club home page Giter Club logo

carrierwave-crop-on-fly's People

Contributors

evg2108 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

carrierwave-crop-on-fly's Issues

Problem with reupload image

Hi. Thanks for your gem! I have one problem with reupload image.
I select image with aspect 16:9 from my pc, cropbox works correct. After i would exchange this image(16:9) with image 4:5 and this look so stretched. Can you help me solve my problem?

PS Sorry for my bad English :(

cropbox not updating to new image dimensions

When I upload an image (960 x 539) like this, everything is OK.
image

but when I upload an image with very different dimensions (550 x 800), this happens:
image

I'm not using the default width and height attributes because I want full width images.
So, How can I fix this?

Failed to crop - wrong number of arguments (1 for 3, 4, or 5)

Hi, nice fork from the orginal one.
I have this issue

POST /users.json

def create
@user = User.new(user_params)

respond_to do |format|
  if @user.save

Request

Parameters:

{"utf8"=>"โœ“",
"authenticity_token"=>"MRa4sEXNc5+sfOkPMuy49YhR76Ykkixb5FPO9HK/s+k8uxAibLPWHHA940Zp0sXhZ+WAP1uew5tSNQIknk2MAQ==",
"user"=>{"avatar"=>#<ActionDispatch::Http::UploadedFile:0x007fa93a231be0 @crop_x="135.46",
@crop_y="100.72666666666666",
@crop_w="538.3666666666667",
@crop_h="618.2533333333333",
@tempfile=#Tempfile:/var/folders/_0/q8fjlt_537x1qf7f8jx500dc0000gn/T/RackMultipart20151217-63314-9yhro2.jpg,
@original_filename="andreas-2.jpg",
@content_type="image/jpeg",
@headers="Content-Disposition: form-data; name="user[avatar]"; filename="andreas-2.jpg"\r\nContent-Type: image/jpeg\r\n">,
"avatar_cache"=>""},
"commit"=>"Crop"}

My private controller for user looks like this
private
# Use callbacks to share common setup or constraints between actions.
def set_user
@user = User.find(params[:id])
end

# Never trust parameters from the scary internet, only allow the white list through.
def user_params
  params.require(:user).permit(:avatar, {avatars: []}, :avatar_cache, :favatar_crop_x, :avatar_crop_y, :avatar_crop_w, :avatar_crop_h)
end

end

How to deal with nil value, "first time image will be uploaded"

Hi,

Thanks for amazing gem ;)

I installed in my app and i have an issue!

When the user already exist and have an avatar that was uploaded before, all the fields work fine.

<%= form_for @Profile do |f| %>
<%= f.cropbox :avatar, width: 250, height: 250 %>
<%= f.file_field :avatar %>
<%= f.previewbox :avatar %>
<%= f.submit 'Crop and Save' %>

But when there is no avatar yet "first time that avatar will be uploaded"

I get the message:

nil is not a valid asset source

And the two field that dont work are:

<%= f.cropbox :avatar, width: 250, height: 250 %>
<%= f.previewbox :avatar %>

How to deal with first time upload image?

Thanks a lot!

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.