Package org.apache.sanselan.common.byteSources

Examples of org.apache.sanselan.common.byteSources.ByteSourceArray


                File tempFile = createTempFile("test", ".jpg");
                Debug.debug("tempFile", tempFile);
                IOUtils.writeToFile(bytes, tempFile);

                Debug.debug("Output Segments:");
                new JpegUtils().dumpJFIF(new ByteSourceArray(bytes));

                assertTrue(!hasExifData(tempFile));
            }
        }
    }
View Full Code Here


                File tempFile = createTempFile("removed", ".jpg");
                Debug.debug("tempFile", tempFile);
                IOUtils.writeToFile(bytes, tempFile);

                Debug.debug("Output Segments:");
                stripped = new ByteSourceArray(bytes);
                new JpegUtils().dumpJFIF(stripped);

                assertTrue(!hasExifData(tempFile));
            }

            {
                TiffOutputSet outputSet = oldExifMetadata.getOutputSet();
                //            outputSet.dump();

                ByteArrayOutputStream baos = new ByteArrayOutputStream();

                new ExifRewriter().updateExifMetadataLossy(stripped, baos,
                        outputSet);

                byte bytes[] = baos.toByteArray();
                File tempFile = createTempFile("inserted" + "_", ".jpg");
                Debug.debug("tempFile", tempFile);
                IOUtils.writeToFile(bytes, tempFile);

                Debug.debug("Output Segments:");
                new JpegUtils().dumpJFIF(new ByteSourceArray(bytes));

                //                assertTrue(!hasExifData(tempFile));

                JpegImageMetadata newMetadata = (JpegImageMetadata) Sanselan
                        .getMetadata(tempFile);
View Full Code Here

                File tempFile = createTempFile(name + "_", ".jpg");
                Debug.debug("tempFile", tempFile);
                IOUtils.writeToFile(bytes, tempFile);

                Debug.debug("Output Segments:");
                new JpegUtils().dumpJFIF(new ByteSourceArray(bytes));

                //                assertTrue(!hasExifData(tempFile));

                JpegImageMetadata newMetadata = (JpegImageMetadata) Sanselan
                        .getMetadata(tempFile);
View Full Code Here

    }

    public final IImageMetadata getMetadata(byte bytes[], Map params)
            throws ImageReadException, IOException
    {
        return getMetadata(new ByteSourceArray(bytes), params);
    }
View Full Code Here

    }

    public final ImageInfo getImageInfo(byte bytes[], Map params)
            throws ImageReadException, IOException
    {
        return getImageInfo(new ByteSourceArray(bytes), params);
    }
View Full Code Here

    }

    public final FormatCompliance getFormatCompliance(byte bytes[])
            throws ImageReadException, IOException
    {
        return getFormatCompliance(new ByteSourceArray(bytes));
    }
View Full Code Here

    }

    public final ArrayList getAllBufferedImages(byte bytes[])
            throws ImageReadException, IOException
    {
        return getAllBufferedImages(new ByteSourceArray(bytes));
    }
View Full Code Here

            Map params) throws ImageReadException, IOException;

    public final BufferedImage getBufferedImage(byte bytes[], Map params)
            throws ImageReadException, IOException
    {
        return getBufferedImage(new ByteSourceArray(bytes), params);
    }
View Full Code Here

    }

    public final Dimension getImageSize(byte bytes[], Map params)
            throws ImageReadException, IOException
    {
        return getImageSize(new ByteSourceArray(bytes), params);
    }
View Full Code Here

    }

    public final byte[] getICCProfileBytes(byte bytes[], Map params)
            throws ImageReadException, IOException
    {
        return getICCProfileBytes(new ByteSourceArray(bytes), params);
    }
View Full Code Here

TOP

Related Classes of org.apache.sanselan.common.byteSources.ByteSourceArray

Copyright © 2018 www.massapicom. 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.