473,394 Members | 1,887 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Resize JPEG and no EXIF data

Hi.

I try to use PEL (pel.sourceforge.net) to copy some exif information from
orginial camera jpeg to resized copy with php gd library. But without
success:(
1) File is uploaded to server with html upload form.

2) File is testes is it image/jpeg ?

3) If yes:

4) $copy = copy($_FILES['fotofile_'.$nrx]['tmp_name'],$destination_file);

5) if file height or width is too large - it's scaled:

$new_img = imagecreatetruecolor($new_x, $new_y);
$img = imagecreatefromjpeg($destination_file);
$org_x = imagesx($img);
$org_y = imagesy($img);
imagecopyresampled($new_img, $img,0, 0, 0, 0, $new_x, $new_y, $org_x,
$org_y);
imagejpeg($new_img, $destination_file.'_',$zcompression);
unlink(destination_file);
rename($destination_file.'_',$destination_file);
imagedestroy($new_img);
imagedestroy($img);
Now I've got smaller scaled new $destination_file. But it is without any
exif data now.
How to write a few exif information to it ? I need Camera Manufacturer,
Camera Model, Date&Time and ExposureTime, and ApertureFNumber

Of course I know how to read these informations before rescaling (I use
exif_read_data php function). But I cannot wirte them to new image ........

Thanx a lot for help

Tomm


Jul 17 '05 #1
0 2200

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Useko Netsumi | last post by:
Does anyone aware of any program/apps/scripts that has the ability to modify/add/create/delete metadata in any image type such as JPEG, GIF, PNG, etc. Question for the experts, is it wise to...
0
by: Markus Bulmer | last post by:
Hi, I'm trying to do a photo album with php. The admins should be able to write comments, descriptions etc. into the jpeg files via a web form. I tried to implement this with the (still...
0
by: Weasel | last post by:
Does anyone know about a free API to insert textual data (like EXIF) into JPEG's and/or TIFF's? I've looked around but haven't found anything worth using. Most of the things I've found are,...
2
by: Vladish | last post by:
Hi all, I wonder, if anybody here has any source code or component, which can read EXIF informations from JPEG pictures. Or some good, easy to understood, description of JPEG files. I didn't...
3
by: BluDog | last post by:
Hi I was wandering if anyone knew if it was possible to add custom EXIF tags (such as Photographer and Title) to a JPEG image, or to modify the existing tags (such as ImageDescription). There...
5
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...
0
by: alnorth29 | last post by:
I'd like to be able to access EXIF data in a JPEG file without expanding the file into a Bitmap object. I've searched for a ready made solution for a few hours and all the existing VB.NET code...
0
by: Roger | last post by:
Does anybody have a pointer to a Python library/utility that will extract the chrominance and luminance quantization tables from JPG images? I have been using the _getexif method from PIL, which...
8
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
jinu1996
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.