Comments (7)
I can't reproduce this behaviour but I'm running slightly different versions of ImageMagick and Exiftool:
- ImageMagick 6.8.8-9
- Exiftool 9.54
My first guess would be a bug in ImageMagick that is fixed in this newer version.
from converjon.
Do we have an example ImageMagick-Command or can I log converjon commands, so that I can verify, ImageMagick is the problem?
from converjon.
The commands that converjon uses are logged when the "debug" option is set to true
in the configs.
Here's the logged command for this GIF:
convert ./cache/source/localhost:8001/test.gif -crop 74x99+47+0 -resize 125x166! gif:./cache/target/localhost:8001/test.gif/905ebb9f63bf818765f4391885b0a68574977a49c9edbebea3627ad1e9893717.gif
I also did reproduce this problem with the later version of imagemagick. I was accidentally converting to JPEG before where the problem does not occur. It does only occur when converting to GIF, regardless of the source format.
from converjon.
$ identify test.gif
test.gif GIF 169x99 169x99+0+0 8-bit sRGB 64c 1.9KB 0.000u 0:00.000
$ convert test.gif -crop 74x99+47+0 -resize 125x166! gif:out.gif
$ identify out.gif
out.gif GIF 125x166 285x166+79+0 8-bit sRGB 256c 4.97KB 0.000u 0:00.000
There seems so be additional metadata in the output GIF that contains different dimensions for the image.
from converjon.
Same error on Suse SLES-11 SP3
error occurs while crop without resize:
$ identify test.gif
test.gif GIF 169x99 169x99+0+0 8-bit PseudoClass 64c 1.85kb
$ convert test.gif -crop 74x99+47+0 gif:crop.gif
$ identify crop.gif
crop.gif GIF 74x99 169x99+47+0 8-bit PseudoClass 64c 1.16kb
$ file crop.gif
crop.gif: GIF image data, version 89a, 169 x 99
from converjon.
There is an additional option for ImageMagick: "+repage" http://www.imagemagick.org/script/command-line-options.php#repage
That solves the GIF-problem:
$ identify test.gif
test.gif GIF 169x99 169x99+0+0 8-bit sRGB 64c 1.9KB 0.000u 0:00.000
$ convert test.gif -crop 74x99+47+0 +repage gif:crop.gif
$ identify crop.gif
crop.gif GIF 74x99 74x99+0+0 8-bit sRGB 64c 1.19KB 0.000u 0:00.000
$ file crop.gif
crop.gif: GIF image data, version 89a, 74 x 99
and
$ convert test.gif -crop 74x99+47+0 +repage -resize 125x166! gif:out.gif
$ identify out.gif
out.gif GIF 125x166 125x166+0+0 8-bit sRGB 256c 5.05KB 0.000u 0:00.000
$ file out.gif
out.gif: GIF image data, version 89a, 125 x 166
Please add this additional option to converjon for gif-conversion.
from converjon.
--- a/lib/converter.js
+++ b/lib/converter.js
@@ -104,6 +104,10 @@ var getConvertArgs = function(sourceFile, targetFile, options) {
args.push("-border", cropping.paddingX+"x"+cropping.paddingY);
}
+ if (to == "gif") {
+ args.push("+repage");
+ }
+
if (options.width && options.height) {
args.push("-resize", options.width+"x"+options.height+"!");
} else if (options.width) {
This is a fix for 1.8.1, it should be included into 2.0.0.
from converjon.
Related Issues (20)
- AOI as percentages
- Support for keep-alive connections
- Support of option --config-dir
- Override AOI precedence in URL
- Support for other storage systems
- Fallback to default crop mode when embedded AOI is invalid
- Optional fallback to source image if conversion fails
- converjon-cli not working HOT 3
- Handling of filenames without suffix
- Source HTTP header whitelist not working HOT 4
- Response header enhancements
- Aliases validation, headers and config merging problems HOT 1
- Explicit error message missing when trying to use a not defined alias HOT 1
- Error message details missing on source download failure HOT 1
- Converjon fails on Node v6 w/ "options.hasOwnProperty is not a function" HOT 2
- default.yml overwrites options from urls-defined-yml HOT 5
- Wrong mtime usage for item.source_type=file converjon images - HIGH load HOT 10
- Cache item timestamp should not use mtime HOT 2
- Provide config option for short cache paths HOT 6
- Testrunner nodeunit is deprecated
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 converjon.