Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    How to set options when saving TIF file

    Cinema 4D SDK
    2023 c++
    2
    2
    394
    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.
    • kbarK
      kbar
      last edited by

      Is it possible to set the Byte Order and Compression values when saving a TIF?

      BaseContainer bc; //What do we set here?
      bmp->Save(tiffFile, FILTER_TIF, &bc, SAVEBIT::USE16BITCHANNELS);
      

      efd07ecf-781c-46a1-8dd9-c4fc52cbf114-image.png

      https://www.gamelogicdesign.com
      https://www.plugins4d.com

      ferdinandF 1 Reply Last reply Reply Quote 0
      • ferdinandF
        ferdinand @kbar
        last edited by

        Hello @kbar,

        Thank you for reaching out to us. You cannot do what you want to do from the classic API. When we use the classic API interface BaseBitmap::Save internally, we always pass nullptr or the empty container when saving a FILTER_TIF. There is unfortunately no classic API translation layer anymore for this aspect of TIFF saving.

        But you can get the underlying ImageRef with BaseBitmap::GetImageRef and then use the Image API directly to save things as you want them to be saved:

        • Saving an ImageRef to Disk
        • maxon::MEDIASESSION::TIFF::EXPORT Namespace

        Note that other than in the classic API, image data is expressed by more than one type in the maxon API. To save a plain ImageRef, you will have first to insert it into a ImageTextureRef via ::AddChildren, as only it has the ::Save method.

        Cheers,
        Ferdinand

        MAXON SDK Specialist
        developers.maxon.net

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