converting JPEG to BMP in memory

This is a discussion on converting JPEG to BMP in memory within the Windows Programming forums, part of the Platform Specific Boards category; Im trying to convert a JPEG image, which ive already loaded into memory, into a BMP (also in memory). I ...

  1. #1
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189

    converting JPEG to BMP in memory

    Im trying to convert a JPEG image, which ive already loaded into memory, into a BMP (also in memory). I tried using the libjpeg release from IJG but it has over 100+ errors in it and refuses to compile. Can anyone provide an example using the GDI to process images entirely in memory.

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    One approach would be to use OleLOadPicture and/or OleLoadPicturePath; there's an example here.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  3. #3
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    Well, the whole thing is I already have the image in memory, so it isnt from a stream source technically. Although I think it might work with HINTERNET style handles.

  4. #4
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    I ended up using CxImage, which is based on the IJG code, but comes with all the project files, and compiles without any editing under VC++ 6.0. It supports direct memory to memory conversion to and from multiple formats, including JPG BMP PNG TIFF and others.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Question regarding Memory Leak
    By clegs in forum C++ Programming
    Replies: 29
    Last Post: 12-07-2007, 12:57 AM
  2. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 10:22 AM
  3. Suggestions on this C style code
    By Joelito in forum C Programming
    Replies: 11
    Last Post: 06-07-2007, 03:22 AM
  4. Shared Memory - shmget questions
    By hendler in forum C Programming
    Replies: 1
    Last Post: 11-29-2005, 01:15 AM
  5. Memory allocation and deallocation
    By Micko in forum C++ Programming
    Replies: 3
    Last Post: 08-19-2005, 06:45 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21