PhotoPost Photo Gallery Sales PhotoPost Sales Toll Free Phone Number
Mon-Fri 9am-4pm EST
  PhotoPost Photo Sharing Photo Gallery    Visualize community tm
| | | | | | | | |
Old February 14th, 2007, 09:03 AM   #1 (permalink)
Registered User
 
Join Date: Aug 2005
Posts: 1,229
bug and fix in editimage

This only affects GD2 users
I didnt find the "troubleshooting" forum so i thought i'd post it here... sorry if i'm wrong.

somehow the "rotate image" did not really work in my 2.1 version downloaded last week. so I looked at the code..

the rotation is done by following in GD2:

$tempimage = @imagerotate($tempimage, $angle, '#000000');

in php 5.20 it somehow flips the pic by 90 degres and only sqeezes the content without rotating (tried several times)

so i looked up in php.net and found following:

resource imagerotate ( resource source_image, float angle, int bgd_color [, int ignore_transparent] )

as for what i know.. the background color i a int and not a string.. so the code should be:
$tempimage = @imagerotate($tempimage, $angle, 0);

i tried that.. and... it started working.. ( i do not know if in former editions of php it used to be a hex string.. but in 5.20 and 5.21 it definetly is an int.

so to fix: open forum/includes/functions_gallery_imageedit.php
find:
Code:
Content visible to verified customers only.
and replace with:
Code:
Content visible to verified customers only.
at least it worked for me

----------
thoughts: Make rotate image to rotate clockwise

A little confusing for users (and for myself) the default direction of imageRotate() is counter clockwise.

On php.net I found a little code snippet that solves the problem and sets the rotation direction to clockwise:

after having applied the fix above, find in forum/includes/functions_gallery_imageedit.php

Code:
Content visible to verified customers only.
and replace with:
Code:
Content visible to verified customers only.
hope this helps
Luc

Last edited by Luciano; February 20th, 2007 at 08:14 AM.
Luciano is offline  
Old March 5th, 2007, 11:57 AM   #2 (permalink)
Registered User
 
Zachariah's Avatar
 
Join Date: Nov 2005
Location: Canoga Park, CA
Posts: 3,244
Send a message via ICQ to Zachariah Send a message via AIM to Zachariah Send a message via MSN to Zachariah Send a message via Skype™ to Zachariah
Nice.
Added to next build
Zachariah is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to fix a template bug? Arjan Photopost Pro How Do I...? 7 October 20th, 2006 10:08 AM
5.2 bug, can you still help me fix? Johnny Doomo Photopost Pro Bug Reports 0 September 4th, 2006 04:29 PM
Version 3 Bugs or how do you fix them?(NOT A BUG) nf71 ReviewPost Bug Reports 6 September 2nd, 2005 12:31 PM
Possible typo/bug in showphoto + fix(NOT A BUG) Sebbb Photopost Pro Bug Reports 1 July 12th, 2005 06:01 PM


All times are GMT -5. The time now is 04:28 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0