Jump to content

Recommended Posts

Posted

hi,

i want to know how are images programmed? what languages can they be programmed in?what softwares are used to make them?

 

the reason i want to know is because i saw this:

 

vipersig.jpg

 

how is this made?

Posted

Meh, I've seen it n times so it fails to surprise me now.:cool: Virtually every forum has some people using sigs consisting of that.

 

I don't think SFN allows pictures in the signatures though...that's probably why no one has seen it before here.

Posted

You can create images in virtually any language you care to choose. Web-based images are commonly created using PHP as Capn points out since it's a fairly popular language. However, it's perfectly feasible to create images using C, C++, Perl, Python, or any other language that you care to choose. Chances are that there's an image library for the language that you choose; it's just a matter of finding it. Even if there isn't, it's really trivial to create uncompressed images just by using basic file operations.

Posted

I fiddled around w/ PHP's method of doing it. They have functions at php.net (I think it is). You used to need an extra package beyond PHP and apache. Like mod_php-gtkGD or something. I think after version 5 it comes default though. When you use a package manager for php (5) you see libjpg, libpng, etc in the dependencies list.

 

Images work just like any other file.

 

header("Content-type: image/png");

$signature = imagecreatefrompng("mybooringimage.png");

Do some text coloring and,

imagepng($signature);

 

Something like that. Look it up, it's really not as dificult as you may think.

Posted

You don't need any extra packages, you just need GD--I had it running on a PHP 4.3 webhost. They may have compiled it in, though (have to look at phpinfo to be sure) but many softwares, like image galleries, require GD, so most hosts have it.

Posted
Is it possible to do this using VB? If so how?

 

 

Stage 1: set fire to computer

Stage 2: place all VB books and CD's onto fire

Stage 3: use a proper programming language....

 

But it's probably possible...

Posted

Well, those types of images are quite interesting. its quite simple, called a one way door - it allows information from the browser to be sent back but not other information.

 

If you use PHP you have some powerful functions at your disposal, a friend and I recently finished a quick project that turns images to ASCII art here:

 

http://www.penagate.spiralmindsinc.com/misc/image-upload.php

 

The function was quite simple read the x and y direction, grab the pixel colour and then assign that through CSS.

 

function ASCII($File)
{
 $Width  = imagesx($File);
 $Height = imagesy($File);
 $RetVal = '';
 for ($i = 0; $i < $Height; $i++)
 {
   for ($j = 0; $j < $Width; $j++)
   {
     $RGB = imagecolorsforindex($File, imagecolorat($File, $j, $i));
     $HexVal = sprintf('%02X%02X%02X', $RGB['red'], $RGB['green'], $RGB['blue']);
     $RetVal .= '<span style="color: #' . $HexVal . ';">#</span>';     
   }
   $RetVal .= '<br />' . "\n";
 }
 return  $RetVal;
}

 

Where the parameter is recieved from either:

 

imagecreatefrompng(File Name Here);

imagecreatefromgif(File Name Here); or...

imagecreatefromjpg(File Name Here); Depending on the file type of the file too be generated.

 

As with the generator above, the dynamic images are usually done with PHP although CGI can be used with a little more work :)

 

As for exactly how the PHP functions themselves work with images, I'm still researching in the source code :)

 

Cheers,

 

Ryan Jones

  • 10 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.