All Questions

Tagged with
Filter by
Sorted by
Tagged with
57
votes
9answers
35k 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 ...
18
votes
3answers
18k views

How to split an image vertically using the command line?

Say I have a large 800x5000 image; how would I split that into 5 separate images with dimensions 800x1000 using the command line?
15
votes
2answers
2k views

How to cut image by top 30% in Unix?

I want to cut 30% from the top of the image. I know the thread How to cut a really large raster image into smaller chunks? but there is no successful approach because I cannot find a distance measure ...
12
votes
2answers
2k views

How to generate a lot of (blank) images files?

For a test, I need to quickly create 1700 jpg-images (even blank) in a defined size 1000x706. I wonder if we could do this with a shell script or a program (like ImageMagick). I wish they called img_0....
11
votes
1answer
3k views

Combine multiple PDF files into one (arranged in a matrix)

Having a set of PDF files, lets say: in-01.pdf, in-02.pdf, in-03.pdf, ... I would like to combine all of them into a single one, forming an M x N matrix. The command montage allows for doing so (M ...
8
votes
1answer
7k views

ImageMagick (or other) for UTF-8 text to image

I'm trying to create many single-character images using convert. The purpose is to provide a plastics specialist with images to print onto keyboard keycaps. The ImageMagick documentation suggests ...
7
votes
3answers
2k views

How to rescale several images to same size

I have several image files in a directory. These images are similar size and have same background color. How can I make all images same size by adding background like this attached image?
7
votes
1answer
358 views

converting pdf pictures to png files makes pictures too small

I'm converting a bunch of pdf vector figures to png files. for f in *.pdf do convert -trim ${f} "${f}.png" done rename 's/\.pdf//' *.png But the dimension of the pictures are too small. The doc ...
6
votes
2answers
200 views

How to find y-axis joint similarity in two pictures?

I want to merge two pictures but I do not know how to find the cut location in y-axis by any Linux/Unix tools, but here ImageMagick as the first idea. Any approach is welcome: a programmatic solution ...
6
votes
2answers
937 views

Ways to convert and combine image files into a pdf file?

I have about 190 image files (png and jpg) in a directory. For more information, each image has 2500 x 3072 pixels, and about 500KB. I use the command convert from ImageMagik to convert and combine ...
4
votes
1answer
2k 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 ...
4
votes
4answers
350 views

Programmatically 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 ...
4
votes
1answer
2k views

Resize a very tiny xcf image without blurring or dithering it

I have some drawings I made with an Intuos tablet. All of these drawings are 25x35 or so. The color of each pixel was very carefully selected. They're kind of like 'miniatures.' I need to resize ...
4
votes
1answer
2k views

Imagemagick: set IPTC parameters in jpeg image

With the Imagemagick command $ identify -verbose image.jpg so many properties of the image are shown. For example, in the output I can find Profiles: Profile-8bim: 1058 bytes Profile-iptc: 1017 ...
3
votes
1answer
11k views

Imagemagick used to generate PPM's in Linux, PPM's are unreadable

I need to generate PPM's as raw data sources for one program. I have a bunch of png's as Input, which I'm going to convert ppm's. When I try a tool like mogrify it generates files, but these are ...
2
votes
1answer
570 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 ...
2
votes
1answer
226 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 ...
2
votes
1answer
38 views

record image effects as animations

I've done only some very basic stuff with ImageMagick (mainly resizing, also messing with color filters a bit). Imagemagick has a simple example for overlaying images: convert anthony_1.jpg ...
2
votes
1answer
1k views

Imagemagick 'convert' text to image: ReadTEXTImage: Assertion

I'm trying the following command to convert text to an image: $ echo test | convert text:- text_box_trimmed.png convert: ../../coders/txt.c:198: ReadTEXTImage: Assertion `exception->signature == ...
2
votes
1answer
530 views

How to extract comment from ppm file?

I have ppm file X.ppm with comment : xxd X.ppm|head -10 0000000: 5036 0a23 206d 6967 6874 796d 616e 6465 P6.# mightymande 0000010: 6c20 2d32 2e38 3034 3132 3232 3037 3833 l -2.80412220783 0000020: ...
2
votes
1answer
61 views

Pack images into PDF

I have many screenshots which were all taken under the same conditions: Same display resolution, same display scaling, PDF viewer at the same size, PDF zoom level the same, etc. They are of different ...
2
votes
1answer
133 views

Sorting image files based on whether the content is picture or graphics: updating an older solution?

Someone wanted to sort files in a directory according to whether the files are pictures(camera) vs. design graphics. On Stackoverflow, there is an older solution/proof-of-concept involving the ...
2
votes
0answers
166 views

Create small high-quality GIF/APNG from a bunch of PNGs

I have 50 PNGs (like those ones here) and I would like to create a GIF (or APNG) animation from it that approximately retains the quality and is small. What I'm doing so far is to rescale and throw ...
1
vote
2answers
10k views

Convert image with imagemagick command line convert tool

I have an image Image.png. How do I use the ImageMagick command convert to make this file into a Image.jpg file with the following requirements: File size is 200~500 kb. Resolution in not less than ...
1
vote
1answer
210 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 ...
1
vote
1answer
915 views

Merging pairs of TIFF files in a directory

For example, say a given directory has 1000 TIFF files named sample1.TIFF, sample2.TIFF, etc., all the way to sample1000.TIFF. I want to merge each pair of files: sample1.TIFF and sample2.TIFF are ...
1
vote
1answer
583 views

Automatically restoring verticality of the edges of a scanned photo

I want to scan a collection of rectangular photos, both color and black-and-white. I am generally quite happy with the scanning, but I run into some practical problems, due to the fact that photos are ...
1
vote
1answer
34 views

Using convert to create JPGs?

When I use convert image.png image.jpg to convert a PNG to a JPEG, does convert perform any lossy compression? How much?
1
vote
0answers
32 views

What does this 'exif:GPSInfo: 8253' mean in ImageMagick identify command?

Totally love the tool and documentation and currently trying to use EXIF data to geotag my own pictures. Just wondering what this exactly means: exif:GPSInfo: 8253 It pops up in the exif section ...
1
vote
1answer
35 views

How to get convert to not interpolate pixels?

I am using ImageMagick's convert to convert a bunch of .fits files (an image format used in astronomy) to an animated .gif. My astronomical images are pretty low resolution (150 x 300 pixels) but ...
1
vote
0answers
61 views

How to split an image with offset using ImageMagic? [duplicate]

I planning to print a large map(6400x15360) and I want to split that image to multiple images(1123x794). I found that -crop 1123x794 do that but How I can add offset so it will be easier for me to ...
1
vote
0answers
504 views

How to open a gif without loop repetition with oeg

I use to open .gif file with eog -f myfile.gif The gif animation is however running in loop. What I want is to display the animation once and then quit. How to avoid this? Please also help in ...
1
vote
0answers
530 views

To Adjust Brightness-Contrast in Plane with Gimp/ImageMagick/…?

This kind of plane is a common tool used to view Rontgen pictures in Radiology. It exists as a standard in many RTG programs in hospitals. I would like to have a similar tool open-source for ...
1
vote
0answers
79 views

How to preserve clearness while converting jpg to pdf file?

I would like convert a jpg file (a photo taken of two pages of a book) to a pdf file, with the goal of making the pdf file look like pages of a regular ebook file in terms of page size and ...
1
vote
0answers
214 views

Gigapixel Panorama not loading after converted with imagemagick

I made a 3GB tif panorama, but as 3GB is a too big size to open in a computer with a 3Gb RAM, i converted it to JPG convert input.tif output.jpg The result was a 15Mb(?!?) JPG, which i am unable ...
0
votes
1answer
810 views

Bulk Resize images in sub directories with Imagemagick

I'm trying to resize all images in a directory and sub directories. I have this script which I got from here: Use mogrify to resize large files while ignoring small ones and adjusted to: identify -...
0
votes
1answer
164 views

Find gif/jpeg files with png extension and convert to png

First command find and list jpeg/gif files with png extension. Second command convert a file to png. find . -type f -name "*.png" | xargs -L 1 -I{} file -i {} | grep -v 'image/png; charset=binary$' ...
0
votes
1answer
1k views

How can I make a montage which seamlessly tiles the same one image file?

I would like to preview how one single image (768x1024 px .tiff) would look as a pattern by generating an output file where it is tiled in such and such a way (4x4, 5x5, etc.). The image should be ...
0
votes
1answer
43 views

Replace a certain color of pixels in a png with another png image

I have a png (items.png) which consists of mostly black pixels. I want to replace all the black pixels with another image. (background.png) The images are not the same size, items.png is smaller ...
0
votes
1answer
1k views

Change default image viewer

# ... def show(): """ Show image """ t = Twitter(auth=authen()) try: target = g['stuff'].split()[0] if target != 'image': return id = int(g['...
0
votes
0answers
24 views

Deleting images all completely black images and files with the same name

I'm working on preprocessing images for a semantic segmentation task and have two folders with identically named images (one of the images in colour, and the other that have been colour coded for the ...
0
votes
0answers
540 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 ...
0
votes
1answer
410 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 ...