Jump to content
Sal's RuneScape Forum
Roy

Item Transparency Tool (2.7)

Recommended Posts

Okay thanks. I'm guessing you can only use this for items right?

The actual uploading part works for any image. But it can't remove the background for npc's or other objects (only items).

Share this post


Link to post
Share on other sites

Wow, this is awesome. This could potentially save hours for guide makers. Thank you very much, Roy. :) I will be using it in the future.

Share this post


Link to post
Share on other sites

I have rewritten the code a bit (to make it easier for me to debug) and added something new.

 

wXx2k8C.png

 

Normally, you would take a screenshot, open paint, select the item you want and copy-paste it to the program. I wanted to make this a bit shorter by allowing you to simply drag a crosshair to the item you want (no need to screenshot) and the program would take a screenshot for you and remove the background.

Share this post


Link to post
Share on other sites

After making a massive amount of items transparent, I realised that this tool should be a lot faster. So I added a shortcut key to capture an item close to the cursor (ctrl+D). All you need to do is have the program open and focused and move your cursor to the image of the item you want and press Ctrl and D.

 

This is a lot faster than dragging and dropping some crosshairs...

 

EDIT: I did 25 images in about 20 seconds (including the uploading), that's less than a second per image.

Edited by Roy

Share this post


Link to post
Share on other sites

After making a massive amount of items transparent, I realised that this tool should be a lot faster. So I added a shortcut key to capture an item close to the cursor (ctrl+D). All you need to do is have the program open and focused and move your cursor to the image of the item you want and press Ctrl and D.

 

This is a lot faster than dragging and dropping some crosshairs...

 

EDIT: I did 25 images in about 20 seconds (including the uploading), that's less than a second per image.

highly impressed good job making this! Do you know if this works on Linux systems? Edited by Kaysie

Share this post


Link to post
Share on other sites

After making a massive amount of items transparent, I realised that this tool should be a lot faster. So I added a shortcut key to capture an item close to the cursor (ctrl+D). All you need to do is have the program open and focused and move your cursor to the image of the item you want and press Ctrl and D.

 

This is a lot faster than dragging and dropping some crosshairs...

 

EDIT: I did 25 images in about 20 seconds (including the uploading), that's less than a second per image.

highly impressed good job making this! Do you know if this works on Linux systems?

I'm using .net framework 4.0 for this and I have heard of compilers that can compile .net code for linux. I'll look into that...

 

EDIT: I installed mono by using:

sudo apt-get install mono-complete

(it does take about 10 minutes). And this allowed me to run the exe of my tool in ubuntu but it looked horrible and crashed when I tried to save an image. It also doesn't seem to upload (or it takes too long) and it removes a lot more than just the background (doesn't work).

 

To get this to work, I'll need a lot more time (and I don't have a lot of time)...

Edited by Roy

Share this post


Link to post
Share on other sites

Lol 25 items in 20 seconds. That must have been an intense 20 seconds.

Share this post


Link to post
Share on other sites

After making a massive amount of items transparent, I realised that this tool should be a lot faster. So I added a shortcut key to capture an item close to the cursor (ctrl+D). All you need to do is have the program open and focused and move your cursor to the image of the item you want and press Ctrl and D.

 

This is a lot faster than dragging and dropping some crosshairs...

 

EDIT: I did 25 images in about 20 seconds (including the uploading), that's less than a second per image.

highly impressed good job making this! Do you know if this works on Linux systems?

 

To get this to work, I'll need a lot more time (and I don't have a lot of time)...

100% understandable Roy if you ever get it done even if it's a year from now it will be greatly appreciated. :)

Share this post


Link to post
Share on other sites

After making a massive amount of items transparent, I realised that this tool should be a lot faster. So I added a shortcut key to capture an item close to the cursor (ctrl+D). All you need to do is have the program open and focused and move your cursor to the image of the item you want and press Ctrl and D.

 

This is a lot faster than dragging and dropping some crosshairs...

 

EDIT: I did 25 images in about 20 seconds (including the uploading), that's less than a second per image.

 

