Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
padair  
#1 Posted : Friday, September 23, 2011 9:46:15 AM(UTC)
padair

Rank: Newbie

Groups: Member
Joined: 9/23/2011(UTC)
Posts: 1

I am implementing Aurigma Up on a php website and everything works good getting an image uploaded from the iphone gallery with one exception.

I noticed in the sample php code it is not creating a thumbnail like the sample ASP.NET code. I researched creating thumbnails with php and found a few standard functions that do this. The main one being imagecreatefromjpeg.

Everytime I try to process an Aurigma Up image from the iphone it fails on the thumb create with the following error.

Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: 'pics/UploadedFile19.jpg' is not a valid JPEG file in /var/www/thumbs.php on line 17

I have tried my thumbs.php script on other jpg files (created with paint or other sources) and it works fine. Only seems to have a problem with Aurigma Up jpg files.

Has anyone come across a fix for this or know of another way to create thumbnail files using Aurigma Up on iPhone?

thx, Paul.
Dmitry.Obukhov  
#2 Posted : Monday, September 26, 2011 1:43:51 AM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello Paul,

I attached SimpleImage.php class to this post. Using it you are able to resize images on the server side, like in this code snippet:
Code:
//create nd save thumbnail
include('SimpleImage.php');
$image = new SimpleImage();
$image->load($galleryPath."/".$sourceFileName);
$image->resize(250,300);
$image->save($galleryPath."/".'picture'.$i.'.jpg');

This way is working for me perfectly. Also, I attached file with complete server-side code. Please download and look through it. If you have any additional questions please feel free to let me know.

Edited by user Monday, September 26, 2011 1:45:06 AM(UTC)  | Reason: Not specified

File Attachment(s):
ResizingOnPHP.zip (3kb) downloaded 16 time(s).
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.