x404.co.uk
http://www.x404.co.uk/forum/

Dynamic PHP image generation
http://www.x404.co.uk/forum/viewtopic.php?f=4&t=16244
Page 1 of 1

Author:  Fogmeister [ Tue Apr 10, 2012 10:25 pm ]
Post subject:  Dynamic PHP image generation

Just finished writing a php script for the Facebook sharing part of my app.

Allows the user to share the sudoku they are playing including an image without actually uploading the image :)

http://oliverfoggin.com/test/index.php? ... 0801700460

Image

The board is generated from the boardstring parameter passed in to it :D

Woop woop!

Author:  big_D [ Wed Apr 11, 2012 4:18 am ]
Post subject:  Re: Dynamic PHP image generation

Why use a dynamic image? Surely setting up the grid with divs would be easier? There is nothing about the board that requires it to be an image, other than maybe the font choice...

Author:  Fogmeister [ Wed Apr 11, 2012 6:02 am ]
Post subject:  Dynamic PHP image generation

I'm going to use it as the thumbnail when posting a link onto Facebook.

For that it needs to be an image.


---
I am here: http://tapatalk.com/map.php?yz3rxy

Author:  finlay666 [ Wed Apr 11, 2012 8:35 am ]
Post subject:  Re: Dynamic PHP image generation

Can't be that hard, it's relatively simple to do in asp.net after all ;)

Author:  Fogmeister [ Wed Apr 11, 2012 9:18 am ]
Post subject:  Re: Dynamic PHP image generation

finlay666 wrote:
Can't be that hard, it's relatively simple to do in asp.net after all ;)

In the end it was only around 10 lines of code.

Create image from background image.
For each number in the string.
If not 0 then work out coords of where it goes and place it on the image.
output image.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/