Author Topic: Narrow NexStorm Screenshot  (Read 1994 times)

0 Members and 1 Guest are viewing this topic.

Offline Curly

  • Forecaster
  • *****
  • Posts: 724
    • Michiana Weather
Narrow NexStorm Screenshot
« on: March 23, 2008, 05:49:22 PM »
This will take the nexstorm.png image and move the right side windows to the bottom of the map with a little re-arranging.
The new image will be as wide as the map but longer.

There is no reducing involved so the image is clear as the original.

Display mode 800x600 will output the new image at 552x798. The 1024x768 display mode will output the new image at 700x1040.

Check your NexStorm Display mode setting.

For NexStorm display mode 800x600
Quote
<?php
// This will move the right hand charts in Nexstorm
// and put them below the lightning graph.
// The display mode for Nexstorm must be set at 800x600.
// The output will be 552x798

// Create a blank image the right size
$dimg=imagecreatetruecolor(552,798);

// URL of the source image.
$im=("/nexstorm.png");

//Get the original image for cropping
$simg=imagecreatefrompng($im);

//Copy the entire image onto the blank
imagecopy ($dimg, $simg, 1, 1, 1, 1, 550, 580);

// Crop the upper half top right chart out of the image and paste it
// below the main graph
imagecopy ($dimg, $simg, 24, 550, 550, 1, 240, 143);

// Moves stuff up. Covers the Strike, Noise & Bearing indicators
imagecopy ($dimg, $simg, 27, 561, 554, 40, 232, 100);

// Crop the bottom half of the top right chart from the image and paste it
// below the top half of the above chart to make it the same size as the next one.
imagecopy ($dimg, $simg, 24, 692, 550, 128, 240, 100);

// Crop the bottom right chart out of the image and paste it
// next to the chart listed above.
imagecopy ($dimg, $simg, 288, 556, 550, 311, 240, 232);

// Crop the time and paste it at the top left corner.
imagecopy ($dimg, $simg, 5, 1, 555, 233, 200, 18);   

// Crop the remaining text and paste it in the chart.
imagecopy ($dimg, $simg, 28, 662, 554, 255, 230, 41);

// Turn it into a png.
imagepng($dimg,'nexstorm1.png');   //  The new output file name.

// Destroy an old image
imagedestroy($simg);
// Destroy an old image
imagedestroy($dimg);
//Display the image
?>

For NexStorm display mode 1024x768
Quote
<?php
// This will move the upper and lower right hand charts in Nexstorm
// and put them below the lightning graph.
// The display mode for Nexstorm must be set at 1024x768.
// The output will be 700x1040

// Create a blank image the right size
$dimg=imagecreatetruecolor(700,1040);

// URL of the source png image.
$im=("/nexstorm.png");

//Get the original image for cropping.
$simg=imagecreatefrompng($im);

//Copy the entire image onto the blank
imagecopy ($dimg, $simg, 1, 1, 1, 1, 698, 701);

// Crop the upper half top right chart out of the image and paste it
// below the main graph
imagecopy ($dimg, $simg, 24, 709, 698, 1, 316, 189);

// Crop the bottom half of the top right chart from the image and paste it
// below the top half of the above chart to make it the same length as the next one.
imagecopy ($dimg, $simg, 24, 898, 698, 167, 316, 118);

// Crop the bottom right chart out of the image and paste it
// next to the chart listed above.
imagecopy ($dimg, $simg, 360, 712, 698, 390, 316, 303);

// Moves stuff up. Covers the Strike, Noise & Bearing indicators
imagecopy ($dimg, $simg, 33, 718, 706, 55, 294, 75);

// Crop the time and paste it at the top left corner.
imagecopy ($dimg, $simg, 2, 1, 704, 292, 245, 22);   

// Crop the remaining text and paste it in the first chart. 
imagecopy ($dimg, $simg, 36, 850, 704, 322, 290, 50);   

// Moves stuff up.
imagecopy ($dimg, $simg, 31, 790, 706, 120, 294, 59);

// Turn it into a png.
imagepng($dimg,'nexstorm1.png');     //  The new output file name.

// Destroy an old image.
imagedestroy($simg);
// Destroy an old image.
imagedestroy($dimg);
//display the image
?>

 

anything