|
-
Oct 18th, 2002, 03:50 PM
#1
Thread Starter
Junior Member
Reverse an image in a byte array???
Please can anyone help. I have an image/pic in
a byte array and cannot figure out how to reverse the pic.
Main Problem: I need to take an existing (upright) picture/image
and then display it in a picbox upside down.
I've put the pic in a byte array & tried to reverse
the bytes - i.e. last byte into first position etc...
No luck. Please can anyone advise.... Katz
-
Oct 18th, 2002, 04:19 PM
#2
Lively Member
something like this should work (btw, i don't have vb on this computer so i can't test this):
for y = 0 to picture1.height
for x = 0 to picture1.width
c = picture1.point(x,y)
picture2.pset(picture2.height-y,picture2.width-x),c
next
next
well, this isn't very efficient or practical because it's so slow. you could replace the pset and point calls with api functions.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|