// ///// high level utility methods follow //////////// // //////////// DPI /// <summary> /// Returns physical resolution, in DPI, in both coordinates /// </summary> /// <returns>[dpix,dpiy], -1 if not set or unknown dimensions</returns> public double[] GetDpi() { var c = chunkList.GetById1(ChunkHelper.pHYs, true); if (c is null) { return(new double[] { -1, -1 }); } else { return(((PngChunkPHYS)c).GetAsDpi2()); } }
// ///// high level utility methods follow //////////// // //////////// DPI /// <summary> /// Returns physical resolution, in DPI, in both coordinates /// </summary> /// <returns>[dpix,dpiy], -1 if not set or unknown dimensions</returns> public double[] GetDpi() { PngChunk c = chunkList.GetById1(ChunkHelper.pHYs, true); if (c == null) { return new double[] { -1, -1 } } ; else { return(((PngChunkPHYS)c).GetAsDpi2()); } }
public double[] GetDpi() { PngChunk byId = chunkList.GetById1("pHYs", failIfMultiple: true); if (byId == null) { return(new double[2] { -1.0, -1.0 }); } return(((PngChunkPHYS)byId).GetAsDpi2()); }