Zubrag.com
April 24, 2019, 06:24:00 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Fixed width & height  (Read 14902 times)
puglover
Newbie
*
Posts: 4


« on: June 25, 2007, 01:14:35 AM »

Hello there, great script, thank you for sharing this,

Do you know by any chance how to set a fixed width & height of the screenshots ? If the website has a very small amount of content in the top of the page and nothing below, the screenshot is cut and has no more a squared shape but a rectangular one (same thing is the height of the website content is very long). I'd like to have all my screenshots with the same format, independently of the website's content, is that possible ? any clue of how to do it ?! Thank you very much, Frank

Logged
zubrag
Administrator
Hero Member
*****
Posts: 788


WWW
« Reply #1 on: June 25, 2007, 08:44:00 AM »

Hi. There are following options in the thumb.php

// If not equal 0 then cut original image size before resizing (in pixels).
// Long page will have bad thumbnail, its better to cut page length first.
$cut_x = 0;
$cut_y = 1024;

Are those of any help?
Logged
puglover
Newbie
*
Posts: 4


« Reply #2 on: June 25, 2007, 01:05:35 PM »

Hello! thank you or answering quickly  Grin

Well I've seend this parameters but it's working only for long pages, not for short ones aren't they ? I can cut the page, but i' cant actually have a specific format if the page is very short or am I mistaken ? Let say i need all my shots to have the format 240x180, even if the pages are long or short, how can i do that please ?

Best regards
Logged
zubrag
Administrator
Hero Member
*****
Posts: 788


WWW
« Reply #3 on: June 26, 2007, 06:43:15 AM »

You could achieve such effect by putting website thumbnail into the div block.

<div style="width:240; height:180; background:#FFFFFF">
  <img src="http://example.com/webthumb.php?....." />
</div>
Logged
puglover
Newbie
*
Posts: 4


« Reply #4 on: June 26, 2007, 07:01:51 PM »

Hi there, yes i know what you mean, thanks, but it the website's background is different than white this will be kind of odd...
Logged
zubrag
Administrator
Hero Member
*****
Posts: 788


WWW
« Reply #5 on: June 27, 2007, 09:41:13 AM »

I see, but script currently cannot determine site's background. Not even sure how to implement this feature. It has to be really smart.

I'm thinking of following: get color of the thumb's top left pixel, and use the color as background color.

Not sure if that would work. Please provide your comments based on website thumbnails you have generated.
Logged
puglover
Newbie
*
Posts: 4


« Reply #6 on: June 27, 2007, 12:56:04 PM »

Hi Zubrag,

Yes it should not be easy to code it...it implies the creation of a canvas width fixed height & width

Tricky question about how to do it, if you get the top left pixel color, you may pick the color of the navigation menu, not the page background color, id rather pick the bottom page color don't u think ?

What i don't get is why iecapt is not able to take a regular screenshot of the page with the parameters we want, in that case fixed height & width ? What's the problem here ? Is the program making a screenshot from the HTML code of the website instead of making a "real" screenshot of what actually appears on screen ??


Bests
Logged
zubrag
Administrator
Hero Member
*****
Posts: 788


WWW
« Reply #7 on: June 29, 2007, 03:17:31 PM »

As far as i know IECapt does not accept "size control" parameters. It somehow grabs whole page rather than just visible area. That is why we are having problems.

Do you suggest to parse html/css text to find out the background color? Nice idea! But this will take a little longer to render thumbnail because we'll need to to load html and css from the remote server and parse it. Will add option to turn this feature on/off.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC