homepage Welcome to WebmasterWorld Guest from 23.20.77.156
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Site Graphics and Multimedia Design
Forum Library, Charter, Moderators: not2easy

Site Graphics and Multimedia Design Forum

    
WaterMark Software for Photos and Videos
dailypress




msg:3662233
 7:37 pm on May 29, 2008 (gmt 0)

any recommendations on free software that easily stamps your logo or text on images?

 

thecoalman




msg:3662259
 7:57 pm on May 29, 2008 (gmt 0)

Both irfanview and exifer can to batch processing, they don't have the ability to stamp a logo or other image that I'm aware of but can be used to stamp simple text or even extract information from the EXIF data for stamping.

For video it gets a little harder, there aren't many free programs that are simple and easy to use. They generally have a steep learning curve but are very powerful if you learn how to use them. You might want to look at something like Virtualdub, that should be able to accomplish the task with the widest array of video. This should be done to high quality source video, if you try to put a logo on already compressed video you will get a lot of degradation in quality.

Other than that most pay for editors can do that even the better consumer grade ones. What you're going to want to look for is a application that can import .TGA with alpha channel. You'll also need a logo that was created this way .

rocknbil




msg:3663662
 3:19 pm on May 31, 2008 (gmt 0)

Image Magick can to this, and on your server as you upload images. Working sample below. You will need:

- CGI-executable abilities with perl
- ImageMagick/PerlMagick installed on server
- directory with two images and one to composite over these
- the "composite" image must be a .png with a transparent background. The other images can be in any web format
- Set the permissions on the images directory to writable, the script to executable

Load it up in a browser and select the image, ImageMagick will get the image sizes and place the composite image in the center of the image you select. Adjust programming to locate your logo as required.


#!/usr/bin/perl
$imagesdir = '/virtual/path/to/images';
$imageurl = '/server/path/to/images';
$img1 = 'image1.jpg';
$img2 = 'image2.jpg';
$comp_img = 'overlay.png';
$thisScript = 'composite_sample.cgi';
use Image::Magick;
%qs = &query;
if ($qs{'base_img'} && $qs{'comp_image'}) { &comp_image; }
else { &html('Select Images'); }
sub html {
$html = shift(@_);
if ($html eq 'Select Images') {
$content = qq¦
<div style="width: 50%; margin: auto">
<p>Below you will see three images. They are named $img1, $img2,
and $comp_img. Select one of the first two and $comp_img will be
composited over the top of it.</p>
<form method="post" action="$thisScript">
<input type="hidden" name="comp_image" value="$comp_img">
<select name="base_img" id="base_img">
<option value="">SELECT IMAGE</option>
<option value="$img1">$img1</option>
<option value="$img2">$img2</option>
</select>
<input type="submit" value="Composite It">
</form>
<div style="clear:both;"></div>
</div>
<h3 class="center">For your reference . . . </h3>
<div style="float:left; text-align: center;"><img src="$imageurl/$img1"
alt="$img1"><br><strong>$img1</strong></div>
<div style="float:left; text-align: center;"><img src="$imageurl/$img2"
alt="$img2"><br><strong>$img2</strong></div>
<div style="float:left; text-align: center;"><img src="$imageurl/$comp_img"
alt="$comp_img"><br><strong>$comp_img</strong></div>
¦;
}
elsif ($html eq 'Image Composited') {
$content = qq¦
<p style="text-align:center">Below should be the composited image.</p>
<div style="margin:auto"><img src="$imageurl/$qs{'composite'}" alt="$qs{'composite'}"></div>
<p style="text-align:center"><a href="$thisScript">Test Another</a></p>
¦;
}
else { $error=$html; $html="No State:$error"; $content = "Oops. No HTML state."; }
print "content-type: text/html\n\n";
print qq¦
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>$html</title>
</head>
<body>
<h1 style="text-align:center;">$html</h1>
$content
</body>
</html>
¦;
exit 0;
}
#########################################################################
sub query{
my $method = $ENV{'REQUEST_METHOD'};
my ($query_string, $pair);
my %query_hash;
$query_string = $ENV{'QUERY_STRING'} if $method eq 'GET';
$query_string = <STDIN> if $method eq 'POST';
return undef unless $query_string;

foreach $pair (split(/&/, $query_string)) {
($_qsname, $_qsvalue) = split(/=/, $pair);
$_qsname =~ s/\+/ /g;
$_qsname =~ s/%([\da-f]{2})/pack('c',hex($1))/ieg;
$_qsvalue =~ s/\+/ /g;
$_qsvalue =~ s/%([\da-f]{2})/pack('c',hex($1))/ieg;
$query_hash{$_qsname} = $_qsvalue;
}
return %query_hash;
}
#####################################################
sub comp_image {
my ($pic,$x,$height,$width,$mid_x,$mid_y,$nm,$ext,$file,$comp,$composite,$compw,$comph);
unless ($qs{'base_img'} && $qs{'comp_image'}) {
&error("Image missing: base $qs{'base_img'} comp $qs{'comp_image'}");
}
$pic = Image::Magick->new;
$x =$pic->Read("$imagesdir/$qs{'base_img'}");
if ($x) { &error("Error on reading image: $x"); }
$pic->Set(background=>'white');
$height=$pic->GetAttribute('height');
$width= $pic->GetAttribute('width');
$comp=Image::Magick->new;
$x=$comp->ReadImage("$imagesdir/$qs{'comp_image'}");
if ($x) { &error("Error on reading composite: $x"); }
$comp->Set(background=>'white');
$comph=$comp->GetAttribute('height');
$compw= $comp->GetAttribute('width');
$mid_x = int(($width/2)-($compw/2));
$mid_y = int(($height/2)-($comph/2));
($nm,$ext) = split(/\./,$qs{'base_image'});
$file = $nm . '_composite.' . $ext;
$qs{'composite'} = $file;
$composite=$pic->Clone();
$composite->Composite(image=>$comp,compose=>'over',geometry=>"+$mid_x+$mid_y");
$composite->Write("$imagesdir/$file");
&html('Image Composited');
}
#########################################
sub error {
$err = shift(@_);
print "content-type: text/html\n\n";
print "ERROR: $err";
exit 0;
}


Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Site Graphics and Multimedia Design
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved