Use this tag for questions related to the changing/combining of files containing pictures or other images. (Dumps of filesystems are often called images, but handling those is not called image-manipulation)

learn more… | top users | synonyms

11
votes
5answers
4k views

Change file created date from JPEG EXIF metadata

When uploading to an ftp site, the original file create date seems to be lost, and I get the upload date instead. However, the Exif data in the file is correct. Is there a tool to batch change the ...
0
votes
1answer
28 views

Is conversion between images and a text PDF possible

I have a scanned book as images compressed into a PDF file and I want to keep the book as is, but would like to extract the text from the images, so that it would be possible to select/copy it. Is ...
-1
votes
1answer
14 views

Detect WebP files

I am using Ubuntu and type doesn't seem to work for webp images: bash: type: test.webp: not found How can I discriminate webp images from the command line?
3
votes
2answers
40 views

Collate image list with name

How to create a collation of images in the format: image_name_1 [IMAGE#1] image_name_2 [IMAGE#2] image_name_3 [IMAGE#3] ... Using Imagemagick I can say something like: montage -label '%f' -mode ...
7
votes
5answers
11k views

How to rotate all images in a directory with imagemagick?

I want to rotate all the images in a directory that match a pattern. So far I have: for file in `ls /tmp/p/DSC*.JPG`; do convert $file -rotate 90 file+'_rotated'.JPG done but that gives no ...
0
votes
0answers
67 views

Using mogrify (imagemagick) to batch convert all my files (with params)

we are new to mogrify and I just read all I could find but somehow I am not succeeding to do the following. take a input path and process all files also in subdirectories trim all resize all image, ...
1
vote
0answers
25 views

How can I remove the embedded preview in an EPS file without destroying all metadata?

I have several EPS files data exported from Adobe Illustrator, which apparently embeds a TIFF preview so that the EPS file is previewable. This is undesired, because I use these files in XeLaTeX, ...
0
votes
0answers
10 views

Mogrify/imagemagick flatten + trim in 1 command nog working when processing JPG and TIFF

We are processing 500 images tiff and jpg using this command mogrify -path "PATH_TO\DONE" -trim -flatten -define jpeg:extent=500kb -format jpg -resize "1200x1200>" *.* It should open all images, ...
2
votes
1answer
28 views

Silhouette from an image

How can I create silhouette from an image in linux using the terminal? By creating silhouette I mean - how do I turn the RGB components values of an RGBA image to #000000, while preserving the alpha ...
4
votes
4answers
57 views

Programatically determine “uniformity” of image

I'm attempting to write a script which thumbnails our many thousands of assets. The assets use Flash for the most part, and I'm capturing them via chromium-browser on the command line. I pretty much ...
0
votes
1answer
49 views

jpegtran - losslessly crop left portion of image

I have a 1400x1400 image in which I want to trim 4 pixels to the left, 1 at the bottom and, to keep square proportions, 3 from the top. The problem is, whenever I perform a crop with jpegtran, pixels ...
1
vote
1answer
37 views

pdftoppm (v 3.0) very slow to convert thumbnail in newer version

On one of our local servers, I use pdftoppm (v 0.18.4) to capture the first page of a pdf file as a 1200px wide jpg. It's very quick, and works very well. I'm doing it like so: pdftoppm -f 1 -l 1 -...
0
votes
1answer
36 views

Making concentric circles in GIMP

I have a single layer image that is 480px square, which I am created with GIMP (it is blank). How can I make: Three concentric circles (the center being at 240,240 px) with radii 240, 180, and 60. ...
0
votes
0answers
28 views

How to create a gamma cross-fade of two pictures using ImageMagick?

I want to make a gamma composite image, as is common with making cross-fades between two video tracks. The composite frames of the cross-fade are made by cross-fading the gamma values of one picture ...
2
votes
0answers
19 views

Using a web browser to generate a gallery/slideshow from local files

I'm trying to see how far I can go with using a web browser for various tasks vs. native apps. One of these tasks is selecting a group of local image files and generate a preview/gallery/slideshow in ...
1
vote
1answer
52 views

Stop ImageMagick from rotating image on append

I took two photos with my phone, one horizontal and one vertical, and they show up fine in Eye of Gnome. When I try to glue them top-to-bottom with ImageMagick's convert: $ convert img1.jpg img2.jpg ...
1
vote
1answer
29 views

How to use ImageMagick's convert to rescale an image, adding letterboxing to produce a fixed size result?

I have some arbitrarily-sized images for which I want to produce fixed-size 800x600 thumbnails, which keep the original image ratio and add white letterboxing to make up the rest of the space. I'd ...
3
votes
4answers
3k views

How to resize a PNG file from the command line?

Suppose I have a image named 1.png which is currently 500px : height 1000px : width I want to resize it to: 50px : height 100px : width It must be output in PNG format, not JPG. An example would ...
1
vote
2answers
110 views

Create one pdf out of multiple (selected) images

To convert multiple images to pdf this script will do that for all images inside a folder: #!/bin/bash # for f in *.png; do convert ./"$f" ./"${f%.png}.pdf" done But each image is converted into ...
4
votes
1answer
2k views

Resizing and cropping images to an aspect ratio of 6x4 with width of 1024 pixels

I have a mixed set of images, each one has a slightly different resolution with a slightly different aspect ratio from other images. I have tried using commands like convert -resize and convert -...
2
votes
1answer
131 views

Cropping images using ImageMagick results in all output files (TIF) of same size?

I am scanning a rare old book (cookbook) for archiving using my Canon LiDE 110. The scans are .TIF files, and I want to batch crop them for uniformity, et cetera. This is how I am doing the batch ...
5
votes
1answer
2k views

Crop SVG drawing to canvas size in command line

I have SVG images produced by PlantUML, which has some parts of drawing outside of canvas. It makes it difficult to use such images and I need to crop drawing to canvas size. As I produce UML diagrams ...
0
votes
0answers
17 views

What Linux tool can I use to measure font sizes in a PSD file?

I've tried gimp (clicking the texts with the Text tool), but it doesn't work (adds a new text instead of focusing on the existing one). The font information is already there (I've asked a friend with ...
3
votes
1answer
105 views

overlay an image

I have two photos ( 1.jpg and 2.jpg) I want to make photo 2.jpg as a background and photo 1.jpg red colored overlay and I want the output to be like photo 3.jpg as follow ( I want to put photo number ...
4
votes
3answers
264 views

How do I find all square images in a directory

The images are stored in JPEG and PNG files. I want to get a list of those of them that are square.
0
votes
0answers
78 views

Resizing image with ImageMagick and Ruby on Rails

I have been trying to use Imagemagick to resize images uploaded by a user as a square. Currently, I am using the ! like so - 640x640! This works fine if the image I feed it is a resolution of ...
10
votes
6answers
10k views

shell command to get pixel size of an image

Is there a shell command that returns the pixel size of an image? I'm trying to produce an animated gif starting from different gifs with different sizes using convert (e.g. convert -delay 50 1.gif 2....
1
vote
1answer
274 views

ImageMagick convert grayscale to alpha, colorize, overlay

I'm a total noob with ImageMagick, but I have extensive experience with Photoshop – I know this should be a breeze for an ImageMagick veteran, but I'm pulling hairs here. I have a 24-bit RGB (not ...
28
votes
5answers
47k views

How can I convert a PNG to a PDF in high quality so it's not blurry or fuzzy?

There are a lot of questions out there about how to convert a PDF file to a PNG image, but I'm looking to take a nice sharp PNG file and just basically wrap it or embed it in a PDF file without having ...
8
votes
2answers
2k views

Is there a way to flatten a .pdf image from the command line?

In GIMP, I can import a .pdf, and use the GUI to flatten it (if it was made with many layers) by selecting "Flatten Image" in the "Image" dropdown menu. I can then export the .pdf with a new filename....
0
votes
0answers
48 views

imagemagick: compositing images with fractional X/Y offsets

Using a one-line imagemagick command, how can the offset of a destination image be defined in relation to the size of the source image? The following command superimposes two images with absolute ...
1
vote
0answers
37 views

How to cut a really large raster image into smaller chunks?

I have a large poster as a pdf-file. I need to create a raster image from it (for instance because there seems to be no pdf viewer which allows me to zoom sufficiently to see the contents). So I ...
0
votes
0answers
80 views

How to obtain the same effect as Camscanner default setting using terminal?

As of now, I can't find any linux command line tool to do it (Demonstration of Camscanner). I could do it using GIMP batch edit mode, But I am looking for existing command line tools/utilities. For ...
15
votes
4answers
8k views

Command line convert webp to jpg?

I'm using ubuntu 12.04. I've installed libwebp2 & libwebp-dev So far, no example found on the net of converting webp to jpg. Some webp files can easily converted by using imagemagick with ...
2
votes
1answer
366 views

Alpha removal with ImageMagick is bad but only with a white background

I'm getting surprising (to me) variations in antialiasing quality when converting a PDF (with black text on white only) to a PNG and removing transparency with ImageMagick (version 6.7.7.10 from ...
0
votes
0answers
102 views

Metadata preservation when modifying images with ImageMagic

I want to resize, convert or resize + convert images in JPEG, PNG and TIFF in each direction: jpg → tiff, tiff → png, etc. And I want to use -flatten as well. What does ImageMagick do with the ...
2
votes
1answer
57 views

Manipulating RGB values in PNG from command line

I'm looking for a command line tool/script which allows you to balance the colors in a PNG - similar to the "Adjust Color Balance" effect in Gimp (Colors > Color Balance...). Something like this ...
3
votes
1answer
203 views

Create an ARGB struct for C header from a PNG

I need to update a logo bitmap to an updated logo. The existing code uses a C header which is loaded via XChangeProperty. I have looked into imagemagick and the Gimp in order to convert the updated ...
16
votes
4answers
32k views

pdf to jpg without quality loss; gscan2pdf

When I convert a pdf file to bunch of jpg files using convert -quality 100 file.pdf page_%04d.jpg I have appreciable quality loss. However if I do the following, there is no (noticeable) quality ...
0
votes
1answer
332 views

Bash script to create montages of images with G'Mic

I need a bash script which will run through a folder of 100s of jpegs and create montages of every 30 images and output the montages with distinct file names. The G'Mic command to create a montage ...
2
votes
2answers
802 views

add filename as text in the corner of an image file

I have a bunch of jpeg images. Say 001abcd.jpg, 002abcd.jpg, and so on. I want to capture the filename and add it as a text in the image itself in one corner. So the result would be, for example, the ...
0
votes
1answer
182 views

Resizing/Processing only images in folder larger than specified height? [duplicate]

I have a folder with JPG images, some of which have a height dimension larger than 1900 pixels. I need a command that will ignore the images with a height dimension lower than 1900 pixels, while ...
1
vote
1answer
179 views

splitting an image into multiple pieces

I have an image as below. It is 2579*2388 pixels. Lets assume that it's bottom left corner is at 0,0. From that image I want to create multiple images as follows and save them in the working folder. ...
4
votes
1answer
4k views

Convert a folder of images into a multi-page pdf file using command line tools?

I have a folder with 100 jpg images. I want to convert these images into a multi-page pdf file, with all the images (cropped to A4 size). They are already in the correct rotation. Which tools should ...
1
vote
1answer
807 views

How to use convert command with bash to resize all images in a given directory?

I want to resize all PNG files in ~/somefolder/ whose filenames are NOT started with tn_ to 50% of its original size and rename the output file with a tn_ as its prefix and its original name. I know ...
0
votes
1answer
165 views

Imagemagick mogrify with shadow geometry

How can I specify the size of a shadow with imagemagick? This command works: montage foo.jpg bar.jpg foobar.jpg -background lightgray -geometry 1031x1642+57+57 -shadow -monitor -tile 3x1 out.png ...
4
votes
5answers
4k views

convert single-page landscape pdf into rescaled double-page portrait pdf

I'm having trouble using convert to do the following: I have a bunch of single-page pdf files whose geometry corresponds to a landscape A4 sheet. The actual content is visually split in 2 pages. ...
2
votes
1answer
184 views

Rotate image if width is greater than a value (i.e in pixels)

I was trying to rotate few hundred images which have 7000px height in 1000+ images how to rotate them from bash.
2
votes
1answer
198 views

ImageMagick vs GraphicMagick: How to move image

So, I have a bunch of files that I use as the basis for my wallpapers. Using ImageMagick, I can convert then using: convert \ -resize '1920x1080>' \ -extent 1920x1080 \ -background '#...
5
votes
3answers
193 views

What tools to use to eliminate metadata in graphics files?

What tools can I use to delete all the EXIF, IPTC, XMP, etc metadata from graphics files?