GD Graphics Library withdrawn
Wacko writes "The gd library, which allows on-the-fly creation of GIF files, has been withdrawn due to copyright problems. They say they may release another version in the future, but would either need to remove LZW compression algorithm or charge for the library. " Mmmm...patents & copyright laws, oh my!
Encoding an image with JPEG involves a fairly complex mathematical process, which is relatively CPU intensive. It's not really possible to produce a "lightweight" JPEG compressor. Having said that, with the speed of modern CPUs, it doesn't need to be particularly lightweight, and such a library could now be feasibly produced. However, the sort of images that can be dynamically produced don't tend to lend themselves to JPEG anyway...
"The invisible and the non-existent look very much alike." -- Delos B. McKown
My company relies on MRTG! MRTG needs GD!
AHAH!H!HAH
Also please note that PNG cannot do animations (yet).
Now that IS scary. Maybe it's time to get Aladdin's view on this. The current (5.50) version of gs is scheduled to become GPLd soon and I'd hate to see anything mess that up.
If your server's dead, how are they going to run rm?
Seriously, though, I doubt Unisys cares about individual users.
Citizens Against Plate Tectonics
LZ is not patented, LZW which is a slight improvement on LZ is. Almost all modern compression techniques have some basis on LZ
Not quite. The point of a patent is not to encourage wide dissemination of the process that's patented, it's to make it safe for the patent holder to disseminate the process. The fact that making something safe encourages it is a side effect.
Without a patent system (in general - I'm not talking about software patents) the inventor who comes up with a new process wouldn't tell anyone about it. They'd use trade secret law to make sure that nobody learns it, ever.
In general, given the choice between someone sharing their knowledge under the condition that only they can use it for a period of time, and someone never sharing any of their knowledge and burning their notes to make sure nobody else will duplicate their work, I'll choose the former every time.
I don't understand how distributing source code can be in violation of their patent. I got my GIF code from a book that I bought at Borders (Graphics File Formats, John Levine). There were no patent lawyers standing around making sure I didn't read the book without a license. That was a few years ago (1994?) but the book is still available. I don't use that code any more, for fear of being sued, but I still have the book, and I probably have the source ZIPped somewhere in some directory. And nowdays GIF r/w code is easy to find on the web.
Isn't providing source code basically the same as providing the algorithm? Doesn't one describe the other? Can they prevent people from knowing how LZW works? It should only be an issue when someone chooses to use the compiled source.
But, I will not fault gd here, I have too much riding on their GIF/RLE code...
I have discovered a truly remarkable proof which this margin is too small to contain.
No such thing. Alpha channel is a measure of how opaque/transparent (I forget which, but they're simply inverse measures) each pixel is, while the gamma value for the image (there might be separate values for each color, but not per pixel) is a declaration of how much brighter full intensity must be than, say, half intensity, to accurately display the original image. Usually you rescale the whole image from the gamma of the source to that of your screen.
Upthread, Boutell said Unisys doesn't *allow* open-source LZW. If that's true even when you negotiate your own license, it's a whole new kind of evil.
No, no, no. He should just switch to PNG, and say "If you want to see the little icons, get a better web browser." No browser-checking conditional stuff.
BTW, I don't know about IE, but Netscape Communicator 4.04 (which I'm using at this moment) does not support PNGs, and I figure Netscape 4.x counts as one of the "Big two". If IE supports it, then sites switching to PNG will result in even more pressure on Netscape to update their browser to at least 1995 technology. Heck, Amiga Mosaic 1.0 handled PNG just fine. :-)
As copyright owner of this comment, I authorize everyone to defeat any technological measure which limits access to it.
Unisys can't be aware of everything that might be using LZW. The real problem is descriptions of the algorithm that don't admit to the patent (like the Dr. Dobbs' article), and the fact the US patent database is all but useless to a typical programmer.
The third problem is that a patent is an absolute monopoly, and there may be no alternatives. There's no requirement that it be licensed on reasonable, non-discriminatory terms. Granted, that would be really tough to enforce.
IMHO, you should be able to claim a better mousetrap, but you should not be able to claim trapping pests, and you certainly shouldn't be able to tell people they can't trap pests at all simply because you don't like them.
Until then, there's always civil disobedience.
Hell, that's going to annoy a lot of people...
--
"The use of COBOL cripples the mind.
Its teaching, therefore, should be
There's something strange about that decision; maybe someone at Slashdot should ask someone at Boutell for a statement. Consider : Wusage outputs GIFs - in fact, it appears to have the GD library statically linked. One would think Boutell either does have a license from Unisys to distribute GIF code with Wusage - in which case one would expect that they would have been clear on what the score is with respect to GIF,RLE and LZW copyright and/or patent issues for some time now - or they do not, in which case why discontinue GD but keep distributing Wusage (or MapEdit, which reads GIFS...) So; what brought this on ? Inquiring minds want to know.
Heres my patch for GD to use JPEG
/* pointer to JSAMPLE row[s] */ /* physical row width in image buffer */ /* image width and height, in pixels */ /* # of color components per pixel */ /* colorspace of input image */ /* limit to baseline-JPEG values */); /* JSAMPLEs per row in image_buffer */
#include "jpeglib.h"
#include
void gdImageJPG( gdImagePtr im, FILE *outfile, int quality)
{
char *rowdata;
struct jpeg_compress_struct cinfo;
struct jpeg_error_mgr jerr;
JSAMPROW row_pointer[1];
int row_stride;
cinfo.err = jpeg_std_error(&jerr);
jpeg_create_compress(&cinfo);
jpeg_stdio_dest(&cinfo, outfile);
cinfo.image_width = im->sx;
cinfo.image_height = im->sy;
cinfo.input_components = 3;
cinfo.in_color_space = JCS_RGB;
jpeg_set_defaults(&cinfo);
jpeg_set_quality(&cinfo, quality, TRUE
jpeg_start_compress(&cinfo, TRUE);
row_stride = im->sx * 3;
rowdata = (char *)malloc( row_stride );
if ( rowdata ){
while (cinfo.next_scanline cinfo.image_height) {
Convert8to24bit( im, cinfo.next_scanline, rowdata );
row_pointer[0] = (unsigned char *)rowdata;
(void) jpeg_write_scanlines(&cinfo, row_pointer, 1);
}
free( rowdata );
}
jpeg_finish_compress(&cinfo);
jpeg_destroy_compress(&cinfo);
}
> 1. Is this LZW compression the same compression
> used in the unix "compress" command?
It's related, anyway. Patent problems are among the reasons that the GNU folks created gzip as a replacement for compress.
> If Unisys failed to defend their
> patent/copyright (does anyone know the facts
> regarding what rights they have to LZW?) for so
> long, wouldn't it have lapsed?
They have a patent on the algorithm, and were essentially licencing the patent for free, not failing to defend it outright. It wasn't until LZW started getting widely used that they decided to yank the rug out from under everyone and start charging money.
> 3. Who do we email at Unisys to complain about
> this?
You don't. This has been going on a long time now, and a lot of people have been complaining. It seems that as long as they get their money, they don't give a shit what happens the rest of the world.
---
DNA just wants to be free...
Heres my patch for GD to use PNG
/* Optionally write comments into the image */
#include "png.h"
void gdImageWritePNG( gdImagePtr im, FILE *fp )
{
long i;
png_structp png_ptr;
png_infop info_ptr;
png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, 0, 0, 0);
if (png_ptr == NULL){
fclose(fp);
return;
}
info_ptr = png_create_info_struct(png_ptr);
if (info_ptr == NULL){
fclose(fp);
png_destroy_write_struct(&png_ptr, (png_infopp)NULL);
return;
}
if (setjmp(png_ptr->jmpbuf)){
fclose(fp);
png_destroy_write_struct(&png_ptr, (png_infopp)NULL);
return;
}
png_init_io(png_ptr, fp);
{
png_colorp palette;
png_set_IHDR(png_ptr, info_ptr, im->sx, im->sy, 8, PNG_COLOR_TYPE_PALETTE,
PNG_INTERLACE_ADAM7, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
palette = (png_colorp)png_malloc(png_ptr, 256 * sizeof (png_color));
for ( i=0; ired[i];
palette[i].green = im->green[i];
palette[i].blue = im->blue[i];
}
png_set_PLTE(png_ptr, info_ptr, palette, 256);
}
{ png_text text[3];
png_textp text_ptr;
text_ptr = &text[0];
text_ptr[0].key = "Title";
text_ptr[0].text = "App";
text_ptr[0].compression = PNG_TEXT_COMPRESSION_NONE;
text_ptr[1].key = "Author";
text_ptr[1].text = "Blah";
text_ptr[1].compression = PNG_TEXT_COMPRESSION_NONE;
text_ptr[2].key = "Description";
text_ptr[2].text = "Cool";
text_ptr[2].compression = PNG_TEXT_COMPRESSION_zTXt;
png_set_text(png_ptr, info_ptr, text_ptr, 3);
}
png_write_info(png_ptr, info_ptr);
{ long number_passes, pass,y;
number_passes = png_set_interlace_handling(png_ptr);
for (pass = 0; pass sy; y++) {
row_pointers[0] = &im->pixels[y][0];
png_write_rows(png_ptr, row_pointers, 1);
}
}
}
png_write_end(png_ptr, info_ptr);
free(info_ptr->palette);
png_destroy_write_struct(&png_ptr, (png_infopp)NULL);
fclose(fp);
return;
}
>Also please note that PNG cannot do animations (yet).
This is a good thing IMHO. GIF animations are almost as annoying as the dreaded BLINK tag. Just imagine a web without annoying flashing banners assaulting your eyes (at least until the page completely loads and you can hit escape).
I read the internet for the articles.
No. But distracting animations on web pages are evil, so this is another good reason to use PNG instead of GIF.
I don't think the issue is whether or not we can get something for nothing. The very existence of PNG shows that non-restricted software and media formats can exist to solve our collective imageing problems. The real issue is that Unisys was predatory.... they created something, and allowed popular opinion to believe it was "free", then changed the rules. I doubt if many of us don't think that they deserve the rights to LZW and related technology. They just should've been open about it from the beginning.
Way back then when UniSys first claimed a patent on GIF, there was a group that came out with an open GIF replacement spec. Yet because of the general laziness of society, this standard went nowhere. Maybe I'm missing something but it seems the only advancement the OSS community has made with algorithms is bzip2.
The very nature of these algorithms makes them difficult for someone who is not intricately familiar with the code to modify it. Something like the Linux kernel is comparatively simple.
UNISYS tried charging for GIF what, 5 years ago? At that time (after almost the entire world went up in arms over it), they said they'd retain the patent on LZW, but not charge for non-commercial use or something like that. I can understand pulling it for non-free reasons, but what prompted pulling GD right now?
"We are pleased to be able to bring you a new version of gd. Version 1.6 completely replaces GIF images with PNG images. Please note that you will need to make code modifications to use version 1.6. This should be straightforward. Both major web browsers and many less popular tools support PNG in their recent versions. PNG also produces highly compressed images. Version 1.6 produces palette-based PNG images only; however, version 2.0 will support truecolor, and also JPEG. We are also in the process of reevaluating the RLE-based compression used to make LZW-compatible GIFs in gd version 1.3."
'nuff said...
I am not merely a "consumer" or a "taxpayer". I am a Citizen of the State of Texas
wouldn't it be possible to write out gif files
without using LZW compression? I don't know the details of LZW - is it possible to just write the "obligatory" escape codes and output the stream in raw format?
Although the files will grow considerably in size, it'd be better than nothing!
-- close but no sig
...no telling what you might catch from them....
I am not merely a "consumer" or a "taxpayer". I am a Citizen of the State of Texas
I was a bit confused, but a part of what I was thinking was that several files at once could be stuffed into the same container. This could allow animation, e.g. And they wouldn't really all need to be graphics (although synching up the sound is probably a whole other problem -- still, once it was there it would be something to buid from).
I think we've pushed this "anyone can grow up to be president" thing too far.
...in a more civilized nation (on terms of IP laws)? I understand if the program cannot continue in the U.S. but what about Europe?
Uhh, what is a gamma channel? Gamma is traditionally associated with color calabration in computer graphics. However it is always applied as a single function over an entire image, meaning there is no need for a channel. Am I missing something?
-- Virtual Windows Project
Doesn't Cserve own the GIF patent still? (And IIRC it could apply to any program that -views- GIF files, not just creating them. But they have failed to enfore for so long.... Maybe the same thing will happen to creation sometime soon.
Or maybe we should write a GD library replacement that uses JPG...
/*He who controls Purple controls the Universe. *
www.gotontheinter.net
Updated vaguely once a whenever, maybe once a whenever-and-a-half.
yes, but i have to leave that unselected for all windows, so that if i want images in one window, and not others, i have to load them every time i load a page. I should be able to set the auto-load window by window
Anyone have a copy of the latest version? Time to move development out of the US.
crap, someone else would have done it.
and if unisys ignored violations for so long then it means they dont care
and why would they care now? they only have 3 years left of life in it, or are they gona get back pay from everyone over 10years?
This doesn't surprise me. It appears that UNISYS is bound and determined to end GIF as a graphics file format. GD should go PNG and be done with it. This bit of news is probably a great reason to do so.
--
"All that is visible must grow and extend itself into the realm of the invisible."
I swear by MacOS X. Although I use to swear *at* MacOS 9...
Ok, well, Communicator 4.5 and later apparently do. So, that's something, I guess...
Sam: "That was needlessly cryptic."
Max: "I'd be peeing my pants if I wore any!"
Why bother with GIF when you can use PNG, or JPEG, both of which are a lot nicer, and are not patented/license restricted.
Actually, IE has supported PNG since the beta versions of 4.0. It doesn't support alpha, true, but you can get PNGs to load via the tag, which was more than you could say for netscape at the time (IIRC, during the 4.0 beta perios, Netscape said they wouldn't support png natively, leaving people to write plug-ins. Gee, thanks for the extra work in writing pages, guys.)
If you've got pngs that cause IE to blow up, you've either found some kind of IE bug or are using a feature it doesn't support. Maybe you should tell the IE team so they can fix it.
PNG offers better compression and features than GIF, and doesn't have the legal problems. The modern browsers all support it too. There's really little reason to even want to use GIF.
True, there is the issue of animation... Quite honestly though, I can live without all the blinkenlighten on Web sites... Most are garish nightmare creations spawned from the depths of hell. ;>
That's the reason...
#include "png.h"
void gdImageWritePNG( gdImagePtr im, FILE *fp )
{
long i;
png_structp png_ptr;
png_infop info_ptr;
png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, 0, 0, 0);
if (png_ptr == NULL){
fclose(fp);
return;
}
info_ptr = png_create_info_struct(png_ptr);
if (info_ptr == NULL){
fclose(fp);
png_destroy_write_struct(&png_ptr, (png_infopp)NULL);
return;
}
if (setjmp(png_ptr->jmpbuf)){
fclose(fp);
png_destroy_write_struct(&png_ptr, (png_infopp)NULL);
return;
}
png_init_io(png_ptr, fp);
{
png_colorp palette;
png_set_IHDR(png_ptr, info_ptr, im->sx, im->sy, 8, PNG_COLOR_TYPE_PALETTE,
PNG_INTERLACE_ADAM7, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
palette = (png_colorp)png_malloc(png_ptr, 256 * sizeof (png_color));
for ( i=0; ired[i];
palette[i].green = im->green[i];
palette[i].blue = im->blue[i];
}
png_set_PLTE(png_ptr, info_ptr, palette, 256);
}
{ png_text text[3];
png_textp text_ptr;
text_ptr = &text[0];
text_ptr[0].key = "Title";
text_ptr[0].text = "text";
text_ptr[0].compression = PNG_TEXT_COMPRESSION_NONE;
text_ptr[1].key = "Mr X";
text_ptr[1].text = "xxxx";
text_ptr[1].compression = PNG_TEXT_COMPRESSION_NONE;
text_ptr[2].key = "xxxx";
text_ptr[2].text = "zzzz";
text_ptr[2].compression = PNG_TEXT_COMPRESSION_zTXt;
png_set_text(png_ptr, info_ptr, text_ptr, 3);
}
png_write_info(png_ptr, info_ptr);
{ long number_passes, pass,y;
number_passes = png_set_interlace_handling(png_ptr);
for (pass = 0; pass sy; y++) {
row_pointers[0] = &im->pixels[y][0];
png_write_rows(png_ptr, row_pointers, 1);
}
}
}
png_write_end(png_ptr, info_ptr);
free(info_ptr->palette);
png_destroy_write_struct(&png_ptr, (png_infopp)NULL);
fclose(fp);
return;
}
> #1. Is this LZW compression the same compression used in the unix "compress" command?
Yes. That's why gzip was created.
> #2. If Unisys failed to defend their patent/copyright (does anyone know the facts
> regarding what rights they have to LZW?) for so long, wouldn't it have lapsed?
Patents don't lapse like trademarks do. But, in any case, they have defended it on many occasions. What so-called "submarine patent" laws prohibit is them not doing anything until the use became ubiquitous, and the law probably wouldn't make the patent invalid but would rather only require them to license it reasonably.
> #3. Who do we email at Unisys to complain about this?
http://lpf.ai.mit.edu/Patents/Gif/unisys.html
By the way, the patent expires in 2003.
Instead of continuing to use the old, limited, patent-encumbered GIF format, you should consider using PNG. PNG is a free (speech) format which offers the benefits of GIF without the drawbacks.
Like GIF, PNG offers lossless compression: you won't find the ugly square artifacts you get in JPEGs. However, PNG also offers a wider range of bit depths (1-bit through 24-bit), an alpha channel, and gamma information.
(For those who don't know: An alpha channel is a fourth number attached to each pixel, alongside the red, green, and blue values. It tells how transparent that pixel is to be considered. Most browsers and graphics tools don't support alpha yet, but they will. Gamma information helps different computers, with different display characteristics, render an image in the same real-world colors.)
I use GD as a lightweight portable drawing system and never encode a GIF or read a GIF. (I encode as jpeg usually, too many old non-png browsers around.) There just doesn't seem to be an alternative around. GGI is not portable to windows or mac, X is huge and not easily portable. I need something I can tack on to my programs to draw a JPEG or PNG so I can show the user a graph or picture or whatnot.
You can see over at the Public 8-Ball that I create my queue position messages with GD and then JPEG encode the frame buffer for transmission. I don't worry about the CPU speed, 15 frames/second is easy on the PII-266. You can click the how its done picture and find all the source code plus rantings at Unisys.
Those of you with IE can thank Unisys for making the 8ball unavailable to you. I had realtime animated GIF creation in place for the video, but its too slow without compressing and I don't feel inclined to hire a lawyer and negotiate a license for a license. IE Windows can't handle the mime type for the jpeg movies I use now.
A popular format, still widely used (because of its animation capabilities). And that doesn't expire until 2006.
Actually, Ghostscript does support PDF distillation (PDF-format writing). I don't know if it tries to use the LZW compression format or not for what it writes (likely not - that'd cause problems with the currently GPL'd version as well, I think). Don't believe me? Do gs -help to see for yourself.
Sam: "That was needlessly cryptic."
Max: "I'd be peeing my pants if I wore any!"
THE BEST IDEA IN THE WHOLE THREAD ! ! !
Compress uses (appropriately) compression.
--
Aaron Gaudio
"The fool finds ignorance all around him.
"Every man is a mob, a chain gang of idiots." - Jonathan Nolan, Memento Mori
This really is a catastrophe , although maybe positive in the long run --
... BAD Unisys ...
(a) another demonstration of the importance of avoiding patented code / libraries / algorithms;
(b) an incentive to get people moving to PNGs;
(c) everyone has it burnt into their brains : BAD Unisys
"None are more hopelessly enslaved than those who falsely believe they are free." -- Goethe
So has Boutell just decided to stop distributing GD without any outside interference - i.e. Unisys haven't played any part in causing this decision to be taken?
How was GD licensed?
Dodge
Just because people use them in a bad way doesn't mean they are always bad. An excellent demonstration of good use is the user interface
hall of shame:
http://www.iarchitect.com/visual.htm
They can have my GD library when they rm it from my cold dead server!
I was thinking that too. How many browsers that provide graphical page display support the PNG format? (i.e., not Lynx o other character-cell browsers) If only enough did, we could throw GIF away forever...
Sam: "That was needlessly cryptic."
Max: "I'd be peeing my pants if I wore any!"
Until I find time to patch lynx so that I can launch extra instances from links, I'm not giving up netscape 3. 4.x crash far to often, and don't have features I use, such as alt to go back, and the moronic move of autoloading of images into preferences rather than a per-page option.
But then, I have no use for graphic, java, and the like, anyway. Just give me the information.
I use lynx, and those PNG files haven't given me a problem yet. :)
We went through this debate months ago on slashdot when the PNG spec was revised and did not include animation.
They claimed they had the perfect GIF replacement, but apparently not.
What were they thinking?
I'm no expert on patent law, or any kind of law for that matter!
_________
flashcommerce.com
_________
dwelr.com
How about you make a diff, post it on a web site, and give us a URL to it? Slashdot's comment system is mangling your code.
Sam: "That was needlessly cryptic."
Max: "I'd be peeing my pants if I wore any!"
This post was succinct and informative regarding the advantages of PNG (Free, variable bit-depth, lossless), and gave a good, simple, workable explanation of alpha and gamma channels.
Thanks Frater.
timothy
jrnl: http://tinyurl.com/c2l8yr / foes: http://tinyurl.com/ckjno5
They're beyond being evil.
Using them damns your immortal soul, to a hell in which you are required to use all microsoft products, even bob, enhanced with the paper clip. Your descendants are cursed unto the seventh generation, and your daughters will become first prostitutes, and then meter-maids. Your sons, after siring the next generation, will go to switzerland for removal of optional factory equipment and join your daughters when they return. You will become obsessed with Roseanne Barr, and search the net for porn sites featuring her. You are a bad person, and your mother will deny you.
There, that's more like it. I don't bother to block ads. I do bother to block anything that blinks.
No one necessarily is overly worried about JPEG compressing the images overly well - just having some acceptable file format to stuff images into is enough. (preferably one without the LZW encumbrance)
Sam: "That was needlessly cryptic."
Max: "I'd be peeing my pants if I wore any!"
Well, GD has support for reading in a GIF image and making modifications to that. I think that may be where the problem is coming in (because you never know when you'll have to read an LZW-compressed GIF image...)
Sam: "That was needlessly cryptic."
Max: "I'd be peeing my pants if I wore any!"
The AC is right; you're confusing copyright and trademark. Copyrights protect a specific instance - if I duplicated Disney's images of their cartoon charachters I would infringe their copyright. Trademarks protect the use of a symbol; if I drew Disney's cartoon charachters I would infringe their trademark.
I've expressed these ideas elsewhere in slashdot, but the time seems right to "plant the meme" again, so here goes.
A society needs copyrights and patents. In most fields of human endeavor there are tremdous costs in moving from idea to artifact and patent law helps protect the small innovator from being beat to market by the huge wealthy predator. Patent law (the idea) is good.
Copyrights protect a specific formulation of an idea (a written work) from direct copy. It does not protect the idea itself which may be reused in an original way. Copyright law is meant to protect writers and artists (and by extension television producers who really do not qualify as either of the above). The extension of copyright to software is, IMHO, imprefect but useful.
Patents go to hell in the computer field for two reasons:
1) The granting of patents for ideas which are dubious as to their patentability. I'm thinking here of the company that claims to have a patent on all e-commerce because the made a dial-up system that took sales orders some time in the mid 1980's. To me, this is like me opening a little antique shop and filing a patent on retail stores. Patent law actually has a protection against obvious patents or prior art, so this is a problem with the Patent Office not doing its job, not the law itself.
2) Rapid obsolescence. A patent lasts far too long in the field of sotware. Most software ideas are not worth anything after just a few years. (LZW may be the exception that proves the rule!).
My friends, co-workers, and I have gone round and round on patents for software. The concensus seems to be that applying patents to software is, generally, bad. In those few cases where it isn't totally unreasonable (and I think inventing as powerful a form of data compression as LZW could qualify), the term should be much shorter. We kind of thought an 18-month patent would be reasonable. Since patents are meant to prevent a highly-resourced upstart from profiting before a true innovator can get to market and establish him/herself, and since software can be distributed quickly with hardly any resources required, 18 months should allow one to truly profit from a truly original idea and let the rest of us get our hands on it in a reasonable time.
So, fix the existing patent office and create a new software patent.
Oh yeah, just to point out patent law has a "FSF-like" goal on the back end. To get a patent one must put all details of an invention down on paper and publish it (in the patent itself). When the patent expires, anyone can read the patent and do what the inventor did. It encourages the sharing of ideas. It's just that software moves so much faster than manufacturing that these patents become an excessive burden on all of us.
Finally, Boutell himself posted to this thread with the details on why the gd library was pulled. If you are a moderator (and still reading my verbose screed), I encourage you to read his post and consider moderating it up...
From what I understand, IBM has a compeating claim to the Unisys patent, and there are a couple of other people who also claim patents to the LZW compression algorithm. It is just a nasty minefield, and even paying off Unisys won't help to hold off other potential lawsuits.
And for the folks concerned about this only affecting people in the United States, these patents are protected under the Berne convention and can be prosecuted in Europe as well.
More recent versions of GD added LZW code back in (#ifdef'd out, I believe), which had a note saying that if you had a Unisys license, you could enable the code. :)
Sort of like how warez/mp3 sites say you're not supposed to download unless you have the program or CD, and that they shouldn't get in trouble if other people are violating copyrights/patents, etc.
Basically, Unisys blows. I think their corporate HQ is down the road from me. Anyone else in the Bay area who wants to go protest?
I was taking a look at Unisys' LZW statement and saw this:
Currently applicable information as to Unisys licensing policies for products using LZW (GIF,
TIFF-LZW, PostScript, Portable Document Format (PDF), V.42bis, etc.)
PostScript uses LZW? Does this mean Ghostscript and Ghostview are going to be affected?
Does this mean that the concept of LZW and GIF are not separately protected, but the combined use only?
Netscape 4.5+
IE 4.0+ (kind of)
Opera
Mozilla
W3C
Amaya
Konqueror
GNOME-help
... and there are more, too.
As for lack of animation support, what percentage of GIFs in the sites you folks visit are animated?
Of those, what percentage of them actually contribute to the content of the site?
Of those, what percentage would render the sites useless if they were not animated?
Lack of animation support is a lame reason not to use PNGs, at least in the majority of cases, where you don't need animation.
At worst, you can always use GIFs for those specific times when you do really need animation.
---
DNA just wants to be free...
> Also please note that PNG cannot do animations
> (yet).
That is a reason not to use PNG in cases where you do not need animation?
---
DNA just wants to be free...
> Maybe someone could write a *.pnz (.png.gz)
That wouldn't get you much of anywhere; PNG uses the same compression algorithm as gzip, although it is a little more efficient because it is applied a less general fashion.
---
DNA just wants to be free...
No, obviously not. If you read my comment and the comment I was replying to, it should be quite obvious that it was merely a refutation of the other posters point that PNG can do everything GIF can, by providing a counterexample.
Now that they consider LZW profitable, they continue to make their rounds on enforcing their LZW patent ( Patent #4,558,302). But they didn't always consider it profitable enough to actually enforce. They sat silent as CompServe promoted the GIF 87 standard as an open and free graphic file format. Two years later when the open & free format was revised to GIF 89 and GIF 89a, Unisys continued to sit silent. It wasn't until 1993 when GIF had taken on popularity due to it's free nature that Unisys choose to actually take action. If they had taken action back before 1990 instead of 6 years after GIF's original introduction then programmers/users looking for a free file format would not have accepted GIF/LZW and would have looked for an alternative. By remaining blind to the most popular computer image format in BBS history, Unisys ensured an entrenched critical mass of patent infrigement to tax. If Unisys had available to it an even dirtier and non-professional method of making a buck, I'm glad I haven't heard about it.
The League for Programming Freedom has some good information on the GIF Controversy. And, since there is always two sides to every story, Unisys has written their take on the issue. This document explains their stand on requiring licensing from EVERYONE including for what they refered to as "so-called 'freeware.'" They also have a special email address set aside to answer licensing questions. You may wish to email them to find out more on why they refuse to provide a license which is fair to the "so-called 'freeware'" software developer.
Fortantly, this form of Unisys terror will come to an end. Libungif provides a work-around while resulting in files larger than a xpm or bmp containing the same image. The Unisys action also hopefully will help further promote the use of PNG. Most users of web browsers that don't support PNG have much more to worry about than PNGs showing up as a broken image--the public keys for the SSL Certificate Authorites in non-PNG supporting web browsers have either expired or will expire shortly. Since SSL doesn't cleanly handle expired CA entries, users of non-PNG supporting web browsers may be open to a masqurade attack. And to bring things to an end once and for all, 20 years from the filing date of June 20, 1983, US Patent 4,558,302 expires. I suggest that Slashdot mark June 20, 2003 on it's calendar for a party!
The FSF site has long had a notice up saying that no GIFs were available due to (copyright? patent? can't remember) issues. While I think that Unisys is not acting as a friend of the community, I can't really feel that this is something new. The appropriate person there probably just didn't notice before that gd used their proprietary compression. FSF decided to switch to png's. Maybe someone could write a *.pnz (.png.gz) or .ptz (.png.tar.gz) tool? (Has to be "someone" cause I don't yet know how.)
I think we've pushed this "anyone can grow up to be president" thing too far.
While PNG doesn't support animation it does meet or beat GIF in all other areas (e.g. color depth, alpha/transparency).
/ contents.html#2
"Flash" is a good animation format which is supported by most modern browsers. The actual Flash file format is also "open sourced". More info on this at: http://www.macromedia.com/software/flash/open/faq
Correct. For example, Fredrik Lundh's Python Imaging Library can output GIFs (along with a bunch of other formats), but the GIFs are really large because the image data isn't compressed. Apparently at one point he contacted Unisys to ask if he could get a licence for the patent, but Unisys wanted a per-sales fee and reacted uncomprehendingly to the words "free software". If, as another poster claims, Unisys is now accepting a one-time fee for unlimited use, then at least that's a baby step in the right direction.
It seems to me that UNISYS are just being anal about people using anything that tastes like LZW, but what I don't understand is why people try to comply with their insane demands...
There really is no point in jumping through hoops becasue of patents as long as we are talking OpenSource.
OSS is not subject to patentlaws, as every patent violating line of code can be rolled up in a patch or a lib and placed on a server in the free world where software patents are void.
Actually putting up a single server with all the patent violating code would be very helpful as the local judge would quickly get used to booting whiney patent-holders out of court:=)
BTW if anyone starts a patent-violation archive, know this: "Off-site backup is your friend".
-- To dream a dream is grand, but to live it is divine. -- Leto ][
perl -pi -e 's:ANIMEXTS1:ANIMEXTZ1:' ./netscape ./netscape
perl -pi -e 's:NETSCAPE2:NOTSCAPE2:'
Kills 'em dead. They animate ONCE and then they
stop. Death to lame-ass graphics!
And yes, there are a _few_ good animated GIFs..
just like there are a few useful Java applets.
There are just too many BAD ones out there.
No, we have no intentions of dropping the GD-support in PHP. PHP has absolutely no LZW, GIF nor libgd code in it. All it has are a set of access functions. If you have libgd.a and the gd include files on your system, PHP will work. We don't care how you get these files and nobody can come after us for anything because we don't distribute them.
Animated GIFs can be used very effectivley : see here for examples.
Posted by kewlmann:
I have talked to some people here at Unisys (where I work) about this. They certainly don't see it as a very big issue at all. There idea is that we invented, we can do with it what we want.
I just want to say that anything here is not representative of company policy. It is just my personal opinion.
I remember seeing original article (by Lempel & Ziv ?) in an IEEE magazine way back. How can it be patented if it was published in a scientific magazine? Isn't it used in just about any compressing algorithm today (winzip, gzip and what not)?
Even RLE is patented. (two separate patents, actually) Algorithm patents have no basis in fairness or reality. It's just a matter of picking the algorithm with the fewest patents, or the algorithm with the patent holders who are least likely to make your life a living hell.
---
DNA just wants to be free...
Unisys applied for the patent in the early eighties so it should be in 2003, I believe.
From what I understand, copyrights (don't know about patents) do offer this type of user-protection. If a company does not defend their copyright under certain circumstances, they may lose it.
This is why Disney sues kids who draw little comic strips featuring their characters, or nurseries that draw the characters on walls. They have to, or some guy can sell unlicensed T-shirts later and claim that Disney had forfeited their copyright.
At least that's my general understanding of it.
> GGI is not portable to windows or mac
Actually there's a Win32 port now.
---
DNA just wants to be free...
I have always been told that failing to promptly informing an infringer of a problem will jeopardize any future ability to go after an infringer.
I know that's true of trademarks, but I don't know if it applies to patents.
The problem is, it's expensive to go to court at all these days, whether you're right or wrong. You're not likely to recover court costs even if you win because there is no well defined time frame for abandonment (AFAIK). Even if you could recover the costs, you're out the money until (and if) you get a settlement. The little guy doesn't stand a chance, and big business just swaps patents or figures paying the fees is cheaper than going to court.
It doesn't help that the USPTO likes to dump any real decisions into the court system and simply ASSuMEs that everyone can afford their day in court.
Try ImageMagick and PerlMagick. You can create images on the fly and save them to just about *ANY* graphic file format.
www.wizards.dupont.com/magick/
I used this stuff to create a web-based coloring book. Have a peek at:
www.dartfirststate.com/color/
PNG may be a better format than GIF, but nobody on the web is using it. Why not? Well, for one thing, people are comfortable with using the old trusted GIF format and since Unisys totally failed to enforce his patents some five years ago, people have been using it on their webpages because it served its purpose good enough and their was no alternative. PNG was to become that alternative. But, in terms of browser compatibility, you can't use PNG simply because the PNG support sucks. In our Internet publishing compagny, we want all our Internet sites to be supported by at least Internet explorer 3.02 and higher and Netscape 3 and higher. The PNG support is still limited to the >=4 versions of these browsers and even then the support is often broken. Netscape Navigator, for example, still doesn't support transparency (haven't checked the latest Mozilla releases though). I must say the broken support for PNG is partly because the PNG format has a lot more features than the GIF format (I mean, I just have to see about the support for arithmetic coded JPegs which is patented also btw)
So it seems that Unisys is trying to enforce it's patent again and the GD library is their (first) victim in this round, which is a shame because f.e. the PHP server side scripting language (http://www.php3.org) uses the GD library to create GIFs on the fly, a feature that we have been using a few times and which has proven itself quite valuable.
see http://www.cdrom.com/pub/png/pngapbr.html for information on PNG browser support.
TlighT
I remember downloading .GIF files back in the 80's ('course they were all porn back then)... Isn't that patent close to expiring yet?
If I remember right, the default version of gd comes without the patented LZW stuff. It works, but it makes big fat GIFs. Then if you have a license from Unisys, you can download the LZW stuff and compile it in. So what's the problem?
It's always bothered me why there wasn't
a lightweight JPEG producing engine like there is with GD for GIFs. Now would be a good time for one to materialize - and if it had the same API as GD, that would certainly help people migrate from GD.
What is wrong with altering the souce of GD to go to a neutral output format (like a simple bit-map), and then having the option of several output filters like: png, jpg, bmp, ppm...
I use this library all the time with PHP! This is a major bummer!
-AP
I'm not a GIF file guru but I was told by someone
who is that he's written GIF image tools that
have basic RLE compression, or some other
compression and they're standard GIF image files.
GIF images don't have to use LZW compression.
these libraries help the webalizer to make good reports - and if they want to take that away from me, i will just use the version i got on those disks and laugh in their stoopid faces (giggle)
GIFs are nice for uncomplicated animations on web pages - does PNG offer this feature?
"The only good windmill is a tilted windmill."
you can get gd1.5 from me here.
[CptnForq] ummm... what was I talking about?
The whole GIF issue IS much older than gd. I was referring to the overall behavior of Unisys.
They pulled their license stunts in the latter half of the '80s. They probably deserved to have their rights stripped at that time. When GIF came out it was: "GIFS are great, everyone use them". Dozens of shareware GIF programs came out without a single word from unisys. Then a few small commercial apps came out, still not a word. Then, nearly all commercial apps supported GIG and suddenly, "That's an infringement on out patent, we demand fees".
Enforcement is still very selective and spotty at best. Apparently based on weighing potential profits and the probability that the latest victim will quietly pay up vs. the big PR black eye if it ever goes to court.
What I heard when the whole thing with Compuserve first came out was that Compuserve had thought the algorithm was in the public domain because it had been published by the inventor without a patent pending notice. Also, it turned out that he hadn't applied for the patent until too much time had passed after he had published the algorithm for the patent to actually be valid.
I haven't heard any justification of the patent on these grounds; I don't think UNISYS or anyone has actually had to defend their patent claims, since they haven't actually sued anyone over it. I had thought that UNISYS was failing to do anything about people violation the patent because they knew if they got into a case, the patent wouldn't hold up and the people they'd licensed it to would be able to get their money back.
Sorry, no cigar...
The berne convention is an international agreement on respecting copyrights, it NEVER mentions the word "patent", so, eventhough I didn't take the time to read it, I'd say that it is a safe bet that the Berne convention has nothing to say about patents.
So it seems I still live in the free world:)
-- To dream a dream is grand, but to live it is divine. -- Leto ][
I remember seeing original article (by Lempel & Ziv ?) in an IEEE magazine way back. How can it be patented if it was published in a scientific magazine? Isn't it used in just about any compressing algorithm today (winzip, gzip and what not)?
Fuck the GIF format. Does anyone ever use it anymore? I stopped using it way back when Compuserve started bitching about its patents on the compression.
ncompress comes with Red Hat at least and provides the compress/uncompress programs which handle LZW compression. gzip also is compatible with compress'd files, so that too much handle LZW compression. Is there some sort of general license agreement whic Unisys provided for these programs?
--
Aaron Gaudio
"The fool finds ignorance all around him.
"Every man is a mob, a chain gang of idiots." - Jonathan Nolan, Memento Mori
No, the patent is on LZW. Hardly anyone else cares about LZW anymore, because other algorithms are not only unencumbered but better. But LZW is the best compression scheme available in the GIF spec (which IMHO should have long since been deprecated in favor of PNG, for this and other reasons), and there's a special licensing arrangement for GIF generators.
Is character licensing based on copyright or trademark?
In fact, when it comes to real property, the law already recognizes that if you tolerate trespassing, eventually people acquire an easement to your property. Cases like LZW suggest that this principle should be carried over into IP law.
It can't be that, since the patent only applies to GIF generating software (decompression is not covered by the patent) Correct me if I'm wrong...
John
John_Chalisque
ISTR patents have to be filed by country (Berne definitely doesn't apply), and the rules vary somewhat, though there's some sort of clearinghouse that automatically covers as much of Europe as you care to pay for.
RSA is only banned in the US (unless you're filthy rich) because, due to mistakes in applying in other countries, those other countries didn't issue patents on it.
Microsoft Developers Network.
--
"L'IT c'est moi!"
http://www.radix.net/~cknudsen/Ilib/
It allows you to use giflib (or ungiflib) so that Ilib doesn't have the licensing issues. As long as you can get gliflib, you're good to go.
See the FAQ and the API.
It's open source and should work on all *nix as well as win32.
The Free Software Foundations has stated that they feel the patents do not cover programs that only accomplish decompression. Ghostscript only decompresses PDF files, not write them and Ghostview only handles the page images that Ghostscript hands to it. So, according to the FSF, ghostscript/ghostview should not be effected. However, the fact that Unisys gave the author of xpdf such a hard time seems to indicate that Unisys feels it has a legal claim to tax LZW decompression only programs as well. I suggest you write to the FSF for more information or compare the LZW decompression algorithm used in gzip with the claims in the Unisys patent.
JPEG is never perfect. Even if you don't drop any lower-order terms in the frequency domain, there's still some quantization error (though maybe that's not cumulative over de/recompression).
Perhaps because PNG doesn't work in older
browsers and JPEG is not so hot for
non-photographic images (eg like web buttons)?
I imagine that a useful alternative might be to pull out the gif code and insert png code instead. That would be the most viable alternative, looking at the code, all that would really be required would be to modify/replace gdImageGif which converts gd to gif with something line gdImagePng and re-release the software as lib to create png's instead. I imagine that you'd have to drop support for importing gif's ala gdImageCreateFromGif, but i suppose we can live with that.
The gd library is a simple but truly handy library, I imagine that the author is incredibly annoyed about this, as he only announced the latest version (1.5) a few days ago.
The problems about the gif patent have cropped up again and again since unisys tried to hold the web to ransom on the matter, it really is time for apps that use gif to use png instead. png does appear to be such a nicer format as well.
C.
I sometimes write stuff
Heh, but there aren't really any standard image formats that do the same thing as Animated GIFs.
Geez, if the government ever needed an example of why file-format patenting is bad, GIF is certainly it. I'm so sick of hearing about one thing or another going under because GIF is proprietary. As has been mentioned here, PNG is nice, and (most importantly) free.
Although I still have yet to see any large number of PNG graphics on the net, it does seem to be a better format than GIF, and netscrape and exploder (claim to) support it. It does everything GIF does, but it also allows more than 256 colours, full alpha, and a few other features. Here's the PNG homepage.
``This, too, shall pass.'' ---Eastern proverb
since libgif and libungif are binary compatable why don't they just dynamically link to that?
--
enterfornone - logging in for a change
C.
I sometimes write stuff
There was a DDJ article explaining GIF and/or LZW by one of the creators (I want to say Welch, but don't be too sure of that) that just happened *not to mention* LZW was patented. The format took off shortly after that.
The whole industry should start a class-action suit against whichever fsckhead wrote the article.
You can get your animated groove thing on with MNG, baby (from the same people who brought you PNG).
.sig is hilarious!
P.S. That
If nothing else, this debate has exposed an awful lot of greed among posters on SlashDot... The general reaction seems to be "Oh, my God! This could interfere with me getting something for nothing!" Don't forget that you wouldn't have LZW *at all* if it weren't for UniSys funding research in this area.
You can get gd1.3.tar.gz from me.
-russ
Don't piss off The Angry Economist
So let me see... this means that all those new people coming to the wonderful language of PHP (http://www.php.net) can no longer create graphics because the file type was patented...
Does this meant that future releases of php will have to drop the gif creation functions as well... I sincerly hope not, as they were *very* useful and at the same time effective and quick.
Damn shame IMHO.
Posted by La Bola:
Roy Batty's wisdom.
GIF: BEER
PNG: SPEECH
Lend me your ears !
the subject says it all
What is needed is provisions to prevent preditory patent licensing. To define:
Keeping silent about patent voilations until the use of it becomes nearly ubiquitous, then cash in on others work by coming out from under the rock screaming violation.
Had Unisys claimed patent infringement when GIFs were just beginning, I'll bet GIF would use a different compression standard now. (Or GIF would have been replaced.)
Fraunhoffer (sp?) did the same with MP3 IIRC. For a long time their web page said that they had a patent for the purposes of enforcing standards only (I sure wish I still had that in my cache!). Later, after a number of programmers had put a lot of hard work into implementing a 'free' standard in their software, suddenly Fraunhoffer (sp?) crys infringement.
In both cases, I think it's quite clear that the intent was a sort of bait and switch tactic. If they had advertized in the sunday paper, it would have been illegal in many places.
#1. Is this LZW compression the same compression used in the unix "compress" command?
#2. If Unisys failed to defend their patent/copyright (does anyone know the facts regarding what rights they have to LZW?) for so long, wouldn't it have lapsed?
#3. Who do we email at Unisys to complain about this?
The Dodger