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.

DarkBASIC Professional Discussion / Bitmap resolution problem

Author
Message
Statue
19
Years of Service
User Offline
Joined: 16th Nov 2006
Location: Monterey Hills, CA
Posted: 8th Mar 2012 05:29
Hello Y'all:

Anyone know why when I load and paste a bitmap, it appears approximately 1/4th the resolution of the file?

Lance
Ortu
DBPro Master
18
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 8th Mar 2012 06:25
could be the resolution of your display mode, or if you are using get image from the bitmap, check the texture flag.

Statue
19
Years of Service
User Offline
Joined: 16th Nov 2006
Location: Monterey Hills, CA
Posted: 8th Mar 2012 19:58
Hello Ortu:

I'm just doing a load image...paste image...Program is running Windowed in a 640x480 Window, bitmap is 400x200 resolution. I tried BMP and JPG - same result on both.

Lance
Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 8th Mar 2012 20:52
Ortu is suggesting you check the texture flag on the load image command. You do something like load image "bob.bmp",1,0. The additional zero tells DBP not to treat it as a texture, so it won't be resized and should stay the same size.

Statue
19
Years of Service
User Offline
Joined: 16th Nov 2006
Location: Monterey Hills, CA
Posted: 8th Mar 2012 23:01
Hello Fallout:

I already had the ,1 at the end, adding the ,0 (i.e. ,1,0) made no difference. The image is the same size, just not full resolution/is pixelated.

Lance
Statue
19
Years of Service
User Offline
Joined: 16th Nov 2006
Location: Monterey Hills, CA
Posted: 8th Mar 2012 23:15
Hello Fallout:

I made you a great screenshot. See attached. All I did was go into Microsoft Paint, select text, set the font size to 72 point, and type "Hello". In my program, I made sure it was set to run in a 640x480 window, and imported my Hello.jog file. Here's the code to display it:

load image "media\Hello.jpg",1,0
paste image 1,0,0
input a

As you can see from the screenshot, it is exactly the same size (no foolery going on), yet the image is about 1/4th the resolution of the original.

Lance
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 8th Mar 2012 23:23 Edited at: 8th Mar 2012 23:25
The first font looks higher than 640x480. In Photoshop, fonts are allowed to float over the screen resolution, so are much higher than the screen resolution. I suppose that Paint might do that as well.

Statue
19
Years of Service
User Offline
Joined: 16th Nov 2006
Location: Monterey Hills, CA
Posted: 8th Mar 2012 23:43
Hello Pincho:

Try it yourself - I had full instructions...If the font was higher resolution than 640x480, the window would just clip the image. But the image I am having a problem with is definitely 400x200, in a 640x480 window...

Lance
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 9th Mar 2012 01:10
Are you sure your window resolution matches the desktop resolution? On my PC the window seems to be stretched somewhat which causes the "Hello" image to be stretched and filtered as well.
Statue
19
Years of Service
User Offline
Joined: 16th Nov 2006
Location: Monterey Hills, CA
Posted: 9th Mar 2012 01:54
Hello Green Gandalf:

The window does appear to match the desktop resolution on mine.

Lance
Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 9th Mar 2012 03:05
The texture flag should be one not zero, ie.



[b]
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 9th Mar 2012 03:11
OK I tested it in lots of ways, and they were all fine until I tried Full screen Window exclusive. Then it was like yours. When I examined full screen exclusive it was 16 bit, so the AA was lost. All you need to do is change it to 32bit.

Statue
19
Years of Service
User Offline
Joined: 16th Nov 2006
Location: Monterey Hills, CA
Posted: 9th Mar 2012 03:32
Hello Diggsey:

That was it - thanks!!!

Lance
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 9th Mar 2012 12:54 Edited at: 9th Mar 2012 12:55
Sorry. I assumed you were using the bitmap commands:

Quote: "Anyone know why when I load and paste a bitmap"


My comments were addressed to those.

Quote: "Hello Diggsey:

That was it - thanks!!!

Lance"


That is what Ortu was telling you in the first place:

Quote: "or if you are using get image from the bitmap, check the texture flag."
Statue
19
Years of Service
User Offline
Joined: 16th Nov 2006
Location: Monterey Hills, CA
Posted: 9th Mar 2012 14:54
Hello Green Gandalf:

Yes, but he didn't say how it should be set, then Fallout said to set it to 0.

Lance
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 9th Mar 2012 16:12
Indeed he did - but there were only four values to try and there is a clue in the Help file:

Quote: "Texture Flag

Integer
A zero will treat the image as a texture and one will preserve pixel perfect quality, two will load as a cubemap texture and three as a volume
"
Statue
19
Years of Service
User Offline
Joined: 16th Nov 2006
Location: Monterey Hills, CA
Posted: 9th Mar 2012 17:20
Many thanks Green Gandalf...
Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 9th Mar 2012 20:04 Edited at: 9th Mar 2012 20:04
Quote: "Indeed he did - but there were only four values to try and there is a clue in the Help file:"


This is what happens when you don't have the help file to hand for reference. I didn't have DBP on the machine I replied on, so I tried to help from memory, and my memory ain't what it used to be! I thought it was 0 for "don't treat as texture". Sorry for the confusion. Glad you got your problem sorted.

Statue
19
Years of Service
User Offline
Joined: 16th Nov 2006
Location: Monterey Hills, CA
Posted: 9th Mar 2012 20:45
Hello Fallout:

No biggie - I would have assumed the same thing (and it makes more sense that it would be 0 from a design standpoint - i.e. 0=don't do anything, other numbers=various compression formats).

Lance
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 10th Mar 2012 00:45
Yes, I'm inclined to agree. DBPro is like that at times.
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 10th Mar 2012 22:14
Yes, some of the set object indexes are backwards as well.

Login to post a reply

Server time is: 2026-07-09 00:08:52
Your offset time is: 2026-07-09 00:08:52