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

    UB BaseBitmap Alpha channels from file

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 280 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 16/08/2007 at 11:11, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R9.5-R10 
      Platform:      Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      The only place that I have difficulties with alphas in image files is in XCode (UB). If the image is just loaded, the alphas are incorrect. My usual solution is to call:

      bitmap->RemoveChannel(bitmap->GetChannelNum(0));
      

      But this creates undesirable results as well - in UB. Works a spiff otherwise. Doesn't seem to be clear information on how to get at the actual alpha channels. You can get the count, get the internal, but with reading a file, how do you know which channels (by number) are the actual alpha channels, pray tell? Any suggestions?

      Thanks,

      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 17/08/2007 at 04:00, xxxxxxxx wrote:

        GetChannelNum() should always give you the alphachannel as you get an AlphaBitmap from it.

        What is exactly not working with it?

        If you have other layers than the primary color layer beside the alpha channels, you maybe should check if it´s a MultipassBitmap and cast accordingly? Maybe that gets rid of any problems as MultipassBitmap seems to have more specific functions concerning working with any type of layers.

        However, this is all just guessed. Haven´t tried it.

        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 19/08/2007 at 19:46, xxxxxxxx wrote:

          Well, what I'm getting is as expected. In UB versions, Loading PNG/PICT images via C4D's QuickTime support yields a 'ghosted' image when there is an alpha channel in the file. Removing the channel works - per se - but you get no alpha, just stark transitions due to the lack of alpha. This doesn't occur in non-UB versions (PPC Classic, Windows). Why the alpha is mistranslated in the UB support is beyond me - works fine in Classic MacOS and Windows 32-bit (in Windows 64-bit, I opt for libPng instead with no PICT support). This could be Cinema 4D and/or QuickTime (?).

          It is so frustrating not having consistent image support (simplistic (as it can be) 2D bitmaps) across systems. This all has nothing to do with QuickTime though (?) as I replaced all PNG support with libPng - but, ah, libPng doesn't support *all* possible PNG formats and a user is complaining about missing thumbnails. Can't win... I could spend money on a robust library - and pass the cost to users - naaah. 😉

          Thanks,

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