SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Tools and Files

Reply
 
Thread Tools Display Modes
Old 04/08/2011, 01:56 PM   #1
gamer931215
High-roller
 
gamer931215's Avatar
 
Join Date: Feb 2010
Location: That box in front of your house stealing your wifi.
Posts: 1,277
Reputation: 322
Default Image2Textdraw - Image to textdraw converter! -FINAL VERSION

Image2Textdraw 1.0 FINAL

What is it ?
With this tool you can convert images to textdraws!
It is an .exe application that converts every pixel of a image
to a textdraw and it generates an errorless filterscript!

Changelog:
Code:
BETA:
1.1:
*Checkbox added to enable/disable the background removal
1.2:
*Code optimised at the checkbox.
*The threads are now "sleeping" longer, THIS MEANS THAT THE APPLICATION WILL RENDER SLOWER, unfortunally i had to do this because i noticed it the loop was going too fast that it will randomly skip pixels :S
1.3:
*Remove transparency checkbox will be disabled when rendering
*The previewbox has been removed and the location-select part will now show your image instead of a dot
*Improved location selector (better accuracy)
*System is now using a different save method
*The system will now compare every 2-4 pixels with echothers color, and combines them if they are identical
1.3b:
*Icon has been removed to fix the crashes at Windows XP
1.4:
*New method of detecting transparency (A LOT more accurate)
*Menubar added
*Checkbox of the transparency removal has now been moved to the menubar
*A possible crash has been fixed after you closed the app
1.5:
*New color detection to reduce textdraw sizes!
*Quality option has been added (adding more delay to give the ram more time to store the pixels avoiding random transparant pixels).
RC2:
*New image for locating positions (on request)
Final version:
*Standard transparency value adjusted
*Help button added (including information about how to avoid "transparant" pixels).
*You can now turn multithreading off (for slower/single core processors)
*Load/Render buttons added in the menu
*Some major speed improvements have been added
*You can now change the background image of the previewbox in order to select the location with your own screenshots (On request of asdfgh98).
NEW!Result of the pixel-reduce method:

The ammount of textdraws on this image above has been reduced from 495 to 245!!!
Version 1.5 reduces this example to just 74 textdraws!!!!

Important notes:
1. Please note that the SA-MP server has a 2048 textdraw limit! This means you can only convert small images arround 64x64 (depends on how much transparant pixels and nearby pixels with the same color there are to combine).
2. 1 pixel will be showed larger as the original due to the 640x480 scale !
3. The pixelcount on the details is INCLUDING transparant pixels, transparant pixels will not be made as textdraw though.

How to use it ?
1. resize your logo so it is arround 45x45 pixels (can be smaller or maybe even larger, it also depens on the ammount of transparant pixels you have).
2. Run the tool and click on Load Image, select now your resized logo/image.
3. Click on "Render image", and select the output where you want to save the pawn file.
4. Wait until its finished and then open the filterscript with pawn and hit F5 (compile it).
5. Your filterscript is ready to go!

License
*Do NOT re-release it, clame it as your own or mirror it!
*You are allowed to use PARTS of the code for yourself, but atleast put some credits in the comments to me!

Do you enjoy my tool/like it ? Please make a donation and help me keeping my favourite sa-mp server up!

Or go to http://www.gamer93.net/ and click on "Donate".
Attached Files
File Type: zip Image2Pawn 1.0 Final.zip (2.05 MB, 13397 views)
__________________

Thanks to Zh3r0 for this awesome signature!

Last edited by gamer931215; 20/08/2011 at 11:04 AM.
gamer931215 is offline   Reply With Quote
Old 04/08/2011, 02:00 PM   #2
IstuntmanI
High-roller
 
IstuntmanI's Avatar
 
Join Date: Mar 2009
Location: Romania
Posts: 1,863
Reputation: 370
Default Re: Image2Textdraw - Image to textdraw converter!

That's awesome ! Thanks gamer !

First
__________________


IstuntmanI is offline   Reply With Quote
Old 04/08/2011, 02:08 PM   #3
Rock_Ro
Huge Clucker
 
