• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ByteSourceFile类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.sanselan.common.byteSources.ByteSourceFile的典型用法代码示例。如果您正苦于以下问题:Java ByteSourceFile类的具体用法?Java ByteSourceFile怎么用?Java ByteSourceFile使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ByteSourceFile类属于org.apache.sanselan.common.byteSources包,在下文中一共展示了ByteSourceFile类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: checkAdobeMarker

import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
/**
 * Check Adobe markers in File
 * @param file
 * @throws IOException
 * @throws ImageReadException 
 */
public void checkAdobeMarker(File file) throws IOException, ImageReadException {
    JpegImageParser parser = new JpegImageParser();
    ByteSource byteSource = new ByteSourceFile(file);
    @SuppressWarnings("rawtypes")
    ArrayList segments = parser.readSegments(byteSource, new int[] { 0xffee }, true);
    if (segments != null && segments.size() >= 1) {
        UnknownSegment app14Segment = (UnknownSegment) segments.get(0);
        byte[] data = app14Segment.bytes;
        if (data.length >= 12 && data[0] == 'A' && data[1] == 'd' && data[2] == 'o' && data[3] == 'b' && data[4] == 'e')
        {
            hasAdobeMarker = true;
            int transform = app14Segment.bytes[11] & 0xff;
            if (transform == 2)
                colorType = COLOR_TYPE_YCCK;
        }
    }
}
 
开发者ID:nkiraly,项目名称:Java-FPDF,代码行数:24,代码来源:JpegReader.java


示例2: checkAdobeMarker

import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
public static void checkAdobeMarker(File file) throws IOException, ImageReadException {
    JpegImageParser parser = new JpegImageParser();
    ByteSource byteSource = new ByteSourceFile(file);
    @SuppressWarnings("rawtypes")
    ArrayList segments = parser.readSegments(byteSource, new int[] { 0xffee }, true);
    if (segments != null && segments.size() >= 1) {
        UnknownSegment app14Segment = (UnknownSegment) segments.get(0);
        byte[] data = app14Segment.bytes;
        if (data.length >= 12 && data[0] == 'A' && data[1] == 'd' && data[2] == 'o' && data[3] == 'b' && data[4] == 'e')
        {
            hasAdobeMarker = true;
            int transform = app14Segment.bytes[11] & 0xff;
            if (transform == 2)
                colorType = COLOR_TYPE_YCCK;
        }
    }
}
 
开发者ID:lklong,项目名称:imageweb,代码行数:18,代码来源:CmykImageUtil.java


示例3: checkAdobeMarker

import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
private void checkAdobeMarker(File file) throws IOException, ImageReadException {
    JpegImageParser parser = new JpegImageParser();
    ByteSource byteSource = new ByteSourceFile(file);
    @SuppressWarnings("rawtypes")
    List segments = parser.readSegments(byteSource, new int[]{0xffee}, true);
    if (segments != null && !segments.isEmpty()) {
        UnknownSegment app14Segment = (UnknownSegment) segments.get(0);
        byte[] data = app14Segment.bytes;
        if (data.length >= 12 && data[0] == 'A' && data[1] == 'd' && data[2] == 'o' && data[3] == 'b' && data[4] == 'e') {
            hasAdobeMarker = Boolean.TRUE;
            int transform = app14Segment.bytes[11] & 0xff;
            if (transform == 2) {
                colorType = COLOR_TYPE_YCCK;
            }
        }
    }
}
 
开发者ID:YAMJ,项目名称:yamj-v2,代码行数:18,代码来源:JpegReader.java


示例4: getMetadata

import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
public final IImageMetadata getMetadata(File file, Map params)
		throws ImageReadException, IOException
{
	if (debug)
		System.out.println(getName() + ".getMetadata" + ": "
				+ file.getName());

	if (!canAcceptExtension(file))
		return null;

	return getMetadata(new ByteSourceFile(file), params);
}
 
开发者ID:fulcrumapp,项目名称:sanselan-android,代码行数:13,代码来源:ImageParser.java


示例5: getImageInfo

import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
public final ImageInfo getImageInfo(File file, Map params)
		throws ImageReadException, IOException
{
	if (!canAcceptExtension(file))
		return null;

	return getImageInfo(new ByteSourceFile(file), params);
}
 
开发者ID:fulcrumapp,项目名称:sanselan-android,代码行数:9,代码来源:ImageParser.java


示例6: getFormatCompliance

import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
public final FormatCompliance getFormatCompliance(File file)
		throws ImageReadException, IOException
{
	if (!canAcceptExtension(file))
		return null;

	return getFormatCompliance(new ByteSourceFile(file));
}
 
开发者ID:fulcrumapp,项目名称:sanselan-android,代码行数:9,代码来源:ImageParser.java


示例7: getICCProfileBytes

import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
public final byte[] getICCProfileBytes(File file, Map params)
		throws ImageReadException, IOException
{
	if (!canAcceptExtension(file))
		return null;

	if (debug)
		System.out.println(getName() + ": " + file.getName());

	return getICCProfileBytes(new ByteSourceFile(file), params);
}
 
开发者ID:fulcrumapp,项目名称:sanselan-android,代码行数:12,代码来源:ImageParser.java


示例8: dumpImageFile

import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
public final String dumpImageFile(File file) throws ImageReadException,
		IOException
{
	if (!canAcceptExtension(file))
		return null;

	if (debug)
		System.out.println(getName() + ": " + file.getName());

	return dumpImageFile(new ByteSourceFile(file));
}
 
