Examples of ColorSpaceObject


Examples of org.jpedal.objects.raw.ColorSpaceObject

            System.out.println(padding+"before alt colorspace >>"+(char)raw[i]+(char)raw[i+1]+(char)raw[i+2]+(char)raw[i+3]);
            System.out.println("i="+i+"  >>"+(char)raw[i]+(char)raw[i+1]+(char)raw[i+2]+(char)raw[i+3]+(char)raw[i+4]+(char)raw[i+5]+(char)raw[i+6]+(char)raw[i+7]);
        }

        //read the alt colorspace
        PdfObject altColorSpace=new ColorSpaceObject(-1,0);
        i=handleColorSpaces(altColorSpace, i,  raw);
        pdfObject.setDictionary(PdfDictionary.AlternateSpace,altColorSpace);

        i++;

        //read the transform
        PdfObject tintTransform=new FunctionObject(-1,0);

        i=handleColorSpaces(tintTransform, i,  raw);
        pdfObject.setDictionary(PdfDictionary.tintTransform,tintTransform);

        //check for attributes
        for(int ii=i;ii<raw.length;ii++){

            if(raw[ii]==']'){
                break;
            }else if(raw[ii]==32 || raw[ii]==10 || raw[ii]==13){//ignore spaces
            }else{

                i=ii;
                //read the attributes
                PdfObject attributesObj=new ColorSpaceObject(-1,0);
                i=handleColorSpaces(attributesObj, i,  raw);
                pdfObject.setDictionary(PdfDictionary.Process,attributesObj);
                i--;
                ii=raw.length;
View Full Code Here

Examples of org.jpedal.objects.raw.ColorSpaceObject

        return i;
    }

    private int readIndexedColorspace(PdfObject pdfObject, int i, byte[] raw) {
        //read the base value
        PdfObject IndexedColorSpace=new ColorSpaceObject(-1,0,true);

        //IndexedColorSpace.setRef(pdfObject.getObjectRefAsString());
        i=handleColorSpaces(IndexedColorSpace, i,  raw);
        pdfObject.setDictionary(PdfDictionary.Indexed,IndexedColorSpace);


        //onto hival number
        while(i<raw.length && (raw[i]==32 || raw[i]==13 || raw[i]==10 || raw[i]==']' || raw[i]=='>'))
            i++;

        if(debugColorspace)
            System.out.println(padding + "Indexed Reading hival starting at >>" + (char) raw[i] + (char) raw[i + 1]+(char)+raw[i+2]+"<<i="+i);

        //hival
        i = setNumberValue(pdfObject, i, raw, PdfDictionary.hival);

        if(debugColorspace)
            System.out.println("hival="+pdfObject.getInt(PdfDictionary.hival)+" i="+i+" raw[i]="+(char)raw[i]);

        if(raw[i]!='(')
            i++;

        if(debugColorspace)
            System.out.println(padding + "next chars >>" + (char) raw[i] + (char) raw[i + 1]+(char)+raw[i+2]+"<<i="+i);

        //onto lookup
        while(i<raw.length && (raw[i]==32 || raw[i]==13 || raw[i]==10))
            i++;

        if(debugColorspace)
            System.out.println(padding+"Indexed Reading lookup "+(char)raw[i]+(char)raw[i+1]+(char)raw[i+2]+(char)raw[i+3]+(char)raw[i+4]);

        //read lookup
        //get the colorspace data (base)

        PdfObject IndexedColorSpaceData;

        //can be embedded in this object (when we need to use ref or in separate object
        //when we need to use that ref). This code switches as needed)
        boolean needsKey=raw[i]=='[' || raw[i]=='(' || raw[i]=='<';
        if(needsKey)
            IndexedColorSpaceData=new ColorSpaceObject(pdfObject.getObjectRefAsString());
        else
            IndexedColorSpaceData=new ColorSpaceObject(-1,0);

        //IndexedColorSpace.setRef(pdfObject.getObjectRefAsString());
        pdfObject.setDictionary(PdfDictionary.Lookup,IndexedColorSpaceData);

        i=handleColorSpaces(IndexedColorSpaceData, i,  raw);
View Full Code Here

Examples of org.jpedal.objects.raw.ColorSpaceObject

        if(debugColorspace)
            System.out.println(padding+"Separation Reading altColorspace >>"+(char)raw[i]+(char)raw[i+1]);

        //read the alt colorspace
        PdfObject altColorSpace=new ColorSpaceObject(-1,0);
        i=handleColorSpaces(altColorSpace, i,  raw);
        pdfObject.setDictionary(PdfDictionary.AlternateSpace,altColorSpace);

        //allow for no gap
        if(raw[i]!='<')
View Full Code Here

Examples of org.jpedal.objects.raw.ColorSpaceObject

            }else{ //Direct object in XObject

                //can be called in 2 diff ways and this is difference
                boolean isKey=raw[i]=='/';
                if(isKey)
                    ColorSpace = new ColorSpaceObject(objectRef);
                else
                    ColorSpace = new ColorSpaceObject(-1,0);

                pdfObject.setDictionary(PdfDictionary.ColorSpace, ColorSpace);

                if(ColorSpace.isDataExternal()){
                    ColorSpace.isDataExternal(true);
View Full Code Here

Examples of org.jpedal.objects.raw.ColorSpaceObject

         * work out colorspace
         */
        PdfObject ColorSpace=(PdfObject)cache.get(PdfObjectCache.Colorspaces,colorspaceObject);

        if(ColorSpace==null)
            ColorSpace=new ColorSpaceObject(StringUtils.toBytes(colorspaceObject));

        String ref=ColorSpace.getObjectRefAsString(), ref2=ref+ '-'+isLowerCase;

        GenericColorSpace newColorSpace;

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.