New Texture File Extensions!

Make suggestions for improving one of the best games on the net!
Post Reply
User avatar
enrico123
Private First Class
Private First Class
Posts: 91
Joined: Tue Jul 14, 2009 10:49 am
Contact:

New Texture File Extensions!

Post by enrico123 »

what I find a very big problem for bzflag is that on textures etc
you can have the .png file extension only and that really bugs me because most images are in .jpg or .JPEG and I think they should add more avaidble file types for textures

who else agrees with me.....
"See a need fill a need"-(Bigweld from the movie "Robots")
User avatar
Gamma
Private First Class
Private First Class
Posts: 97
Joined: Fri Nov 28, 2008 6:47 pm
Location: USA

Re: New Texture File Extensions!

Post by Gamma »

It would make it a bit easier but for right now if you want a pic thats in jpg format then just install gimp, open the pic, then export as a png.
Thats what I do. :wink:
Image

...BZFlag Forever.
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: New Texture File Extensions!

Post by blast »

There are hundreds of image converters. XnView is a pretty nice one, and it can read hundreds of formats. ;)

Also, if you intend to host any images on the official BZFlag image site, then they can't just be random images you find on the Internet. They have to be images that are released under an open license.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
User avatar
War Pig
Private First Class
Private First Class
Posts: 46
Joined: Sat Feb 16, 2008 11:38 pm

Re: New Texture File Extensions!

Post by War Pig »

If you are on linux, ImageMagick is free and will do the job:

Code: Select all

#convert filename.jpg filename.png
GIMP is another option already suggested.

While it would be really easy to have the server automatically convert any uploaded image to png format using a similar method either by calling 'convert' or using the built in PHP image manipulation functions, I think I'd require the uploader to upload the required format. Would avoid the whole 'your conversion made my textures look bad' scenario.

WP
<life> <!-- insert something interesting here --> </life>
User avatar
Gamma
Private First Class
Private First Class
Posts: 97
Joined: Fri Nov 28, 2008 6:47 pm
Location: USA

Re: New Texture File Extensions!

Post by Gamma »

And if my mem proves right isn't png format higher quality than jpg? :shock:
Image

...BZFlag Forever.
User avatar
joevano
General
General
Posts: 1863
Joined: Sat Jun 18, 2005 1:08 pm
Location: South Bend, Indiana, USA

Re: New Texture File Extensions!

Post by joevano »

Depends on what you are displaying. JPEGs are for photographs and realistic images. PNGs are for line art, text-heavy images, and images with few colors. You can have photos in PNG format, but the file size will be much larger that a JPEG with no real noticeable difference in quality. The same does not hold true for text and line art being used in a JPEG, as this cartoon illustrates: http://lbrandy.com/blog/2008/10/my-firs ... -webcomic/
There is nothing worse than aggressive stupidity. -- Johann Wolfgang von Goethe
"How many legs does a dog have if you call his tail a leg? Four. Calling a tail a leg doesn't make it a leg." -- Abraham Lincoln
User avatar
Runic
Private First Class
Private First Class
Posts: 23
Joined: Fri Jul 02, 2004 8:51 pm

Re: New Texture File Extensions!

Post by Runic »

FYI, JPEG is a compression scheme, not a file format. JPEG File Interchange Format (JFIF) is a file format - I know everyone just calls them JPEGs though

PNG was design as a replacement for GIF, mainly because of COMPUSERVEs copyright on GIF

