Watermarking GRlevel3 images

Hi guys.

This weekend I’ve started experminting with GRlevel3 Radar…WOW!!!

I like the way you guys have put a watermark on your images. I read a post http://discourse.weather-watch.com/t/20596 and I quickly got lost…

Here’s what I got:

  • I can get a series of images to FTP to a GR3 folder.
  • I have a watermark with a good alpha channel.
  • An e-Rice account that does not support ImageMagik, but does have GD2
  • An understanding that some sort of php coding will combine/crop/position the pictures together on the server.(right?)

Here’s where I’m short

  • A good tutorial on GD2.
  • Do I put code in my webpage to access a seperate php file that actually completes the process of combining the radar picture with the watermark?

Could someone please point me toward some examples of code to help me transition my radar to GRlevel3…Thanks!

How about Ken’s script?

Thanks…I have seen that script, and I plan on getting to that next. What I’d like to do is get my logo on the (each) image before I publish it. I didn’t see that option in that script…

I needed to do this for the charts on SCWN as shown here:
http://www.scottishweather.net/wxcharts.php
I will dig out the php code and post it when I get home from work tonight.

Chris

I have found the code that I use and looking at it I use it almost verbatim from the post by jay at zylex dot net dot nz in this link here: http://uk3.php.net/imagecopymerge

Here is the slightly modified version that I use (filenames and paths have been changed):

<?php

$image = imagecreatefromjpeg("myimage.jpg");
$insert = imagecreatefromgif("mylogo.gif");
$image = image_overlap($image, $insert);
header ("Content-type: image/jpeg");
imagejpeg($image, "../mynewpath/myimage.jpg", 90);

function image_overlap($background, $foreground){
   $insertWidth = imagesx($foreground);
   $insertHeight = imagesy($foreground);

   $imageWidth = imagesx($background);
   $imageHeight = imagesy($background);

   $overlapX = $imageWidth-$insertWidth-20;
   $overlapY = $imageHeight-$insertHeight-440;
               imagecolortransparent($foreground,
imagecolorat($foreground,0,0));                imagecopymerge($background,$foreground,
$overlapX,$overlapY,0,0,$insertWidth,$insertHeight,100);   return $background;
    }
?>

Chris

AWESOME!!!

I’ll try it this evening and see what I come up with…It it looks as good as your charts, I’ll be very pleased!!!

Thanks, Welsh

If you are just simply wanting to add your watermark or logo to your radar image that is easy. You don’t need any special code to do that unless you want to get technical like some have and add other things to the map.

To add your logo or watermark to GR3 just make sure it is in png format and make sure it is named logo. So it would be logo.png. The just copy and paste that image in the folder where you GR3 is installed on your computer and that is it. If your program is open then close it, when you open it back up the image will be in the top left. Then when you click on web publish from the file menu it will upload that image with your logo or watermark on it. simple as cake. Now if you wanted to cut the DBZ or put other watermarks or logos or change the location you are going to need external scripts for that. Their are a couple out there floating around that will do what you need.

Wow!..that was easy…That will help be get functional…I’ll work with the scripts to adjust the dbz bar later…this will work great for now!!! :smiley:

BTW, do you know of a way to make GR open to a particular zoom level? I can’t seem to find a .ini or .cfg file anywhere…

Thanks

Well, I found the GFC file at C:\Documents and Settings[i]USER[/i]\Application Data\GRLevel3 , but it sems to just have the FIPS for the Show On Lists

This was brought up over at the GRLevel forums before and if I remember correctly their isn’t a way. I think you might be able to create a placefile that will open it to a certain threshold and locations but I can’t remember for sure. I want to say this was something they were working on adding to allow you to set favorites so you can have certain thresholds and views saved. I would check out http://www.grlevelxstuff.com/ for more information and about GRLevel. They have a wealth of info and flash tutorials on using and setting up GRLevel. They also have a ton of free placefiles, colortables, icons, add ons etc for free.

You can do simple zoom in, zoom out using an autoit script. I use one to startup GRlevel3 and have it start publishing.

I’ve not tried to zoon though since I dont really need it.

That would be really nice and I have been looking for something like that. I have StartWatch but what good is it starting GRLevel if it is not publishing images because you have to manually start that.

An old posting about it…

http://discourse.weather-watch.com/p/142793

Ken:

I’ve tried AutoIT and turned the script into a .exe

It worked really great last night during testing, but when I started my computer today, the .exe minimized to the system tray and showed script paused. I can’t get it to go.

Any Idea Why?

My Multifunction Image Handler PHP Script can do all that;

I guess I need to check out all of your scripts…

My next project was your Contact page you posted a few days ago…

Coool Stuff…Thanks MCHALLIS…You da man