Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create IPTC reader #1451

Closed
lenaorobei opened this issue Jun 11, 2020 · 1 comment · Fixed by #1550
Closed

Create IPTC reader #1451

lenaorobei opened this issue Jun 11, 2020 · 1 comment · Fixed by #1550
Assignees
Labels
Backend Priority: P2 Should be fixed as early as possible Severity: S2 Affects non-critical data or functionality and forces users to employ a workaround
Milestone

Comments

@lenaorobei
Copy link
Contributor

lenaorobei commented Jun 11, 2020

Story #1183: Magento extracts image meta data from file

Description

The Magento\MediaGalleryMetadata module should be created in adobe-stock-integration repository.
The Magento\MediaGalleryMetadataApi module should be created in adobe-stock-integration repository.
The Magento\MediaGalleryMetadataApi\Model\ReadMetadataInterface should be introduced declaring the only method execute(string $content): array
The Magento\MediaGalleryMetadata\Model\Read\Iptc class should be introduced implementing the Magento\MediaGalleryMetadataApi\Model\ReadMetadataInterface
The implementation of execute method should extract iptc metadata from the passed image file content.

Reading iptc metadata example:

$iptcHeaders = [
    'title' => '2#005',
    'headline' => '2#105',
    'keywords' => '2#025'
];

getimagesize('image.jpg', $info);
$decodedMetadata = iptcparse($info['APP13']);
$keywords = $decodedMetadata[$iptcHeaders['keywords']];
$title = $decodedMetadata[$iptcHeaders['headline']];

Implementation details

See: https://github.com/magento/adobe-stock-integration/wiki/Technical-Design:-Images-metadata-processing

AC

  • Covered with integration tests
@m2-assistant
Copy link

m2-assistant bot commented Jun 11, 2020

Hi @lenaorobei. Thank you for your report.
To help us process this issue please make sure that you provided sufficient information.

Please, add a comment to assign the issue: @magento I am working on this


@lenaorobei lenaorobei added this to the 2.1.0 milestone Jun 11, 2020
@lenaorobei lenaorobei added Priority: P1 Needs to be fixed before any other issues Priority: P2 Should be fixed as early as possible Severity: S2 Affects non-critical data or functionality and forces users to employ a workaround and removed Priority: P1 Needs to be fixed before any other issues labels Jun 24, 2020
@Nazar65 Nazar65 self-assigned this Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend Priority: P2 Should be fixed as early as possible Severity: S2 Affects non-critical data or functionality and forces users to employ a workaround
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants