Jump to content

capture image of server side output (not displayed to user)


Recommended Posts

The output buffer is going to take a long time to process the content, because it's a 25X25 table with an image in each square.

 

I am using a form submit that renders a map output behind the scenes, then displays it to the folder with other maping images.

 

Capture an image? Of the user's screen? You can't do that. Would you like it if a website could take screenshots of what you're seeing whenever it wanted?

It's a server side trigger for an image capture after everything being grabbed is displayed to the server.

Edited by Q695

An output buffer would take a few milliseconds to process the mark-up for that number of images. It's only mark-up after all, unless you base64 encode the image data or something?

 

The problem is that you're forcing the user to download 625 images all at once! You should lazy-load them. Define the div the correct width and height to contain them all, but only load the actual image when it's needed, or when it's say one or two images out of view. Otherwise you're going to waste a tonne of bandwidth and slow down the initial page load like crazy, if not crashing the browser.

 

You'll need to use JS, but I suspect you'll be able to download a jQuery plug-in or something to handle it.

It's a server side trigger for an image capture after everything being grabbed is displayed to the server.

I don't really see what that has to do with a map? You can't trigger a screen grab from the server. Not unless the client has some special software installed and grants you permission. A standard website cannot do it though.

An output buffer would take a few milliseconds to process the mark-up for that number of images. It's only mark-up after all, unless you base64 encode the image data or something?

 

The problem is that you're forcing the user to download 625 images all at once! You should lazy-load them. Define the div the correct width and height to contain them all, but only load the actual image when it's needed, or when it's say one or two images out of view. Otherwise you're going to waste a tonne of bandwidth and slow down the initial page load like crazy, if not crashing the browser.

 

You'll need to use JS, but I suspect you'll be able to download a jQuery plug-in or something to handle it.

 

Actually the 625 images would be image locations with 10 different images total being downloaded like an image pixel with 10 options that are about 20 px X 20 px grid.

Not sure if its because I've just woken up, but I can't seem to make any sense from your last post? 625 images would be 10 images? Wha?

think of a *.jpg that only has 10 colors in it being created by a table, and MySQL, then telling the server to take a snapshot of it for use somewhere else.

think of a *.jpg that only has 10 colors in it being created by a table, and MySQL, then telling the server to take a snapshot of it for use somewhere else.

That doesn't help me understand it at all.

 

In any case, I still have no idea what it is you really want to do. Do you want to create an image of what the rendered page would look like in the browser? For that you'd either need a app that can render HTML to an image or you'd have to install a browser and some screen-capture software on the server to load the page and snap the picture.

 

If that is not what you're trying to do you need to do a much better job of explaining yourself.

Do you want to create an image of what the rendered page would look like in the browser? For that you'd either need a app that can render HTML to an image or you'd have to install a browser and some screen-capture software on the server to load the page and snap the picture.

Exactly, but like a button press cronjob.  I have a page that is written just to do the image output in HTML, but now I want to have it converted to an image.

Edited by Q695

You can use the GD library to copy a load of smaller images into a larger image and then save the large image. If that is what you mean?

How?

 

Is there an easy way to take it from HTML, and make it a PHP, if it's already in a table form (think of how overhead projectors used to be able to convert print on paper onto a clear film I want the clear film copies).

Edited by Q695

The images are like transparencies (not actually transparencies), but electronic images being put into a file.  I to put the output in a file electronically, just have the user click a submit button that will make an image of the output.

 

This is what I have:

<?php
$filename = 'image.jpg';
 header('Content-Disposition: inline; filename="'.$filename.'"');
 header("Content-Type: image/png");

 // Don't forget the Content-Type as well...
 // Output image here

/*
header("Content-Type: image/png");
header('Content-Disposition: inline; filename="some.png"');
//*/
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

	<head>
		<meta http-equiv="content-type" content="text/html;charset=utf-8" />
		<meta name="generator" content="Adobe GoLive" />
		<title>Untitled Page</title>
	</head>

	<body>
<?php
$id='1';
$img_fldr='../';
if (isset($_GET['map']) && $_GET['map']!='' && isset($id) && $id!=''){
include "../connection.php";//the database connection off the main application
include "../design.php";//the object I want to have a screen shot of behind the scenes
}
?>
	</body>

</html>

The URL being pulled is: http://localhost/fall_axe/builder/map_render.php?map=1

 

error: it says there are errors, but when without the header info it works just fine.

You guys were right, I was wrong, I should do: it with switches being flipped to certain colors behind the scenes, then store the flips as a formula in a single database entry with a longtext field storing the data, and strip the <a>.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.