~vincent-vandevyvre/pyunraw/trunk

« back to all changes in this revision

Viewing changes to pyunraw.py

  • Committer: Vincent Vande Vyvre
  • Date: 2019-03-03 09:18:10 UTC
  • Revision ID: vincent.vandevyvre@oqapy.eu-20190303091810-90l7fgt45kaamoj4
Add quick_unraw() func, update the doc

Show diffs side-by-side

added added

removed removed

Lines of Context:
682
682
            self.raw.demosaicate(index, out)
683
683
            self.out_filename = self.raw.out_file
684
684
 
 
685
    def quick_unraw(self, dest=""):
 
686
        """Decode a half-size middle-quality of the raw image.
 
687
 
 
688
        This only usefull to see a preview of the image when the (old) camera
 
689
        doesn't include a thumbnail into the file.
 
690
 
 
691
        If some custom parameters are already fixed, the profile is cleared 
 
692
        and will be restaured after the demosaication.
 
693
 
 
694
        Args:
 
695
        dest -- destination file name whitout extension
 
696
 
 
697
        Return the path of the file created
 
698
        """
 
699
        if not dest:
 
700
            dest = self.filename
 
701
 
 
702
        dest = os.path.splitext(dest)[0]
 
703
        self.raw.reset()
 
704
        self.set_interpolation_method(8)
 
705
        self.unraw(0, dest)
 
706
        out = self.raw.out_file
 
707
        self.raw.reset()
 
708
        self.apply_new_profile(self.profile)
 
709
        return out
685
710
 
686
711
    def unraw_dark(self, filename, dest=""):
687
712
        """Decode a raw image as a dark.