Questions tagged [imagemagick]

ImageMagick is an open source software suite for displaying, converting and editing raster image files.

The software mainly consists of libraries and a number of utilities for manipulating images.

File format conversion

One of the basic and thoroughly-implemented features of is its ability to efficiently and accurately convert images between different file formats. Over 100 different formats are supported.

Language Bindings

There are ImageMagick bindings for most popular programming languages including , , , , , , , , , , , and . There are also bindings for which only operate in Mac OS X and Linux, not iOS.

Distribution

is cross-platform, and runs on all recent versions of Microsoft Windows (except Windows 95), and Unix-like systems including Mac OS X, Linux, Solaris, and FreeBSD. The project's source code can be compiled for other systems, including AmigaOS 4.0 and MorphOS.

Resources

9193 questions
3
votes
1 answer

Convert rgb to png with imagemagik

I am trying to convert some image (raw) that has no header, just the pixel values to a png, so I can view it. I found some information here (using imageMagik) and it works if the image is one channel. I used the command convert -depth 8 -size…
sop
  • 3,445
  • 8
  • 41
  • 84
3
votes
2 answers

Convert Magick::Image to cv::Mat

I am trying to convert an image loaded in from a GIF via Magick++ into a cv::Mat. I have already converted from cv::Mat to Magick::Image but cannot seem to find how to pull the data out of an Image in Magick in order to load it into a Mat. What's…
adjkant
  • 163
  • 2
  • 9
3
votes
1 answer

image processing to remove lines

I am trying to end up with an image of only text. My code would take this image as greyscale and remove all the long lines from it and everything except for text/symbols/measurements. Is this something that can be accomplished using image…
Yep
  • 141
  • 1
  • 13
3
votes
2 answers

ImageMagick: cannot convert 24-bit bmp image to 8-bit bmp image

My programming platform is: Ubuntu 3.19 ImageMagick 6.7.7 Programming language: php My code: $img = new Imagick($image_input_24bit_bmp); $img->setimagedepth(8); $img->writeImage($image_output); Then image_output is still 24-bit bmp image. The…
Cuongvn08
  • 85
  • 9
3
votes
0 answers

Programmatically converting Adobe image files to jpg

I'm interested in hearing about the best practices for converting Adobe files to jpg's for an upcoming project. I've read some about Imagemagick being used to convert .psd files to jpg, but what about .ai? Is there any magic bullet solution for…
pstinnett
  • 275
  • 6
  • 15
3
votes
2 answers

PHP: Convert alpha channel to white background with ImageMagick

I'm trying to remove the alpha channel (transparency) of a PNG file and replace it with a white background in PHP. Using ImageMagick I've tried several functions with no luck so far. These are the function which didn't work: …
ninsky
  • 1,772
  • 23
  • 31
3
votes
3 answers

im4java throws FileNotFoundException error

I need to use ImageMagic in my java project. I already installed ImageMagic-7.0.3 on Windows 10 (command line works fine) Then, i added dependency to im4java in maven file. When i try to do some action like: public static void main(String[] args)…
Konrad Dziurdź
  • 717
  • 3
  • 8
  • 15
3
votes
1 answer

Fastest way to read PNG metadata in PHP

I would like to extract two fields from a PNG file. Namely, the geometry field and one of the fields from the metadata. What is the fastest way I could go about doing this? I have benchmarked my script that currently performs this and by far the…
Jonathan Chan
  • 2,355
  • 3
  • 25
  • 38
3
votes
2 answers

Images with Apostrophe CMS

I am trying to figure out the best way to upload and show images in articles. Right now I have the following code under the apostrophe-blog-pages show.html template
{{ apos.area(data.piece, 'main', { widgets: { …
Parik Tiwari
  • 1,525
  • 1
  • 12
  • 19
3
votes
1 answer

Combine two single-channel TIFF stacks to a single multi-channel stack

I've got two tiff stacks with time-lapse data corresponding to different channels acquired in a microscopy experiment. I'd like to merge them into a single stack with two channels. Both stacks are 16-bit greyscale. When I use: convert stack1.tiff…
mattek
  • 903
  • 1
  • 6
  • 18
3
votes
2 answers

Setting image orientation exif data using imagemagick

I have a set of images with corrupt exif orientation data. I would like to change the orientation of these images using imagemagick. I found the following command mogrify -set "%[EXIF:Orientation]" BottomRight image.jpg but it does not seem to work…
Pablo Jomer
  • 9,870
  • 11
  • 54
  • 102
3
votes
2 answers

In Imagemagick what is the opposite of crop. Add padding to one side of an image

I know about extend and gravity. I have an image and I want to increase its canvas size to 400x400 AND I want to take the existing image and place it at a specific X and Y in the canvas. I have the Specific values, but I need the ability to move…
Case
  • 4,244
  • 5
  • 35
  • 53
3
votes
1 answer

Replace only background color of PNG

Here is my code: #! /usr/bin/env sh # Generate test image. convert -size 100x60 xc:blue -fill blue -stroke black -draw "circle 50,30 55,55" in.png # Make background transparent. convert in.png -fill none -draw 'matte 0,0 floodfill' -flop -draw…
3
votes
1 answer

Facebook-like resizing of images using ImageMagick

I would like to resize (downscale) some images the way that Facebook does it. ImageMagick, but hey, I'm open for suggestions :) I believe Facebook is doing this: Say you have a max width x height of 250x200, Facebook is optimizing the use of this.…
freeall
  • 3,187
  • 4
  • 24
  • 31
3
votes
3 answers

Imagemagick - change policy.xml on Heroku

I'm trying to access images via https on Heroku with Imagemagick. How can I change the policies (in policy.xml) on Heroku? Heroku made an "ImageMagick security update" in May, 2016: https://devcenter.heroku.com/changelog-items/891 I can see the…
JohnnyTheTank
  • 668
  • 5
  • 14
1 2 3
99
100