Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Image data range

    SDK Help
    0
    4
    343
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      On 23/08/2015 at 03:48, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R14 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Hi folks,

      could someone clarify for me how I can get the data range of a given image? For instance, I have an image that ranges in colour values from 0-65535. How can I test for this data value range programmatically? I'm needing to get which data range the images are in, i.e. are they 0-255, 0-65535, 0.0-1.0.

      Cheers,

      WP.

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 23/08/2015 at 04:09, xxxxxxxx wrote:

        255 = 8 bits
        65535 = 16 bits
        float = 32 bits "and it can go out of range (0.f - 1.f)"

          
        BaseBitmap yourBitmap = ...;  
        Int32 bits = yourBitmap.GetBt();  
        
        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          On 23/08/2015 at 18:10, xxxxxxxx wrote:

          Hi Mohammed,

          that's what I thought. I'd been using COLORMODE to get the mode flag, but an experiment I ran was giving me an image with 0-65535 an 8 bit data range. It must be something else. I'll need to keep digging.

          Thanks,

          WP.

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            On 24/08/2015 at 07:59, xxxxxxxx wrote:

            Hi,

            I think, GetBt() is more what you'll want.
            There's also a Python example script, how to use it in the Python SDK examples: Copy32BitImage.py
            It should be easily transferable to C++.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post