PHP obtains the method for writing Image text information into photoshop. Some photographers like to use photoshop to directly write the title, content, and keywords of an image into an image file. Use the following code to obtain the image text information written by photoshop in PHP:
Some photographers like to use photoshop to directly write the title, content, and keywords of an image into the image file. Use the following code to read data.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
$ Image_info = array (); $ Size = getimagesize('image file .jpg ', $ info ); If (isset ($ info ['app13']) { $ Iptc = iptcparse ($ info ['app13']); Foreach (array_keys ($ iptc) as $ s) { $ C = count ($ iptc [$ s]); For ($ I = 0; $ I <$ c; $ I ++) { @ $ Image_info [$ s]. = $ iptc [$ s] [$ I]; } } } Print_r ($ image_info ); |
Some photographers like to use photoshop to directly write the title, content, and keywords of an image into the image file. Use the following code...