Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revising PNG to JPG conversion #27

Closed
wants to merge 1 commit into from

Conversation

fvh-P
Copy link
Collaborator

@fvh-P fvh-P commented Aug 1, 2017

Based on issue #25
Resolve a validation error occurring if the converted JPG file is larger than the uploded PNG file.

@lnanase
Copy link
Collaborator

lnanase commented Aug 2, 2017

ImgConverter クラスを遅ればせながら確認させて頂きました。

自分なりにリファクタしてみたコミットが下記になります。

lnanase@06b51a7

ImgConverter を Paperclip::Thumbnail クラスの子クラスにしてしまって、
圧縮しないケースはそのまま Thumbnail クラスの
親makeメソッドに流してしまえばいかがでしょうか?

なお、

  • identify の結果で改行コードが入ることがあったので.stripつけました

  • 圧縮するケースはpngのみに限定してもよいかもしれません

レビューをお願い致します。

@takayamaki takayamaki added the bug Something isn't working label Aug 3, 2017
@fvh-P
Copy link
Collaborator Author

fvh-P commented Aug 5, 2017

#30 seems the best way to resolve the problem, so I close this PR.

@fvh-P fvh-P closed this Aug 5, 2017
@fvh-P fvh-P deleted the convert-PNG-revised branch August 14, 2017 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants