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
4
votes
1 answer

Convert .h5 file to .jpg with Python

I currently have a .h5 file containing grayscale imagery. I need to convert it to a .jpg. Does anybody have any experience with this? Note: I could possible convert the h5 file to a numpy array and then use an external library like pypng to convert…
Brand
  • 347
  • 2
  • 11
4
votes
1 answer

Converting an image to binary in javascript using base64

I have to convert an image to binary for storing it through IPFS and retrieve it again as a viewable image. I should do this with javascript code. Does any body have any clear example of how to do this? Will Base64 help me? Thanks in advance
we.are
  • 409
  • 2
  • 6
  • 15
4
votes
2 answers

React Native Speed up converting image uri to base64

I'm working on a react native iOS app where I want to take certain images from a user's Camera Roll and save them in cloud storage (right now I'm using Firebase). I'm currently getting the images off the Camera Roll and in order to save each image…
Onaracs
  • 935
  • 3
  • 14
  • 22
4
votes
1 answer

Imagecreatefromwebp(): WebP decode: fail to decode input data

I am trying to convert a webp file to JPEG using imagecreatefromwebp() but unfortunately, it throws me a warning: Warning: imagecreatefromwebp(): WebP decode: fail to decode input data. Here's my code $filename =…
Bishnu Dev
  • 117
  • 1
  • 12
4
votes
2 answers

How to convert a DICOM from Monochrome 1 to Monochrome 2?

I am working on a project with DICOM images where I need to compare two DICOM images. The problem is, one is in monochrome 1 and the other is in monochrome 2 (zero means white and black, respectively). How can I convert these pixel intensities to…
Sean M
  • 91
  • 2
  • 5
4
votes
3 answers

OSError when using PIL to save image as TIFF with compression

I am trying to change the dpi of my PNG images and convert them to TIFF using Pillow/PIL like so, from PIL import Image import os for fl in os.listdir(os.getcwd()): name, ext = fl.split(".") im = Image.open(fl) im.save(name + ".tiff",…
pbreach
  • 16,049
  • 27
  • 82
  • 120
4
votes
3 answers

How to convert an image file to BMP programmatically using native Windows XP capabilities?

Is it possible to convert an image file to BMP format using WindowsXP's native libraries and scripting capabilities? I'm talking about WSH, JScript, VBS, etc... C++ is also good for what I need if it can be compiled with Dev-C++
GetFree
  • 40,278
  • 18
  • 77
  • 104
4
votes
3 answers

PHP - save a converted image into a folder

I am trying to convert a jpeg image to black & white (grayscale) through the php function IMG_FILTER_GRAYSCALE . It works fine but i would like to save the image into a folder. Below the code: $im =…
Roberto Rizzi
  • 1,525
  • 5
  • 26
  • 39
4
votes
2 answers

How to change background color of an eps file while converting it to jpeg or png

I am converting eps (Encapsulated PostScript) files to jpeg files with ghostscript. A sample command I use is: gswin32.exe -sDEVICE=jpeg -dJPEGQ=100 -dNOPAUSE -dBATCH -dSAFER -r600x600 -dGraphicsAlphaBits=4 -dUseCIEColor -dEPSCrop…
Serhat Ozgel
  • 23,496
  • 29
  • 102
  • 138
4
votes
2 answers

Convert RGB image to YUV and convert back in matlab

I am very new to Matlab. I am trying to convert an RGB image to YUV, and convert it back to RGB. This is my code: RGB = imread('ist.jpg'); R = RGB(:,:,1); G = RGB(:,:,2); B = RGB(:,:,3); Y = 0.299 * R + 0.587 * G + 0.114 * B; U = -0.14713 * R -…
Umut Ulutas
  • 53
  • 1
  • 1
  • 4
4
votes
5 answers

JPEG encoder super slow, how to Optimize it?

I'm building an App with actionscript 3.0 in my Flash builder. This is a followup question this question. I need to upload the bytearray to my server, but the function i use to convert the bitmapdata to a ByteArray is super slow, so slow it freezes…
Myy
  • 18,107
  • 11
  • 37
  • 57
4
votes
1 answer

How to convert CMYK/RGB TIFF to RGB JPEG using PHP IMagick

I have a PHP application which needs to deal with incoming TIFF files. I have neither control nor knowledge over the colorspaces of this TIFFs and the application should store all incoming images as RGB JPEGs. Problem is, incoming TIFF files are…
hijarian
  • 2,159
  • 1
  • 28
  • 34
4
votes
2 answers

Compress JP2 (JPEG2000) image with a high compression level

After reading Image from database, I need to convert that Image to JP2 (JPEG2000) Update: I used FreeImage to convert the image to JP2 // Load bitmap FIBITMAP dib = FreeImage.LoadEx(imageName); // Check success if (dib.IsNull) { …
Dark_Knight
  • 387
  • 4
  • 20
4
votes
1 answer

Public service to convert bmp/gif/png/etc to jpg?

Is there any public service which I can use to convert any of the common image formats (gif, png, bmp, tga, etc) to a jpg? I'm looking for something I can use from within javascript, sending the image to whereever, then getting back a jpg I can…
BrianFreud
  • 7,094
  • 6
  • 33
  • 50
3
votes
1 answer

Quick, multi-OS, command line conversion of JPEG-2000 to JPEG

I am working on a web script that handles image processing using ImageMagick. It takes relevant parameters, executes an ImageMagick command at the command line or shell depending on OS, and passes the raw image data back to the script. The language…
aaron
  • 315
  • 1
  • 7
1 2
3
24 25