开发者ID:fulcrumapp,项目名称:sanselan-android,代码行数:12,代码来源:ImageParser.java


示例9: getICCProfileInfo

import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
public IccProfileInfo getICCProfileInfo(File file)
{
    if (file == null)
        return null;

    return getICCProfileInfo(new ByteSourceFile(file));
}
 
开发者ID:mike10004,项目名称:appengine-imaging,代码行数:8,代码来源:IccProfileParser.java


示例10: issRGB

import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
public Boolean issRGB(File file)
{
    if (file == null)
        return null;

    return issRGB(new ByteSourceFile(file));
}
 
开发者ID:mike10004,项目名称:appengine-imaging,代码行数:8,代码来源:IccProfileParser.java


示例11: getMetadata

import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
public final IImageMetadata getMetadata(File file, Map params)
        throws ImageReadException, IOException
{
    if (debug)
        System.out.println(getName() + ".getMetadata" + ": "
                + file.getName());

    if (!canAcceptExtension(file))
        return null;

    return getMetadata(new ByteSourceFile(file), params);
}
 
开发者ID:mike10004,项目名称:appengine-imaging,代码行数:13,代码来源:ImageParser.java


示例12: getImageInfo

import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
public final ImageInfo getImageInfo(File file, Map params)
        throws ImageReadException, IOException
{
    if (!canAcceptExtension(file))
        return null;

    return getImageInfo(new ByteSourceFile(file), params);
}
 
开发者ID:mike10004,项目名称:appengine-imaging,代码行数:9,代码来源:ImageParser.java


示例13: getFormatCompliance

import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
public final FormatCompliance getFormatCompliance(File file)
        throws ImageReadException, IOException
{
    if (!canAcceptExtension(file))
        return null;

    return getFormatCompliance(new ByteSourceFile(file));
}
 
开发者ID:mike10004,项目名称:appengine-imaging,代码行数:9,代码来源:ImageParser.java


示例14: getAllBufferedImages

import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
public final ArrayList getAllBufferedImages(File file)
        throws ImageReadException, IOException
{
    if (!canAcceptExtension(file))
        return null;

    return getAllBufferedImages(new ByteSourceFile(file));
}
 
开发者ID:mike10004,项目名称:appengine-imaging,代码行数:9,代码来源:ImageParser.java


示例15: getBufferedImage

import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
public final BufferedImage getBufferedImage(File file, Map params)
        throws ImageReadException, IOException
{
    if (!canAcceptExtension(file))
        return null;

    return getBufferedImage(new ByteSourceFile(file), params);
}
 
开发者ID:mike10004,项目名称:appengine-imaging,代码行数:9,代码来源:ImageParser.java


示例16: getImageSize

import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
public final Dimension getImageSize(File file, Map params)
        throws ImageReadException, IOException
{

    if (!canAcceptExtension(file))
        return null;

    return getImageSize(new ByteSourceFile(file), params);
}
 
开发者ID:mike10004,项目名称:appengine-imaging,代码行数:10,代码来源:ImageParser.java


示例17: getICCProfileBytes

import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
public final byte[] getICCProfileBytes(File file, Map params)
        throws ImageReadException, IOException
{
    if (!canAcceptExtension(file))
        return null;

    if (debug)
        System.out.println(getName() + ": " + file.getName());

    return getICCProfileBytes(new ByteSourceFile(file), params);
}
 
开发者ID:mike10004,项目名称:appengine-imaging,代码行数:12,代码来源:ImageParser.java


示例18: dumpImageFile

import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
public final String dumpImageFile(File file) throws ImageReadException,
        IOException
{
    if (!canAcceptExtension(file))
        return null;

    if (debug)
        System.out.println(getName() + ": " + file.getName());

    return dumpImageFile(new ByteSourceFile(file));
}
 
开发者ID:mike10004,项目名称:appengine-imaging,代码行数:12,代码来源:ImageParser.java


示例19: getFormatCompliance

import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
public static FormatCompliance getFormatCompliance(File file)
        throws ImageReadException, IOException {
    return getFormatCompliance(new ByteSourceFile(file));
}
 
开发者ID:mike10004,项目名称:appengine-imaging,代码行数:5,代码来源:Sanselan.java


示例20: removeExifMetadata

import org.apache.sanselan.common.byteSources.ByteSourceFile; //导入依赖的package包/类
/** 
 * Reads a Jpeg image, removes all EXIF metadata (by removing the APP1 segment),
 * and writes the result to a stream.
 * <p>
 * @param  src  Image file.
 * @param  os  OutputStream to write the image to.
 * 
 * @see java.io.File
 * @see java.io.OutputStream
 * @see java.io.File
 * @see java.io.OutputStream
 */
public void removeExifMetadata(File src, OutputStream os)
		throws ImageReadException, IOException, ImageWriteException
{
	ByteSource byteSource = new ByteSourceFile(src);
	removeExifMetadata(byteSource, os);
}
 
开发者ID:fulcrumapp,项目名称:sanselan-android,代码行数:19,代码来源:ExifRewriter.java



注:本文中的org.apache.sanselan.common.byteSources.ByteSourceFile类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ExtendSelector类代码示例发布时间:2022-05-22
下一篇:
Java SQLInsertClause类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap