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 / Load Images with Bad Quality. Why?

Author
Message
MetaCortex
16
Years of Service
User Offline
Joined: 24th Mar 2010
Location:
Posted: 25th Mar 2010 00:53
Hello!

Im facing a little problem here that never happened before.
When loading any image, (JPG, BMP, PNG) The quality is really poor.

I mean the image get some squares like the resolution is down.
I have an image 800x600 and set the fullscreen mode as 800x600 too.

And keep happenning... Its a lame code but if it helps:


I´ve tried with different images from different places.. saved from Photoshop, Paint, even from Web..
Please anyone??

Thanks a lot!!
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 25th Mar 2010 02:33
Scaling in DBPro is not great, but perhaps try the ,1 flag when loading an image, it often works well with non transparent images, it should make it clearer...

Load image "file.bmp",1,1


Health, Ammo, and bacon and eggs!
MetaCortex
16
Years of Service
User Offline
Joined: 24th Mar 2010
Location:
Posted: 25th Mar 2010 02:39
Thanks a lot Van B!!

Its not perfect but is very good now!!
Actually Im dont know how scalling can affect it.. since im trying only to display the image.

Do you recommend to do this with every image I load?

Thank you again for your super quick response!
SoftMotion3D
AGK Developer
20
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 25th Mar 2010 04:38
Also it may be your graphics card quality setting for direct x.... I had a simular problem and it didnt go away untill i moved the slider bar on the graphics control panel to full quality.

i believe its range =Quality -> Performance

Quality looks perfect!

Development & Editting
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 25th Mar 2010 09:01
By scaling, I mean that your running at 800x600 but I'm guessing your desktop (native) resolution is more like 1680x1050 or something, so the whole screen is scaled in that mode.

To see your image perfectly, you should use the native resolution, by adding this to the start of your program:

set display mode desktop width(),desktop height(),32

That will set the resolution to suit your desktop, and will get rid of all scaling. You could also use windowed mode, which I find very useful while developing, as it gives easy access to task manager etc alongside it.

Sometimes it's best not to use the ,1 flag - because it affects the textures ability to mipmap, so if it's a texture for a terrain for instance, it would probably look horrible with that ,1 flag as you'd get no filtering or mipmapping. So if the image is a texture for a 3D model, or for a particle, then don't use the ,1 flag - if it's 2D for a title screen or text or something like that, then the ,1 flag should be the best option.

SMD has a good point of course, you have all those other options for filtering, quality etc, maybe worth just checking over those to make sure it's set appropriately.


Health, Ammo, and bacon and eggs!
MetaCortex
16
Years of Service
User Offline
Joined: 24th Mar 2010
Location:
Posted: 25th Mar 2010 15:30
Ok Thanks again SMD and Van B for the great help
I´ll try this too.

But regarding your hint Van B. Its correct im scalling as you said.
Because I want to create a 2D Game, and want to run on other computers too.

So I would create all my graphics to fit 800x600 and run always in this resolution. Otherwise I could take different results if another machine have a different resolution.

This is right? Or am I thinking wrong?
Many Thanks!
Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 25th Mar 2010 23:43
@MetaCortex
If you want it to always run at 800x600, then that is correct, but you will get scaling issues, because the 800x600 output of your program will be stretched to fit on the user's screen.

Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 26th Mar 2010 00:04
Sometimes it's a good idea to use 3D plains and stuff instead of sprites, as that way it scales itself automatically, and you can then run at different resolutions without doing too much.

I would suggest that 800x600 is kinda old fashioned, it looks better if you go for wide screen, then add borders in standard def displays. Maybe 1024x600 is a good resolution these days for lower spec games - Netbooks for instance.


Health, Ammo, and bacon and eggs!

Login to post a reply

Server time is: 2026-07-26 21:12:02
Your offset time is: 2026-07-26 21:12:02