SlideShare a Scribd company logo
1 of 8
Download to read offline
[Tips] Membaca Metadata Image JPEG/TIFF
dengan PHP

PHP memiliki kemampuan membaca image / gambar. Dengan kemampuan itu tentu saja PHP mampu
membaca data-data asal yang terdapat dalam image tersebut. Biasanya data tersebut dinamakan
metadata. Proses pembacaan metadata itu cukup mudah, yaitu dengan memanfaatkan fungsi
exif_read_data(). Misal saya memiliki sebuah gambar berekstensi JPEG dengan nama satu.JPEG, yang
berasal dari hasil jepretan kamera digital. Maka data asal dari gambar tersebut dapat dibaca dengan
perintah berikut :

$data = exif_read_data('images/satu.jpg');
echo "< pre >";
print_r( $data );
echo "< /pre >";


Data yang muncul kira-kira seperti berikut:

Array
(
     [FileName] => satu.jpg
     [FileDateTime] => 1335936620
     [FileSize] => 5441417
     [FileType] => 2
     [MimeType] => image/jpeg
     [SectionsFound] => ANY_TAG, IFD0, THUMBNAIL, EXIF, INTEROP
     [COMPUTED] => Array
          (
               [html] => width="4320" height="3240"
               [Height] => 3240
               [Width] => 4320
               [IsColor] => 1
               [ByteOrderMotorola] => 0
               [ApertureFNumber] => f/2.9
[UserComment] =>
        [UserCommentEncoding] => UNDEFINED
        [Copyright] => Copyright 2010
        [Thumbnail.FileType] => 2
        [Thumbnail.MimeType] => image/jpeg
    )


[ImageDescription] =>
[Make] => BenQ Corporation
[Model] => DC C143X
[Orientation] => 1
[XResolution] => 288/3
[YResolution] => 288/3
[ResolutionUnit] => 2
[Software] => 1.7600
[DateTime] => 2012:05:02 12:30:21
[YCbCrPositioning] => 2
[Copyright] => Copyright 2010
[Exif_IFD_Pointer] => 322
[THUMBNAIL] => Array
    (
        [Compression] => 6
        [Orientation] => 1
        [XResolution] => 72/1
        [YResolution] => 72/1
        [ResolutionUnit] => 2
        [JPEGInterchangeFormat] => 4290
        [JPEGInterchangeFormatLength] => 7287
        [YCbCrPositioning] => 2
    )


[ExposureTime] => 1/279
[FNumber] => 29/10
[ExposureProgram] => 2
[ISOSpeedRatings] => 100
[ExifVersion] => 0220
[DateTimeOriginal] => 2012:05:02 12:30:21
[DateTimeDigitized] => 2012:05:02 12:30:21
[ComponentsConfiguration] => �
[CompressedBitsPerPixel] => 500/100
     [ShutterSpeedValue] => 8124/1000
     [ApertureValue] => 3071/1000
     [ExposureBiasValue] => 0/100
     [MaxApertureValue] => 3171/1000
     [MeteringMode] => 4
     [LightSource] => 0
     [Flash] => 24
     [FocalLength] => 6300/1000
     [MakerNote] =>
IP1:1 exp 130 agc: 95 cal_agc : 128 P2C : 16
.
.
.


dan seterusnya. Hanya diambil sebagian karena cukup panjang. Pada bagian tersebut terlihat hampir
semua properti pembuatan gambar tersebut. Antara lain dibuat kapan, dengan menggunakan kamera
apa, ukuran berapa. Untuk keperluan programming biasanya hasil ini akan diatur dengan penguraian
array lanjut. Antara lain kira-kira seperti berikut:


$data = exif_read_data('images/satu.jpg');
foreach($data as $key=>$val) {
     if(is_array($val)) {
          foreach($val as $k=>$v) {
                echo $key."[$k]: $v<br />n";
          }
     } else
          echo "$key: ".@substr($val,0,40)."<br />n";
}


Hasilnya kira-kira akan seperti berikut:


FileName: IMG_0495.JPG


FileDateTime: 1335936620


FileSize: 5441417
FileType: 2


MimeType: image/jpeg


SectionsFound: ANY_TAG, IFD0, THUMBNAIL, EXIF, INTEROP


COMPUTED[html]: width="4320" height="3240"


COMPUTED[Height]: 3240


COMPUTED[Width]: 4320


COMPUTED[IsColor]: 1


COMPUTED[ByteOrderMotorola]: 0


COMPUTED[ApertureFNumber]: f/2.9


COMPUTED[UserComment]:


COMPUTED[UserCommentEncoding]: UNDEFINED


COMPUTED[Copyright]: Copyright 2010


COMPUTED[Thumbnail.FileType]: 2


COMPUTED[Thumbnail.MimeType]: image/jpeg


ImageDescription:


Make: BenQ Corporation


Model: DC C143X


Orientation: 1


XResolution: 288/3
YResolution: 288/3


ResolutionUnit: 2


Software: 1.7600


DateTime: 2012:05:02 12:30:21


YCbCrPositioning: 2


Copyright: Copyright 2010


Exif_IFD_Pointer: 322


THUMBNAIL[Compression]: 6


THUMBNAIL[Orientation]: 1


THUMBNAIL[XResolution]: 72/1


THUMBNAIL[YResolution]: 72/1


THUMBNAIL[ResolutionUnit]: 2


THUMBNAIL[JPEGInterchangeFormat]: 4290


THUMBNAIL[JPEGInterchangeFormatLength]: 7287


THUMBNAIL[YCbCrPositioning]: 2


ExposureTime: 1/279


FNumber: 29/10


ExposureProgram: 2


ISOSpeedRatings: 100


ExifVersion: 0220
DateTimeOriginal: 2012:05:02 12:30:21


DateTimeDigitized: 2012:05:02 12:30:21


ComponentsConfiguration: �


CompressedBitsPerPixel: 500/100


ShutterSpeedValue: 8124/1000


ApertureValue: 3071/1000


ExposureBiasValue: 0/100


MaxApertureValue: 3171/1000


MeteringMode: 4


LightSource: 0


Flash: 24


FocalLength: 6300/1000


MakerNote:
IP1:1 exp 130 agc: 95 cal_agc : 128 P2C


UserComment: ����������������������������������������


SubSecTime: 0�


FlashPixVersion: 0100


ColorSpace: 1


ExifImageWidth: 4320


ExifImageLength: 3240
RelatedSoundFile:


InteroperabilityOffset: 4260


FileSource:


SceneType:


ExposureMode: 0


WhiteBalance: 0


DigitalZoomRatio: 100/100


FocalLengthIn35mmFilm: 36


SceneCaptureType: 33


Contrast: 0


Saturation: 0


Sharpness: 0


InterOperabilityIndex: R98


InterOperabilityVersion: 0100


Dengan demikian, sebenarnya situs-situs fotografi, atau lomba fotografi akan dapat mengetahui bahwa
sebenarnya gambar tersebut asli atau sudah ter-edit oleh software lain seperti potoshop dan lain
sebagainya, meski ternyata metadata ini juga dapat dilakukan editing, yang akan kita pelajari dalam
section lain. Ada yang berminat menjadi roy suryo moderen sebagai ahli metadata?? Silakan belajar
lebih lanjut   . Untuk exif_read_data, hanya dapat digunakan jenis file JPG dan TIFF. Anda juga dapat
mengkombinasikan dengan form upload file.

Sekian, semoga bermanfaat
Wahyu Bimo S
bimosaurus@gmail.com
http://bimosaurus.com

More Related Content

Viewers also liked

Funcionamientodenotebook
FuncionamientodenotebookFuncionamientodenotebook
Funcionamientodenotebookstephanie407
 
Banrisul na case studies 2012
Banrisul na case studies 2012Banrisul na case studies 2012
Banrisul na case studies 2012Paulo Ratinecas
 
Inter movistar
Inter movistarInter movistar
Inter movistarsopis
 
Gafanhoto #60
Gafanhoto #60Gafanhoto #60
Gafanhoto #60ESGN
 
Criação de poemas(slide)-602
Criação de poemas(slide)-602Criação de poemas(slide)-602
Criação de poemas(slide)-602sandralobo49
 
Case Parada - Prêmio Colunistas
Case Parada - Prêmio ColunistasCase Parada - Prêmio Colunistas
Case Parada - Prêmio ColunistasPedro Araújo
 
Conbinacion de correspondencias
Conbinacion de correspondenciasConbinacion de correspondencias
Conbinacion de correspondenciasshirleygm10
 
The ciberbullying
The ciberbullyingThe ciberbullying
The ciberbullyingobeet666
 
virus en memoria USB
virus en memoria USBvirus en memoria USB
virus en memoria USBcetis27ev
 
Poesiaren bidea
Poesiaren bideaPoesiaren bidea
Poesiaren bideasustatu
 
Ambiente de aprendizaje apoyado con tecnologías de información UNAM
Ambiente de aprendizaje apoyado con tecnologías de información UNAMAmbiente de aprendizaje apoyado con tecnologías de información UNAM
Ambiente de aprendizaje apoyado con tecnologías de información UNAMDianna HM
 
Funcionamiento de notebook
Funcionamiento de notebookFuncionamiento de notebook
Funcionamiento de notebookstephanie407
 
Relatório julho - Quem se Importa
Relatório julho - Quem se ImportaRelatório julho - Quem se Importa
Relatório julho - Quem se ImportaGeneTatuapé
 
Naughty Horror [O espelho - Parte I]
Naughty Horror [O espelho - Parte I]Naughty Horror [O espelho - Parte I]
Naughty Horror [O espelho - Parte I]Rafael Ruiz
 
A lei de acesso à informação
A lei de acesso à informaçãoA lei de acesso à informação
A lei de acesso à informaçãoadri-kay
 
Aula de capacitación profesional 2014 (blog)
Aula de  capacitación profesional 2014 (blog)Aula de  capacitación profesional 2014 (blog)
Aula de capacitación profesional 2014 (blog)Titanium14
 

Viewers also liked (20)

Funcionamientodenotebook
FuncionamientodenotebookFuncionamientodenotebook
Funcionamientodenotebook
 
Banrisul na case studies 2012
Banrisul na case studies 2012Banrisul na case studies 2012
Banrisul na case studies 2012
 
Inter movistar
Inter movistarInter movistar
Inter movistar
 
Gafanhoto #60
Gafanhoto #60Gafanhoto #60
Gafanhoto #60
 
Criação de poemas(slide)-602
Criação de poemas(slide)-602Criação de poemas(slide)-602
Criação de poemas(slide)-602
 
Case Parada - Prêmio Colunistas
Case Parada - Prêmio ColunistasCase Parada - Prêmio Colunistas
Case Parada - Prêmio Colunistas
 
Conbinacion de correspondencias
Conbinacion de correspondenciasConbinacion de correspondencias
Conbinacion de correspondencias
 
Liliana
LilianaLiliana
Liliana
 
The ciberbullying
The ciberbullyingThe ciberbullying
The ciberbullying
 
virus en memoria USB
virus en memoria USBvirus en memoria USB
virus en memoria USB
 
Poesiaren bidea
Poesiaren bideaPoesiaren bidea
Poesiaren bidea
 
Ambiente de aprendizaje apoyado con tecnologías de información UNAM
Ambiente de aprendizaje apoyado con tecnologías de información UNAMAmbiente de aprendizaje apoyado con tecnologías de información UNAM
Ambiente de aprendizaje apoyado con tecnologías de información UNAM
 
Funcionamiento de notebook
Funcionamiento de notebookFuncionamiento de notebook
Funcionamiento de notebook
 
Modulo 1 proinfo
Modulo 1 proinfoModulo 1 proinfo
Modulo 1 proinfo
 
Radiasi benda hitam
Radiasi benda hitamRadiasi benda hitam
Radiasi benda hitam
 
Relatório julho - Quem se Importa
Relatório julho - Quem se ImportaRelatório julho - Quem se Importa
Relatório julho - Quem se Importa
 
Naughty Horror [O espelho - Parte I]
Naughty Horror [O espelho - Parte I]Naughty Horror [O espelho - Parte I]
Naughty Horror [O espelho - Parte I]
 
A lei de acesso à informação
A lei de acesso à informaçãoA lei de acesso à informação
A lei de acesso à informação
 
Aula de capacitación profesional 2014 (blog)
Aula de  capacitación profesional 2014 (blog)Aula de  capacitación profesional 2014 (blog)
Aula de capacitación profesional 2014 (blog)
 
Montelimar
MontelimarMontelimar
Montelimar
 

Similar to Metadata php

Observational Science With Python and a Webcam
Observational Science With Python and a WebcamObservational Science With Python and a Webcam
Observational Science With Python and a WebcamIntellovations, LLC
 
Module wise format oops questions
Module wise format oops questionsModule wise format oops questions
Module wise format oops questionsSANTOSH RATH
 
Internal training - Eda
Internal training - EdaInternal training - Eda
Internal training - EdaTony Vo
 
Integrating Angular js & three.js
Integrating Angular js & three.jsIntegrating Angular js & three.js
Integrating Angular js & three.jsJosh Staples
 
How to Make AJAX Applications Scream on the Client
How to Make AJAX Applications Scream on the ClientHow to Make AJAX Applications Scream on the Client
How to Make AJAX Applications Scream on the Clientgoodfriday
 
CE344L-200365-Lab5.pdf
CE344L-200365-Lab5.pdfCE344L-200365-Lab5.pdf
CE344L-200365-Lab5.pdfUmarMustafa13
 
Re-Design with Elixir/OTP
Re-Design with Elixir/OTPRe-Design with Elixir/OTP
Re-Design with Elixir/OTPMustafa TURAN
 
Y1 gd engine_terminology ben comley-excell
Y1 gd engine_terminology ben comley-excellY1 gd engine_terminology ben comley-excell
Y1 gd engine_terminology ben comley-excellBenCom1
 
virtualtouchscreen
virtualtouchscreenvirtualtouchscreen
virtualtouchscreenk.jagan.20
 
Deep learning study 3
Deep learning study 3Deep learning study 3
Deep learning study 3San Kim
 
Advanced iOS Build Mechanics, Sebastien Pouliot
Advanced iOS Build Mechanics, Sebastien PouliotAdvanced iOS Build Mechanics, Sebastien Pouliot
Advanced iOS Build Mechanics, Sebastien PouliotXamarin
 
Build Better Games with Unity and Microsoft Azure
Build Better Games with Unity and Microsoft AzureBuild Better Games with Unity and Microsoft Azure
Build Better Games with Unity and Microsoft AzureXamarin
 
New Features of SQL Server 2016
New Features of SQL Server 2016New Features of SQL Server 2016
New Features of SQL Server 2016Mir Mahmood
 
Synchronizing without internet - Multipeer Connectivity (iOS)
Synchronizing without internet - Multipeer Connectivity (iOS)Synchronizing without internet - Multipeer Connectivity (iOS)
Synchronizing without internet - Multipeer Connectivity (iOS)Jorge Maroto
 
Protractor framework – how to make stable e2e tests for Angular applications
Protractor framework – how to make stable e2e tests for Angular applicationsProtractor framework – how to make stable e2e tests for Angular applications
Protractor framework – how to make stable e2e tests for Angular applicationsLudmila Nesvitiy
 

Similar to Metadata php (20)

Observational Science With Python and a Webcam
Observational Science With Python and a WebcamObservational Science With Python and a Webcam
Observational Science With Python and a Webcam
 
Module wise format oops questions
Module wise format oops questionsModule wise format oops questions
Module wise format oops questions
 
Internal training - Eda
Internal training - EdaInternal training - Eda
Internal training - Eda
 
myslide1
myslide1myslide1
myslide1
 
myslide6
myslide6myslide6
myslide6
 
NewSeriesSlideShare
NewSeriesSlideShareNewSeriesSlideShare
NewSeriesSlideShare
 
Integrating Angular js & three.js
Integrating Angular js & three.jsIntegrating Angular js & three.js
Integrating Angular js & three.js
 
How to Make AJAX Applications Scream on the Client
How to Make AJAX Applications Scream on the ClientHow to Make AJAX Applications Scream on the Client
How to Make AJAX Applications Scream on the Client
 
CE344L-200365-Lab5.pdf
CE344L-200365-Lab5.pdfCE344L-200365-Lab5.pdf
CE344L-200365-Lab5.pdf
 
Re-Design with Elixir/OTP
Re-Design with Elixir/OTPRe-Design with Elixir/OTP
Re-Design with Elixir/OTP
 
Y1 gd engine_terminology ben comley-excell
Y1 gd engine_terminology ben comley-excellY1 gd engine_terminology ben comley-excell
Y1 gd engine_terminology ben comley-excell
 
virtualtouchscreen
virtualtouchscreenvirtualtouchscreen
virtualtouchscreen
 
Deep learning study 3
Deep learning study 3Deep learning study 3
Deep learning study 3
 
Advanced iOS Build Mechanics, Sebastien Pouliot
Advanced iOS Build Mechanics, Sebastien PouliotAdvanced iOS Build Mechanics, Sebastien Pouliot
Advanced iOS Build Mechanics, Sebastien Pouliot
 
Image Compression
Image CompressionImage Compression
Image Compression
 
Build Better Games with Unity and Microsoft Azure
Build Better Games with Unity and Microsoft AzureBuild Better Games with Unity and Microsoft Azure
Build Better Games with Unity and Microsoft Azure
 
New Features of SQL Server 2016
New Features of SQL Server 2016New Features of SQL Server 2016
New Features of SQL Server 2016
 
Synchronizing without internet - Multipeer Connectivity (iOS)
Synchronizing without internet - Multipeer Connectivity (iOS)Synchronizing without internet - Multipeer Connectivity (iOS)
Synchronizing without internet - Multipeer Connectivity (iOS)
 
lec1b.ppt
lec1b.pptlec1b.ppt
lec1b.ppt
 
Protractor framework – how to make stable e2e tests for Angular applications
Protractor framework – how to make stable e2e tests for Angular applicationsProtractor framework – how to make stable e2e tests for Angular applications
Protractor framework – how to make stable e2e tests for Angular applications
 

Recently uploaded

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 

Recently uploaded (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

Metadata php

  • 1. [Tips] Membaca Metadata Image JPEG/TIFF dengan PHP PHP memiliki kemampuan membaca image / gambar. Dengan kemampuan itu tentu saja PHP mampu membaca data-data asal yang terdapat dalam image tersebut. Biasanya data tersebut dinamakan metadata. Proses pembacaan metadata itu cukup mudah, yaitu dengan memanfaatkan fungsi exif_read_data(). Misal saya memiliki sebuah gambar berekstensi JPEG dengan nama satu.JPEG, yang berasal dari hasil jepretan kamera digital. Maka data asal dari gambar tersebut dapat dibaca dengan perintah berikut : $data = exif_read_data('images/satu.jpg'); echo "< pre >"; print_r( $data ); echo "< /pre >"; Data yang muncul kira-kira seperti berikut: Array ( [FileName] => satu.jpg [FileDateTime] => 1335936620 [FileSize] => 5441417 [FileType] => 2 [MimeType] => image/jpeg [SectionsFound] => ANY_TAG, IFD0, THUMBNAIL, EXIF, INTEROP [COMPUTED] => Array ( [html] => width="4320" height="3240" [Height] => 3240 [Width] => 4320 [IsColor] => 1 [ByteOrderMotorola] => 0 [ApertureFNumber] => f/2.9
  • 2. [UserComment] => [UserCommentEncoding] => UNDEFINED [Copyright] => Copyright 2010 [Thumbnail.FileType] => 2 [Thumbnail.MimeType] => image/jpeg ) [ImageDescription] => [Make] => BenQ Corporation [Model] => DC C143X [Orientation] => 1 [XResolution] => 288/3 [YResolution] => 288/3 [ResolutionUnit] => 2 [Software] => 1.7600 [DateTime] => 2012:05:02 12:30:21 [YCbCrPositioning] => 2 [Copyright] => Copyright 2010 [Exif_IFD_Pointer] => 322 [THUMBNAIL] => Array ( [Compression] => 6 [Orientation] => 1 [XResolution] => 72/1 [YResolution] => 72/1 [ResolutionUnit] => 2 [JPEGInterchangeFormat] => 4290 [JPEGInterchangeFormatLength] => 7287 [YCbCrPositioning] => 2 ) [ExposureTime] => 1/279 [FNumber] => 29/10 [ExposureProgram] => 2 [ISOSpeedRatings] => 100 [ExifVersion] => 0220 [DateTimeOriginal] => 2012:05:02 12:30:21 [DateTimeDigitized] => 2012:05:02 12:30:21 [ComponentsConfiguration] => �
  • 3. [CompressedBitsPerPixel] => 500/100 [ShutterSpeedValue] => 8124/1000 [ApertureValue] => 3071/1000 [ExposureBiasValue] => 0/100 [MaxApertureValue] => 3171/1000 [MeteringMode] => 4 [LightSource] => 0 [Flash] => 24 [FocalLength] => 6300/1000 [MakerNote] => IP1:1 exp 130 agc: 95 cal_agc : 128 P2C : 16 . . . dan seterusnya. Hanya diambil sebagian karena cukup panjang. Pada bagian tersebut terlihat hampir semua properti pembuatan gambar tersebut. Antara lain dibuat kapan, dengan menggunakan kamera apa, ukuran berapa. Untuk keperluan programming biasanya hasil ini akan diatur dengan penguraian array lanjut. Antara lain kira-kira seperti berikut: $data = exif_read_data('images/satu.jpg'); foreach($data as $key=>$val) { if(is_array($val)) { foreach($val as $k=>$v) { echo $key."[$k]: $v<br />n"; } } else echo "$key: ".@substr($val,0,40)."<br />n"; } Hasilnya kira-kira akan seperti berikut: FileName: IMG_0495.JPG FileDateTime: 1335936620 FileSize: 5441417
  • 4. FileType: 2 MimeType: image/jpeg SectionsFound: ANY_TAG, IFD0, THUMBNAIL, EXIF, INTEROP COMPUTED[html]: width="4320" height="3240" COMPUTED[Height]: 3240 COMPUTED[Width]: 4320 COMPUTED[IsColor]: 1 COMPUTED[ByteOrderMotorola]: 0 COMPUTED[ApertureFNumber]: f/2.9 COMPUTED[UserComment]: COMPUTED[UserCommentEncoding]: UNDEFINED COMPUTED[Copyright]: Copyright 2010 COMPUTED[Thumbnail.FileType]: 2 COMPUTED[Thumbnail.MimeType]: image/jpeg ImageDescription: Make: BenQ Corporation Model: DC C143X Orientation: 1 XResolution: 288/3
  • 5. YResolution: 288/3 ResolutionUnit: 2 Software: 1.7600 DateTime: 2012:05:02 12:30:21 YCbCrPositioning: 2 Copyright: Copyright 2010 Exif_IFD_Pointer: 322 THUMBNAIL[Compression]: 6 THUMBNAIL[Orientation]: 1 THUMBNAIL[XResolution]: 72/1 THUMBNAIL[YResolution]: 72/1 THUMBNAIL[ResolutionUnit]: 2 THUMBNAIL[JPEGInterchangeFormat]: 4290 THUMBNAIL[JPEGInterchangeFormatLength]: 7287 THUMBNAIL[YCbCrPositioning]: 2 ExposureTime: 1/279 FNumber: 29/10 ExposureProgram: 2 ISOSpeedRatings: 100 ExifVersion: 0220
  • 6. DateTimeOriginal: 2012:05:02 12:30:21 DateTimeDigitized: 2012:05:02 12:30:21 ComponentsConfiguration: � CompressedBitsPerPixel: 500/100 ShutterSpeedValue: 8124/1000 ApertureValue: 3071/1000 ExposureBiasValue: 0/100 MaxApertureValue: 3171/1000 MeteringMode: 4 LightSource: 0 Flash: 24 FocalLength: 6300/1000 MakerNote: IP1:1 exp 130 agc: 95 cal_agc : 128 P2C UserComment: ���������������������������������������� SubSecTime: 0� FlashPixVersion: 0100 ColorSpace: 1 ExifImageWidth: 4320 ExifImageLength: 3240
  • 7. RelatedSoundFile: InteroperabilityOffset: 4260 FileSource: SceneType: ExposureMode: 0 WhiteBalance: 0 DigitalZoomRatio: 100/100 FocalLengthIn35mmFilm: 36 SceneCaptureType: 33 Contrast: 0 Saturation: 0 Sharpness: 0 InterOperabilityIndex: R98 InterOperabilityVersion: 0100 Dengan demikian, sebenarnya situs-situs fotografi, atau lomba fotografi akan dapat mengetahui bahwa sebenarnya gambar tersebut asli atau sudah ter-edit oleh software lain seperti potoshop dan lain sebagainya, meski ternyata metadata ini juga dapat dilakukan editing, yang akan kita pelajari dalam section lain. Ada yang berminat menjadi roy suryo moderen sebagai ahli metadata?? Silakan belajar lebih lanjut . Untuk exif_read_data, hanya dapat digunakan jenis file JPG dan TIFF. Anda juga dapat mengkombinasikan dengan form upload file. Sekian, semoga bermanfaat