Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 31413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T13:36:04+00:00 2026-05-10T13:36:04+00:00

I’m trying to embed a IPTC data onto a JPEG image using iptcembed() but

  • 0

I’m trying to embed a IPTC data onto a JPEG image using iptcembed() but am having a bit of trouble.

I have verified it is in the end product:

// Embed the IPTC data $content = iptcembed($data, $path);  // Verify IPTC data is in the end image $iptc = iptcparse($content); var_dump($iptc); 

Which returns the tags entered.

However when I save and reload the image the tags are non existant:

// Save the edited image $im = imagecreatefromstring($content); imagejpeg($im, 'phplogo-edited.jpg'); imagedestroy($im);  // Get data from the saved image $image = getimagesize('./phplogo-edited.jpg');  // If APP13/IPTC data exists output it if(isset($image['APP13'])) {     $iptc = iptcparse($image['APP13']);     print_r($iptc); } else {     // Otherwise tell us what the image *does* contain     // SO: This is what's happening     print_r($image); } 

So why aren’t the tags in the saved image?

The PHP source is avaliable here, and the respective outputs are:

  1. Image output
  2. Data output
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T13:36:04+00:00Added an answer on May 10, 2026 at 1:36 pm

    getimagesize has an optional second parameter Imageinfo which contains the info you need.

    From the manual:

    This optional parameter allows you to extract some extended information from the image file. Currently, this will return the different JPG APP markers as an associative array. Some programs use these APP markers to embed text information in images. A very common one is to embed » IPTC information in the APP13 marker. You can use the iptcparse() function to parse the binary APP13 marker into something readable.

    so you could use it like this:

    <?php $size = getimagesize('./phplogo-edited.jpg', $info); if(isset($info['APP13'])) {     $iptc = iptcparse($info['APP13']);     var_dump($iptc); } ?> 

    Hope this helps…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to clean up various Word 'smart' characters in user input, including but
i want to parse a xhtml file and display in UITableView. what is the
public static bool CheckLogin(string Username, string Password, bool AutoLogin) { bool LoginSuccessful; // Trim

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.