FAQ Database Discussion Community


Imagemagick crop loop not working well

bash,crop,imagemagick-convert
I need to cut 16 images out from one. All images in .tif format. Coordinates of top left points of each images contains in text file. It's like 100,200 300,400 ... I used this bash code IFS=',' while read x y; do convert image.tif -crop 262x262+$x+$y image_%02d.tif; done < coordinates...

Why converting this PDF file fails when using ImageMagick/Ghostscript?

pdf,imagemagick,ghostscript,imagemagick-convert
I want to convert this PDF file compiled with LaTeX (XeLaTeX engine so that to use an Arabic font) and I want to upload it to the web and prevent copy and paste of its content. Since I am looking for a freeware to do that, I came across two...

Imagemagick text diacritics on image

imagemagick-convert
I'm trying to use ImageMagick to write some text on image. Unfortunatelly, by running this command convert -background lightblue -fill blue -font /usr/share/fonts/truetype/msttcorefonts/Arial.ttf -pointsize 72 label:ĂăÂâÎîȘșȚț label.png The resulting image has question marks instead of ȘșȚț characters, but ĂăÂâÎî are ok. What am I missing? I'm on Ubuntu 14.04. Thank...

How to increase quality of image through imagemagick binary convert?

php,image,imagemagick,exec,imagemagick-convert
Hereby,I working in Image conversion using imageMagick binary convert. When i resize small image into large image and also increase quality of image. Here my sample code: $img = 'old_image.png'; $path1= 'new_img.png'; exec("convert $img -quality 100% -density 600 -resize 2480x3508 -depth 400 $path1"); When i used this command it working...

ImageMagick : Compose with results of multiple convert

imagemagick,imagemagick-convert
I want to create an image from to others, which are results of convert operations their self, without saving intermediate results to file system. Long explanation: I have two images, the two needs specific transformations : avatar.jpg needs to be transformed to a rounded image -> rounded-avatar.jpg background.jpg needs to...

convert and crop image in tiles with python

python,imagemagick,crop,imagemagick-convert,wand
I tried to tile a JPG image in python. Usualy I use imageMagick .. so I have seen than wand seems to do this work ... But I am not able to translate convert -crop 256x256 +repage big_image.jpg tiles_%d.jpg someone ca help me ?...

Imagemagick crop while keeping size

imagemagick,imagemagick-convert
I want to crop the top 10 pixels of an image, but to keep the width All exmaples I found look like convert rose: -crop 90x60-10-10 crop_all.gif I need to supply the 90x60 so for the result size How can I crop with something like +0+10 and not supply a...

How to properly generate an A3 sized pdf from jpg with convert

imagemagick,pdf-generation,image-resizing,imagemagick-convert
On linux using the imagemagick tool convert, I want to convert my large jpg files into A3 pdfs <= 10MB in order to print those files with the best quality at the store. When running: $ convert summer-bokeh.jpg -quality 100 -density 300 -resize 2480x3508! summer_resized.pdf I'm trying to force the...

Imagemagick convert tif to rgba16 png

imagemagick,png,tiff,imagemagick-convert
So here is my source tif image: $ identify -verbose source.tif Image: Format: TIFF (Tagged Image File Format) Class: DirectClass Geometry: 512x512+0+0 Resolution: 72x72 Print size: 7.11111x7.11111 Units: PixelsPerInch Type: Palette Base type: TrueColor Endianess: MSB Colorspace: RGB Depth: 8-bit Channel depth: red: 8-bit green: 8-bit blue: 1-bit And I've...

Why this parameter '+profile “*”' get convert killed?

imagemagick,ubuntu-14.04,imagemagick-convert
If I run this command, convert -limit memory 2071963648 -quality 100 -alpha off -density 165% -scene 1 infile.jpg outfile.png The conversion runs without any issue. However if I add +profile "*", convert +profile "*" -limit memory 2071963648 -quality 100 -alpha off -density 165% -scene 1 infile.jpg outfile.png The process is...

How to store ImageMagick output into Bash variable (and then use it)?

bash,imagemagick,imagemagick-convert
I use ImageMagick and need to do conditional resize of images. For that I store results of the identify tool into variables. $infile='test.jpg' width=$(identify -ping -format %w $infile) height=$(identify -ping -format %h $infile) But before resizing I want to do some transformations that change image size: -trim and -shave. So...

How to create transparent image for rubber stamp in ImageMagick

