Click here to Skip to main content
16,004,854 members
Home / Discussions / Graphics
   

Graphics

 
GeneralRe: drawing algorithms Pin
El Corazon7-May-07 7:22
El Corazon7-May-07 7:22 
GeneralRe: drawing algorithms Pin
sarah_malik7-May-07 10:56
sarah_malik7-May-07 10:56 
GeneralRe: drawing algorithms Pin
El Corazon7-May-07 11:25
El Corazon7-May-07 11:25 
GeneralRe: drawing algorithms Pin
El Corazon7-May-07 15:34
El Corazon7-May-07 15:34 
GeneralRe: drawing algorithms Pin
El Corazon7-May-07 16:20
El Corazon7-May-07 16:20 
GeneralRe: drawing algorithms Pin
sarah_malik8-May-07 0:55
sarah_malik8-May-07 0:55 
QuestionHow to code for flipping an image myself ? Pin
coolguynp5-May-07 8:44
coolguynp5-May-07 8:44 
AnswerRe: How to code for flipping an image myself ? Pin
Mark Salsbery5-May-07 9:10
Mark Salsbery5-May-07 9:10 
The basic idea is to move the data for each pixel from it's original place to its flipped place.

How you code it depends on the layout of your image pixel data.

Typically it's in a packed form (like an array), where pixel data for a row is consecutive and
each row of pixel data follows the previous. To flip the pixels in-place (without needing a
second image buffer) you could use a pointer to the first row/column pixel data and a pointer to
the last row/column pixel data (whether you use row or column depends on if you are flipping
horizontally or vertically)...
Pseudocode for vertical flip:
 
Set FirstRowPtr to first row pixel data
Set LastRowPointer to last row pixel data
loop (imageheight / 2) times
{
   swap FirstRowPtr pixel data with LastRowPointer pixel data
   Set FirstRowPtr to next row pixel data
   Set LastRowPointer to previous row pixel data
}
For interlaced image data it's similar, but the row/col calculations are more complex.

Hope that helps a bit,
Mark





"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder

AnswerRe: How to code for flipping an image myself ? Pin
Hamid_RT22-May-07 2:52
Hamid_RT22-May-07 2:52 
AnswerRe: How to code for flipping an image myself ? Pin
stevepqr29-May-07 4:12
stevepqr29-May-07 4:12 
QuestionOpenGL problems Pin
XTAL2565-May-07 2:57
XTAL2565-May-07 2:57 
AnswerRe: OpenGL problems Pin
Rilhas19-May-07 10:59
Rilhas19-May-07 10:59 
GeneralRe: OpenGL problems Pin
XTAL25619-May-07 14:21
XTAL25619-May-07 14:21 
QuestionHElpppppppppppp Pin
HassanKU4-May-07 9:37
HassanKU4-May-07 9:37 
AnswerRe: HElpppppppppppp Pin
Mark Salsbery4-May-07 10:22
Mark Salsbery4-May-07 10:22 
Questionclueless Pin
Xraider Xenocide3-May-07 15:53
Xraider Xenocide3-May-07 15:53 
AnswerRe: clueless Pin
Christian Graus6-May-07 11:30
protectorChristian Graus6-May-07 11:30 
GeneralRe: clueless Pin
El Corazon7-May-07 5:36
El Corazon7-May-07 5:36 
AnswerRe: clueless Pin
Hamid_RT22-May-07 2:50
Hamid_RT22-May-07 2:50 
Questionhow to put a standard opengl in a windows form Pin
sinosoidal2-May-07 5:42
sinosoidal2-May-07 5:42 
AnswerRe: how to put a standard opengl in a windows form Pin
Jeff J Anderson6-May-07 22:32
Jeff J Anderson6-May-07 22:32 
Questionopen 2 window at the same time--->openGL???? Pin
Miss_ Petrovna1-May-07 8:50
Miss_ Petrovna1-May-07 8:50 
AnswerRe: open 2 window at the same time--->openGL???? Pin
El Corazon4-May-07 13:39
El Corazon4-May-07 13:39 
GeneralThank U..El Corazon Pin
Miss_ Petrovna5-May-07 5:57
Miss_ Petrovna5-May-07 5:57 
QuestionCapturing Network PC`s Desktop Pin
HassanKU1-May-07 5:55
HassanKU1-May-07 5:55 

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.