CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2003
    Location
    Bangalore,INDIA
    Posts
    122

    Creating .bmp/.jpg/.gif image from raw image data

    Hello All,

    I have some raw image data in a byte array, i want to know how can i convert this into .bmp/.jpg/.gif image file.. I am using VC++.It's urgent please can anybody help me...

    Thanks in advance,
    Poornima.

  2. #2
    Join Date
    Nov 2007
    Posts
    613

    Re: Creating .bmp/.jpg/.gif image from raw image data


  3. #3
    Join Date
    May 2005
    Posts
    4,954

    Re: Creating .bmp/.jpg/.gif image from raw image data

    Image Class of GDI+ can help you on that one .

    Cheers
    If a post helped you dont forget to "Rate This Post"

    My Article: Capturing Windows Regardless of Their Z-Order

    Cheers

  4. #4
    Join Date
    Jun 2003
    Location
    Bangalore,INDIA
    Posts
    122

    Re: Creating .bmp/.jpg/.gif image from raw image data

    Hello Srelu,

    Thanks for your help...but one problem i have is my image is showing as a very tiny image..the problem comes where you are settinfg up the pixels array..in sample code. What could be the problem?

    Thanks & Regards,
    Poornima.

  5. #5
    Join Date
    Oct 2007
    Posts
    178

    Re: Creating .bmp/.jpg/.gif image from raw image data

    Quote Originally Posted by cheery_poori
    Hello Srelu,

    Thanks for your help...but one problem i have is my image is showing as a very tiny image..the problem comes where you are settinfg up the pixels array..in sample code. What could be the problem?

    Thanks & Regards,
    Poornima.
    i would guess the problem is this (in CRawDoc::Serialize):
    Code:
    // Hardcoded startup parameters (may be changed for other size raw files).
    		int iWidth  = 256; // for lena.raw - you can change for different value
    		int iHeight = 256; // for lena.raw - you can change for different value
    otherwise, if you want to display an image at a larger size than its native size use StretchBlt() instead of BitBlt()

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured