Hey guys...
I have a image string I want to read with exif_read_data( ) but
exif_read_data( ) does not read strings, only files.
i can display the picture via php
Header( "Content-type: image/jpg"); echo $string;
save it manually and then read the meta data like this
function EXIFALL($img){
$exif = exif_read_data( $img, 0, true);
echo "myimage.jpg:<b r />\n";
foreach ($exif as $key =$section) {
foreach ($section as $name =$val) {
echo "$key.$name : $val<br />\n";
}}return;}
(code from http://th.php.net/manual/en/function.exif-read-data.php)
and it will read out the meta data like i want it.
but i would like to read the meta data from the string without my
interaction!
so I tried this
imagejpeg(image createfromstrin g($string),'tem p.jpg');
EXIFALL('temp.j pg');
unlink ('temp.jpg');
witch creates a temporary.jpg reads it and then deletes it.
but the function imagejpeg() replaces the important meta data from my
original image that i want to read.
what should i do?
thanks for your help 5 2687
Mohawk Mawk wrote:
imagejpeg(image createfromstrin g($string),'tem p.jpg');
EXIFALL('temp.j pg');
unlink ('temp.jpg');
witch creates a temporary.jpg reads it and then deletes it.
but the function imagejpeg() replaces the important meta data from my
original image that i want to read.
Try file_put_conten ts($string,'tem p.jpg') instead of
imagecreatejpeg (imagecreatefro mstring()).
Remember to use some kind of lock on your temporary files, or give them
random names, to avoid concurrency issues.
Hope that helps,
--
----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-
Q: How do you shoot a blue elephant?
A: With a blue-elephant gun.
Q: How do you shoot a pink elephant?
A: Twist its trunk until it turns blue, then shoot it with
a blue-elephant gun.
what should i do?
thanks for your help
to be more clear i want to either create a jpg from a stream without
the metadata to be written, o be able to read the metadata directly
from the stream, witch exif_read_data( ) does not do.
Try file_put_conten ts($string,'tem p.jpg') instead of
imagecreatejpeg (imagecreatefro mstring()).
I tried this but what happens is it creates a 8 byte file named ˙Ř˙ŕ
(witch are the first charachters of my string)
Mohawk Mawk wrote:
>
>Try file_put_conten ts($string,'tem p.jpg') instead of imagecreatejpe g(imagecreatefr omstring()).
I tried this but what happens is it creates a 8 byte file named ˙Ř˙ŕ
(witch are the first charachters of my string)
Sorry, I can't remember the syntax of every function... Try
file_put_conten ts('temp.jpg',$ string)
--
----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-
Now listening to: Plaid - Spokes (2003) - [8] Get What You Gave (5:16) (95%)
On May 5, 8:10 pm, Iván Sánchez Ortega <ivansanchez-...@rroba-
escomposlinux.-.punto.-.orgwrote:
Mohawk Mawk wrote:
Try file_put_conten ts($string,'tem p.jpg') instead of
imagecreatejpeg (imagecreatefro mstring()).
I tried this but what happens is it creates a 8 byte file named ˙Ř˙ŕ
(witch are the first charachters of my string)
Sorry, I can't remember the syntax of every function... Try
file_put_conten ts('temp.jpg',$ string)
--
----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-
Now listening to: Plaid - Spokes (2003) - [8] Get What You Gave (5:16) (95%)
haha sorry my bad, thank you very much it worked, i also found that i
could do fwrite(fopen("t emp.jpg", 'a'),$string); but that would not
create the file so i cant unlink it. i will take your advice and
generate random names, thank you again This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: K |
last post by:
I am absolutly exausted to figure this one out. I require the exif
module to work under 5.0.1 but apache (2.0.48) just dies with a 1067
failure, I can't find any usable log info apart from the 1067.
Anyone had the same problem? (all other extesions seem to work fine)
Thanks
Dirk
|
by: Jan Schmidt |
last post by:
Hi NG,
i created my own Picture Gallery, which reads the EXIF Data of each Picture
before displaying on website.
I'd like to give my users the ability to alter some opened EXIF Values.
It would reduce the Traffic, because users don't need to upload the whole
Picture because of an missing, or bad Value of EXIF Data.
But i still can't find a solution to write EXIF Data via php...
I mean reading with php is no problem, but for writing...
|
by: leo |
last post by:
hi there
i'm using gene cash's EXIF.py module to find out the shoting time of an jpeg
image.
this module works usually like a beauty, but some images raise an exception:
Traceback (most recent call last):
File "/Users/Shared/bin/exiftool.py", line 148, in ?
tags=EXIF.process_file(f)
|
by: TheGanjaMan |
last post by:
Hi everyone,
I'm trying to write up a simple image stamper application that stamps the
Exif date information from the jpegs that I've taken from my digital
camera and saves the new file with the date stamped on the lower right
part of the picture. (I'm not an advanced programmer so my code may not
be 100% efficient - sorry, I'm still learning)
Everything works fine until the saving part. I've been able to read the
file into a...
|
by: Alfonso Acosta |
last post by:
Hi all,
exif_read_data() doesn't support URLs
(http://php.net/manual/en/function.exif-read-data.php ) but I would
like to do that with the minimum traffic and overhead possible.
A naive solution would be downloading the whole target file locally and
then call exif_read_data() but that means a lot of overhead traffic
| |
by: Frank |
last post by:
I see that ImageFormat includes exif.
But I can't find out if
I've System.Drawing.Image.FromStream
or something like it
can read and/or write that format.
|
by: infoseekar |
last post by:
Does anyone know what's the right code to read IPTC metadata.
I have the code to read EXIF metadata and it gives me alot of information which I don't need. How do I modify this code so it only give the information i required.
EXIF inout code
<?php
$path="image.jpeg";
|
by: SPE - Stani's Python Editor |
last post by:
Phatch is a simple to use cross-platform GUI Photo Batch Processor
Phatch handles all popular image formats and can duplicate (sub)folder
hierarchies. It can batch resize, rotate, apply perspective, shadows,
rounded corners, ... and more in minutes instead of hours or days if
you do it manually. Phatch allows you to use EXIF and IPTC tags for
renaming and data stamping. Phatch also supports a console version to
batch photos on web...
|
by: tlhintoq |
last post by:
I'd like to think I can work out most issues, but this one is kicking my butt.
What's worse, is that I know I can't be the first guy to want to add a thumbnail to jpg that doesn't already have one. I see it in plenty of other applications. Yet I can't seem to make it work despite being so very close.
I know the problem has to be in how I am making the PropertyItem of the thumbnail - because if I comment out lines 24-34 the JPG saves fine,...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |