wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Resources > Code Resources > Scripts
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 09-18-2009, 06:26 PM   #1
Deaod
User
 
Join Date: Jan 2007
Posts: 541

Submissions (11)

Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)

Send a message via ICQ to Deaod Send a message via MSN to Deaod
Default ImageUtils

Well, purpose of this library:
- add the IMAGE_TYPEs Blizzard forgot to add.
- provide an object oriented wrapper for images + some additional features, like reading certain properties of the image

Images are an interesting type. I recently published a documentation of that type, which is also the basis for large parts of this script.

This library uses vJass (JassHelper 0.9.H.0 and up) and ARGB.

Expand ImageUtils:

EDIT 1: Updated ImageUtils to incorporate the result of my research. Attached a map demonstrating use of ImageUtils in the context of a TextSplat library.
EDIT 2: Added a documentation. If you still need something explained, feel free to ask.
EDIT 3: Made the link to my research more visible.
EDIT 4: Fixed two bugs.
EDIT 5: Now supports wrapping to the ground. Fixed documentation errors.
EDIT 6: Updated with workarounds to the newfound bug. As a result, CreateImageEx was added. Refer to the documentation for more information.
EDIT 7: Deprecated CreateImageEx in favour of NewImage/ReleaseImage. Now also tries to work around the most common errors with images (and reports those to the user).
EDIT 8: Fixed imagex instances causing errors.

Last edited by Deaod : 02-27-2010 at 10:37 PM.
Deaod is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 09-18-2009, 06:34 PM   #2
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,726

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

Expand JASS:
Man, fix the bloody spacing... Also, did you verify that this is actually the order (from bottommost to topmost) that Blizzard uses in actual WC3 or are these the (obviously incorrect) names used in GUI?
Expand JASS:
Use SCOPE_PREFIX.

Oh, and put the "ImageUtils" library on top of the example, and have both of them use [hiddenjass][/hiddenjass] tags around them.

You will also need better documentation. By a lot.

Also, I am calling forth the necessity of a demo map for this library. I refuse to let it get approved without one that shows all of the working image types, how they stack on each other, and gives some examples of how they work when you change their values and such.
__________________
Home Page
DoE v1.14c Download
AotZ v2.03d Download
OD v0.10x Download

Coming soon eventually...

Personal To-Do List:
ICARUS
Aot3

WC3C Chat
Chat IP: 66.103.20.109
Earthbound 2 in English
vJass Manual

"DAMAGE_TYPE_POISON motherfucker!" ~Anitarf

Last edited by Rising_Dusk : 09-18-2009 at 06:35 PM.
Rising_Dusk is offline   Reply With Quote
Old 09-22-2009, 10:35 PM   #3
Deaod
User
 
Join Date: Jan 2007
Posts: 541

Submissions (11)

Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)

Send a message via ICQ to Deaod Send a message via MSN to Deaod
Default

Updated.
__________________
Deaod is offline   Reply With Quote
Old 09-23-2009, 01:45 PM   #4
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,726

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

Quote:
Originally Posted by Rising_Dusk
You will also need better documentation. By a lot.
Collapse JASS:
    // Credits:
    // - Vexorian for ARGB and JassHelper
    // - Pipedream for grimoire
    // - MindWorX and Pitzermike for JassNewGenPack
    // - SFilip for TESH
This does not constitute proper script documentation. Parts of your image test experiment thing will basically need to be copied and pasted into the library to explain why the library does what it does and how it does it.
__________________
Home Page
DoE v1.14c Download
AotZ v2.03d Download
OD v0.10x Download

Coming soon eventually...

Personal To-Do List:
ICARUS
Aot3

WC3C Chat
Chat IP: 66.103.20.109
Earthbound 2 in English
vJass Manual

"DAMAGE_TYPE_POISON motherfucker!" ~Anitarf
Rising_Dusk is offline   Reply With Quote
Old 10-08-2009, 02:31 PM   #5
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,726

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

Please do something about your documentation so I can approve this.
__________________
Home Page
DoE v1.14c Download
AotZ v2.03d Download
OD v0.10x Download

Coming soon eventually...

Personal To-Do List:
ICARUS
Aot3

WC3C Chat
Chat IP: 66.103.20.109
Earthbound 2 in English
vJass Manual

"DAMAGE_TYPE_POISON motherfucker!" ~Anitarf
Rising_Dusk is offline   Reply With Quote
Old 10-16-2009, 12:01 PM   #6
Deaod
User
 
Join Date: Jan 2007
Posts: 541

Submissions (11)

Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)

Send a message via ICQ to Deaod Send a message via MSN to Deaod
Default

Is that enough documentation now?
__________________
Deaod is offline   Reply With Quote
Old 10-16-2009, 01:44 PM   #7
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,726

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

I think it's enough, but I suggest having the URL for your Image Tutorial in the documentation too for further reading if the user is interested.
__________________
Home Page
DoE v1.14c Download
AotZ v2.03d Download
OD v0.10x Download

Coming soon eventually...

Personal To-Do List:
ICARUS
Aot3

WC3C Chat
Chat IP: 66.103.20.109
Earthbound 2 in English
vJass Manual

"DAMAGE_TYPE_POISON motherfucker!" ~Anitarf
Rising_Dusk is offline   Reply With Quote
Old 10-16-2009, 02:49 PM   #8
Deaod
User
 
Join Date: Jan 2007
Posts: 541

Submissions (11)

Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)

Send a message via ICQ to Deaod Send a message via MSN to Deaod
Default

Link was already there, but anyway, updated.
__________________
Deaod is offline   Reply With Quote
Old 10-16-2009, 03:20 PM   #9
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,726

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

Oh? I guess I missed it when I read it, weird. Oh well, approved.
__________________
Home Page
DoE v1.14c Download
AotZ v2.03d Download
OD v0.10x Download

Coming soon eventually...

Personal To-Do List:
ICARUS
Aot3

WC3C Chat
Chat IP: 66.103.20.109
Earthbound 2 in English
vJass Manual

"DAMAGE_TYPE_POISON motherfucker!" ~Anitarf
Rising_Dusk is offline   Reply With Quote
Old 11-08-2009, 04:25 AM   #10
Deaod
User
 
Join Date: Jan 2007
Posts: 541

Submissions (11)

Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)

Send a message via ICQ to Deaod Send a message via MSN to Deaod
Default

updated.
__________________
Deaod is offline   Reply With Quote
Old 11-15-2009, 10:21 PM   #11
Deaod
User
 
Join Date: Jan 2007
Posts: 541

Submissions (11)

Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)

Send a message via ICQ to Deaod Send a message via MSN to Deaod
Default

Aaaaand, updated.
__________________
Deaod is offline   Reply With Quote
Old 11-26-2009, 12:37 AM   #12
Rikim4ru
User
 
Rikim4ru's Avatar
 
Join Date: Dec 2006
Posts: 21

Rikim4ru has little to show at this moment (0)

Default

It's annoying that the position is always the lower left corner of the image. You can fix that 'flaw' with simple math. Could you please do that?
Rikim4ru is offline   Reply With Quote
Old 11-26-2009, 02:37 PM   #13
Deaod
User
 
Join Date: Jan 2007
Posts: 541

Submissions (11)

Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)

Send a message via ICQ to Deaod Send a message via MSN to Deaod
Default

I wont "fix" that, mostly because i already have two other libraries depending on it.
Also, its rather trivial to fix this on your side (or even incorporate it).

Edit: That aside, where would you want me to move the origin to?
__________________

Last edited by Deaod : 11-26-2009 at 02:43 PM.
Deaod is offline   Reply With Quote
Old 11-26-2009, 02:51 PM   #14
Viikuna-
User
 
Viikuna-'s Avatar
 
Join Date: Feb 2009
Posts: 203

Viikuna- will become famous soon enough (44)Viikuna- will become famous soon enough (44)

Default

It could be in the middle of the image, so when modifying its size over time, you dont have to move your image alla time.

See for example those images that appear in the ground when you use burrow/unborrow spell with those undead nerubian units.
__________________
No Marlo, no game.

Last edited by Viikuna- : 11-26-2009 at 02:52 PM.
Viikuna- is offline   Reply With Quote
Old 11-26-2009, 03:24 PM   #15
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,726

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

The origin being the center does make the most sense, for what it's worth.
__________________
Home Page
DoE v1.14c Download
AotZ v2.03d Download
OD v0.10x Download

Coming soon eventually...

Personal To-Do List:
ICARUS
Aot3

WC3C Chat
Chat IP: 66.103.20.109
Earthbound 2 in English
vJass Manual

"DAMAGE_TYPE_POISON motherfucker!" ~Anitarf
Rising_Dusk is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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


All times are GMT. The time now is 11:39 PM.


Donate

Affiliates
The Hubb http://bylur.com - Warcraft, StarCraft, Diablo and DotA Blog & Forums The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2014, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services