Click here to Skip to main content
15,885,366 members
Home / Discussions / Graphics
   

Graphics

 
AnswerRe: Free html5 templates... Pin
User 418025420-Jun-18 12:39
User 418025420-Jun-18 12:39 
QuestionCan opengl memory fragment Pin
Joe Woodbury13-Jun-17 13:44
professionalJoe Woodbury13-Jun-17 13:44 
QuestionWin32 console programming Pin
Member 132421455-Jun-17 11:17
Member 132421455-Jun-17 11:17 
AnswerRe: Win32 console programming Pin
Richard MacCutchan5-Jun-17 21:39
mveRichard MacCutchan5-Jun-17 21:39 
QuestionLibrary for obtaining duration of video movies in various formats? Pin
kalberts23-May-17 23:03
kalberts23-May-17 23:03 
AnswerRe: Library for obtaining duration of video movies in various formats? Pin
Michael_Davies23-May-17 23:18
Michael_Davies23-May-17 23:18 
GeneralRe: Library for obtaining duration of video movies in various formats? Pin
kalberts24-May-17 0:41
kalberts24-May-17 0:41 
QuestionHow to use GDI to convert these SPRs and MAPs files to bmp files, so I can invoke LoadImage function to load the bmp files and render them on my window by invoking the BitBlt function Pin
EZCodeProject4-May-17 10:03
EZCodeProject4-May-17 10:03 
I have a set of SPRs and MAPs files in my harddisk, which I have uploaded all of them to OneDrive in the shared folder. You can download some of them or all of them from the following link:

There is the link

LoadImage fails to open these files directly, even though I change their extension to bmp, because they are not in the format of bmp, but I know for sure that these are image files and they are convertible to bmp files. In other words, there is a way or algorithm to convert all these files to bmp files, so LoadImage succeeds and BitBlt renders the images to my window. But the problem is that I don't know how to convert these files to bmp files. When I invoke CreateBitmap function, to create new 32 bit BGRA bitmap, open them by invoking the CreateFile function, reading all their bytes to an array of bytes, also called "buffer", by invoking ReadFile function, then CloseHandle, then SetBitmapBits or SetDIBits, and finally BitBlt (after CreateCompatibleDC and SelectObject), I see unclear image on my window. Later I figured out that these images are 8 bit color, in the SPR files, the first byte is the width of the image, and the second byte is the height of the image, and the rest of the bytes are the pixels of the image, each byte for each pixel. MAP files are always 320x200 pixels image, so all their bytes are the pixels of the MAP image itself, the same as in the SPR files. When I read one byte, I set all channels of the bitmap to this byte. Then BitBlt renders the bitmap and I can see the image clearly, but it is grayscaled. But I want to see it colorful. When I use 2 bits for Blue, 3 bits for Green and 3 bits for Red, I see the image in the wrong colors. I know how it suppose to look like in DOSBox. I need help about how to convert and correct the colors, rather than shape. Shape is fine. I want to convert the SPR and MAP images to 32 bit BGRA colorful and not grayscaled bitmap. That's my purpose.

modified 4-May-17 16:09pm.

AnswerRe: How to use GDI to convert these SPRs and MAPs files to bmp files, so I can invoke LoadImage function to load the bmp files and render them on my window by invoking the BitBlt function Pin
Richard MacCutchan4-May-17 10:57
mveRichard MacCutchan4-May-17 10:57 
AnswerRe: How to use GDI to convert these SPRs and MAPs files to bmp files, so I can invoke LoadImage function to load the bmp files and render them on my window by invoking the BitBlt function Pin
Jochen Arndt4-May-17 21:29
professionalJochen Arndt4-May-17 21:29 
GeneralRe: How to use GDI to convert these SPRs and MAPs files to bmp files, so I can invoke LoadImage function to load the bmp files and render them on my window by invoking the BitBlt function Pin
EZCodeProject5-May-17 9:25
EZCodeProject5-May-17 9:25 
GeneralRe: How to use GDI to convert these SPRs and MAPs files to bmp files, so I can invoke LoadImage function to load the bmp files and render them on my window by invoking the BitBlt function Pin
Jochen Arndt5-May-17 21:52
professionalJochen Arndt5-May-17 21:52 
QuestionUrgently need code for rotating a leaf in c language Pin
Member 1301643721-Feb-17 21:54
Member 1301643721-Feb-17 21:54 
AnswerRe: Urgently need code for rotating a leaf in c language Pin
Richard MacCutchan21-Feb-17 21:55
mveRichard MacCutchan21-Feb-17 21:55 
AnswerRe: Urgently need code for rotating a leaf in c languag e Pin
Patrice T3-Mar-17 15:14
mvePatrice T3-Mar-17 15:14 
QuestionHelp getting started Pin
SpiveyC#17-Feb-17 1:18
SpiveyC#17-Feb-17 1:18 
AnswerRe: Help getting started Pin
Pete O'Hanlon17-Feb-17 1:50
mvePete O'Hanlon17-Feb-17 1:50 
GeneralRe: Help getting started Pin
SpiveyC#19-Feb-17 22:40
SpiveyC#19-Feb-17 22:40 
QuestionDirectX9 - Problems to arrange bitmap Pin
Korowai25-Dec-16 8:54
Korowai25-Dec-16 8:54 
QuestionGetting a sense of Depth and 3D space from images Pin
Member 1233692920-Dec-16 5:19
Member 1233692920-Dec-16 5:19 
AnswerRe: Getting a sense of Depth and 3D space from images Pin
Gerry Schmitz21-Dec-16 8:41
mveGerry Schmitz21-Dec-16 8:41 
QuestionHow to extract geometry from Google Earth? Pin
Member 123369294-Oct-16 1:08
Member 123369294-Oct-16 1:08 
SuggestionRe: How to extract geometry from Google Earth? Pin
Richard MacCutchan4-Oct-16 3:48
mveRichard MacCutchan4-Oct-16 3:48 
AnswerRe: How to extract geometry from Google Earth? Pin
leon de boer18-Oct-16 9:48
leon de boer18-Oct-16 9:48 
QuestionD2D + WPF + SwapChain = ??? Pin
Max Dhom17-May-16 0:56
Max Dhom17-May-16 0:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.