Jump to content

vbnullchar

Members
  • Posts

    428
  • Joined

  • Last visited

About vbnullchar

  • Birthday 12/28/1997

Contact Methods

  • Website URL
    http://arnelqlabarda.com
  • ICQ
    76100192
  • Yahoo
    vbnullchar

Profile Information

  • Gender
    Male
  • Location
    Pasig City, Philippines

vbnullchar's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. got it working.. put the water first then resize. $srcimg = "test.jpg"; //the source file $tmimg = "sm_".$srcimg; //were to place the thumb $wmimg = "hack.png"; //the watermark files $target = 150; //thumbnail target size $waterlevel = 40; //the level of opacity //load the jpeg and get its sizes $image = imagecreatefromjpeg($srcimg); $size = getimagesize($srcimg); //make watermage img | and get its sizes; $watermark = imagecreatefrompng($wmimg); $watermark_width = imagesx($watermark); $watermark_height = imagesy($watermark); //this will place it Bottom-Left, 5px from the border $dest_x = $size[0] - $watermark_width - 5; $dest_y = $size[1] - $watermark_height - 5; //copy it over | save it over the original | and clean up imagecopymerge($image, $watermark, $dest_x, $dest_y, 0, 0, $watermark_width, $watermark_height, $waterlevel); //this if just figures out what side is dominant if ($size[0] > $size[1]) { $percentage = ($target / $size[0]); } else { $percentage = ($target / $size[1]); } //calc the thumb sizes $newwidth = round($size[0] * $percentage); $newheight = round($size[1] * $percentage); //make a new img | copy the smaller | save as jpeg | clean up $thumb = imagecreatetruecolor($newwidth, $newheight); imagecopyresized($thumb, $image, 0, 0, 0, 0, $newwidth, $newheight, $size[0], $size[1]); imagejpeg($thumb, $tmimg); imagedestroy($thumb); imagedestroy($watermark); imagedestroy($image);
  2. saving photos in your database is a bad idea.. save it in your file system its much faster..
  3. is this a javascript question? this might help http://www.dreamincode.net/code/snippet1542.htm
  4. try mustache for PHP https://github.com/bobthecow/mustache.php
  5. http://php.net/manual/en/function.parse-url.php
  6. try to use filezilla theres a column there that displays the folder permission
  7. this is made with php, you need to set the end time then subtract it from the current. example the difference is 25 days.. just use the 25th image http://images.play.com/SiteCSS/Play/Live2/2010051801/img/countdown/25.gif
  8. did you check the upload folders permission?
  9. <pre> <?php $raw = file_get_contents('data.txt'); $delim = explode("\n", $raw); foreach($delim as $k => $d){ if($k%2){ $ident[] = $d; }else{ $user[] = $d; } } print_r($ident); print_r($user); exit(); ?>
  10. try to put error_reporting(E_ALL); on top of your script then post the errors here
  11. can you post the form here?
  12. sid and tid are two diff parameters and & is the separator
  13. <?php // start loop $selected = ($user===$id) ? 'selected' : ''; echo "<option value='$id' $selected>$name</option>"; // end loop ?>
  14. if($_SERVER['PHP_REFERER'] != '') header("location: somewhere.php");
×
×
  • 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.