Page 2 of 2 FirstFirst 12
Results 21 to 23 of 23

Thread: Resizing a raw file and keeping it raw.

  1. #21

    Join Date
    Nov 2009
    Location
    Provence, France
    Posts
    990
    Real Name
    Remco

    Re: Resizing a raw file and keeping it raw.

    In theory there's no reason why you couldn't resize a RAW file the same way as any other image file type (perhaps with some restrictions). But for RAW files there's a few things that complicate it:
    - The file is stored/read as (multiples of) 8-bit bytes, but RAW data is usually 12- or 14-bit, so either you limit yourself to cuts where byte bounds coincide with pixel bounds, or you'd have to decode (part of) your raw file
    - A pixel in RAW data has only information for one colour, and to get the three base colours you'd have to make sure you work with squares of 4 pixels
    - The metadata will have to be preserved intact, except for the image size information (which you change on cropping); but part of the meta-data information is in a manufacturer-specific (and usually unpublished) format. That makes writing to the meta-data rather dangerous: you run a chance that some of the decoders won't understand your modified RAW file any more, either because there's now contradictory information, or you messed up some of the data.

    So cropping is already somewhat difficult. I'm not even sure resizing/resampling is possible without decoding the RAW data. But if you have to decode/demosaic the RAW data to do your resizing, why bother to re-encode in RAW (with all the extra errors that induces). Ad to that that some RAW formats are compressed (usually lossless compression), and the job really gets too complicated to be useful

    But there's a site that provides RAW files in a lot of formats, perhaps you can find some smaller usable ones there.

  2. #22

    Join Date
    Dec 2008
    Location
    New Zealand
    Posts
    17,660
    Real Name
    Have a guess :)

    Re: Resizing a raw file and keeping it raw.

    Quote Originally Posted by revi View Post
    In theory there's no reason why you couldn't resize a RAW file the same way as any other image file type (perhaps with some restrictions). But for RAW files there's a few things that complicate it:
    - The file is stored/read as (multiples of) 8-bit bytes, but RAW data is usually 12- or 14-bit, so either you limit yourself to cuts where byte bounds coincide with pixel bounds, or you'd have to decode (part of) your raw file
    - A pixel in RAW data has only information for one colour, and to get the three base colours you'd have to make sure you work with squares of 4 pixels
    - The metadata will have to be preserved intact, except for the image size information (which you change on cropping); but part of the meta-data information is in a manufacturer-specific (and usually unpublished) format. That makes writing to the meta-data rather dangerous: you run a chance that some of the decoders won't understand your modified RAW file any more, either because there's now contradictory information, or you messed up some of the data.

    So cropping is already somewhat difficult. I'm not even sure resizing/resampling is possible without decoding the RAW data. But if you have to decode/demosaic the RAW data to do your resizing, why bother to re-encode in RAW (with all the extra errors that induces). Ad to that that some RAW formats are compressed (usually lossless compression), and the job really gets too complicated to be useful
    I think removing fingernails - with pliers - one by one - ...

    ... would be less painful, to be honest

  3. #23

    Join Date
    Nov 2009
    Location
    Provence, France
    Posts
    990
    Real Name
    Remco

    Re: Resizing a raw file and keeping it raw.

    Quote Originally Posted by Colin Southern View Post
    I think removing fingernails - with pliers - one by one - ...

    ... would be less painful, to be honest
    Well, not for the end user...
    And that's why I said that croping RAW should be possible in theory :P
    I'm sure you know the one about there being no difference between theory and practice, in theory that is.

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •