当前位置: 首页>>代码示例>>Java>>正文


Java ImageInfo.toString方法代码示例

本文整理汇总了Java中org.apache.sanselan.ImageInfo.toString方法的典型用法代码示例。如果您正苦于以下问题:Java ImageInfo.toString方法的具体用法?Java ImageInfo.toString怎么用?Java ImageInfo.toString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.sanselan.ImageInfo的用法示例。


在下文中一共展示了ImageInfo.toString方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: dumpImageFile

import org.apache.sanselan.ImageInfo; //导入方法依赖的package包/类
public boolean dumpImageFile(PrintWriter pw, ByteSource byteSource)
        throws ImageReadException, IOException
{
    pw.println("pnm.dumpImageFile");

    {
        ImageInfo imageData = getImageInfo(byteSource);
        if (imageData == null)
            return false;

        imageData.toString(pw, "");
    }

    pw.println("");

    return true;
}
 
开发者ID:mike10004,项目名称:appengine-imaging,代码行数:18,代码来源:PNMImageParser.java

示例2: dumpImageFile

import org.apache.sanselan.ImageInfo; //导入方法依赖的package包/类
public boolean dumpImageFile(PrintWriter pw, ByteSource byteSource)
		throws ImageReadException, IOException
{
	pw.println("tiff.dumpImageFile");

	{
		ImageInfo imageInfo = getImageInfo(byteSource);
		if (imageInfo == null)
			return false;

		imageInfo.toString(pw, "");
	}

	pw.println("");

	{
		ArrayList segments = readSegments(byteSource, null, false);

		if (segments == null)
			throw new ImageReadException("No Segments Found.");

		for (int d = 0; d < segments.size(); d++)
		{

			Segment segment = (Segment) segments.get(d);

			NumberFormat nf = NumberFormat.getIntegerInstance();
			// this.debugNumber("found, marker: ", marker, 4);
			pw.println(d + ": marker: "
					+ Integer.toHexString(segment.marker) + ", "
					+ segment.getDescription() + " (length: "
					+ nf.format(segment.length) + ")");
			segment.dump(pw);
		}

		pw.println("");
	}

	return true;
}
 
开发者ID:fulcrumapp,项目名称:sanselan-android,代码行数:41,代码来源:JpegImageParser.java

示例3: dumpImageFile

import org.apache.sanselan.ImageInfo; //导入方法依赖的package包/类
public boolean dumpImageFile(PrintWriter pw, ByteSource byteSource)
        throws ImageReadException, IOException
{
    pw.println("tiff.dumpImageFile");

    {
        ImageInfo imageInfo = getImageInfo(byteSource);
        if (imageInfo == null)
            return false;

        imageInfo.toString(pw, "");
    }

    pw.println("");

    {
        ArrayList segments = readSegments(byteSource, null, false);

        if (segments == null)
            throw new ImageReadException("No Segments Found.");

        for (int d = 0; d < segments.size(); d++)
        {

            Segment segment = (Segment) segments.get(d);

            NumberFormat nf = NumberFormat.getIntegerInstance();
            // this.debugNumber("found, marker: ", marker, 4);
            pw.println(d + ": marker: "
                    + Integer.toHexString(segment.marker) + ", "
                    + segment.getDescription() + " (length: "
                    + nf.format(segment.length) + ")");
            segment.dump(pw);
        }

        pw.println("");
    }

    return true;
}
 
开发者ID:mike10004,项目名称:appengine-imaging,代码行数:41,代码来源:JpegImageParser.java

示例4: dumpImageFile

import org.apache.sanselan.ImageInfo; //导入方法依赖的package包/类
public boolean dumpImageFile(PrintWriter pw, ByteSource byteSource)
        throws ImageReadException, IOException
{
    pw.println("gif.dumpImageFile");

    {
        ImageInfo imageData = getImageInfo(byteSource);
        if (imageData == null)
            return false;

        imageData.toString(pw, "");
    }
    {
        ImageContents blocks = readFile(byteSource, false);

        if (blocks == null)
            return false;

        pw.println("gif.blocks: " + blocks.blocks.size());
        for (int i = 0; i < blocks.blocks.size(); i++)
        {
            GIFBlock gifBlock = (GIFBlock) blocks.blocks.get(i);
            this.debugNumber(pw, "\t" + i + " ("
                    + gifBlock.getClass().getName() + ")",
                    gifBlock.blockCode, 4);
        }

    }

    pw.println("");

    return true;
}
 
开发者ID:mike10004,项目名称:appengine-imaging,代码行数:34,代码来源:GifImageParser.java

示例5: dumpImageFile

import org.apache.sanselan.ImageInfo; //导入方法依赖的package包/类
public boolean dumpImageFile(PrintWriter pw, ByteSource byteSource)
        throws ImageReadException, IOException
{
    pw.println("bmp.dumpImageFile");

    ImageInfo imageData = getImageInfo(byteSource, null);
    if (imageData == null)
        return false;

    imageData.toString(pw, "");

    pw.println("");

    return true;
}
 
开发者ID:mike10004,项目名称:appengine-imaging,代码行数:16,代码来源:BmpImageParser.java

示例6: dumpImageFile

