new image from a big image and insert into html

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Kyori
Forum Newbie
Posts: 23
Joined: Mon Oct 14, 2002 5:23 am
Contact:

new image from a big image and insert into html

Post by Kyori »

I'm making a game and it's got a map. Whole map is around 800x600 but i only need 180x180 of it at a time to send to client as a background for table. I have 2 options, one is to make 64x64 (4096) 180x180 images which will take around 30MB or use php image functions.

My prob is I can't mix php image functions with doc/html format. Any way this can be possible?
User avatar
mydimension
Moderator
Posts: 531
Joined: Tue Apr 23, 2002 6:00 pm
Location: Lowell, MA USA
Contact:

Post by mydimension »

probably a good way to do it would be to make a seperate script that would be called in a <img> tag and in the src attribute you would pass it the neccesary parameters.
example:

Code: Select all

<img src="processing_script.php?some=parameters">
Kyori
Forum Newbie
Posts: 23
Joined: Mon Oct 14, 2002 5:23 am
Contact:

Post by Kyori »

thanks, I get the picture. Now, why hadn't that come into my thinking? I'm guessing ur pretty good at prog'ng
Post Reply