How can I convert a .jpg or .png image to .raw format?

24,155

Solution 1

I just find out here how to do that with Gimp !

Works almoust perfectly ! :P

Update

Used method:

  1. Export the file on Gimp: Ctrl Shift E
  2. On the export window, choose Raw Image Data on Select File Type

    1. Click on Export button
  3. On the raw image export window, Choose Planar for the RGB Save Type
    1. Click on Export button
  4. Open the folder where the file was saved and rename his extension from .data to .raw
  5. On Unity3d, chose Bit 8 for Depth on the Import Heightmap window

Unfortunately, the generated image by Gimp isn't that good... So, I'm still would appreciate some help.

Solution 2

Ubuntu by default has Imagemagick installed and provides the convert command line tool to convert to various image formats. You can simply do:

convert xyx.jpg xyz.RAW
Share:
24,155

Related videos on Youtube

Victoralm
Author by

Victoralm

Updated on September 18, 2022

Comments

  • Victoralm
    Victoralm over 1 year

    Is there any software that converts JPEG or PNG to RAW?

    I have been looking around and I've only found applications that do the reverse.

    • phuclv
      phuclv about 7 years
      why do you want to convert jpg to raw? It's pointless. Converting png to raw might also produces unexpected results, because png files are already demosaicized (if taken from camera), unlike filter camera sensors
    • Rodrigo
      Rodrigo over 5 years
      @phuclv Because some programs only accept raw files as input (like Unity reading heightmaps).
  • Torrien
    Torrien over 8 years
    If you add the procedure to the answer I will up vote. Please remember to quote but also to place the answer locally for future reference.
  • Rodrigo
    Rodrigo over 5 years
    I've just tried this, but got convert-im6.q16: no encode delegate for this image format 'RAW' @ warning/constitute.c/WriteImage/1180.