delorie.com/archives/browse.cgi | search |
From: | "Michael Stewart" <mike AT reggin DOT freeserve DOT co DOT uk> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: Flipping an image |
Date: | Tue, 13 Jul 1999 14:09:52 +0100 |
Organization: | (Posted via) Netcom Internet Ltd. |
Message-ID: | <7mfdr3$m9r$1@taliesin.netcom.net.uk> |
References: | <7mf2qk$nlg$1 AT rockall DOT cc DOT strath DOT ac DOT uk> |
NNTP-Posting-Host: | hgty.capgemini.co.uk |
X-Trace: | taliesin.netcom.net.uk 931871395 22843 194.42.240.2 (13 Jul 1999 13:09:55 GMT) |
X-Complaints-To: | abuse AT corp DOT netcom DOT net DOT uk |
NNTP-Posting-Date: | 13 Jul 1999 13:09:55 GMT |
X-Newsreader: | Microsoft Outlook Express 4.72.3155.0 |
X-MimeOLE: | Produced By Microsoft MimeOLE V4.72.3155.0 |
Lines: | 22 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Alan Wills wrote in message <7mf2qk$nlg$1 AT rockall DOT cc DOT strath DOT ac DOT uk>... >void flip_image(int array[], int rows, int cols) >{ >int row_count, col_count, total_pixelsp; > > for(row_count = 0; row_count < rows; row_count++) > { > for(col_count = 0; col_count < cols; col_count++) > { // Something like this ? (note: this is untested) tmp = array[row_count * cols + col_count]; array[row_count * cols + col_count] = array[(row_count + 1) * cols - 1 - col_count]; array[(row_count + 1) * cols - 1 - col_count] = tmp; > } > } >}
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |