[File] [PATCH] of Magdir/images Adobe Photoshop Image *.psd *.pbd *.pdd

Christos Zoulas christos at zoulas.com
Tue May 25 15:17:27 UTC 2021


Committed, thanks!

christos

> On May 23, 2021, at 11:11 AM, Jörg Jenderek <joerg.jen.der.ek at gmx.net> wrote:
> 
> Hello,
> 
> some days ago my system with Windows 10 updates itself. When checking
> the system with ccleaner many file name associations are now broken.
> So i look for the reported filename extension. One file name
> extension is PDD.
> 
> When running running file command version 5.40 on such examples and
> related files i get an output like:
> 
> 0006902.PDD:                               Adobe Photoshop Image,
> 					   85 x 56, RGB,
> 					   3x 8-bit channels
> 18.psd:                                    Adobe Photoshop Image,
> 					   3000 x 3000, RGB,
> 					   3x 8-bit channels
> 2002.PDD:                                  Adobe Photoshop Image,
> 					   900 x 1200, RGB,
> 					   3x 8-bit channels
> 3877134.psd:                               Adobe Photoshop Image,
> 					   2000 x 2000, RGB,
> 					   3x 8-bit channels
> 4998682.psd:                               Adobe Photoshop Image,
> 					   3556 x 2000, RGB,
> 					   3x 8-bit channels
> abydos.psd:                                Adobe Photoshop Image,
> 					   800 x 600, RGBA,
> 					   4x 8-bit channels
> blue-winter-snowflakes-background-psd.psd: Adobe Photoshop Image,
> 					   1600 x 1067, RGB,
> 					   3x 8-bit channels
> ColorPubOpen.psd:                          Adobe Photoshop Image,
> 					   619 x 408, RGBA,
> 					   4x 8-bit channels
> input.psd:                                 Adobe Photoshop Image,
> 					   70 x 46, RGB,
> 					   3x 8-bit channels
> OCREATIVE_-_sparo_web_elements.psd:        Adobe Photoshop Image,
> 					   738 x 600, RGB,
> 					   3x 8-bit channels
> ORIGINAL.PDD:                              Adobe Photoshop Image,
> 					   300 x 300, RGB,
> 					   3x 8-bit channels
> PayNow.psd:                                Adobe Photoshop Image,
> 					   68 x 23, RGB,
> 					   3x 8-bit channels
> PS-test1.psb:                              Adobe Photoshop Image
> 					   (PSB),
> 					   454 x 340, RGB,
> 					   3x 8-bit channels
> sample_1920×1280.psd:                      Adobe Photoshop Image,
> 					   1920 x 1280, RGB,
> 					   3x 8-bit channels
> x-fmt-92-signature-id-277.psd:             Adobe Photoshop Image
> 
> 
> Furthermore with --extension only psd is displayed and with --apple
> option only UNKNUNKN is displayed.
> 
> For comparison reason i run the file format identification utility
> TrID ( See https://mark0.net/soft-trid-e.html). This describes the
> PDD examples first as "Adobe Photoshop Elements (PhotoDeluxe) image"
> by definition pdd-adobe.trid.xml. Second it describes the examples
> as "Adobe Photoshop image" by psd.trid.xml. By that definition all
> PSD are also described (See appended pdd-trid-v.txt.gz ). It also
> displays used file name extensions and related URL.
> 
> So i add inside Magdir/images that information links by additional
> comment lines like:
> # URL: 	http://fileformats.archiveteam.org/wiki/PSD
> # Ref. https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/
> # URL: 	http://fileformats.archiveteam.org/wiki/PhotoDeluxe
> # URL: 	http://fileformats.archiveteam.org/wiki/PSB
> 
> The identification start by lines like
>  0	string		8BPS Adobe Photoshop Image
>  !:mime	image/vnd.adobe.photoshop
>  !:ext	psd
> and later the image dimensions (1-30000 for normal PSD and 1-300000
> for PSB) are shown by lines like
>  >>18  belong  x \b, %d x
>  >>14  belong  x %d,
> 
> So example x-fmt-92-signature-id-277.psd is described as Adobe
> Photoshop Image without dimensions, but in reality this is not a real
> image. It is just a short test pattern for DROID identifying tool
> (See https://sourceforge.net/projects/droid/).
> 
> Furthermore on mentioned web sites there software like XnView or
> ImageMagick is listed that can handle such images. With the help of
> the command line tool i was able to verify information that DROID
> example is not a real image by shell lines like:
> 	nconvert -fullinfo *.psd *.psb *.pdd
> 	identify -verbose *
> 
> To skip DROID x-fmt-92-signature-id-277.psd i add as second test a
> check for valid image width and after mime type add line for apple
> type. This now becomes like:
>  0	string		8BPS
>  >18	belong		>0	Adobe Photoshop
>  !:mime	image/vnd.adobe.photoshop
>  !:apple	????8BPS
> 
> So i look also for other Photoshop characteristic. According to
> documentation at offset 6 six bytes are declared as reserved and
> should be zero. This was true for all my inspected examples with one
> exception sample input.psd, which is found in "t" test sub directory
> of PerlMagick module of ImageMagick source package ( at least for
> version 7.0.11-11). Instead nil the bytes are space characters
> (0x20). So show at the end such unexpected bytes by lines like:
> >>6   bequad&0xFFffFFffFFff0000 !0 \b, at offset 6
> >>>6  belong  x	 0x%8.8x
> >>>6  beshort x   \b%4.4x
> 
> The stored version was only used once by line like
> >4   beshort 2 (PSB)
> This now becomes like:
> >>4   beshort 1
> >>>34	search/0xC0d7	PHUT	Image (PhotoDeluxe)
> !:ext	pdd
> >>>34	default		x	Image
> !:ext	psd
> >>4   beshort 2 Image (PSB)
> !:ext	psb
> 
> According to document ion the version is always equal to 1, but 2 for
> big dimension variant which use PSB file name extension.
> According to documentation the image resources segment of PDD images
> contain some blocks with a signature of "PHUT", instead of the usual
> "8BIM" found in PSD images. So the PDD file format seems to be an sub
> format of the Photoshop PSD format. The PDD format was used by Adobe
> PhotoDeluxe raster graphics editor. It is often called Adobe
> PhotoDeluxe document or image. This software is discontinued, but it
> is said the Adobe Photoshop still can open and create such images.
> 
> After applying the above mentioned modifications by patch
> file-5.40-images-pdd.diff then all real Adobe Photoshop (excluding
> DROID x-fmt-92-signature-id-277.psd) are described with more details
> like:
> 
> 0006902.PDD:                                 Adobe Photoshop Image
>                                             (PhotoDeluxe),
>                                             85 x 56, RGB,
>                                             3x 8-bit channels
> 18.psd:                                      Adobe Photoshop Image,
>                                             3000 x 3000, RGB,
>                                             3x 8-bit channels
> 2002.PDD:                                    Adobe Photoshop Image
>                                             (PhotoDeluxe),
>                                             900 x 1200, RGB,
>                                             3x 8-bit channels
> 3877134.psd:                                 Adobe Photoshop Image,
>                                             2000 x 2000, RGB,
>                                             3x 8-bit channels
> 4998682.psd:                                 Adobe Photoshop Image,
>                                             3556 x 2000, RGB,
>                                             3x 8-bit channels
> abydos.psd:                                  Adobe Photoshop Image,
>                                             800 x 600, RGBA,
>                                             4x 8-bit channels
> blue-winter-snowflakes-background-psd.psd:   Adobe Photoshop Image,
>                                             1600 x 1067, RGB,
>                                             3x 8-bit channels
> ColorPubOpen.psd:                            Adobe Photoshop Image,
>                                             619 x 408, RGBA,
>                                             4x 8-bit channels
> input.psd:                                   Adobe Photoshop Image,
>                                             70 x 46, RGB,
>                                             3x 8-bit channels
>                                             , at offset 6
> 					     0x202020202020
> OCREATIVE_-_sparo_web_elements.psd:          Adobe Photoshop Image,
>                                             738 x 600, RGB,
>                                             3x 8-bit channels
> ORIGINAL.PDD:                                Adobe Photoshop Image
>                                             (PhotoDeluxe),
>                                             300 x 300, RGB,
>                                             3x 8-bit channels
> PayNow.psd:                                  Adobe Photoshop Image,
>                                             68 x 23, RGB,
>                                             3x 8-bit channels
> PS-test1.psb:                                Adobe Photoshop Image
>                                             (PSB),
>                                             454 x 340, RGB,
>                                             3x 8-bit channels
> sample_1920×1280.psd:                        Adobe Photoshop Image,
>                                             1920 x 1280, RGB,
>                                             3x 8-bit channels
> x-fmt-92-signature-id-277.psd:               data
> 
> 
> And with --extension option now i get a correct output like:
> 0006902.PDD:                               pdd
> 18.psd:                                    psd
> 2002.PDD:                                  pdd
> 3877134.psd:                               psd
> 4998682.psd:                               psd
> abydos.psd:                                psd
> blue-winter-snowflakes-background-psd.psd: psd
> ColorPubOpen.psd:                          psd
> input.psd:                                 psd
> OCREATIVE_-_sparo_web_elements.psd:        psd
> ORIGINAL.PDD:                              pdd
> PayNow.psd:                                psd
> PS-test1.psb:                              psb
> sample_1920×1280.psd:                      psd
> x-fmt-92-signature-id-277.psd:             ???
> 
> I hope my diff file can be applied in future version of file utility.
> 
> With best wishes
> Jörg Jenderek
> --
> Jörg Jenderek
> 
> 
> <pdd-trid-v.txt.gz><file-5_40-images-pdd_diff.DEFANGED-17057><file-5_40-images-pdd_diff_sig.DEFANGED-17058>--
> File mailing list
> File at astron.com
> https://mailman.astron.com/mailman/listinfo/file
> <sanitizer.log>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 235 bytes
Desc: Message signed with OpenPGP
URL: <https://mailman.astron.com/pipermail/file/attachments/20210525/11396ccc/attachment-0001.asc>


More information about the File mailing list