1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2026-05-16 09:18:09 +02:00

Fix Photoshop metadata dump

This commit is contained in:
DarthSim
2023-05-29 21:27:47 +03:00
parent 2e6a3c6dd1
commit b20b5ff768
+5 -1
View File
@@ -67,9 +67,13 @@ func (m PhotoshopMap) Dump() []byte {
buf.Grow(26) buf.Grow(26)
buf.Write(ps3Header) buf.Write(ps3Header)
buf.Write(ps3BlockHeader)
for id, data := range m { for id, data := range m {
if len(data) == 0 {
continue
}
buf.Write(ps3BlockHeader)
buf.WriteString(id) buf.WriteString(id)
// Write empty name // Write empty name
buf.Write([]byte{0, 0}) buf.Write([]byte{0, 0})