Click here to Skip to main content
15,559,275 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
i want to convert jpg images into RAW again.. How to do it?

What I have tried:

tried photoshop and google search solutions.
Posted
Updated 5-May-22 10:35am
Comments
CHill60 5-May-22 8:06am    
Please read the posting guidelines and use the "Improve question" link to share the code you are using

Short answer: You can't.

Because, RAW format is from camera sensor and have more bit per pixel than processed JPEG.
 
Share this answer
 
You can't: RAW files are just that - raw CCD data from the greyscale values received by a chip through it's colour filters.
When they are converted to a RGB image (of any type), information is changed and manipulated to produce the new image - which discards information.

When the output format is JPG, the situation is worse, because JPG is a lossy format: it compresses data by deliberately discarding information. You can see this if you open a JPG file in any editor software, then save it in a new file. The new file will be smaller than the original, but detail will have been lost forever. Repeat the process, and more detail will go. Eventually, you will have a blurred image that contain nothing useful - and it doesn't take many iterations to get significantly visible changes!

You cannot reverse a JPG file and get the original RAW file.
There are converters out there that will generate a RAW file from a JPG, but it will never contain the original information!

Why do you think this is a good idea?
 
Share this answer
 
Comments
CPallini 5-May-22 10:50am    
5.
You say "RAW" but I wonder whether you might actually mean "Photoshop Raw" ...

Photoshop will, itself, provide a means of converting .jpg to .RAW during display of a save-as dialog but only as it's proprietary type-of-raw (much as MS has many flavors of MS-fortified file extension in it's Office apps line Excel, Access, Word, etc). As "Photoshop RAW" then, in the drop-down selection, choose that .RAW and follow the prompt dialogs to provide, or not provide as the case might be, extra known parameters about the save ("Photoshop Raw Options") ... these might be "File Type" and "File Creator" but certainly "Header", and "Save Channels In".

You can see what you're up against though once you try to reopen that saved file; namely that you'll have to know the dimensions of the original .jpg. "Guessing" or "Swapping" is a shooting match which usually results in a mismatched array blit and no valid display.

Know this though, once you've managed to guess (or make a correct input of the dimension) you'll probably have to break the displayed channels into RGBA pastes to get the colored facsimile back.

Bottom line: don't try to use Photoshop RAW.

I know, I know, it's what I need to do because I've bought this pricey software and now I have to use it, damn it!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900