Saving PNGs?



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

    On 27/12/2007 at 02:57, xxxxxxxx wrote:

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

    ---------
    Hi there again!
    My export is nearly there with its basic functionality. However one thing is missing yet: I want to allow the user to force texture format conversion. For example if he used BodyPaint to create a texture and used a TIF for that, I want the ability to force a conversion to another image format. I already implemented this for TIF<->JPG, which was pretty simple: Open the original image and save it in the other format, using BaseBitmap::Save(...). I thought I could do the same for PNG, however I seem unable to find a way to save a PNG file.

    Any help with that would be appreciated.



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

    On 27/12/2007 at 11:03, xxxxxxxx wrote:

    If you look at BaseBitmap::Save() more closely, PNG is not a format option. For instance, with interPoser Pro I opted to save a PCT and convert to RSR for Poser pose thumbnail saves because of this.

    I have used libPNG to successfully load PNG images into Cinema 4D - because QuickTime is not available on Windows 64-bit. One would suppose that if it can be done in this direction, the other direction should be possible as well.

    Building libPNG as a static library and adding to your plugin project is the simplest way to go. If you need a prebuilt static library with my source example (loading into a BaseBitmap only unfortunately), let me know.



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

    On 27/12/2007 at 11:33, xxxxxxxx wrote:

    yes, I actually looked at that BaseBitmap::Save() and was pretty surprised that I didn't find PNG in there, although C4D has the capability to save PNGs obviously.
    I've worked with libPNG I think. I'll look into that. Thx. Just thought there was an integrated solution for that in the C4D API.
    Today I decided to look into the DDS format, too, so it's probably not a bad idea to look into the Bitmap classes used by C4D anyway.



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

    On 27/12/2007 at 11:45, xxxxxxxx wrote:

    The Picture Viewer allows this but the SDK doesn't (?). I was thinking that you can load an image into the Picture Viewer using ShowBitmap(Filename/BaseBitmap). But have no idea how you would then procedurally call Save As... and make the appropriate settings. This is one of the many reasons we should petition Maxon for SDK access to these interface elements - at least then we could do much more with what already exists.


Log in to reply