oNyx
|
 |
«
Posted
2003-11-06 21:29:51 » |
|
 These two images should look identical. They look identical in my browser (Firebird), in my image viewer (irfan view) and in other programms too. See for yourself: PNGBug.jar (4kb - ugly useless source included) The image labled with "/gfx/set_o.png" was produced by PNGCrush. However, I don't know if that image is kinda malformed or don't fullfill the specs... but I thought here might be someone around who can check that. edit: ooooh... forgot my system specs  Running win98se, 1.4.2 (build 1.4.2-b28, mixed mode)
|
|
|
|
swpalmer
|
 |
«
Reply #1 - Posted
2003-11-06 22:07:07 » |
|
I get the same thing on a Mac. I think you can get a 'pngcheck' program that will validate the file to see that it follows the spec.. google around... and you might as well file a bug now in any case if everything else doesn't have the same problem.
|
|
|
|
oNyx
|
 |
«
Reply #2 - Posted
2003-11-06 22:38:51 » |
|
pngcheck says that both files are ok. I also used a hex editor to create a broken file and indeed pngcheck reports it as broken. Well... I won't file a bug report, because I don't know where, I don't remember my login, the request login stuff doesn't work and because I don't want to register again. In addition the bug report pages aren't shown correctly in *any* of my browsers. It seems to depend on my resolution (800x600). Also searching something on Sun's pages always gives me a headache... and I already have one. You're welcome to do that if you want to 
|
|
|
|
Games published by our own members! Check 'em out!
|
|
Abuse
|
 |
«
Reply #3 - Posted
2003-11-06 22:39:48 » |
|
Not the 1st bug i've seen in Javas PNG codec, Does it exhibit the same behaviour if you use ImageIO.read()? (I would test it myself.... but its late  ) also, does using a 'proper' Toolkit (as in 1 returned from a specific component, rather than Toolkit.getDefaultToolkit()) give correct results? (I doubt it will make any difference - but u never know  ) I'd guess its the PNG codec not handling a 16color pallette properly. As I said earlier, its not the 1st codec bug i've seen in Java, GIF images with the transparency color not at index 0 also behave incorrectly under certain circumstances. /me searches for the Thread.... http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=2D;action=display;num=1061208332;start=0#0
|
|
|
|
oNyx
|
 |
«
Reply #4 - Posted
2003-11-06 22:53:23 » |
|
[...] Does it exhibit the same behaviour if you use ImageIO.read()? (I would test it myself.... but its late  ) [...] It works with ImageIO... duh  Hadn't thought that they use different decrunching methods (because it doesn't make any sense).
|
|
|
|
jtr
Senior Newbie 
I love YaBB 1G - SP1!
|
 |
«
Reply #5 - Posted
2003-11-07 01:11:54 » |
|
Well... I won't file a bug report, because I don't know where, I don't remember my login, the request login stuff doesn't work and because I don't want to register again.
The JDC request/reset login does ork, but for some reason it takes days for it to arrive in the inbox.
|
|
|
|
|
blahblahblahh
|
 |
«
Reply #6 - Posted
2003-11-07 07:01:35 » |
|
Well... I won't file a bug report, because I don't know where, I don't remember my login, the request login stuff doesn't work and because I don't want to register again.
The JDC request/reset login does ork, but for some reason it takes days for it to arrive in the inbox.
In the last 5 years, there has only been a period of about 4-6 months where a jdc login was required to log a bug, AFAIAA. Certainly, I've logged more than 50 bugs in that time, without ever using a JDC login. I complained bitterly when they made logins compulsory late last year / early this year. I got the one response I didn't expect: "But it's always been that way....I've checked with the JDC team and they say you've always had to login". It took many weeks of me insisting I wasn't insane, and that I could probably find thousands of people who would back me up, before the login requirement just one day vanished again. The contact at sun responsbile for my bug was particularly helpful - apparently he had to argue the case internally for quite a long time. To quote Pratchett: "I got nothing against [Sun]...it's just that --" "I know, I know," said Lezek. "He couldn't find his arse with both hands."
|
malloc will be first against the wall when the revolution comes...
|
|
|
swpalmer
|
 |
«
Reply #7 - Posted
2003-11-07 12:11:01 » |
|
I've never had a problem with filing bugs or searching for them either. If you want it fixed, file the bug.
I hate it when you happen to overhear your customers complaining about a problem you never knew you had because nobody ever bothered to tell you, particularly when it would be a simple fix. Man, I hate that. Tell Sun.
|
|
|
|
oNyx
|
 |
«
Reply #8 - Posted
2003-11-07 14:50:35 » |
|
I've never had a problem with filing bugs or searching for them either. If you want it fixed, file the bug.
I hate it when you happen to overhear your customers complaining about a problem you never knew you had because nobody ever bothered to tell you, particularly when it would be a simple fix. Man, I hate that. Tell Sun. If I want to file a bug I've to check if it was already mentionend. Searching and reading of an unknown number of bug reports... since they aren't properbly displayed in my browser I would have to read the source of the pages - that means usually a lot of horizontal scrolling... that's so much fun. All I wanted to is pointing that bug out (validate and checking on other platforms)... the actual bug filing should be done by someone else, who can do that without a pain in the arse, writes good english and doesn't sound that mean and pissed of as I do 
|
|
|
|
trembovetski
|
 |
