You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to have api support for generating the pHYs section, as it is part of the PNG Specification.
It's possible to do it manually if there is already a chunk:
stream.each_chunk do |c|
if c.type == 'pHYs'
c.content = [5906, 5906, 1] .pack('N2C')
end
end
But it's not as easy to insert this node into a fresh PNG. I plan on inserting a ChunkyPNG::Chunk::Generic into #other_chunks, but this feels really a tad dirty. I propose that Datastream have ChunkyPNG::Chunk::Phys and a corresponding phys_chunk accessor.
The text was updated successfully, but these errors were encountered:
It would be nice to have api support for generating the pHYs section, as it is part of the PNG Specification.
It's possible to do it manually if there is already a chunk:
But it's not as easy to insert this node into a fresh PNG. I plan on inserting a
ChunkyPNG::Chunk::Generic
into#other_chunks
, but this feels really a tad dirty. I propose thatDatastream
haveChunkyPNG::Chunk::Phys
and a correspondingphys_chunk
accessor.The text was updated successfully, but these errors were encountered: