Qbasicnews.com
July 04, 2020, 07:51:23 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: 1 [2]
  Print  
Author Topic: jpg and tga  (Read 9696 times)
Z!re
*/-\*
*****
Posts: 4599


« Reply #15 on: February 17, 2005, 12:25:43 PM »

Well, I compressed a BMP (1024x768x24bit) -> PNG

A few pixels had changed a tiny bit.. it was like, a dark blue pixel in the middle of a whole lot of darker blu pixels was a bit darker... such things.. not really loss.. more like.. color dimming.. or something...

Nothing you notice unless you specifically look for it..


PNG is deffinitely good to use if you want HQ textures.. instead of using BMPs that take like 8MB per texture Tongue


And I prefer PNG too =)
Logged
xteraco
Ancient QBer
****
Posts: 450



WWW
« Reply #16 on: February 17, 2005, 12:37:25 PM »

so many formats...png sounds good to me tho, as the game were doing will prob have lots of textures :normal:
Logged

url=http://www.random-seed.net][/url]
fsw
Guru
**
Posts: 251


« Reply #17 on: February 17, 2005, 01:49:09 PM »

Quote from: "Antoni Gual"
In XP, there are GDI+ API calls delaing with JPEGS. Unfortunately they only works in XP...


Actually GDI+ comes with XP that's true...
but you can download the GDI+ DLL and install it on every Windows OS.
And AFAIK it should work.
Here is one location where you can download it:
http://www.dll-files.com/dllindex/dll-files.shtml?gdiplus

Take care
Logged
Antoni Gual
Na_th_an
*****
Posts: 1434



WWW
« Reply #18 on: February 17, 2005, 03:08:36 PM »

I have GDI+ in my W2000 system because Office 2000 installed it.

MS says explicitly in his web that installing GDI+ independently of any software distribution is a license violation and a lot more lawyer's blah blah..

I never tried to move into a PC without Office and call a function to see if it works.Probably  it must be unlocked by a MS installer...
Logged

Antoni
Plasma
Na_th_an
*****
Posts: 1770


WWW
« Reply #19 on: February 17, 2005, 03:47:51 PM »

Quote from: "Z!re"
Well, I compressed a BMP (1024x768x24bit) -> PNG

A few pixels had changed a tiny bit.. it was like, a dark blue pixel in the middle of a whole lot of darker blu pixels was a bit darker... such things.. not really loss.. more like.. color dimming.. or something...

Nothing you notice unless you specifically look for it..


PNG is deffinitely good to use if you want HQ textures.. instead of using BMPs that take like 8MB per texture Tongue


And I prefer PNG too =)


PNG is 100% lossless. Maybe you saved a true-color bitmap as a 256-color PNG?
Logged
xteraco
Ancient QBer
****
Posts: 450



WWW
« Reply #20 on: February 17, 2005, 03:52:50 PM »

this is gonna be the dumbest question i've prob ever asked....can you convert a bmp to data..lol, so i could just copy paste it  and use it like , well...data??? i think that would probably end up being really slow, but is it possible?
Logged

url=http://www.random-seed.net][/url]
fsw
Guru
**
Posts: 251


« Reply #21 on: February 17, 2005, 04:17:48 PM »

Quote from: "Antoni Gual"

MS says explicitly in his web that installing GDI+ independently of any software distribution is a license violation and a lot more lawyer's blah blah..

Didn't know about that   :oops:

Are you sure ?
Logged
shiftLynx
Wandering Guru
***
Posts: 340



WWW
« Reply #22 on: February 17, 2005, 04:27:54 PM »

Quote from: "xteraco"
this is gonna be the dumbest question i've prob ever asked....can you convert a bmp to data..lol, so i could just copy paste it  and use it like , well...data??? i think that would probably end up being really slow, but is it possible?


Here you go: http://download.cdsoft.co.uk/code/fb-img2dat.zip

It outputs the data statements to console, so redirect the output to catch the code if you want (more info is at the top of the source file). Cheesy

-shiftLynx
Logged

img]http://www.cdsoft.co.uk/misc/shiftlynx.png[/img]
xteraco
Ancient QBer
****
Posts: 450



WWW
« Reply #23 on: February 17, 2005, 06:13:40 PM »

i got it to work, but i cant get the data to my bas file...tried everything!!!    tried  test.bmp > prog.bas and all i get is error's
Logged

url=http://www.random-seed.net][/url]
xteraco
Ancient QBer
****
Posts: 450



WWW
« Reply #24 on: February 17, 2005, 06:39:07 PM »

heh...nevermind...i got an idea, i changed the source to wait a little while, so i could open through double clik icon, then select all, copy paste .... lol, simple  Cheesy
Logged

url=http://www.random-seed.net][/url]
shiftLynx
Wandering Guru
***
Posts: 340



WWW
« Reply #25 on: February 17, 2005, 06:49:09 PM »

Oh, I see... I suppose you must have tried to do the > from when the program asked you for the parameters. Sorry I didn't explain that too well. Smiley

I meant if you run it from command line, you can redirect the output of the program. So from cmd, you would do: img2dat test.bmp > code.bas

Heh. Good idea to modify the code though. Smiley

-shiftLynx
Logged

img]http://www.cdsoft.co.uk/misc/shiftlynx.png[/img]
Pages: 1 [2]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!