Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 07-20-2009, 02:42 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by Stefan View Post
What exactly is your suggestion (making all pixels of a specific color transparent ?)
Yes, you know how artists typically paint the background one color then set that as the transparent color?

In theory I would use it like so..

This is serverside usage

PHP Code:
// Declare Source Image
temp.sourceimg "source.png";
// Create Panel and Draw Source Image
temp.img = new TDrawingPanel();
temp.img.setsize(getimgwidth(sourceimg), getimgheight(sourceimg));
temp.img.drawimage(00sourceimg);
// Get Top Left Pixel Color
temp.rgb img.getPixelRGB(00);
// Set Image Transparencies
temp.img.setTransparency(rgb[0], rgb[1], rgb[2]);
// Save the Image
temp.img.saveimage2("levels/image/newimage.png"8); 
Which reminds I think functionality to get the RGB value of a certain would be needed as well.

TDrawingPanel.getPixelRGB(x, y); - returns {red, green, blue}

This wouldn't hurt either..
TDrawingPanel.isimgpixeltransparent(x, y) - returns boolean ( like the scripted clientside function )

I'd use this functionality to make it easier for players to create their own heads, bodies, shields, other player content, and have it uploaded in-game versus emailing, or other systems. Typically most newbies usually just open the graphic in paint, and submit the BMP's. Provided they will still have to upload them in the right format but setting transparencies can be a difficult task.
__________________
Quote:

Last edited by fowlplay4; 07-20-2009 at 03:03 AM..
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:47 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.