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 / Weird Paste Image Issue

Author
Message
Derek Darkly
12
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 3rd Aug 2018 05:44 Edited at: 3rd Aug 2018 17:00
When I load the attached 2048x2048 image with texture flag 1 and use PASTE IMAGE it appears to be stretched (shrunk) smaller on the screen when compared to the original dimensions. Only the top left corner seems to match up, but gets worse from there on out. If I save the image the new image file has the proper dimensions, so the image paste seems to be the problem, not the loading itself. Any clues anyone?
Send your parents to noisy sprite demo hell... enter the D-Zone

Attachments

Login to view attachments
Derek Darkly
12
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 3rd Aug 2018 05:51

NOTE: The black margins were created by me, and were not part of the images.
Send your parents to noisy sprite demo hell... enter the D-Zone
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 3rd Aug 2018 17:00
Hi Derek Darkly ...its a long time !

Such a screen size you have ! Holy moly ! my laptop is no more than 1366*768 ....I can't test this .
I'm not a grumpy grandpa
Derek Darkly
12
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 3rd Aug 2018 19:02

Actually I'm only using the default 640x480 size.
If you do something like: PASTE IMAGE 1,-1600,-1600 then you can see the bottom right corner.
Send your parents to noisy sprite demo hell... enter the D-Zone
Derek Darkly
12
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 3rd Aug 2018 23:27 Edited at: 3rd Aug 2018 23:31
Also, I've noticed that GET IMAGE does not actually capture the coordinates you specify...

For example GET IMAGE 1,0,0,31,31 should capture pixels 0 to 31 on the x and y axes for a 32x32 image but it only creates a 31x31 image which excludes the last row/column of pixels farthest out .

I have a feeling it's because math like "31-0" is being used to calculate the user's input, rather than counting the digits upward.
Send your parents to noisy sprite demo hell... enter the D-Zone
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 4th Aug 2018 07:40
well i dont have an answer for ur stretched problem but it might be related to apsect ratio. try running dbpro at the same resolution as your desktop. as far as get image it works properly, if you start on row one you cant grab row one 1 to 31 is 30, that like counting to 10 on your fingers but u started at one not at zero so u have one finger up already when u count to ten which means u only counted 9 fingers
A child's dream never dies.





chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 4th Aug 2018 09:21
Quote: "Also, I've noticed that GET IMAGE does not actually capture the coordinates you specify...

For example GET IMAGE 1,0,0,31,31 should capture pixels 0 to 31 on the x and y axes for a 32x32 image but it only creates a 31x31"


Try this :
GET IMAGE 1,0,0,31,31,1

I'm not a grumpy grandpa
Derek Darkly
12
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 4th Aug 2018 10:08
Quote: "if you start on row one you cant grab row one 1 to 31 is 30"


That appears to be the case, but it would make more sense to me if the actual parameters were captured; (1 through 31 equals 31 digits total)

Send your parents to noisy sprite demo hell... enter the D-Zone
Derek Darkly
12
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 4th Aug 2018 10:13
Quote: "Try this :
GET IMAGE 1,0,0,31,31,1"


Hello Chafari!
Sorry, no the flag didn't help....
0 through 31 should equal 32 points on the screen [at least in my mind] but still only returns an image of 31x31
Nonetheless, I think I can deal with/compensate for this, but I'm really more interested in finding out if anyone can confirm that stretching thing. LoL
Send your parents to noisy sprite demo hell... enter the D-Zone
Derek Darkly
12
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 4th Aug 2018 10:20
Quote: " try running dbpro at the same resolution as your desktop"


Sorry, it's still shrunk at my desktop resolution of 1024x768 =(
Can anyone confirm the same results?

The original color swatch is 96x96 but only matches in the upper left corner... the other corners are much smaller, as seen in the attached examples.
Send your parents to noisy sprite demo hell... enter the D-Zone
Chris Tate
DBPro Master
15
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 4th Aug 2018 13:02
I've not experienced this problem.

What does get maximum texture width() and get maximum texture height() return on your system?
Derek Darkly
12
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 4th Aug 2018 16:04 Edited at: 4th Aug 2018 16:17
Quote: "What does get maximum texture width() and get maximum texture height() return on your system?"


Whoa! I had never noticed those before. Thanks!
Ironically, the width and height limits for me are 2048w and 2048h

I have attached an executable (with media already compiled) that should illustrate the problem.

(Here is the code I used for the test... swatch image provided below)
Send your parents to noisy sprite demo hell... enter the D-Zone

Attachments

Login to view attachments
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 6th Aug 2018 19:29
I have noticed an issue where some of the text in my bitmap font system is cutoff at the end slightly when using the text to image capabilities. I think I worked around this by simply extending the text with a space character in the conversion. Perhaps this issue is the cause of this. The system uses a method of pasting the text to a bitmap layer and grabbing it into an image using Get Image, in a complex manner where 8bit transparency is preserved. Though I had assumed the clipping issue was more than one pixel. Perhaps I was wrong about that. I'll check into it.
gamehazer
5
Years of Service
User Offline
Joined: 2nd May 2018
Location:
Posted: 6th Aug 2018 21:45
What you can do is make a image for every screen width and height and just call each one when needed.
Derek Darkly
12
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 8th Aug 2018 00:46 Edited at: 8th Aug 2018 01:03
WOHoo!!

Thanks again everyone. DBPro is alive and well. Or at least alive and eating pudding in a wheelchair with a pretty and/or muscular nurse standing by.

So I've decided to go with a MEMBLOCK routine, because when it comes to raw DBPro data, ME MEMBLOCKS.

I can now divide an image into squares using the aforementioned Memblocks with whatever maths necessary , and then just stitch my terrains together by forcing the new neighbor's seam to sync up with its predecessor's. (I now have a land system that would take at least five hours to walk across at slacker-speed.)

However, I only have my tier-1 terrain working as these pop-in 5x5 (25) "leapfrogging" or paging tiles.
This weekend I'll work on tier 2 LOD, which will be 9x9.

Once I get all the levels and the full terrain engine running, I'll add textures, landscaping, a better heightmap, texture splatting, etc.
I'd like to achieve something visually appealing - somewhere between Minecraft and Skyrim by the end of the year. Just to see if I can!!!
Send your parents to noisy sprite demo hell... enter the D-Zone

Attachments

Login to view attachments
Derek Darkly
12
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 8th Aug 2018 00:58 Edited at: 8th Aug 2018 01:00
By the way... BIG THANKS to Lee & Co., and all the talented modelers who agreed to release all these model packs!!! These assets would take me three lifetimes to produce!!

https://github.com/TheGameCreators/FPS-Creator-Classic
Send your parents to noisy sprite demo hell... enter the D-Zone
Derek Darkly
12
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 8th Aug 2018 01:05
Send your parents to noisy sprite demo hell... enter the D-Zone
Chris Tate
DBPro Master
15
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 8th Aug 2018 20:04
We love good work ethic

Login to post a reply

Server time is: 2024-04-25 05:44:19
Your offset time is: 2024-04-25 05:44:19