Join Date: Mar 2011
Location: Los Santos
Posts: 270
Reputation: 2
Default Re: Image2Textdraw - Image to textdraw converter!

Tested.

Nice.
I don't know if it's a bug but i used this image


In textdraw it appears only eyes and mouth and the black background is transparent..
Anyway..that picture it looks more good without background xD
Rock_Ro is offline   Reply With Quote
Old 04/08/2011, 02:10 PM   #4
gamer931215
High-roller
 
gamer931215's Avatar
 
Join Date: Feb 2010
Location: That box in front of your house stealing your wifi.
Posts: 1,277
Reputation: 322
Default Re: Image2Textdraw - Image to textdraw converter!

Quote:
Originally Posted by Rock_Ro View Post
Tested.

Nice.
I don't know if it's a bug but i used this image


In textdraw it appears only eyes and mouth and the black background is transparent..
Anyway..that picture it looks more good without background xD
Hmm thanks for reporting, il might add a checkbox with "Remove transparency" so you can turn it off, the black background is matching the transparency hex i think with other image formats.
__________________

Thanks to Zh3r0 for this awesome signature!
gamer931215 is offline   Reply With Quote
Old 04/08/2011, 02:11 PM   #5
Deskoft
Guest
 
Posts: n/a
Default Re: Image2Textdraw - Image to textdraw converter!

Thanks for this release, and thanks for the source.
  Reply With Quote
Old 04/08/2011, 02:12 PM   #6
Snipa
Banned
 
Join Date: May 2010
Posts: 864
Reputation: 115
Default Re: Image2Textdraw - Image to textdraw converter!

Wow, really nice.
Snipa is offline   Reply With Quote
Old 04/08/2011, 03:20 PM   #7
gamer931215
High-roller
 
gamer931215's Avatar
 
Join Date: Feb 2010
Location: That box in front of your house stealing your wifi.
Posts: 1,277
Reputation: 322
Default Re: Image2Textdraw - Image to textdraw converter!

Remove transparancy option has now been added with a checkbox
__________________

Thanks to Zh3r0 for this awesome signature!
gamer931215 is offline   Reply With Quote
Old 04/08/2011, 03:21 PM   #8
Naruto_Emilio
Banned
 
Join Date: Apr 2011
Location: North Africa
Posts: 1,555
Reputation: 365
Default Re: Image2Textdraw - Image to textdraw converter!

OMFG YOU DID IT YOU DID IT YOU RELEASE IT man i love you (bear in mind no gay )
Naruto_Emilio is offline   Reply With Quote
Old 04/08/2011, 03:23 PM   #9
GangsTa_
High-roller
 
GangsTa_'s Avatar
 
Join Date: May 2010
Location: Republic of Moldova
Posts: 1,125
Reputation: 51
Default Re: Image2Textdraw - Image to textdraw converter!

This is insanity!
__________________
i5-5200U @ 2.6 GHz
GTX 950M 2GB GDDR3 128-bit
8,00GB DDR3 RAM
128GB SSD, 1TB 5400RPM HDD
Windows 10 Pro x64
GangsTa_ is offline   Reply With Quote
Old 04/08/2011, 03:25 PM   #10
LZLo
Gangsta
 
LZLo's Avatar
 
Join Date: Jul 2010
Location: Central Europe
Posts: 527
Reputation: 21
Default Re: Image2Textdraw - Image to textdraw converter!

one of the most useful tools, i think
thank you
__________________

CCFH 2.0 is out now! (preview: https://www.*******.com/watch?v=Bubt5MykYj0)
LANGUAGE: (ENGLISH& Hungarian)
PAWN scripting since 2006

Show some love and appreciation by smashing the button!
LZLo is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
i damn want this help (image) Shoaib Help Archive 3 28/04/2011 08:03 PM
sa-mp-0.3b-R3-install.exe - Bad image subz3r02593 Client Support 7 24/09/2010 03:40 PM


All times are GMT. The time now is 02:11 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.