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
3
votes
2 answers

How to convert SVG to png or jpg

I've tried by using batik. But I'm getting empty png file. I've also included all the required jars. My code is import org.apache.batik.transcoder.image.PNGTranscoder; import org.apache.batik.transcoder.TranscoderInput; import…
nmkyuppie
  • 1,456
  • 1
  • 14
  • 30
3
votes
1 answer

How to run process builder command as thread in java

I need to do the image conversion inside a folder using process builder with the help of image magick tool. I need to delete the original files after conversion but when i used wait for it takes long time to complete. i used the following code …
Dhinakar
  • 4,061
  • 6
  • 36
  • 68
3
votes
1 answer

Effective method to convert an image file from RGB to YUV

I am developing an Android application project using Java. I have an image whose extension is JPG or BMP in RGB color space. I want to convert it from RGB to YUV. I have googled and found that we can achieve it by using the brute force method of…
user3714221
  • 31
  • 1
  • 5
3
votes
1 answer

How do I resolve this error: TypeError: argument 1 must be pygame.Surface, not PngImageFile

I used to use Python 2.7 and pygame and, to load a PNG and blit it to a surface, this code was enough: sprites = pygame.image.load('sprites.png') background.blit(sprites, (0, 0), rect) Now I'm using Python 3, which means I need to load PIL to deal…
user1115363
3
votes
1 answer

A code for step by step JPEG compression

The JPEG compression steps are as follows: Raw image data -> forward DCT -> Quantization -> Entropy encoding -> JPEG image There are numbers of converters and APIs out there and the converting process is a single API call. I was unable to find a…
Risina
  • 234
  • 3
  • 16
3
votes
1 answer

Batch convert/resize different image formats to JPEG of certain resolution with ImageMagick

How do I use mogrify to batch-convert a ton of files (.TIF, .EPS, .JPG but most annoyingly of all-) .PSD files and only keep their first layer? I found a solution on how to convert all images, but I kept getting filenames in my output-directory…
3
votes
1 answer

Client-side conversion of rgb-jpg to 8-bit-jpg using Canvas+HTML5

Many articles shows ways of converting jpeg files to grayscale using canvas+html5 at the client-side. But what I need is to convert an image to 8bit grayscale to reduce its size before uploading to my server. Is it possible to do it using…
3
votes
1 answer

In opencv how do I copy and scale a greyscale image into another colour image

I want to composite a number of images into a single window in openCV. I had found i could create a ROI in one image and copy another colour image into this area without any problems. Switching the source image to an image i had carried out some…
Emile
  • 11,451
  • 5
  • 50
  • 63
3
votes
1 answer

Conversion PDF to PNG or JPEG is very very slow using ImageMagick

I have a working PDF to PNG conversion script using PHP and ImageMagick but I am having a problem with the speed of the conversion. I know it works because with a very small PDF the time taken to convert is not that great, but with a 250kb file…
Tom
  • 12,776
  • 48
  • 145
  • 240
3
votes
3 answers

Convert UIImage to tiff/tif file

In my iPhone app, I need to convert UIImage to tiff/tif file for calling some API with tif type of parameter. So I'm supposed to get the UIImage from iphone photo library or taking a photo from camera. Please let me know whether this conversion…
2
votes
2 answers

convert a pdf for print

I have some pdf documents and I need to find a way to automate convert all the images included in the pdfs from RGB to CMYK. I prefer to use c# as programing language. I worked in the past with iTextSharp but it doesn't allow me to do this (it…
Zelter Ady
  • 6,266
  • 12
  • 48
  • 75
2
votes
3 answers

Converting byte array to bufferedimage results in null

I am trying to convert a byte array of length 128 to a 32x32 bitmap stored in a BufferedImage. I am using the following code: private BufferedImage fSP; public Pattern( byte[] aBitData ) { if ( aBitData == null ) { throw new…
ChrisV
  • 133
  • 2
  • 9
2
votes
4 answers

How does PDF's BitsPerComponent translate to Bits Per Pixel for images?

My goal is to convert a PDF into an image (specifically in TIFF). There is a PDF property called BitsPerComponent And According to description on the page, This property can take the value 1, 2, 4, 8 or 16. Other values are not supported in the…
dance2die
  • 35,807
  • 39
  • 131
  • 194
2
votes
2 answers

How to convert HEIC to JPG in React?

HEIC is Apple's own format to store high resolution images made with iOS cameras. But I would store on backend JPG, because HEIC is not displayed in most browsers, not even in Safari. SOLUTION 1 I tried this for the conversion: const buffer =…
János
  • 32,867
  • 38
  • 193
  • 353
2
votes
2 answers

How to convert images from the jpg format to ppm(P3)

I have recently learned how to read ppm3(P3) images in C++. I just read RGB pixels written in a plain format. I want to convert some certain jpg pictures to ppm3 and then experiment with different things, like identifying numbers there, the circled…