PNG supports 8-bit transparency where JFIFs don't
(must use 24-bit color to have a mask, I'm guessing 48-bit color support a mask too)

Both JFIFs and PNGs use compression but PNGs compression is lossless, while JFIFs is lossy

PNGs can support 8, 24 and 48-bit color (mostly you will see either 8 or 24 bit color PNGs)
GreyScale PNGs support 1,2,4,8 and 16-bit grey color

JFIFs support 8, 16 and 24-bit color - (no mask)
JFIF Greyscale supports 8-bits of grey color (no mask)

GIFs support 8-bit color 1-bit mask
(GIF mask is not a separate channel, it is a single color included in the 256 color max)

1-bit = 2^1 = 2 colors
2-bit = 2^2 = 4 colors
4-bit = 2^4 = 16 colors
8-bit = 2^8 = 256 colors
16-bit = 2^16 = 65,536 colors
24-bit = 2^24 = 16, 777, 216 colors

I would recommend using a PNG if you can first, JPEG second and GIF last, of course for bzflag there is only one to use, PNG!

you could write a server side script or CGI to convert your JPEGs on the fly to PNGs if you really want to use them with out have to re-save each of them and then point the texture to the script instead of the actual image - the script of course would need to be passed the image path you really want to use for the texture.
BZFlag ROCKS!!!
User avatar
hutty
Private First Class
Private First Class
Posts: 227
Joined: Thu Jul 02, 2009 8:09 pm

Re: New Texture File Extensions!

Post by hutty »

I think that more file formats should be available.

while png is higher quality and supports great transparency, jpg would work better for the larger images greatly reducing file size. while for gifs, the copyright restrictions have been lifted (if i am correct), would leave a much easier way to do animation than dynamic color
For all of you who have asked what a hutty is, there is one as my avatar.

instant map... just add water
User avatar
joevano
General
General
Posts: 1863
Joined: Sat Jun 18, 2005 1:08 pm
Location: South Bend, Indiana, USA

Re: New Texture File Extensions!

Post by joevano »

huttymuncher wrote:while for gifs, the copyright restrictions have been lifted (if i am correct)
Huh, copyright restrictions have not been lifted... where did you see that?
There is nothing worse than aggressive stupidity. -- Johann Wolfgang von Goethe
"How many legs does a dog have if you call his tail a leg? Four. Calling a tail a leg doesn't make it a leg." -- Abraham Lincoln
User avatar
hutty
Private First Class
Private First Class
Posts: 227
Joined: Thu Jul 02, 2009 8:09 pm

Re: New Texture File Extensions!

Post by hutty »

multiple places
For all of you who have asked what a hutty is, there is one as my avatar.

instant map... just add water
User avatar
joevano
General
General
Posts: 1863
Joined: Sat Jun 18, 2005 1:08 pm
Location: South Bend, Indiana, USA

Re: New Texture File Extensions!

Post by joevano »

huttymuncher wrote:multiple places
Provide specifics, don't spread hearsay that is not true here.
There is nothing worse than aggressive stupidity. -- Johann Wolfgang von Goethe
"How many legs does a dog have if you call his tail a leg? Four. Calling a tail a leg doesn't make it a leg." -- Abraham Lincoln
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Re: New Texture File Extensions!

Post by JeffM »

jpeg sacrifices quality for size. On textures that get scaled in game this does not look good.

Being able to read GIF files does not infer automatic animation ability in game, that would have to be written in. PNG will have better compression then GIF for 8 bit images (GIF is only RLE, PNG is GZIP). We could do animation with PNG if needed.

The other issue is that supporting those formats would require more third party libraries, and we do what we can to minimize those.

The one good format to support would be SVG.
ImageJeffM
tobylane
Private First Class
Private First Class
Posts: 130
Joined: Thu Jan 29, 2009 4:21 pm

Re: New Texture File Extensions!

Post by tobylane »

http://en.wikipedia.org/wiki/Gif Expired patents.

Does the game support Animated pngs?
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Re: New Texture File Extensions!

Post by JeffM »

not at this time.
ImageJeffM
User avatar
joevano
General
General
Posts: 1863
Joined: Sat Jun 18, 2005 1:08 pm
Location: South Bend, Indiana, USA

Re: New Texture File Extensions!

Post by joevano »

tobylane wrote:http://en.wikipedia.org/wiki/Gif Expired patents.
The patent for the TECHNOLOGY expired, copyright is for the creative content. Know the difference, the law does.
There is nothing worse than aggressive stupidity. -- Johann Wolfgang von Goethe
"How many legs does a dog have if you call his tail a leg? Four. Calling a tail a leg doesn't make it a leg." -- Abraham Lincoln
User avatar
Spazzy McGee
Sergeant Major
Sergeant Major
Posts: 1405
Joined: Mon Mar 21, 2005 4:59 pm
Location: Planet MoFo, Sheffield Division; United Kingdom

Re: New Texture File Extensions!

Post by Spazzy McGee »

JeffM wrote:The one good format to support would be SVG.
Oh, yes please!
"Life is what happens to you while you're busy making other plans." - John Lennon
User avatar
Gamma
Private First Class
Private First Class
Posts: 97
Joined: Fri Nov 28, 2008 6:47 pm
Location: USA

Re: New Texture File Extensions!

Post by Gamma »

Spazzy McGee wrote:
JeffM wrote:The one good format to support would be SVG.
Oh, yes please!
I know what the SVG format is but why would it be so good? correct me if I'm wrong but the last time I read it was primarily being used for mobile phones. (not to get off topic) :D
Image

...BZFlag Forever.
User avatar
Spazzy McGee
Sergeant Major
Sergeant Major
Posts: 1405
Joined: Mon Mar 21, 2005 4:59 pm
Location: Planet MoFo, Sheffield Division; United Kingdom

Re: New Texture File Extensions!

Post by Spazzy McGee »

Gamma wrote:I know what the SVG format is but why would it be so good? correct me if I'm wrong but the last time I read it was primarily being used for mobile phones. (not to get off topic) :D
It's a vector graphics format - that is, images are not defined by pixels of specific shades; they are defined as coordinates, shapes, and colours etc. etc. The advantages to this are that you can infinitely scale an image, and it will always look nice, as the image is being rendered on the screen for you (much like a bzflag map is, in a 3D space, the image is rendered in a 2D space).

It's useful for undetailed textures and patterns, because it's generally a lot smaller than 'raster' graphics, and as stated above, can be infinitely scaled.
"Life is what happens to you while you're busy making other plans." - John Lennon
a bag of hurt
Private
Private
Posts: 2
Joined: Tue Feb 09, 2010 10:33 am

Re: New Texture File Extensions!

Post by a bag of hurt »

"The US LZW patent expired on June 20, 2003.[18.. Consequently, while Unisys has further patents and patent applications relating to improvements to the LZW technique,[18] the GIF format may now be used freely."

-Wikipedia

However, GIFs are not really the best option for anything at this point. PNG is a good choice for any bitmap images, although its (lossless) compression works best on images with a lot of solid colors.

I agree that the development time would be better spent on other issues.
User avatar
joevano
General
General
Posts: 1863
Joined: Sat Jun 18, 2005 1:08 pm
Location: South Bend, Indiana, USA

Re: New Texture File Extensions!

Post by joevano »

a bag of hurt wrote:"The US LZW patent expired on June 20, 2003.[18.. Consequently, while Unisys has further patents and patent applications relating to improvements to the LZW technique,[18] the GIF format may now be used freely."

-Wikipedia
The original comment concerned the COPYRIGHTS on GIF images. Everyone agrees that the patent expired, but a patent is NOT a copyright as I said above (quoted below for your convenience).
joevano wrote:The patent for the TECHNOLOGY expired, copyright is for the creative content. Know the difference, the law does.
There is nothing worse than aggressive stupidity. -- Johann Wolfgang von Goethe
"How many legs does a dog have if you call his tail a leg? Four. Calling a tail a leg doesn't make it a leg." -- Abraham Lincoln
User avatar
hutty
Private First Class
Private First Class
Posts: 227
Joined: Thu Jul 02, 2009 8:09 pm

Re: New Texture File Extensions!

Post by hutty »

I meant that the technology patent expired, gifs people created ARE still protected by their personal copyrights. As goes with all forms of media.

Although yes SVG would be wonderful. Websites would be using it now to if it wasn't for Internet Explorer and it's [insert derogatory statement here]
For all of you who have asked what a hutty is, there is one as my avatar.

instant map... just add water
Post Reply