d2jsp
Log InRegister
d2jsp Forums > d2jsp > Ladder Slasher > Guide: How-to Make A Dynamic Ladder-slasher Sig > In A Few Easy Steps With Pics
Prev1555657585960Next
Add Reply New Topic New Poll
Member
Posts: 9,437
Joined: Jan 3 2008
Gold: 2.85
Oct 18 2009 10:51am
Quote (stiffleronfire @ Sun, Oct 18 2009, 12:33pm)
Thanks keefer7, that works. :)


:D np m8 just here to help

had these problems many times and always figured them out


this guild is the shit it helped me alot made alot of dynamics for guilds now
and some others
Member
Posts: 5,053
Joined: Jul 3 2006
Gold: 198.86
Oct 23 2009 06:19pm
Ok, I have been still fiddling around with the whole .jpg thing, as seen above. My current sig is using the .png version, because the .jpg version gets all blurry, see below. Why does the quality drop so much?

.jpg file on server:



How it looks as a dynamic sig:


Thank you :)
Member
Posts: 5,053
Joined: Jul 3 2006
Gold: 198.86
Oct 26 2009 06:59pm
what I said above....bump :)
Member
Posts: 9,614
Joined: Apr 21 2008
Gold: 7,601.66
Oct 26 2009 07:00pm
Quote (stiffleronfire @ 27 Oct 2009 02:59)
what I said above....bump :)


jpg --> png-24

thatll fix it. 24bit color info is saved within the png file format, its not within the jpg file format. thats why

This post was edited by cyphrex on Oct 26 2009 07:01pm
Member
Posts: 5,053
Joined: Jul 3 2006
Gold: 198.86
Oct 26 2009 09:54pm
Quote (cyphrex @ Oct 26 2009 06:00pm)
jpg --> png-24

thatll fix it. 24bit color info is saved within the png file format, its not within the jpg file format. thats why


Well...it does fix it, but it also makes the file size too large ><
Member
Posts: 12,867
Joined: Mar 10 2004
Gold: 573.84
Oct 29 2009 07:05pm
who to make epx bar to MQ



This post was edited by paxelsen on Oct 29 2009 07:24pm
Member
Posts: 15,364
Joined: May 11 2003
Gold: 11,084.90
Oct 29 2009 07:49pm
Quote (paxelsen @ Oct 29 2009 09:05pm)
who to make epx bar to MQ

http://firehawks.web.surftown.dk/sig/paxelsen.png

1) Using duns scripting

$kx = 245;
$ky = 125;
$kw = 140;
$kh = 15;
$expw = $kw*$char['exp']/70000000;
if($expw > $kw) $expw = $kw;
imagerectangle($image, $kx-1, $ky-1, $kx+$kw+1, $ky+$kh+1, $white);
imagefilledrectangle($image, $kx, $ky, $kx+$expw, $ky+$kh, $black);

or

2)

// set some dimensions for future use
$mqh = -68;

$exph = $mqh*$exp/70000000;
$mqbar = $exph + 90;

// Create an mqbar with bg 'cool' color and the cover of your level in red.
imagefilledrectangle($image, 36, 90, 47, $mqbar, $white);

I threw together the crappy code for #2.. hence it looks horrible :p
but itll work with the flapmo's guide/basic setup.

This post was edited by GimmeCoffee on Oct 29 2009 07:52pm
Member
Posts: 12,867
Joined: Mar 10 2004
Gold: 573.84
Oct 29 2009 08:14pm
Quote (GimmeCoffee @ Oct 30 2009 02:49am)
1) Using duns scripting

$kx = 245;
$ky = 125;
$kw = 140;
$kh = 15;
$expw = $kw*$char['exp']/70000000;
if($expw > $kw) $expw = $kw;
imagerectangle($image, $kx-1, $ky-1, $kx+$kw+1, $ky+$kh+1, $white);
imagefilledrectangle($image, $kx, $ky, $kx+$expw, $ky+$kh, $black);

or

2)

// set some dimensions for future use
$mqh = -68;

$exph = $mqh*$exp/70000000;
$mqbar = $exph + 90;

// Create an mqbar with bg 'cool' color and the cover of your level in red.
imagefilledrectangle($image, 36, 90, 47, $mqbar, $white);

I threw together the crappy code for #2.. hence it looks horrible :p
but itll work with the flapmo's guide/basic setup.


wher to put it in
Member
Posts: 12,867
Joined: Mar 10 2004
Gold: 573.84
Oct 29 2009 09:09pm
Quote (paxelsen @ Oct 30 2009 02:05am)
who to make epx bar to MQ

http://firehawks.web.surftown.dk/sig/paxelsen.png


50.fg fo the help finish me
Member
Posts: 9,437
Joined: Jan 3 2008
Gold: 2.85
Oct 30 2009 06:54pm
Quote (dunaicapa @ Oct 14 2009 04:24am)
how to make dynamic signature from an animated gif

requirements: php 5 & imagick
check phpinfo(); if you have it

Code
<?php

$charid     = 112562;            // your characters id
$animation  = "./2gv7y91.gif";   // original gif
$fastimage  = "./fastimg.gif";   // cached image (should not change)
$refresh    = 60;                // cache time in seconds
$font       = "./BIRTH_OF_A_HERO.ttf";

if(mktime()-filemtime($fastimage)>$refresh) {

  include('readxml.php');
  $charr  = readxml($charid);
  $strings = array(
//     array(size, rotation, posx, posy, color, font, text),
       array(20, 0, 10, 20, "white", $font, $charr['name'].' '.$charr['lvl'].' '.$charr['class']),
       array(20, 0, 10, 40, "white", $font, 'str '.$charr['str']),
       array(20, 0, 10, 60, "white", $font, $charr['mqa'].' / '.$charr['mqp']),
  );
  $image = new Imagick($animation);
  $draw = new ImagickDraw();
  foreach ($image as $frame) {
     for($i=0;$i<count($strings);$i++) {
        $color = new ImagickPixel($strings[$i][4]);
        $draw->setFillColor($color);
        $draw->setFont($strings[$i][5]);
        $draw->setFontSize($strings[$i][0]);
        $frame->annotateImage($draw, $strings[$i][2], $strings[$i][3], $strings[$i][1], $strings[$i][6]);
     }
  }
  file_put_contents($fastimage, $image->getImagesBlob());
  header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
  header('Expires: Thu, 19 Nov 1981 08:52:00 GMT');
  header('Pragma: no-cache');
}
header("Content-type: image/gif");
$image = new Imagick($fastimage);
echo $image->getImagesBlob();
?>


package --> http://www.ls.dunaicapa.hu/anim.gif/anim.gif.rar

http://www.ls.dunaicapa.hu/anim.gif


how would i got about installing that imageick to my webserver

all i use it the ftp am i gonna need something else? or what?
Go Back To Ladder Slasher Topic List
Prev1555657585960Next
Add Reply New Topic New Poll