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

    Store picture pixel information

    Scheduled Pinned Locked Moved SDK Help
    5 Posts 0 Posters 528 Views
    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 Offline
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 11/11/2006 at 04:43, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   9.6 
      Platform:    Mac  ;  
      Language(s) :   C.O.F.F.E.E  ;  C++  ;

      ---------
      Hi!

      Is it possible to "scan" an image and store the pixel informations (like the rgb-value of each pixel), in an array, so that every other object can read this information any time?
      Does this only work with a plugin or also with coffee?

      Best regads!
      IcEberg

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 11/11/2006 at 08:23, xxxxxxxx wrote:

        Not sure what you are trying to achieve, but you can read bitmap data with the BaseBitmap class, both in COFFEE and C++.

        cheers,
        Matthias

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 12/11/2006 at 06:19, xxxxxxxx wrote:

          I want to store the information of each pixel of the picture in an array for example. So that it is possible to read out these information (out of an array, not again out of the picture) at any time, from "everywhere" in cinema 4d.

          Read in a picture once and use these information to change any kind of object. Like using the color-value of a pixel to rotate an object.

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

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 12/11/2006 at 10:27, xxxxxxxx wrote:

            Bitmaps are nothing more than arrays (?). Although they represent 2D images, the usual storage is a 3D array (width x height x depth). Depth depends upon the color space and other information (RGBA is a depth of four). Width elements are usually Byte-size (but can be larger) and store a color component at each depth level:

            0,0
                    (A)(A)(A)(A) ... (optional)
                   B B B B ...
                  G G G G ...
                 R R R R ...
                 ....
                                     (w-1)x(h-1)

            The upper left is the upper-left pixel. Each pixel is desribed with three or four depth values (planes).

            That should be all the information you'll ever need - why duplicate it? The C++ and COFFEE SDKs have a BaseBitmap class that will let you get and set the pixel information. Just store your own BaseBitmap pointer for the image and make it available to all of your plugin. Not certain about what you mean by "'everywhere' in Cinema 4D", but you can use your plugin to direct the bitmap information to the Cinema 4D facilities if they are accessible to the SDK (COFFEE is very limited in this respect).

            Consider that images can take up oodles of memory space (1024x1024 RGBA = 4MB). In low memory situations, all of that duplication may become critical.

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

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 12/11/2006 at 14:16, xxxxxxxx wrote:

              Big thanks for the information.

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