Questions tagged [image-conversion]

Use this tag for questions about conversion from one image format to another. This is for still images only; for video, use the [video-conversion] tag.

This tag applies to any kind of conversion from one still image format to another. Video conversion questions should use .

362 questions
72
votes
5 answers

Imagemagick Convert PDF to JPEG: FailedToExecuteCommand `"gswin32c.exe" / PDFDelegateFailed

I have PDFs that I need to convert to images. I have installed Imagemagick. I have a PDF named a.pdf that I can open (it is not corrupt) in the folder C:\Convert\ From the command line I am trying C:\Convert>convert a.pdf a.jpg And I am getting…
MatthewD
  • 6,719
  • 5
  • 22
  • 41
59
votes
8 answers

Problems with using a rough greyscale algorithm?

So I'm designing a few programs for editing photos in python using PIL and one of them was converting an image to greyscale (I'm avoiding the use of any functions from PIL). The algorithm I've employed is simple: for each pixel (colour-depth is 24),…
47
votes
1 answer

Convert Transparent PNG to JPG with Non-Black Background Color

I'm using System.Drawing.Image in .Net to do a simple conversion from png to jpeg. I'm basically just using these two lines of code: Image img = Image.FromFile(filename); img.Save(newFilename, System.Drawing.Imaging.ImageFormat.Jpeg); it works…
DaveS
  • 895
  • 1
  • 8
  • 20
33
votes
9 answers

Replacing vector images in a PDF with raster images

Is there any easy (scriptable) way to convert a PDF with vector images into a PDF with raster images? In other words, I want to generate a PDF with the exact same (un-rasterized) text but with each vector image replaced with a rasterized version. I…
28
votes
11 answers

JPG to PDF Convertor in C#

I would like to convert from an image (like jpg or png) to PDF. I've checked out ImageMagickNET, but it is far too complex for my needs. What other .NET solutions or code are there for converting an image to a PDF?
Coppermill
  • 6,676
  • 14
  • 67
  • 92
25
votes
5 answers

Convert BufferedImage to ImageIcon

How can I convert a BufferedImage to an ImageIcon? I can not find any documentation on this.
Get Off My Lawn
  • 34,175
  • 38
  • 176
  • 338
20
votes
2 answers

JPG vs compressed JPG vs WEBP - why WEBP isn't the smallest one?

I have this image (photo taken by me on SGS 9 plus): Uncompressed JPG image. Its size is 4032 x 3024 and its weight is around 3MB. I compressed it with TinyJPG Compressor and its weight was 1.3MB. For PNG images I used Online-Convert and I saw webp…
Radek Anuszewski
  • 1,812
  • 8
  • 34
  • 62
14
votes
3 answers

Convert favicon.ico to png to using ImageMagick Procedurally

It looks like ImageMagick does not always convert a single favicon.ico file to a predictable single png file - for some favicon's, it generates a bunch of other favicon-01.png, favicon-02.png, etc... Is there a way to figure out which one's the…
ina
  • 19,167
  • 39
  • 122
  • 201
13
votes
7 answers

How can I display an image in the terminal?

Is there any sort of utility I can use to convert an image to ASCII and then print it in my terminal? I looked for one but couldn't seem to find any.
user1447941
  • 3,675
  • 10
  • 29
  • 34
12
votes
1 answer

Conversion from CMYK to RGB with Pillow is different from that of Photoshop

I need to convert an image from CMYK to RGB in python. I used Pillow in this way: img = Image.open('in.jpg') img = img.convert('RGB') img.save('out.jpg') The code works, but if I convert the same image with Photoshop I have a different result as…
12
votes
4 answers

convert image to base64 in angularjs

I have a requirement where user will upload their image and i have to convert it into something and send it to .Net REStful service. I am new to angular js. Could someone please help
user2610160
  • 131
  • 1
  • 1
  • 8
9
votes
3 answers

Convert A Byte[] Array to Image in Xamarin Forms

Before asking this question I googled a lot but couldn't find a solution that suits mine. In Xamarin.Forms I have a byte[] array and I want to Convert that byte[] array to an Image. How can I achieve that, this is what I tried: In Front…
Jestin Saji Chacko
  • 113
  • 1
  • 1
  • 9
9
votes
3 answers

How to convert a pdf to an image?

Using pdfbox displays an error: import java.awt import javax` Based on the following code: imageType = BufferedImage.TYPE_INT_ARGB; //need to specifies java.awt String[] formats = ImageIO.getReaderFormatNames(); //need to specifies javax
Amit
  • 409
  • 1
  • 5
  • 12
8
votes
2 answers

Converting between multiple image formats in Objective-C

I want to be able to, being given a path to an image, convert that image into another image, but with a different format. By format I mean .png, .bmp .jpg .tiff, etc. In pseudocode, this is really easy: image = [ImageAPI open: imagePath] [image…
Alex
  • 5,009
  • 3
  • 39
  • 73
8
votes
0 answers

Getting "Error while decoding stream #0:0: Invalid data found when processing input" when using ffmpeg to convert tga to mp4

I've used ffmpeg to convert a bunch of tga files into an mp4 just fine for a few weeks, but it broke for no apparent reason earlier today. I have a pastebin with -loglevel debug here, but the command I use is the same as the one that has worked…
Calvin Godfrey
  • 2,171
  • 1
  • 11
  • 27
1
2 3
24 25