Image file crashes Tuniac (+minor other things)

The Tuniac forum.
Harteex
Posts: 80
Joined: Tue Mar 30, 2010 7:23 pm

Image file crashes Tuniac (+minor other things)

Post by Harteex » Tue Mar 22, 2011 8:54 pm

Yo, it has been a while.

Tuniac crashes when trying to display some images. I've seen someone report this issue before somewhere... Not sure if this means anything, but both that image, and mine, seems to be black&white.
Here's my image: http://www.harteex.com/tuniac/folder.jpg
Sometimes it doesn't crash at once, but when you change songs a few times within the album and then chose a song outside of the album.

Could this be because of an old libjpeg or something?



Also, other minor issues:
* When you right-click a song and chose Update (to refresh tags for example) it resets the Played counter.
* The Tuniac icon in Windows 7 looks a bit rough compared to the other applications. The icon for the setup application looks a bit better, but it's also a bit rough. See image.



And finally, the 101102 release seems to have gotten quite some downloads, very nice to see :) I wonder if those comes from any specific site / source.

Brett
Site Admin
Posts: 250
Joined: Sun Mar 28, 2010 12:36 am

Re: Image file crashes Tuniac (+minor other things)

Post by Brett » Thu Mar 24, 2011 8:35 am

The issue with black and white jpegs so far my solution is to not read non 4 byte jpeg data.. basically dont read weird ones :p
The icon I wont fix but all ears for updated icons to be given.
The update thingo I will get to maybe tomorrow.

Brett
Site Admin
Posts: 250
Joined: Sun Mar 28, 2010 12:36 am

Re: Image file crashes Tuniac (+minor other things)

Post by Brett » Sun Mar 27, 2011 4:38 am

Try 110327
-Fix grayscale(1byte) jpeg decoding
-Reapply playcount after update
-Taglib update
-other minor fixes



http://wasteofcash.com/Tuniac/

Harteex
Posts: 80
Joined: Tue Mar 30, 2010 7:23 pm

Re: Image file crashes Tuniac (+minor other things)

Post by Harteex » Tue Mar 29, 2011 10:17 pm

I'm testing with the image I posted above and it doesn't look like it's rendered entirely black and white.
There's some color in the edges, looks a bit like the cleartype fonts in Windows.

Brett
Site Admin
Posts: 250
Joined: Sun Mar 28, 2010 12:36 am

Re: Image file crashes Tuniac (+minor other things)

Post by Brett » Wed Mar 30, 2011 7:06 am

I had some weird colour thing going on down the right hand side, 1 pixel wide.

No idea what causes it, so I cropped 1 pixel out as a cheat. Can you take a screen grab and show me where you see the colour?

I assume it comes from the jpeg decoder or the GPU drivers.

Atleast it no longer crashes! :p

Harteex
Posts: 80
Joined: Tue Mar 30, 2010 7:23 pm

Re: Image file crashes Tuniac (+minor other things)

Post by Harteex » Wed Mar 30, 2011 5:54 pm

Yea the non-crashing is a great improvement! :)

Here's an image showing the colors: http://www.harteex.com/tuniac/colors.png
When I look at the same file with windows image viewer it's completeley black and white.

EDIT: It looks the same on my other computer on Win7.

Btw, the image scaling in Tuniac is quite rough, would it be much work to apply some kind of filtering to smoothen it out? There are probably a few open source image editing apps which has good algorithms.

Brett
Site Admin
Posts: 250
Joined: Sun Mar 28, 2010 12:36 am

Re: Image file crashes Tuniac (+minor other things)

Post by Brett » Wed Mar 30, 2011 10:20 pm

Oh yea the jpeg decoder is cheap and nasty. I could have told you that :p

Maybe in the future I'll swap it out for a better one.

Brett
Site Admin
Posts: 250
Joined: Sun Mar 28, 2010 12:36 am

Re: Image file crashes Tuniac (+minor other things)

Post by Brett » Mon Apr 18, 2011 11:59 am

Ok so Tuniac up to now had:
Small JPEG Decoder Library 0.93b (21 Dec 2001)
http://www.subquantumtech.com/jpeg/

I tried:
NanoJPEG 1.1 (12 May 2010)
http://keyj.s2000.ws/?p=137
http://www.h4ck3r.net/2009/12/02/mini-jpeg-decoder/
It was slow with many JPEG's I tested with it so lets move on.

Then:
jpeglib 8c (16 Jan 2011)
http://www.ijg.org/
Worked well adds about 40kb to the 32bit installer. jpeglib recently added support for reading from memory which is why it previously wasn't used.

Then I got greedy and tried:
libjpeg-turbo 1.1.0 (27 Feb 2011)
http://libjpeg-turbo.virtualgl.org/
I spent ages going around in circles finally getting the config files correct(oh how it was simple in the end). But I still cant get the static lib to link correctly. I have no idea whats wrong with it, but I give up for now.


So back to jpeglib 8c in Tuniac 110418
Give it a whirl and let me know if you like it any better.

http://www.wasteofcash.com/Tuniac/

Harteex
Posts: 80
Joined: Tue Mar 30, 2010 7:23 pm

Re: Image file crashes Tuniac (+minor other things)

Post by Harteex » Wed Apr 20, 2011 12:06 am

The strange edge colors in the black&white image are gone, great! :)
I'm sure this lib is much more stable than that old one.

However I'm still thinking if it's possible to make the resizing of the images a bit better looking.
Image resized with Tuniac
Image resized with Paint.NET

Of course the algorithm used in Paint.NET is probably not that fast. But maybe there are other image filtering algorithms that could be used?
Maybe some very simple form of linear filtering would be enough.

Here's one: http://code.google.com/p/image-filters/
However it's GPL so I'm not sure how usable it would be.
This one is public domain: https://code.google.com/p/imageresampler/
However it seems to be more complex.

Or maybe some kind of filtering even exists in the WinAPI or GDI+ or something.


EDIT: Oh and also, now it seems like Tuniac no longer releases the opened images. I can not rename them until I close the application, even though I'm displaying another image.

Brett
Site Admin
Posts: 250
Joined: Sun Mar 28, 2010 12:36 am

Re: Image file crashes Tuniac (+minor other things)

Post by Brett » Wed Apr 20, 2011 9:05 am

Yea not closing files I fixed 5 minutes ago :)

And I have changed the scaling method used to a slightly slower but better looking one.

Tuniac 110420:
http://www.wasteofcash.com/Tuniac

PS. Tuniac and its source is released under a very free "go nuts but at least credit where the code came from" BSD style license. It should allow for the use of nearly anything other people are offering the source for.

Post Reply