Comments (3)
Are you sure that the above operation requires two calls to convert
?
All of the examples here use one call to convert
: http://www.imagemagick.org/Usage/anim_mods/#resize
eg: convert script_k.gif -coalesce -resize 20x20 script_k_direct2.gif
from arc.
I tried it with the parameters mentioned above:
def transform(:thumb, {file, _scope}) do
file_extension = file.file_name |> Path.extname
case file_extension do
".gif" -> {:convert, "-coalesce -resize 250x250 -gravity center -extent 250x250"}
_ -> {:convert, "-strip -thumbnail 250x250 -gravity center -extent 250x250"}
end
end
def transform(:medium, {file, _scope}) do
file_extension = file.file_name |> Path.extname
case file_extension do
".gif" -> {:convert, "-coalesce -resize 700x700"}
_ -> {:convert, "-quality 80 -strip -thumbnail 700x700> -gravity center"}
end
end
It takes forever and after a while there is a timeout
** (UndefinedFunctionError) undefined function :timeout.__struct__/1 (module :timeout is not available)
:timeout.__struct__({:timeout, {Task, :await, [%Task{owner: #PID<0.1684.0>, pid: #PID<0.1689.0>, ref: #Reference<0.0.1.26960>}, 15000]}})
from arc.
This should be done through https://github.com/stavro/arc#complex-transformations for now.
from arc.
Related Issues (20)
- Warnings during compilation on ELixir 1.8.0-otp-21.2.2
- Expires header is N/A when uploading to S3. HOT 1
- Arc: Uploading Protected Files HOT 3
- Test configuration, how to prevent HTTP requests?
- `arc` crashes when trying to delete a file with a `:skip`ped transform HOT 1
- Arc sometimes does not save files
- Validation when uploading from a remote URL
- Attachment not uploaded to S3 on create, only on update HOT 3
- Converting PDF to PNG - resulting images stuck in temporary file (multi-page pdf) HOT 4
- url/1 returns non existing files HOT 2
- Seperate store_filename from url_filename in definition HOT 2
- minio storage support HOT 1
- Object deletion by scope HOT 2
- MyApp.Avatar.url({filename, scope}) returns path with leading slash
- Change tmp %Arc.File{} path.
- Versions on the fly
- Does it work with Digital Ocean storage instead of AWS? HOT 1
- Local upload - (UndefinedFunctionError) function nil.id/0 is undefined HOT 2
- Getting Timeout error - Azure container upload
- ARC.File unpack/repack /APEX ENGINE
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 arc.