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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Cimage to bmp

Cimage to bmp

Scheduled Pinned Locked Moved C / C++ / MFC
questiongraphics
3 Posts 2 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.
  • D Offline
    D Offline
    dodoxor
    wrote on last edited by
    #1

    I've this class class CImageBase : public CImagePan { public: CImageBase(); virtual ~CImageBase(); virtual BOOL Decode(char *pcMemBuff, long lFileLength) PUREVIRTUAL; // Implementation of pure virtual functions in CImagePan class virtual int GetEffWidth() const { return EffWidth; }; virtual int GetWidth( void ) const { return Width; }; virtual int GetHeight( void ) const { return Height; }; virtual int GetDepth( void ) const { return Depth; }; virtual int GetColorType( void ) const { return ColorType; }; virtual BOOL Inside(int x, int y) const { return (0<=y && ybiSize + lpbi->biSizeImage); } virtual LPBITMAPINFOHEADER GetBitmapInfoHeader() { return lpbi; } virtual void BGR2RGB(unsigned char* pBuffer,int iCount); protected: ImagePointerType RawImage; // Image data void AllocateImage(); int Width, Height; // Dimensions int Depth; // (bits x pixel) int ColorType; // Bit 1 = Palette used // Bit 2 = Color used // Bit 3 = Alpha used int RawImageSize; long EffWidth; // Effective Width LPBITMAPINFOHEADER lpbi; int bgindex; friend class CImageIterator; }; How can i transform a Cimage object in a Bitmap^ bmp ? Thanks, regards

    H 1 Reply Last reply
    0
    • D dodoxor

      I've this class class CImageBase : public CImagePan { public: CImageBase(); virtual ~CImageBase(); virtual BOOL Decode(char *pcMemBuff, long lFileLength) PUREVIRTUAL; // Implementation of pure virtual functions in CImagePan class virtual int GetEffWidth() const { return EffWidth; }; virtual int GetWidth( void ) const { return Width; }; virtual int GetHeight( void ) const { return Height; }; virtual int GetDepth( void ) const { return Depth; }; virtual int GetColorType( void ) const { return ColorType; }; virtual BOOL Inside(int x, int y) const { return (0<=y && ybiSize + lpbi->biSizeImage); } virtual LPBITMAPINFOHEADER GetBitmapInfoHeader() { return lpbi; } virtual void BGR2RGB(unsigned char* pBuffer,int iCount); protected: ImagePointerType RawImage; // Image data void AllocateImage(); int Width, Height; // Dimensions int Depth; // (bits x pixel) int ColorType; // Bit 1 = Palette used // Bit 2 = Color used // Bit 3 = Alpha used int RawImageSize; long EffWidth; // Effective Width LPBITMAPINFOHEADER lpbi; int bgindex; friend class CImageIterator; }; How can i transform a Cimage object in a Bitmap^ bmp ? Thanks, regards

      H Offline
      H Offline
      Hamid Taebi
      wrote on last edited by
      #2

      Do you need to a handle of CImage class?


      WhiteSky


      D 1 Reply Last reply
      0
      • H Hamid Taebi

        Do you need to a handle of CImage class?


        WhiteSky


        D Offline
        D Offline
        dodoxor
        wrote on last edited by
        #3

        I've another ref class where i declare in a method{ func() { .... CImage jpgframe; jpgframe.CreateImage(bufferjpg,mycam->jpg->len,1); jpgframe.Decode(bufferjpg,mycam->jpg->len); ... } and i want to use jpgframe to create a Bitmap^ bmp but i dont't know how. Can you help me? Thank a lot, 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