imagemagick,imagemagick-convert
I have to create an image, which is an overlay texture made up of a white image with some transparency to give it the appearance of a rubber stamp. For reference see the image "stamp_overlay.png" in the video http://railscasts.com/episodes/374-image-manipulation . This is what i did: convert -size 70x70 canvas:white stamp_overlay1.png...

How to speed up a complex image processing?

php,image,imagemagick,converter,imagemagick-convert
Every user will be able to upload 100 TIFF (black and white) images. The process requires: Convert tif to jpg. Resize image to xx. Crop image to 200px. Add a text watermark. Here is my PHP code: move_uploaded_file($image_temp,$destination_folder.$image_name); $image_name_only = strtolower($image_info["filename"]); $name=$destination_folder.$image_name_only.".jpg"; $thumb=$destination_folder."thumb_".$image_name_only.".jpg"; $exec = '"C:\Program Files\ImageMagick-6.9.0-Q16\convert.exe" '.$destination_folder.$image_name. ' '.$name.'...

ImageMagick escape character?

windows,command-line,character-encoding,imagemagick,imagemagick-convert
Is there an escape character I can use to pick up a copyright symbol in an ImageMagick convert command label directive? I'm trying to mark a batch of images with a credit/copyright in the bottom-right corner. The batch is being handled by CMD script running in a Windows command line...

ImageMagick command without intermediary file fails

imagemagick,imagemagick-convert
I'm working on the example from ImageMagick called "Gel" Effects on the ImageMagick Example pages. Instead of executing the ImageMagick script in many steps with intermediary images, I want to do it in ONE step with no intermediary files. My code looks like this (95% same as the example): convert.exe...

Cleaning up an image for OCR with ImageMagick and 'textcleaner'

imagemagick,ocr,tesseract,imagemagick-convert
I have the following image that I'd like to prepare for an OCR with tesseract: The objective is to clean up the image and remove all of the noise. I'm using the textcleaner script that uses ImageMagick with the following parameters: ./textcleaner -g -e normalize -f 30 -o 12 -s...

ImageMagick SVG to PNG conversions removes gradients

php,svg,imagemagick,imagick,imagemagick-convert
I'm trying to allow users to upload an SVG image through a CMS and generate a fallback PNG so that when the CMS displays the content on the front end the PNG fallback is shown for older browsers. The problem is that when I upload an SVG the PNG output...

Need to crop+resize ~300000 files. Runtime = 4+ days. How can I speed up my bash script?

bash,imagemagick,runtime,imagemagick-convert,mogrify
I am working on creating a video timelapse. All the photos I took are .jpg images shot at 4:3 aspect ratio. 2592x1944 resolution. I want them all to be 16:9 at 1920x1080. I have written a little script to do this, but the process is not very fast. It took...

“Errno::ENOENT in ListingsController#create” in Rails application

ruby-on-rails,ruby,cloud9-ide,imagemagick-convert
After adding include CarrierWave::MiniMagick to my image_uploader.rb file as well as uncommenting the process: resize to fit => [200,300] line inside of image_uploader.rb, whenever I attempt to create a new Listing in my app I receive the following error message: "Errno::ENOENT in ListingsController#create" with the explanation of "No such file...

ImageMagick - Making 2 GIFs into side by side GIFs using IM convert

image,unix,imagemagick,imagemagick-convert
I have 2 GIFs that are the same length. I want to put the GIFs beside each other to have 1 GIF with both playing at the same time. I have tried to use the convert tool with: convert +append 1.gif1 2.gif output.gif However, this seems to blend all the...

Calculate the main memory consumption of ImageMagick convert when appending images

imagemagick,imagemagick-convert
I append several PNG images with the ImageMagick convert tool. convert -set colorspace RGB `ls *.png` -append outout.png This are the color parameters of the input files: $ identify input1.png input1.png PNG 9600x1800 9600x7200+0+0 8-bit sRGB 355KB 0.000u 0:00.000 4 input files exist with identical parameters. The output file has...

memory problems with imageMagick?

windows,imagemagick,imagemagick-convert,color-palette,hdd
I have problems using convert F:\path\source.png -define registry:temporary-path=F:\path -limit area 0 -type palette -colors 256 F:\path\target.png the temporary-path and my source and target images are on an external hard drive. I used area 0 because I don't want ImageMagick to use my systems memory or C:. The error(s) I am...