1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-02-07 11:36:25 +02:00

Fix Photoshop metadata dump

This commit is contained in:
DarthSim 2023-05-29 21:27:47 +03:00
parent 2e6a3c6dd1
commit b20b5ff768

View File

@ -67,9 +67,13 @@ func (m PhotoshopMap) Dump() []byte {
buf.Grow(26)
buf.Write(ps3Header)
buf.Write(ps3BlockHeader)
for id, data := range m {
if len(data) == 0 {
continue
}
buf.Write(ps3BlockHeader)
buf.WriteString(id)
// Write empty name
buf.Write([]byte{0, 0})