SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-08-2010, 09:16 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Help with ImageIO.read(file)

Anyone have any experience here I just recently found out that this doesn't work with greyscale or black and white images. You get a exception thrown.

I having been googling all morning i see allot of people using JAI but i was hoping that wouldn't be necessary. Never thought I would have an issue with greyscale images.
Reply With Quote
  #2  
Old 09-08-2010, 09:38 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by PLUCKYHD View Post
Anyone have any experience here I just recently found out that this doesn't work with greyscale or black and white images. You get a exception thrown.

I having been googling all morning i see allot of people using JAI but i was hoping that wouldn't be necessary. Never thought I would have an issue with greyscale images.
What's the exception being thrown? And do you have a sample image?
Reply With Quote
  #3  
Old 09-08-2010, 09:48 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Sorry should have posted that

Code:
Exception: Numbers of source Raster bands and source color space components do not match
Attached is the image. I have found another api I am trying that seems to be working but hate to have to include yet another api if I don't have too.
Attached Images
File Type: jpg backdrop.jpg (151.3 KB, 244 views)
Reply With Quote
  #4  
Old 09-08-2010, 10:06 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
I know this won't help you much... but I did reproduce the same issue. By saving the image as a png, I was able to read it, though.
Reply With Quote
  #5  
Old 09-08-2010, 10:11 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by stuckless View Post
I know this won't help you much... but I did reproduce the same issue. By saving the image as a png, I was able to read it, though.
Well I didn't even try that route....hmm that would be a workaround althrough a long one. If it throws that exception rename to png scale and rename to jpg. not ideal. Images is a bit out of my arena and I am still amazed the default read throws this exception...I thought maybe it was a corrupt image but I got another api to read it just fine (of course it isn't free so can't use it).

I am also suprised you haven't hit this with phoenix (if you are using that to load the images you scale).
Reply With Quote
  #6  
Old 09-08-2010, 10:35 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
We haven't hit this issue yet, in Phoenix, but I think we try to use .png files where possible. And in BMT, I may hit this as well, since I use the ImageIO.read/write apis there to download fanart and scale on the fly, but if that process fails, I just log an error.

BTW... I don't think just renaming the file to png would work, i think you'd have to somehow save it as a png file. In my case I opened up using an image viewer and did a save as png.
Reply With Quote
  #7  
Old 09-08-2010, 10:46 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by stuckless View Post
We haven't hit this issue yet, in Phoenix, but I think we try to use .png files where possible. And in BMT, I may hit this as well, since I use the ImageIO.read/write apis there to download fanart and scale on the fly, but if that process fails, I just log an error.

BTW... I don't think just renaming the file to png would work, i think you'd have to somehow save it as a png file. In my case I opened up using an image viewer and did a save as png.
Good times Yeah the problem I was having was it didn't force me to catch or throw the exception e for that call. I have now added it manually as a workaround (basically black and white fanart won't work if scaling is on right now).

Who would have though that would cause such an issue and to think after I finally got the error of pngs not keeping their transparency worked out.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
software error - can't read ini file cat6man Hardware Support 1 05-21-2010 09:07 AM
.properties file not being read tonysathre SageTV Customizations 7 07-10-2009 06:05 AM
Help importing media: does Sage even read the properties file? silkshadow SageTV Software 9 04-05-2006 10:47 AM
XMLTV file not read properly? henk99 SageTV EPG Service 7 02-08-2005 02:00 AM


All times are GMT -6. The time now is 02:29 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.