import org.apache.sanselan.ImageInfo; //导入方法依赖的package包/类
public boolean dumpImageFile(PrintWriter pw, ByteSource byteSource)
		throws ImageReadException, IOException
{
	try
	{
		pw.println("tiff.dumpImageFile");

		{
			ImageInfo imageData = getImageInfo(byteSource);
			if (imageData == null)
				return false;

			imageData.toString(pw, "");
		}

		pw.println("");

		// try
		{
			FormatCompliance formatCompliance = FormatCompliance
					.getDefault();
			Map params = null;
			TiffContents contents = new TiffReader(true).readContents(
					byteSource, params, formatCompliance);

			ArrayList directories = contents.directories;

			if (directories == null)
				return false;

			for (int d = 0; d < directories.size(); d++)
			{
				TiffDirectory directory = (TiffDirectory) directories
						.get(d);

				ArrayList entries = directory.entries;

				if (entries == null)
					return false;

				// Debug.debug("directory offset", directory.offset);

				for (int i = 0; i < entries.size(); i++)
				{
					TiffField field = (TiffField) entries.get(i);

					field.dump(pw, d + "");
				}
			}

			pw.println("");
		}
		// catch (Exception e)
		// {
		// Debug.debug(e);
		// pw.println("");
		// return false;
		// }

		return true;
	} finally
	{
		pw.println("");
	}
}
 
开发者ID:fulcrumapp,项目名称:sanselan-android,代码行数:66,代码来源:TiffImageParser.java

示例7: dumpImageFile

import org.apache.sanselan.ImageInfo; //导入方法依赖的package包/类
public boolean dumpImageFile(PrintWriter pw, ByteSource byteSource)
        throws ImageReadException, IOException
{
    pw.println("gif.dumpImageFile");

    {
        ImageInfo fImageData = getImageInfo(byteSource);
        if (fImageData == null)
            return false;

        fImageData.toString(pw, "");
    }
    {
        ImageContents imageContents = readImageContents(byteSource);

        imageContents.dump(pw);
        imageContents.header.dump(pw);

        ArrayList blocks = readImageResourceBlocks(byteSource,
        // fImageContents.ImageResources,
                null, -1);

        pw.println("blocks.size(): " + blocks.size());

        // System.out.println("gif.blocks: " + blocks.blocks.size());
        for (int i = 0; i < blocks.size(); i++)
        {
            ImageResourceBlock block = (ImageResourceBlock) blocks.get(i);
            pw.println("\t" + i + " (" + Integer.toHexString(block.id)
                    + ", " + "'"
                    + new String(block.nameData)
                    + "' ("
                    + block.nameData.length
                    + "), "
                    // + block.getClass().getName()
                    // + ", "
                    + " data: " + block.data.length + " type: '"
                    + new PSDConstants().getDescription(block.id) + "' "
                    + ")");

        }

    }

    pw.println("");

    return true;
}
 
开发者ID:mike10004,项目名称:appengine-imaging,代码行数:49,代码来源:PsdImageParser.java

示例8: dumpImageFile

import org.apache.sanselan.ImageInfo; //导入方法依赖的package包/类
public boolean dumpImageFile(PrintWriter pw, ByteSource byteSource)
        throws ImageReadException, IOException
{
    try
    {
        pw.println("tiff.dumpImageFile");

        {
            ImageInfo imageData = getImageInfo(byteSource);
            if (imageData == null)
                return false;

            imageData.toString(pw, "");
        }

        pw.println("");

        // try
        {
            FormatCompliance formatCompliance = FormatCompliance
                    .getDefault();
            Map params = null;
            TiffContents contents = new TiffReader(true).readContents(
                    byteSource, params, formatCompliance);

            ArrayList directories = contents.directories;

            if (directories == null)
                return false;

            for (int d = 0; d < directories.size(); d++)
            {
                TiffDirectory directory = (TiffDirectory) directories
                        .get(d);

                ArrayList entries = directory.entries;

                if (entries == null)
                    return false;

                // Debug.debug("directory offset", directory.offset);

                for (int i = 0; i < entries.size(); i++)
                {
                    TiffField field = (TiffField) entries.get(i);

                    field.dump(pw, d + "");
                }
            }

            pw.println("");
        }
        // catch (Exception e)
        // {
        // Debug.debug(e);
        // pw.println("");
        // return false;
        // }

        return true;
    } finally
    {
        pw.println("");
    }
}
 
开发者ID:mike10004,项目名称:appengine-imaging,代码行数:66,代码来源:TiffImageParser.java

示例9: dumpImageFile

import org.apache.sanselan.ImageInfo; //导入方法依赖的package包/类
public boolean dumpImageFile(PrintWriter pw, ByteSource byteSource)
        throws ImageReadException, IOException
{
    ImageInfo imageInfo = getImageInfo(byteSource);
    if (imageInfo == null)
        return false;

    imageInfo.toString(pw, "");

    {
        ArrayList chunks = readChunks(byteSource, null, false);
        {
            ArrayList IHDRs = filterChunks(chunks, IHDR);
            if (IHDRs.size() != 1)
            {
                if (debug)
                    System.out.println("PNG contains more than one Header");
                return false;
            }
            PNGChunkIHDR pngChunkIHDR = (PNGChunkIHDR) IHDRs.get(0);
            pw.println("Color: "
                    + getColorTypeDescription(pngChunkIHDR.colorType));
        }

        pw.println("chunks: " + chunks.size());

        if ((chunks.size() < 1))
            return false;

        for (int i = 0; i < chunks.size(); i++)
        {
            PNGChunk chunk = (PNGChunk) chunks.get(i);
            printCharQuad(pw, "\t" + i + ": ", chunk.chunkType);
        }
    }

    pw.println("");

    pw.flush();

    return true;
}
 
开发者ID:mike10004,项目名称:appengine-imaging,代码行数:43,代码来源:PngImageParser.java


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