«
Reply #9 - Posted
2003-11-10 06:13:39 » |
|
Happy to report, it's fixed in 1.5.. There were a lot of fixes in this area..
|
|
|
|
|
Games published by our own members! Check 'em out!
|
|
swpalmer
|
 |
«
Reply #10 - Posted
2003-11-11 17:08:24 » |
|
Oh sure make it easy for him! He doesn't even have to report the bug and it gets fixed anyway  Really looking forward to seeing a 1.5 beta/EA release...
|
|
|
|
oNyx
|
 |
«
Reply #11 - Posted
2003-11-12 21:29:04 » |
|
Oh sure make it easy for him! He doesn't even have to report the bug and it gets fixed anyway  [...] You said, that you don't have any probs with filing a bug report, but I do have problems with that... I even tried to explain the details. Arguing won't magically enhance my monitor nor the login-request thingy would begin working. All I did was asking for a small "never had a problem with"-favour, but you are right. It's my bug and my fault (because I found it) therefore I have to report it even if it takes 10 to 20 times longer if I have to do it. Yea... I'm sucha lazy SOB. Coding 10 hours per day, doing stuff for 2 modifications and administrate a board with over 17k registered users just doesn't cut it. See? I always sound pissed off. Well... ok this time it's intentional  @ trembovetski Thanks for the info 
|
|
|
|
swpalmer
|
 |
«
Reply #12 - Posted
2003-11-12 23:52:21 » |
|
Seriously, what system are you using that has so many problems with the Java bug reporting pages? I wouldn't make that much effort either  - I just don't get why it's like that for you???. You seem to have a broken system. I've reported Java bugs on Windows, with IE, Opera, Mozilla, Firebird; on Linux with Mozilla, Opera; on Mac with Safari... and I have never had a problem with the site. Just for the heck of it I started the process using Konqueror and it seemed to be working fine... :-/ Maybe you are referring to the problem when browsing bug reports with the bug report text not wrapping so you have to make the browser window wide to view it? I DO get that - but I just make the window big enough and it isn't a problem.
|
|
|
|
oNyx
|
 |
«
Reply #13 - Posted
2003-11-13 00:50:44 » |
|
As if you could make the window big enough if you have to use 800x600  (A new monitor is on first place on my toBuy list). And my system is fine, thanks 
|
|
|
|
MGodehardt
Junior Member  
why does the chicken cross the road?
|
 |
«
Reply #14 - Posted
2003-11-13 13:03:03 » |
|
why do u use png ? i never used png or gif format, i use my own format and never had problems with it, its much smarter
|
|
|
|
|
swpalmer
|
 |
«
Reply #15 - Posted
2003-11-13 13:15:51 » |
|
have to use 800x600 And my system is fine, thanks  These two statements contradict each other  As for why use PNG? A better question is why not? It is built-in to the JRE and is a generally decent lossless format that supports most of what you would ever need. The world does not need yet another 2d graphic file format, there are already too many.
|
|
|
|
blahblahblahh
|
 |
«
Reply #16 - Posted
2003-11-13 14:19:11 » |
|
As for why use PNG? A better question is why not? It is built-in to the JRE and is a generally decent lossless format that supports most of what you would ever need. The world does not need yet another 2d graphic file format, there are already too many.
Ahem. I'm still awaiting JPG-2000, and full-on wavelet compression. (...and I've been waiting for many years  ) c.f. http://jpeg2000.epfl.ch/ for a basic java implementation. But, agreed, until it arrives (they finish writing the standard, and it gets wide support, etc), PNG is probably the best lossy format (nb: not good IMHO for lossless compression - tools and users have a habit of using the lossy compression, which is a PITA when unwanted and the original file gets overwritten. TGA etc are at least *safe* in this regard...) EDIT: FYI JPEG-2000 provides lossless compression at similar ratios to much of the decent-quality lossy compression. It's rather good 
|
malloc will be first against the wall when the revolution comes...
|
|
|
swpalmer
|
 |
«
Reply #17 - Posted
2003-11-13 14:31:26 » |
|
You can use JPEG 2000 now with ImageIO if you download the IO pack for JAI. I'm not sure if the IO pack is released now (not early access) so that you can distribute it with your apps... I think so, but would have to check to be sure. PNG is not lossy, it has no option for being lossy. So as for being the best lossy format  JPEG 2000 is good... very good at vary high lossy compresson ratios.. but the format is also very complex. Or perhaps better stated it can be very complex, supporting regions of interest and tiles etc.. I have not seen any thing to compare it's performance with lossless compression, but I believe that it would do well. JPEG 2000 is also rather slow to encode/decode, probably simply because the current implementations have not matured. It just so happens that the company I work for is using JPEG 2000 hardware for a high definition video product (with a nice cross-platform Java UI). So if you know of some good & fast JPEG 2000 codecs I'm particularly interested.
|
|
|
|
blahblahblahh
|
 |
«
Reply #18 - Posted
2003-11-13 16:03:22 » |
|
You can use JPEG 2000 now with ImageIO if you Yup, but ask an artist to produce that format and you're just going to get funny looks  . The standard itself is also not finished, and the reference implementations appear to be pretty crude (only the most basic support so far, because the extensions haven't been fully defined yet?) PNG is not lossy, it has no option for being lossy. So as for being the best lossy format  Now that you say that, and I've thought about it a bit more...sorry, I was being stupid  . I'm not sure what I was thinking of, except that I remembered I'd had problems before with being supplied low-quality PNG's. My best guess is that we were being given JPG's that were being converted to PNG too late in the production process. Hmm. It's been a long time since I looked at PNG's in technical terms. Oops. JPEG 2000 is good...
I had a Professor who was an expert on Wavelet compression, and I've still got a big stack of notes from his lectures. I spent more time than I care to recall looking at wavelets and working through the maths behind them... But since nearly all of us aren't ever going to (need to) write our own codecs, like other "difficult" algos (MPEG-4?) most of us will never need to worry about complexity, except where it hogs CPU power...?
|
malloc will be first against the wall when the revolution comes...
|
|
|
rreyelts
Junior Member  
There is nothing Nu under the sun
|
 |
«
Reply #19 - Posted
2003-11-13 22:13:35 » |
|
It just so happens that the company I work for is using JPEG 2000 hardware for a high definition video product (with a nice cross-platform Java UI). So if you know of some good & fast JPEG 2000 codecs I'm particularly interested. Several years ago, I worked for a company writing medical imaging software that used wavelet-based compression techniques to work with large videos like angiograms/cardiograms, etc... The stuff people usually provide in DICOM format. Anways, one of the guys I worked with was a graduate from Georgia Tech's PhD EE program in DSP - which is pretty much reknown for being top of class. I could hook you two up. He might have a pretty good idea of how you go about obtaining a good JPEG2000 implementation. Send me an e-mail if you're interested - toby@reyelts.com. As a side note, yes, JPEG2000 should do lossless compression pretty darn well, as it's based on the same wavelet-based techniques that we were using for our own proprietary lossless codec. God bless, -Toby Reyelts
|
|
|
|
MGodehardt
Junior Member  
why does the chicken cross the road?
|
 |
«
Reply #20 - Posted
2003-11-14 10:12:30 » |
|
i use my own image format and the size of my images is much much smaller then png or gif or jpg or jpg2000.
|
|
|
|
|
oNyx
|
 |
«
Reply #21 - Posted
2003-11-14 22:46:23 » |
|
i use my own image format and the size of my images is much much smaller then png or gif or jpg or jpg2000. PNG can be very small. The PNGs from Photoshop aren't. If you really want small PNGs you have to use tools wich really try everything possible to make em (lossless) smaller. I use PNGCrush and PNGOut. PNGOut takes ages but it can easily shrink an image from 68kb to 42kb. >why do u use png ? Because I want to. If I make a very small game. 42kb alltogether (2 classes, 5 images and 3 sounds) then it won't make any sense to even think about writing my own image format... the loader would be at least 3-4 times bigger than the "saved" space. Sometimes a game has just some small graphics... then it just isn't worth the pain. @blahblahblahh >Yup, but ask an artist to produce that format and you're >just going to get funny looks  . /me looks at blahblahblahh like a car (but not that fast)  Heh... seriously I don't have a clue how to produce jpeg2000 images and I even don't care much. However I'm looking forward the day it get's "mature"  Btw animated avatars are imo distracting. I would be nice if you change it, because I (usually) like reading your posts.
|
|
|
|
swpalmer
|
 |
«
Reply #22 - Posted
2003-11-15 01:42:53 » |
|
The standard itself is also not finished
I think if you check the standard for still images is finished. There are other sections left to complete. Check http://www.jpeg.org/JPEG2000.html"JPEG 2000 refers to all parts of the standard: Part 1 (the core) is now published as an International Standard, five more parts (2-6) are complete or nearly complete, and four new parts (8-11) are under development... "
|
|
|
|
swpalmer
|
 |
«
Reply #23 - Posted
2003-11-15 01:52:24 » |
|
Yup, but ask an artist to produce that format and you're just going to get funny looks  . So? The artist can just deliver a lossless image format - like PNG then you can convert to JPEG2000 for your own purposes.. adjusting compression/quality tradeoffs as the project requires. You can whip up a quick Java app with ImageIO to do the conversions, or use something like IrfanView or photoshop plugins etc. I wonder how lossless lossless JPEG 2000 really is? What about simple rounding errors? Can you go in and out of JPEG2000 lossless 1000 times without accumulating rounding error? Theoretically regular JPEG should only lose information once - during the initial quantization phase.. re-compressing with the same parameters should yield the exact same image because the quantization should do nothing if applied again.. but in practice you will accumulate error due to rounding / smoothing, etc. That's why I like PNG - it doesn't do anything with fractions that might lead to accidental loss.
|
|
|
|
|