Commit 9f389d8dc for imagemagick.org

commit 9f389d8dc2dd0f4d14a31297c6b949222699a1b2
Author: Dirk Lemstra <dirk@lemstra.org>
Date:   Fri Jan 23 13:30:09 2026 +0100

    Also set the profile when pinging the image.

diff --git a/coders/psd.c b/coders/psd.c
index bb4ceecd6..8c1c64f83 100644
--- a/coders/psd.c
+++ b/coders/psd.c
@@ -2639,19 +2639,23 @@ static Image *ReadPSDImage(const ImageInfo *image_info,ExceptionInfo *exception)
       */
       (void) SeekBlob(image,offset+(MagickOffsetType) length,SEEK_SET);
     }
-  /*
-    If we are only "pinging" the image, then we're done - so return.
-  */
   if (EOFBlob(image) != MagickFalse)
     {
       if (profile != (StringInfo *) NULL)
         profile=DestroyStringInfo(profile);
       ThrowReaderException(CorruptImageError,"UnexpectedEndOfFile");
     }
+  /*
+    If we are only "pinging" the image, then we're done - so return.
+  */
   if (image_info->ping != MagickFalse)
     {
       if (profile != (StringInfo *) NULL)
-        profile=DestroyStringInfo(profile);
+        {
+          (void) SetImageProfile(image,GetStringInfoName(profile),profile,
+            exception);
+          profile=DestroyStringInfo(profile);
+        }
       (void) CloseBlob(image);
       return(GetFirstImageInList(image));
     }