Click here to Skip to main content
15,899,003 members
Home / Discussions / Graphics
   

Graphics

 
AnswerRe: Fastest way to capture screen? Pin
Mark Salsbery19-Aug-08 9:05
Mark Salsbery19-Aug-08 9:05 
GeneralRe: Fastest way to capture screen? Pin
Daniel Jansson20-Aug-08 3:48
Daniel Jansson20-Aug-08 3:48 
GeneralRe: Fastest way to capture screen? Pin
Mark Salsbery20-Aug-08 5:05
Mark Salsbery20-Aug-08 5:05 
Questionneed suggestion Pin
ulucky19-Aug-08 2:11
ulucky19-Aug-08 2:11 
Questionerror code: S1001 for directx sdk June 2008 Pin
JoshTheMan18-Aug-08 20:22
JoshTheMan18-Aug-08 20:22 
AnswerRe: error code: S1001 for directx sdk June 2008 Pin
Tim Craig19-Aug-08 17:58
Tim Craig19-Aug-08 17:58 
QuestionRe: error code: S1001 for directx sdk June 2008 Pin
Jack_Voltaire10-Sep-08 1:07
Jack_Voltaire10-Sep-08 1:07 
QuestionSetPixel() too slow? Pin
Naturality18-Aug-08 10:49
Naturality18-Aug-08 10:49 
Hi, I wasn't sure where to put this, but this seems the most appropriate place.

I'm trying to load an image from a 2 Dimensional array into the main screen DC, like so.

for(int y = 0; y < height; y++){
    for(int x = 0; x < width; x++){
        SetPixel(imgDC, x, y, RGB(imgarray[x][y], imgarray[x][y], imgarray[x][y]));
    }
}

StretchBlt(hdc, 0,0, 640, 480, imgDC, 0, 0, width, height, SRCCOPY);



But this becomes too slow for my needs if the image if larger than about 256x256.

I have also tried using do while loops, which were a fraction faster.

Is there a better way to do this?

"Sir, I protest. I am NOT a merry man!"

AnswerRe: SetPixel() too slow? Pin
Matthew Butler18-Aug-08 12:35
Matthew Butler18-Aug-08 12:35 
GeneralRe: SetPixel() too slow? Pin
Naturality18-Aug-08 13:01
Naturality18-Aug-08 13:01 
GeneralRe: SetPixel() too slow? Pin
Mark Salsbery18-Aug-08 14:38
Mark Salsbery18-Aug-08 14:38 
GeneralRe: SetPixel() too slow? Pin
Naturality19-Aug-08 11:28
Naturality19-Aug-08 11:28 
Questioncan rotation be performed using translation itself? Pin
ashishsagarwal18-Aug-08 6:22
ashishsagarwal18-Aug-08 6:22 
QuestionXNA 3d model formats Pin
MikeMarq17-Aug-08 6:12
MikeMarq17-Aug-08 6:12 
QuestionDirectX9 novice help Pin
Dave_BHGF16-Aug-08 7:43
Dave_BHGF16-Aug-08 7:43 
QuestionProblem with CROSSBAR in DirectShow Pin
bhanu_850913-Aug-08 3:28
bhanu_850913-Aug-08 3:28 
AnswerRe: Problem with CROSSBAR in DirectShow Pin
Tim Craig13-Aug-08 9:27
Tim Craig13-Aug-08 9:27 
AnswerRe: Problem with CROSSBAR in DirectShow Pin
tanvon malik16-Aug-08 23:55
tanvon malik16-Aug-08 23:55 
GeneralRe: Problem with CROSSBAR in DirectShow Pin
bhanu_850922-Aug-08 3:35
bhanu_850922-Aug-08 3:35 
QuestionImage Control Pin
Dean Moe9-Aug-08 3:47
Dean Moe9-Aug-08 3:47 
AnswerRe: Image Control Pin
John_Adams22-Aug-08 9:10
John_Adams22-Aug-08 9:10 
QuestionIcon Creation Pin
The Only Nock7-Aug-08 14:31
The Only Nock7-Aug-08 14:31 
AnswerRe: Icon Creation Pin
Shog97-Aug-08 20:09
sitebuilderShog97-Aug-08 20:09 
GeneralRe: Icon Creation Pin
The Only Nock8-Aug-08 7:25
The Only Nock8-Aug-08 7:25 
GeneralRe: Icon Creation Pin
Shog98-Aug-08 7:28
sitebuilderShog98-Aug-08 7:28 

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.