Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Image restrictions?

Author
Message
RedRain
21
Years of Service
User Offline
Joined: 11th Jun 2003
Location:
Posted: 11th Jun 2003 22:22
I have a great backdrop for a 2d game which is saved as a bitmap file. Am testing out some tile mapping techniques, but whenever I get a reasonably big section of the bitmap and paste it to the screen, the graphics go all blocky and distorted. Kind of like when you squeezed the bitmap really small, and then enlarged it again.
I'm using the additional flag of 1, when pasting the image cos I understand that can help with the 'fuzziness' of images.

Here's all that I'm doing:

LOAD BITMAP "Backdrop.bmp",1
GET IMAGE 1,0,0,200,200,1

SET CURRENT BITMAP 0
PASTE IMAGE 1,0,0

It appears to be less severe the smaller the area of the bitmap I take, but it's still not looking as it should.
When I load the bitmap and copy it to the screen it's perfect.

So are there any restrictions on the size of images, or the types of images that you load? Would appreciate the help, I can't even get anything on screen looking as it should at the moment!
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 11th Jun 2003 22:37
Use LOAD IMAGE "Backdrop.bmp", 1, ,1 instead.

Or add the extra ,1 to your GET IMAGE command.

The extra parameter for PASTE IMAGE determines whether the image is pasted with transparency.
RedRain
21
Years of Service
User Offline
Joined: 11th Jun 2003
Location:
Posted: 12th Jun 2003 00:03
Cheers Ian. I tried loading the imnage straight in as you said with the additional parameter, but it's still playing up. Looks like there's a very light criss cross patterm running all the way accross the image, and the edges all look like they have shadows. Could it be something else? Is there anything sepcific about the format of the picture you're using that could cause this? Seems so weird that if I load it as a bmp it's fine.
cheers!

RedRain
21
Years of Service
User Offline
Joined: 11th Jun 2003
Location:
Posted: 12th Jun 2003 00:34
Very weird problem this... If I extract 100x100 sections into images, and past the images to screen like a jigsaw, the backdrop is perfect. But if I try and paste the whole image, it's a mess! Won't actually cause me too much grief, cos I'm working with tiled backdrop images, but would definitely be curious to know why it does this when you paste large images if anyone has any clues!

Login to post a reply

Server time is: 2024-11-24 17:08:41
Your offset time is: 2024-11-24 17:08:41