Archived from the Transloadit support forum. Originally posted on November 15, 2010; details may be outdated, see our docs for current behavior. Original thread
I can’t seem to convert a jpg file into a gif with crop resize strategy and have it sized according to the width I specify.
Here’s an assembly template I’ve created to show the problem (template_id: REDACTED) – I’m creating two cropped thumbs, one jpg, and one gif:
{
"steps": {
"thumb_jpg": {
"robot": "/image/resize",
"use": ":original",
"format": "jpg",
"resize_strategy": "crop",
"width": 50,
"height": 50
},
"thumb_gif": {
"robot": "/image/resize",
"use": ":original",
"format": "gif",
"resize_strategy": "crop",
"width": 50,
"height": 50
},
"export": {
"robot": "/s3/store",
"use": [
"thumb_jpg",
"thumb_gif"
],
"bucket": "...",
"key": "...",
"secret": "..."
}
},
"notify_url": "..."
}
If I upload a 600x450 jpg file, the thumb_jpg is correctly sized 50x50, but the thumb_gif is sized 66x50, with black bars padding the sides. See resulting files:
thumb_jpg: http://mobile-photo-share.s3.amazonaws.com/02/7f5a3333265fbdd2a2a4e0133e55e5/event.jpg thumb_gif: http://mobile-photo-share.s3.amazonaws.com/8d/b6ad6ed905d8669c18d20e77055f82/event.gif
Is there a bug on your side, or am I doing something wrong?