Pandora Little Tool For Pandora : Simtgscreen


Arialia

Member
Joined
Feb 7, 2008
Messages
210
Age
56
Location
Land of French Mustard
Website
arialia.dev-fr.org
Hi guys

i made for us a little tool to simulate the render of bitmap on a little screen like Pandora
because it is difficult to zoom as the real size ( in millimeters) of the screen.


simtgscreen.png

thanks for Chad for his great Mockup :)

Here you can find versions
Linux : Linux simTGScreen V1..0B <Reported Broken>
Windows : Windows simTGScreen V1..0B <Reported Broken>

Librairies needed :

SFML 1.3 and librairies use by SFML http://www.sfml-dev.org/
QT4.4

Linux :
------------------------------------------------------------------------------------------------------------------------------------
ALso it use OpenGL, so if you use Compiz and have problem with OpenGL program :rolleyes:

Be careful : it is a simulation , not the exact render , it is impossible with computer screen have the same quality as Pandora :p

Windows :
------------------------------------------------------------------------------------------------------------------------------------
All librairies needed are in archive. If you have yet these on your path you can delete dll


How to
-------------------------------------------------------------------------------------------------------------------------------------
CODE

Usage : simtgscreen [OPTIONS] filename

filename : any image BMP,PNG,JPEG,TGA,DDS
-h --help : help
-t --title=TITLE : title of window
-W --width=WIDTH : real width in millimeters of screen target
-H --height=HEIGHT : real height in millimeters of screen target
-x --dpix=DPIX : number of pixels by inch (DPI) of your screen
-y --dpiy=DPIY : number of pixels by inch (DPI) of your screen
-X --resX=X : real width in pixels of screen target
-Y --resY=Y : real height in pixels of screen target



by default it is for Pandora, if you don't give dpi information it is dpi information give by XWindows ... so you need give it only if you have bad dpi for your screen :)

Formula to calculate DPI ( in fact exact term is PPI : Pixel Per Inch or PPP in french)

DPIX = ( Width in pixels) / ( Width in millimeters / 25.4)
DPIY = ( height in pixels) / ( height in millimeters / 25.4)

Enjoy it and tell me bugs and needed ;)
 
Gruso said:
I'm using Windows so I can't try it, seems like a good idea though. How does it work - does it calculate the display size based on your monitor size & resolution?

Might be a good first entry in the Pandora File Archive! :)



Yes it calculate display size with dpi of your monitor : for this the function is the only thing which code is not portable :( , QT don't give correct DPI, it give DPI of the font not DPI of screen ...

I understand now why Inkscape is not really wysiwyg on my laptop ...

I must add the how-to :rolleyes:
 
Last edited by a moderator:
Kyosys said:
couldn't this also be done with javascript? I might make a version later today.
So it will run under Windows? Would be great. ^^ I don't use Linux.
 
Last edited by a moderator:
so it will run under everything without having to download anything. It'd be really simple, too
 
Kyosys said:
so it will run under everything without having to download anything. It'd be really simple, too
thank you in advance.
 
Last edited by a moderator:
Kyosys said:
couldn't this also be done with javascript? I might make a version later today.
In javascript :blink: i don't understand how you can get dpi of the screen

and how to use it without navigator web ?

Soon version Windows of simtgscreen , i have only one function to port .
 
Last edited by a moderator:
well obviously it would rely on user input, and then it would simply resize the image by using HTML tags. Sure, it's not the best way to do it, but it's good enough
 
fusion_power said:
By the way, how can I find out the DPI of my Monitor? this value wasn't very common for old CRT's. ^^
you must measure your screen , convert in inch and divide your screen resolution by result.

huh it 's more complicated in windows than on Linux !


because the function to get dpi give the dpi choose by user for font ! Not the real dpi of the screen :huh:

On linux you are two differents dpi : screen dpi and font render dpi.

I understand now why it's difficult on windows to make real wysiwyg :(


i have only this function to work and port to windows will be finish :rolleyes:

Maybe a parameter to give size of computer's screen in millimeters is better ?
 
Last edited by a moderator:
then again, javascript can read the screen resovolution, so it would really just have to accept the size of the screen. I'll probably do it later today if nobody else does
 
The problem with javascript is that it can't read screen size, so it would need user input. And you'd have to write IE code, which sucks.
 
Release of version Windows today :
so be careful windows don't calculate correctly dpi, i think is the fault of monitor driver and user couldn't correct values <_< , you can also put correct values for font rendering but ....
 
Thanks for the port Arialia! Works a treat on my PC, displays a 4.5" image. A tiny bit bigger than Pandora's screen, but close enough to do the intended job.

FYI I'm on a 19" widescreen LCD @ 1440x900.

If the Pandora File Archive is open for submissions, why not be the first to put a file up? A nice little honour for you. :) This will be handy for many people to come, I'm sure.
 
Gruso said:
If the Pandora File Archive is open for submissions, why not be the first to put a file up? A nice little honour for you. :) This will be handy for many people to come, I'm sure.
Any chance this can be put in the Pandora File Archive? It's so useful but not exactly easy for people to find.
 
Last edited by a moderator:
Back
Top