Examples of IntFilterInputStream


Examples of uk.co.mmscomputing.io.IntFilterInputStream

        tables = new JPEGInputStream(new ByteArrayInputStream(ifd.getJPEGTables()));
      }catch(IllegalArgumentException iae){
        tables=null;
      }

      IntFilterInputStream intis;

      int offset=0,mbps=width*rps,max=width*height;
      for(int i=0;i<offsets.length;i++){
        in.seek(offsets[i]);
        byte[] data=new byte[(int)counts[i]];
        in.read(data);                                                          // read codes
        InputStream is=new ByteArrayInputStream(data);
        if(ifd.getFillOrder()!=LowColHighBit){is=new BitSwapInputStream(is);}
        mbps=((max-offset)<mbps)?max-offset:mbps;
        switch(cmp){
        case NOCOMPRESSION:                                                     // 1
          intis=new RGBInputStream(is,spp,alpha!=0);
          break;
        case LZW:                                                               // 5, non base line
          is=new LZWInputStream(is,8,false);  
          intis=new RGBInputStream(is,spp,alpha!=0);
          break;
        case JPEG:
          if(tables!=null){ intis=new JPEGInputStream(is,tables.getQTs(),tables.getDCIns(),tables.getACIns());
          }else{            intis=new JPEGInputStream(is);}
          break;
        case PACKBITS:                                                          // 32773
          is=new PackBitsInputStream(is);
          intis=new RGBInputStream(is,spp,alpha!=0);
          break;
        default:
          System.out.println("9\b"+cn+".readRGBImage:\n\tDo not support compression scheme "+cmp+".");
          return image;
        }
        offset+=intis.read(imgdata,offset,mbps);                                // read/decode max. rps image lines
      }
    }catch(Exception e){
      System.out.println("9\b"+cn+".readRGBImage:\n\t"+e.getMessage());
      e.printStackTrace();
    }
View Full Code Here

Examples of uk.co.mmscomputing.io.IntFilterInputStream

      double[] coeff       = ifd.getYCbCrCoefficients();
      long[]   sampling    = ifd.getYCbCrSubSampling();
      int      positioning = ifd.getYCbCrPositioning();
      double[] rbw         = ifd.getReferenceBlackWhite();

      IntFilterInputStream intis;

      int offset=0,mbps=width*rps,max=width*height;
      for(int i=0;i<offsets.length;i++){
        in.seek(offsets[i]);
        byte[] data=new byte[(int)counts[i]];
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.