private void parse_tIME_chunk(PNGChunk chunk) { int year = chunk.getInt2(0); int month = chunk.getInt1(2) - 1; int day = chunk.getInt1(3); int hour = chunk.getInt1(4); int minute = chunk.getInt1(5); int second = chunk.getInt1(6); TimeZone gmt = TimeZone.getTimeZone("GMT"); GregorianCalendar cal = new GregorianCalendar(gmt); cal.set(year, month, day, hour, minute, second); Date date = cal.getTime(); if (encodeParam != null) { encodeParam.setModificationTime(date); } if (emitProperties) { properties.put("timestamp", date); } }
private void parse_tIME_chunk(PNGChunk chunk) { int year = chunk.getInt2(0); int month = chunk.getInt1(2) - 1; int day = chunk.getInt1(3); int hour = chunk.getInt1(4); int minute = chunk.getInt1(5); int second = chunk.getInt1(6); TimeZone gmt = TimeZone.getTimeZone("GMT"); GregorianCalendar cal = new GregorianCalendar(gmt); cal.set(year, month, day, hour, minute, second); Date date = cal.getTime(); if (encodeParam != null) { encodeParam.setModificationTime(date); } if (emitProperties) { properties.put("timestamp", date); } }
private void parse_tIME_chunk(PNGChunk chunk) { int year = chunk.getInt2(0); int month = chunk.getInt1(2) - 1; int day = chunk.getInt1(3); int hour = chunk.getInt1(4); int minute = chunk.getInt1(5); int second = chunk.getInt1(6); TimeZone gmt = TimeZone.getTimeZone("GMT"); GregorianCalendar cal = new GregorianCalendar(gmt); cal.set(year, month, day, hour, minute, second); Date date = cal.getTime(); if (encodeParam != null) { encodeParam.setModificationTime(date); } if (emitProperties) { properties.put("timestamp", date); } }
private void parse_tIME_chunk(PNGChunk chunk) { int year = chunk.getInt2(0); int month = chunk.getInt1(2) - 1; int day = chunk.getInt1(3); int hour = chunk.getInt1(4); int minute = chunk.getInt1(5); int second = chunk.getInt1(6); TimeZone gmt = TimeZone.getTimeZone("GMT"); GregorianCalendar cal = new GregorianCalendar(gmt); cal.set(year, month, day, hour, minute, second); Date date = cal.getTime(); if (encodeParam != null) { encodeParam.setModificationTime(date); } if (emitProperties) { properties.put("timestamp", date); } }
private void parse_pHYs_chunk(PNGChunk chunk) { int xPixelsPerUnit = chunk.getInt4(0); int yPixelsPerUnit = chunk.getInt4(4); int unitSpecifier = chunk.getInt1(8); if (encodeParam != null) { encodeParam.setPhysicalDimension(xPixelsPerUnit, yPixelsPerUnit, unitSpecifier); } if (emitProperties) { properties.put("x_pixels_per_unit", new Integer(xPixelsPerUnit)); properties.put("y_pixels_per_unit", new Integer(yPixelsPerUnit)); properties.put("pixel_aspect_ratio", new Float((float)xPixelsPerUnit/yPixelsPerUnit)); if (unitSpecifier == 1) { properties.put("pixel_units", "Meters"); } else if (unitSpecifier != 0) { // Error -- unit specifier must be 0 or 1 String msg = PropertyUtil.getString("PNGImageDecoder12"); throw new RuntimeException(msg); } } }
private void parse_pHYs_chunk(PNGChunk chunk) { int xPixelsPerUnit = chunk.getInt4(0); int yPixelsPerUnit = chunk.getInt4(4); int unitSpecifier = chunk.getInt1(8); if (encodeParam != null) { encodeParam.setPhysicalDimension(xPixelsPerUnit, yPixelsPerUnit, unitSpecifier); } if (emitProperties) { properties.put("x_pixels_per_unit", new Integer(xPixelsPerUnit)); properties.put("y_pixels_per_unit", new Integer(yPixelsPerUnit)); properties.put("pixel_aspect_ratio", new Float((float)xPixelsPerUnit/yPixelsPerUnit)); if (unitSpecifier == 1) { properties.put("pixel_units", "Meters"); } else if (unitSpecifier != 0) { // Error -- unit specifier must be 0 or 1 String msg = PropertyUtil.getString("PNGImageDecoder12"); throw new RuntimeException(msg); } } }
private void parse_pHYs_chunk(PNGChunk chunk) { int xPixelsPerUnit = chunk.getInt4(0); int yPixelsPerUnit = chunk.getInt4(4); int unitSpecifier = chunk.getInt1(8); if (encodeParam != null) { encodeParam.setPhysicalDimension(xPixelsPerUnit, yPixelsPerUnit, unitSpecifier); } if (emitProperties) { properties.put("x_pixels_per_unit", xPixelsPerUnit); properties.put("y_pixels_per_unit", yPixelsPerUnit); properties.put("pixel_aspect_ratio", (float) xPixelsPerUnit / yPixelsPerUnit); if (unitSpecifier == 1) { properties.put("pixel_units", "Meters"); } else if (unitSpecifier != 0) { // Error -- unit specifier must be 0 or 1 String msg = PropertyUtil.getString("PNGImageDecoder12"); throw new RuntimeException(msg); } } }
private void parse_pHYs_chunk(PNGChunk chunk) { int xPixelsPerUnit = chunk.getInt4(0); int yPixelsPerUnit = chunk.getInt4(4); int unitSpecifier = chunk.getInt1(8); if (encodeParam != null) { encodeParam.setPhysicalDimension(xPixelsPerUnit, yPixelsPerUnit, unitSpecifier); } if (emitProperties) { properties.put("x_pixels_per_unit", xPixelsPerUnit); properties.put("y_pixels_per_unit", yPixelsPerUnit); properties.put("pixel_aspect_ratio", (float) xPixelsPerUnit / yPixelsPerUnit); if (unitSpecifier == 1) { properties.put("pixel_units", "Meters"); } else if (unitSpecifier != 0) { // Error -- unit specifier must be 0 or 1 String msg = PropertyUtil.getString("PNGImageDecoder12"); throw new RuntimeException(msg); } } }
tileHeight = height = chunk.getInt4(4); bitDepth = chunk.getInt1(8); colorType = chunk.getInt1(9); if ((colorType != PNG_COLOR_GRAY) && (colorType != PNG_COLOR_RGB) && compressionMethod = chunk.getInt1(10); if (compressionMethod != 0) { filterMethod = chunk.getInt1(11); if (filterMethod != 0) { interlaceMethod = chunk.getInt1(12); if (interlaceMethod == 0) { if (encodeParam != null) {
tileHeight = height = chunk.getInt4(4); bitDepth = chunk.getInt1(8); colorType = chunk.getInt1(9); if ((colorType != PNG_COLOR_GRAY) && (colorType != PNG_COLOR_RGB) && compressionMethod = chunk.getInt1(10); if (compressionMethod != 0) { filterMethod = chunk.getInt1(11); if (filterMethod != 0) { interlaceMethod = chunk.getInt1(12); if (interlaceMethod == 0) { if (encodeParam != null) {
tileHeight = height = chunk.getInt4(4); bitDepth = chunk.getInt1(8); colorType = chunk.getInt1(9); if ((colorType != PNG_COLOR_GRAY) && (colorType != PNG_COLOR_RGB) && compressionMethod = chunk.getInt1(10); if (compressionMethod != 0) { filterMethod = chunk.getInt1(11); if (filterMethod != 0) { interlaceMethod = chunk.getInt1(12); if (interlaceMethod == 0) { if (encodeParam != null) {
tileHeight = height = chunk.getInt4(4); bitDepth = chunk.getInt1(8); colorType = chunk.getInt1(9); if ((colorType != PNG_COLOR_GRAY) && (colorType != PNG_COLOR_RGB) && compressionMethod = chunk.getInt1(10); if (compressionMethod != 0) { filterMethod = chunk.getInt1(11); if (filterMethod != 0) { interlaceMethod = chunk.getInt1(12); if (interlaceMethod == 0) { if (encodeParam != null) {