Acme GiFEncoder: java.io.IOException: too many colors for a GIF

I have been using the Acme GifEncoder to save images as gifs. I have been using this quite successfully until today. For some reason it now gives an error when I try to use this in some circumstances. The exception is:
java.io.IOException: too many colors for a GIF
I am not sure why it will work in some situations and not others. If anyone can give any insight on this problem then I would appreciate it.
Thanks

Thanks for the reference to the quantizer. I will try it out and see if it works.
That is going to lead me on to have a bit of a rant about GifEncoders. I realise that gifs are limited to 256 colours. It is ridiculous that a GifEncoder would not limit the number of colours for you. If you have an image in another format such as jpg that does not have a limit the number of colours, the encoder is not able to convert it into gifs unless it has the number of colours reduced. As far as can tell this should be an essential function of the encoder, unless anyone can tell me differently.
Also if anyone can advise me on the Acme JpegEncoder I would appreciate it. It does not seem to work in any shape or form. I am not trying to do anything in particular with it now, so I have no code to show. I did try to use it before and it did not seem to work, so if anyone knows how to get it to work that would be great.
Once again, thanks for your help.

Similar Messages

  • Java.io.IOException: Too many open files while deploying in soa 11g

    hi all,
    I am getting a strange error while deploying any composite .. it's a hello world kinda composite but while i am trying to deploy it i am getting "java.io.IOException: Too many open files" while deployment.. i have tried to deploy it in 2-3 ways but all of them resulted in the same error..bouncing the soa server might be an option but can someone give an insight as why it is happening and can it be resolved without restarting the server..
    Thanks

    yes..so this problem is with unix only ..coz i previously worked in Windows ..never got this problem..

  • "java.io.IOException: Too many open files"  in LinuX

    Hi Developers,
    * I am continiously running and processing more than 2000 XML files by using SAX and DOM.....
    * My process is as follows,
    - Converting the XML file as Document object by DOM....
    - And that DOM will be used while creating log file report, that log file will be created after executing all XML files..
    * After processing approx 1000 files, it throws *"java.io.IOException: Too many open files" in LinuX system* ....
    * I have googled more and more in all sites including sun forum also, but they are telling only to increase the system config by ULIMIT in linux....If i increase that its executing well without exception........
    * My question is, Is it possible to do it by JAVA code itself or any other VM arguments like -Xms512m and -Xmx512m.....
    * Please let me know , if you have any idea.....
    Thanks And Regards,
    JavaImran

    Doh! I forgot to post my little code sample...
    package forums.crap;
    import java.io.*;
    import java.util.*;
    public class TooManyFileHandles
      private static final int HOW_MANY = 8*1024;
      public static void main(String[] args) {
        List<PrintWriter> writers = new ArrayList<PrintWriter>(HOW_MANY);
        try {
          try {
            for (int i=1; i<=HOW_MANY; i++ ) {
              writers.add(new PrintWriter("file"+i+".txt"));
          } finally {
            for (PrintWriter w : writers) {
              if(w!=null)w.close();
        } catch (Exception e) {
          e.printStackTrace();
    }... and the problem still isn't OOME ;-)
    Cheers. Keith.

  • Getting java.io.IOException: Too many open files+ClassNotFoundException

    Dear All
    We have a web application deployed on Rational Application Developer 6.0 (Operating System is Windows 2000 professional) our users are randomly getting java.io.IOException: Too many open files+ClassNotFoundException when they click on some servlet or jsp link, but they are getting this error randomly for example when they click some link they may get these exceptions but refreshing page or clicking once again on same link executes servlet successfully.If anyone could help on this topic we will be grateful
    Thanks

    I think this these two exceptions are occuring in differrent environment
    java.io.IOException is occuring under heavy load to web server its stack trace is as follows:
    JSPG0225E: An error occurred at line: 2 in the statically included file: /SessionCheck.jsp
    JSPG0093E: Generated servlet error from file: /Admin/AdminInsuranceCertificates.jsp
    E:\WebSphere_6\AppServer\profiles\AUSECert\temp\centraNode04\server1\AUSECert\Vero.war\Admin\_AdminInsuranceCertificates.java:259: cannot access com.bplus.natmar.LoginDetails
    bad class file: E:\WebSphere_6\AppServer\java\jre\lib\core.jar(java/io/Writer.class)
    unable to access file: E:\WebSphere_6\AppServer\profiles\AUSECert\installedApps\centraNode04Cell\AUSECert.ear\Vero.war\WEB-INF\classes\com\bplus\natmar\LoginDetails.class (Too many open files)
    Please remove or make sure it appears in the correct subdirectory of the classpath.
    (source unavailable)
    1 error
    ]: com.ibm.ws.jsp.JspCoreException: JSPG0049E: /Admin/AdminInsuranceCertificates.jsp failed to compile :
    this error always occurs in reference to logindetails class this clas is used to make a session check on different roles in our project for e.g., user having end user role should not be able to log in as a user having admin role
    we have included a sessioncheck.jsp in our every jsp page in this jsp we have simply used logindetails class as useBean and called its getresource() method
    above stacktrace is from our live application server
    while testing same project on our local system we are not getting too many open files exception but we are getting following ClassNotFoundException
    [11/30/05 17:11:42:797 EST] 0000004a SystemOut O SELECT count(*) as NoofRecs FROM resourcerolebindings WHERE ResourceName = 'mainEdit.jsp' and IsEndUser=1
    [11/30/05 17:12:50:891 EST] 000001eb SystemOut O SELECT count(*) as NoofRecs FROM resourcerolebindings WHERE ResourceName = 'InsuranceCertificates.jsp' and IsEndUser=1
    [11/30/05 17:17:40:828 EST] 0000008d SystemOut O AppURL is: http://www.VeroECert.com/Vero/indexU.jsp
    [11/30/05 17:17:58:141 EST] 0000008b SystemOut O SELECT count(*) as NoofRecs FROM resourcerolebindings WHERE ResourceName = 'InsuranceCertificates.jsp' and IsEndUser=1
    [11/30/05 17:20:41:703 EST] 00000034 ServletWrappe E SRVE0026E: [Servlet Error]-[com.servlet.UserHelpServlet]: java.lang.ClassNotFoundException: com.servlet.UserHelpServlet
         at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java(Compiled Code))
         at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java(Compiled Code))
         at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
         at java.beans.Beans.instantiate(Beans.java:202)
         at java.beans.Beans.instantiate(Beans.java:63)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper$3.run(ServletWrapper.java:1384)
         at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java(Compiled Code))
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.loadServlet(ServletWrapper.java(Compiled Code))
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.initialize(ServletWrapper.java:1312)
         at com.ibm.wsspi.webcontainer.extension.WebExtensionProcessor.createServletWrapper(WebExtensionProcessor.java:84)
         at com.ibm.ws.webcontainer.extension.InvokerExtensionProcessor.handleRequest(InvokerExtensionProcessor.java:238)
         at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2841)
         at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:220)
         at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:204)
         at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java(Compiled Code))
         at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java(Compiled Code))
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java(Compiled Code))
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java(Compiled Code))
         at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java(Compiled Code))
         at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java(Compiled Code))
         at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))
         at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java(Compiled Code))
         at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java(Compiled Code))
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
    this error is occuring on concurrent clicks suppose three users click on same button then it is possible that one user gets correct output while other users experience this exception
    Also one more point we are not using web.xml for calling servlets we are directly calling it giving its full path.
    Thanks

  • Java.io.IOException: Too many open files

    I am running web-service, by which i have to run .sh file on linux. My code is as follow,
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    public class DomRenewProcessN4Vrsgn
         Process process;
         String s;
         String step;
    public String renewDomain(String ACTIVITY_ID,String DOMAIN_NAME,String DURATION,String EXPIRY_DATE)
              //readOutput(ITEM_ID,TLD);
              Runtime runtime;
                   runtime = Runtime.getRuntime();
                   String domRegisterCmd = "";
                   domRegisterCmd = "sh /home/kesharil/DomainRenew/n4vrsgn/DomainRenew-n4vrsgn.sh"+ " " ACTIVITY_ID " " DOMAIN_NAME" "+DURATION+" "+EXPIRY_DATE;
                   try
                   runtime = Runtime.getRuntime();
                   step=runtime.toString();
                   process =runtime.exec(domRegisterCmd);// + " " ITEM_ID " "+TLD);
                   step=step+process;
                   BufferedReader reader = new BufferedReader(
                   new InputStreamReader(process.getInputStream()));
                   step=step+reader.toString();
                   s = reader.readLine();
                   step=step+s.toString();
                   try
                        process.waitFor();
                   catch (InterruptedException e)
                        return e.getMessage()+1;
                   catch (IOException ex)
                        return ex.getMessage()+step;
              process.destroy();
              int k=process.exitValue();
              String x=String.valueOf(k);
              return x;
    After every 5-6 days, I am getting same error, "java.io.IOException: Too many open files"

    hi,
    domRegisterCmd = "sh /home/kesharil/DomainRenew/n4vrsgn/DomainRenew-n4vrsgn.sh{code}
    you are opening the above file and not closing,,
    so that each and every file still in existence, one the memory full, then you are getting this error..
    please to confirm on this..                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Jpeg to gif ( too many color exception !)

    Dear all :
    I want to convert a jpeg file to gif file (no need to animation's one ) using java . I have found a source program (GIFEncoder ) that convert the image to the gif file . But when i using the class to convert a jpeg to gif, a ' too many color exception ' has return . It is not diffcult to think why the exception happen , it is because the jpeg is always represent in true color (24 bits) , while the gif can only display 256 color (8 bits) . so , i have no ideas that how to create a 256 color jpeg using java ? because the JPEGEncoder package provided by sun will create a 24 bits jpeg file .The JAI can't create the gif files as the animation features of gif files .
    So anyone can teach me the ways of how to create a 256 color jpeg using java , or a suggestions that create gif file using java ?
    Thanks in advance !

    Here's how I do it (it's not based on a color theory or anything, it's just the first thing that came to my mind when I needed this functionality in one of my applications):
    I set up a table with the 256 most frequently appearing colors in the image. Sometimes, these colors are too similar, so I use a little algorithm that makes sure that the colors are satisfyingly different. The algorithm takes a parameter (the color dispersion parameter) and works according to the following pseudocode:
    for all colors in the palette do:
    differential = 0;
    differential = abs(oldColor.red - newColor.red) + abs(oldColor.green - newColor.green) + abs(oldColor.blue - newColor.blue);
    if differential < color dispersion parameter
    don't add new color
    If the new color passes this test, it is added to the palette. Depending on your needs, you may want to let the user select the degree of "color dispersion". If the palette doesn't contain 256 colors after this first pass, I decrease the color dispersion parameter by one and loop over the colors again (keeping the palette from the first pass of course). When this parameter reaches 0, there must be 256 colors in the palette, or the picture wouldn't need to be converted.
    Then make an IndexColorModel from your palette data and set up a MemoryImageSource. From this you can create your image and do whatever you want with it.
    Hope this helps!

  • Reason Of Error java.io.IOException: invalid content type for SOAP: TEXT/HT

    Hi All,
    I am getting an error, when I am sending message from few BPM's to a common Webservice Synchronously.
    Delivery of the message to the application using connection AFW failed, due to: java.io.IOException: invalid content type for SOAP: TEXT/HTML. Setting message to status failed.
    Previously, it was working fine. But today I am getting the errors. Could any one please explain, what exactly the reason is. I searched the Forum, but didnt find a proper resolution. We are sending the same set of data to the Webservice, which we were sending before. Please suggest.
    Regards,
    Subhendu

    Hi Vijay,
    I am wondering,Without this module, how it was working fine for so many days. Could you please throw light?
    Regards,
    Subhendu

  • 11g-[nQSError: 42029] Subquery contains too many values for the IN predicat

    Hi,
    I am having 2 reports one is for subquery which returns inputs to Main report. Actually the report was working fine in 10g. But in 11g we are gettting following error:
    View Display Error
    Odbc driver returned an error (SQLExecDirectW).
    Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 42029] Subquery contains too many values for the IN predicate.Please have your System Administrator look at the log for more details on this error. (HY000)
    Please have your System Administrator look at the log for more details on this error.
    Getting same error after modofying the parameter value MAX_EXPANDED_SUBQUERY_PREDICATES to 12000
    Please suggest what could be the other reason it may fail or any other settings we need to check.
    Regards,
    ckeng

    ckeng,
    Normally the IN clause has restriction of 10000 values in general sql/plsql we will go with inline queries i think model your rpd to generate inner queries
    select * from emp where dept_id in (Select distinct dept_id from dept);
    or have a condition/filter on sub report and make one more inner report with sub-filter but definitely it will cause performance issues.
    thanks,
    Saichand.v

  • Too many lines for CO-PA assessment postings in KSB1

    Hi Experts,
    I created an assessment cycle in KEU1, with one segment, using an PA transfer structure (several cost elements to several value fields), and I´m using one single secondary cost element (category 42) to credit the cost centers.
    When I execute the assessment via KEU5, the credits in the cost centers for the cost element category 42 generates too many lines (for example, I had 3 postings to 3 primary cost elements and in KSB1 I have 9 lines of "credits" - operation KSPA.):
    Primary Cost Elements:
    4110201004  ==> 3.000,00
    4110209009  ==> 2.000,00
    4110209013  ==> 1.000,00
    Secondary cost element (after settlement through KEU5):
    6519999999 ==> 134,36-
                                198,92-
                                190,49-
                                291,54-
                                548,27-
                                311,88-
                                2.659,89-
                                1.268,02-
                                396,63-
    Do you know how can I summarize this postings to have only 3 (ore one) line for the secondary cost element? I cannot identify what was the criteria used by SAP to generate 9 lines.
    Kind Regards
    Mayumi

    the number of line item crediting the cost centre, shall be the same of the line item required in the COPA posting. So the more receiver you have in COPA , the more line item are created.
    Paolo

  • Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 404 Not Found

    In my 2006 biztalk application I have exposed web service to receive SAP input. It was working fine. After I have modified something in orchestration in that application . I am getting following error while SAP try to consume my web service. Can anyone please
    help me.
    Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 404 Not Found

    In my 2006 biztalk application I have exposed web service to receive SAP input. It was working fine. After I have modified something in orchestration in that application . I am getting following error while SAP try to consume my web service.
    HI Arivazhagan K,
    Could you give some explanation about what you modified? according the to error message, this is "resource is not found issue".
    Best regards,
    Angie
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • SOAP: error occured: java.io.IOException: invalid content type for SOAP: TE

    Hi,
    We are implementing an XI scenario as follows: Mail Adapter->XI->SOAP Receiver.
    Basically, we pass the XML File attachment from the Mail Adapter through XI to the SOAP Adapter. However, we keep getting the following error:
    <i>SOAP: error occured: java.io.IOException: invalid content type for SOAP: TEXT/HTML</i>
    Any ideas on where we could look to fix this problem?
    Thanks,
    EC

    People,
    most of errors like that are 401 (unauthorized), 403 (forbidden), 404 (not found) and so on. To be sure, check the message content that comes back from the webservice, in the Message Monitoring.
    Obs: To visualize sync messages payload in Message Monitoring, you'll have to set the Messaging.syncMessageRemover.removebody parameter to <i>false</i> (default is <i>true</i>) in SAP XI AF Messaging service, in the Visual Administrator.
    Regards,
    Henrique.

  • Java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 200 OK

    hi all,
    please help me to resolve the error. i am working on a proxy to soap scenario and in SXMB_moni i am getting the following error.
    i had check my url,its working fine.
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Inbound Message
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIAdapterFramework</SAP:Category>
      <SAP:Code area="MESSAGE">GENERAL</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 200 OK</SAP:AdditionalText>
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>*
    thanks
    kasturika

    Check this thread
    Receiver SOAP Adapter Error: invalid content type for SOAP: TEXT/HTML
    might give you some directions to look at.
    Sameer

  • EROR: java.io.IOException: invalid content type for SOAP: TEXT/HTML

    hi group,
    my problem is related to scenario HTML to WebService in which im trying to send a request to a free webservice on internet and retrieving the response back and showing it in my html page.
    scenario in detail:
    i have a html page deployed on my tomcat server at my local m/c. in which im taking a email string and sending it to webservice which checks whether the email string has a valid email format or not and in response, webservice returns a boolean true/false depending on the email string. i want to show this boolean result n my html page.i have configured HTTP adaptor and SOAP adaptor for this and interfaces are scynchronus.
    im able to send my request to webservice and getting the response also...i checked in trace..it shows message request sent and response recieved...here is the trace..
    http://hcl3sap:50000/MessagingSystem/receive/AFW/XI</Trace>
      <Trace level="3" type="T">User = PIISUSER</Trace>
      <Trace level="3" type="T">Cached =</Trace>
      <Trace level="3" type="T">Creating HTTP-client</Trace>
      <Trace level="3" type="T">HTTP-client: creation finished</Trace>
      <Trace level="3" type="T">Security: Basic authentication</Trace>
      <Trace level="3" type="T">Serializing message object...</Trace>
      <Trace level="3" type="T">HTTP-client: sending http-request...</Trace>
      <Trace level="3" type="T">HTTP-client: request sent</Trace>
      <Trace level="3" type="T">HTTP-client: Receiving http-response...</Trace>
      <Trace level="3" type="T">HTTP-client: response received</Trace>
      <Trace level="3" type="T">HTTP-client: checking status code...</Trace>
      <Trace level="3" type="T">HTTP-client: status code = 200</Trace>
      <Trace level="3" type="T">Deserializing message object...</Trace>
      <Trace level="3" type="T">HTTP-client: closing...</Trace>
      </Trace>
    but i get an error java.io.IOException: invalid content type for SOAP: TEXT/HTML after that,
    Does anyone know where im going wrong....
    regrds

    you are very correct..i used SOAP reciever as http://www.webservicex.net/ValidateEmail.asmx?wsdl and SOAP Action as http://www.webservicex.net/IsValidEmail but getting the same error.
    and if you look in the trace above it says that my request actually went to webservice and got a response also (response code 200)  but i think after recieving the message from webservice something is wrong. either mapping is not correct...(but i tested that ..it works fine) or could be my company firewall is prohibiting the message sent by webservice to XI server (i have given proxy settings with password also)...im NOT sure on this ....
    second thing i noticed in moni while examining the trace was....message payload under "Message Branch According to Receiver List " shows this value
      <?xml version="1.0" encoding="UTF-8" ?>
    - <ns1:IsValidEmail xmlns:ns1="http://www.webservicex.net">
      <ns1:Email>samWhgf.com</ns1:Email>
      </ns1:IsValidEmail>
    and then in just next step "Request Message Mapping" payload is 
    <?xml version="1.0" encoding="UTF-8" ?>
    <ns1:IsValidEmail xmlns:ns1="http://www.webservicex.net" />
    i dont know really why payload is getting appended and if it is correct or not? but after this step further payload goes in this appended format only till call adaptor...if this is so i assume my message is going to webservice as
      <?xml version="1.0" encoding="UTF-8" ?>
      <ns1:IsValidEmail xmlns:ns1="http://www.webservicex.net" /> 
    which is not the proper format to be recieved by the webservice without any input value i.e "samWhgf.com"
    im confused on this ..whether this is the route cause or any other...i have been trying to figure out the root cause from some days but still unsuccessful.
    please provide ur valuable inputs.
    regrds
    Sameer

  • How many photos are too many photos for iPhoto? When do I need to upgrade to Aperture?

    How many photos are too many photos for iPhoto? When do I need to updgrade to Aperture?

    Hi Terrence,  this is what happens, all too often when I click on something, sometimes it takes me 5 more clicks on the mouse while moving the cursor around to get rid of it. The one below popped up as I clicked on my junk mail.
    The next one popped up when I was trying to get on to a site. This happens all the time. Don't know why it is happening. It happens on iPhoto, Aperture, everywhere I go, FaceBook...everywhere and at any time. So frustrating. I don't know if this is normal, but this was happening just before my last mac died a year ago.

  • Working with 30 Camera angles in multicam sequence, best workflow, too many cams for system to play all at once

    Working with 30 Camera angles in multicam sequence, best workflow, too many cams for system to play all at once

    Get a halfway decent system, something like:

Maybe you are looking for