Goddamnit now you made the transparencies I did by hand not so cool :( Awesome work though, I'll definitely use this the next time a transparency is requested! :D

Share this post


Link to post
Share on other sites

Could you (theoretically) make a something like this for chatbox transparencies?

Share this post


Link to post
Share on other sites

Could you (theoretically) make a something like this for chatbox transparencies?

To get the head of the person talking transparent? Or to crop the whole chatbox in some way?

Share this post


Link to post
Share on other sites

Just the talking head.

That's possible, using the method I mentioned here:

http://runescape.sal...e/#entry4112271

 

This requires a few things:

  1. A mask; the chatbox with everything except the talking head.
     
  2. the right offset so that the program knows where to xor the mask. If you're off by just one pixel, the whole process fails.

The mask can be obtained from deleting the jagexcache and hoping that you can take a screenshot before the head loaded. I have one that still works (not 100% and this might change in the future).

The right offset can be obtained by having the program search for a sequence of pixels in the source image that is always in the same spot relative to the head.

 

I had a program that did this but it's still in a early development stage, it wasn't ready to be used without knowing how it works (and still has a few bugs).

 

I could use a few screenshots from other people to test if my program works on screenshots that weren't made on my computer.

Edited by Roy

Share this post


Link to post
Share on other sites

Oh, right. Could GIMP work with that?

 

And how quickly would it take to do a chatbox transparency? A minute?

Share this post


Link to post
Share on other sites

Oh, right. Could GIMP work with that?

 

And how quickly would it take to do a chatbox transparency? A minute?

It is possible with gimp, using a plugin, named G'MIC.

 

You have to install the plugin, start gimp, add the two layers (source and mask) and go to Filters > G'MIC...

 

A new window should open up, select 'All' and 'New Image' for Input layers and Output mode (at the left side of the window). Then under filters, go to layers > Blend [standard] and select xor as mode. Apply, and you should have a new window open where you can get select the black area around the head and copy it over the source image. Then crop and you're done.

 

I would however recommend getting paint.net, it will go a lot faster with that. If you have a mask that you can just paste over the source without having to move it around, it'll take about half a minute.

Share this post


Link to post
Share on other sites

I'm doing something wrong.

 

J3ST3Ey.png

 

I get this in the end (after I remove the background layer and paste)

 

Kt5CLMi.png

 

I'm not using an entire chatbox could that have something to do with it?

Share this post


Link to post
Share on other sites

I'm doing something wrong.

 

J3ST3Ey.png

 

I get this in the end (after I remove the background layer and paste)

 

Kt5CLMi.png

 

I'm not using an entire chatbox could that have something to do with it?

I think your mask is off by a pixel, try moving it around a bit. It should give a slightly distorted head with a lot of black around it.

 

The black is what you want to select and copy over the original image.

Share this post


Link to post
Share on other sites

So that was apparently the problem, but now I get this.

 

Gq75gz4.png

 

It's on global and everything.

Share this post


Link to post
Share on other sites

So that was apparently the problem, but now I get this.

 

Gq75gz4.png

 

It's on global and everything.

You're now working in paint.net, right? Or still in Gimp?

 

If you use the magic wand (or color picker) tool and set the tolerance to 0, and flood mode to global. Then select the black around the head, copy that and paste it over the original image (not the one with the mask; it's best to remove the layer that has the mask). It should make the background (the rest of the chatbox) black.

Share this post


Link to post
Share on other sites

Sweet, I figured out what I was doing wrong. I got this.

 

30tmBzP.png

 

Somewhat embarrassingly, I can't figure out how to reduce the area around the transparency without altering the image. (e.g. I can't crop it). Do I need to do that / How do I do that? I am using paint.net

 

There is also a small issue here. You can see a small portion of the NPC's hair points out of the circular frame around the head. You can see this on the bottom left portion of the image. Do you think we should keep this small portion of hair or just get rid of it?

Share this post


Link to post
Share on other sites

Sweet, I figured out what I was doing wrong. I got this.

 

30tmBzP.png

 

Somewhat embarrassingly, I can't figure out how to reduce the area around the transparency without altering the image. (e.g. I can't crop it). Do I need to do that / How do I do that? I am using paint.net

Select the area you want and either press ctrl+shift+X or go to Image > Crop to Selection.

 

You can also use the pick color tool to select the transparent background, then invert the selection (ctrl+I} and crop to selection (ctrl+shift+X). This should remove all excess background.

 

There is also a small issue here. You can see a small portion of the NPC's hair points out of the circular frame around the head. You can see this on the bottom left portion of the image. Do you think we should keep this small portion of hair or just get rid of it?

I would personally keep the parts that go outside the circular frame.

Share this post


Link to post
Share on other sites

The tool doesn't seem to be working anymore. Whenever I try to upload a file I just get error. I tried uninstalling and installing again and no dice. Anyone else experiencing similar problems?

Share this post


Link to post
Share on other sites

The tool doesn't seem to be working anymore. Whenever I try to upload a file I just get error. I tried uninstalling and installing again and no dice. Anyone else experiencing similar problems?

It currently works for me. What kind of error? A new window saying something went wrong (unhandled exception)? Or a message in the status bar at the bottom?

 

A screenshot could help...

Share this post


Link to post
Share on other sites

If you go to Help > About..., what version does it say? 2.4.0.0?

 

Also can you upload the image manually and post it here?

Edited by Roy

Share this post


Link to post
Share on other sites

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

×

Important Information

By using this site, you agree to our Guidelines and Privacy Policy.