Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Problem with GDI+ Bitmap::Save() function.

Problem with GDI+ Bitmap::Save() function.

Scheduled Pinned Locked Moved C / C++ / MFC
graphicswinformshelp
1 Posts 1 Posters 0 Views 1 Watching
  • 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.
  • S Offline
    S Offline
    Sameerkumar Namdeo
    wrote on last edited by
    #1

    Assume prfimg Bitmap is proper.

    EncoderParameters pEncoderParameters;
    pEncoderParameters.Count = 1;
    pEncoderParameters.Parameter[0].Guid = EncoderCompression;
    pEncoderParameters.Parameter[0].Type = EncoderParameterValueTypeLong;
    pEncoderParameters.Parameter[0].NumberOfValues = 1;

    // Save the image as a tiff with RLE compression
    ULONG compression = EncoderValueCompressionRle;
    pEncoderParameters.Parameter[0].Value = &compression;

    GetEncoderClsid(L"image/tiff", &encoderClsid);
    st = prfimg->Save(L"i:\\m\\img.tif", &encoderClsid, &pEncoderParameters);

    getting value of st as InvalidParameter and the image is not saved properly on disk(saved image size on disk is 1KB) Please tell if something more needs to be done to save tif image with Rle compression. Other compression options gives the same InvalidParameter result. Thanks and Regards.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups