PHP Easy Reflections is a php script that creates a reflection of an image by adding a small bit of code to a web page just after an image you want to create a reflection for. This script is written by Richard Davey and is available from: http://reflection.corephp.co.uk/
I wrapped the Easy Reflections scripts into a Freeway action for my own use but Richard Davey has kindly allowed me to share this with others, so I have made this available as the PHP Easy Reflections action.
Nice work Mike. I created a similar action last summer for a project
I was doing that used one of the JavaScript libraries to achieve
similar effects. Obviously that relied on the client being able to
run the script but it did seem to degrade well for lesser browsers.
I’m increasingly of the opinion that the best actions (IMHO) are
those that do all of their work in Freeway and simply output valid
HTML, CSS, or images. Imagine how cooler this action could be if you
could preview the reflections in the application and simply have it
render them to a fixed image on output. No server side code, no
client side code on output, just an image. Nice.
Good work on the action again Mike.
Regards,
Tim.
Thanks Tim. I also looked at creating my reflections on the site that I built the action for, with one of the Javascript librarys but found:
1# The image reflections where a little slow to build, I guess the page loaded first then Javascript went to work.
2# The clients browser having javascript disabled (As you mention).
I then found the PHP version which was fairly much instantaneous because it was simply like having another image on the page, it just needed the server to have php which for me was not an issue but yes, I agree that it would be nice to have any actions work previewed in Freeway.
Basically it is a very simple action to use, just apply it to an image on your Freeway page and set the height and upload.
Although this uses php as the script to create the image your page should not need to be a .php page to use it as it is called through the image src, I have used it with .html pages without problem although your server will need PHP… which I am sure you have.
I will send you an example file made with Freeway 4 pro although as James has pointed out, you can use it with 5 also.
On 5 Mar. 2008, 11:31 pm, DeltaDave wrote:
Hi Mike
I’ve had a go at this without success.
I thought it might be a server support problem so I checked with James at Have-Host and he put up a test page to show that it works on his servers OK.
So I guess it might/must be down to operator error.
Have you got a Freeway file we can download and try out and does it work in 5?
Sometime around 20/2/08 (at 17:22 -0500) Mike B said:
PHP Easy Reflections is a php script that creates a reflection of an
image by adding a small bit of code to a web page just after an
image you want to create a reflection for. This script is written by
Richard Davey and is available from: http://reflection.corephp.co.uk/
I wrapped the Easy Reflections scripts into a Freeway action for my
own use but Richard Davey has kindly allowed me to share this with
others, so I have made this available as the PHP Easy Reflections
action.
This is really impressive stuff. I do have a small bug report: when
this is used with images that have shadows or borders, the reflection
image is offset both downwards and to the right.
I can see why this happens, and where shadows are used this could be
argued that the vertical shift is a valid approach (although I’d
rather it did still butt up). But the horizontal shift is less
good. Obviously this is to do with graphic bounds before and after
the outer areas are calculated and built into the output image.
Which leads me to my wish. This is damn clever and a great tool to
have. But I would rather see this as a built-in Freeway feature so
that I could see the reflection in the page layout and know
precisely how it will affect or work with other elements on the page.
I do have a small bug report: when
this is used with images that have shadows or borders, the reflection
image is offset both downwards and to the right.
I can see why this happens, and where shadows are used this could be
argued that the vertical shift is a valid approach (although I’d
rather it did still butt up). But the horizontal shift is less
good. Obviously this is to do with graphic bounds before and after
the outer areas are calculated and built into the output image.
Which leads me to my wish. This is damn clever and a great tool to
have. But I would rather see this as a built-in Freeway feature so
that I could see the reflection in the page layout and know
precisely how it will affect or work with other elements on the page.
Keith, not sure I am with you on the image shadows as I haven’t actually worked with shadows on images and not quite sure how you mean but…
Does setting the ‘Set new line of reflection’ do anything on the problem?
Maybe you can send me a small example to have a nosey at.
I have tried this on a couple of different computers at different
locations here in the south of Spain and I just get ‘Cannot find
server’ errors.
If you send me the actual Freeway file (no resources) then I will have
a look to see if you have it applied correctly but in all honestly the
application of the action side is as simple as it is.
Regards
Mike
On Sep 22, 2008, at 10:15 PM, george wrote:
Mike,
I still can’t get this to work. Any luck accessing my site?
Silly question: doesn’t the page need to end in .php rather than
.html in order to make the server’s PHP parser to come out to play?
k
Strictly speaking, no; you can configure Apache to pass .html or .foo
or .bar or whatever through the PHP sausage machine. But practically
speaking, yes, that is exactly true.
This graphic reflection thing is still something that I really and
truly think Softpress should add to Freeway as a graphic action that
calculates and shows the effect in the design environment.
From what I understand about the graphics capabilities of actions in
today’s Freeway this should be quite achievable. And it would make
for a killer Freeway demo!