memory-saving image rotation
BlitzPlus Forums/BlitzPlus Beginners Area/memory-saving image rotation
| ||
| I need help and here is my code: Global image1 = LoadImage("image.bmp") image2 = CopyImage(image1) image3 = CopyImage(image2) image4 = CopyImage(image3) image5 = CopyImage(image4) image6 = CopyImage(image5) image7 = CopyImage(image6) image8 = CopyImage(image7) RotateImage image2, 45 RotateImage image3 90 RotateImage image4, 135 RotateImage image5, 180 RotateImage image6 225 RotateImage image7, 270 RotateImage image8, 315 my problem is that when I get to the line: image2 = CopyImage(image1) or any after that, I receive the message: 'Invalid image handle' what is wrong with my program? P.S. to explain the name, I am doing this so I can have my images rotate in the program instead of using up memory having 8 pictures pre-saved |
| ||
| ......................./\........................ ....................../..\....................... ...................../....\...................... ..................../......\..................... ..................../......\..................... .................../........\.................... .................../........\.................... ................../..........\................... ................./............\.................. ................./............\.................. ................/..............\................. .....................|...|....................... ................................................. |
| ||
| Make sure your image1 loaded successfully. And the tree was not needed. |
| ||
| I don't think it did, but what can I do to make sure it does. |
| ||
Global image1 = LoadImage("image.bmp")
If Not image1 Then RuntimeError "NO IMAGE!!!!!"
image2 = CopyImage(image1)
image3 = CopyImage(image2)
image4 = CopyImage(image3)
image5 = CopyImage(image4)
image6 = CopyImage(image5)
image7 = CopyImage(image6)
image8 = CopyImage(image7)
RotateImage image2, 45
RotateImage image3 90
RotateImage image4, 135
RotateImage image5, 180
RotateImage image6 225
RotateImage image7, 270
RotateImage image8, 315 |
| ||
| O.K. now im sure it doesn't exist. Do you know how to fix it? |
| ||
| ... |
| ||
| Make sure that "image.bmp" is in the same directory as your source. Make sure that the source is saved, and not still "untitled". Try it with a graphics mode set. |
| ||
| thank you sauer!! thank you thank you thank you |
| ||
| nice tree, newcomer |