jcarbelbide / tog-crowdsourcing

Goal is to create a runelite plugin that crowdsources the optimal Tears of Guthix world.
BSD 2-Clause "Simplified" License
9 stars 0 forks source link

tog nav button icon too large #4

Closed Adam- closed 1 year ago

Adam- commented 1 year ago

Your nav button image is nearly 5mb in memory:

image

Please resize it to something reasonable.

jcarbelbide commented 1 year ago

Hi @Adam-, sorry about that, and thank you for creating this issue. It's been a while since I worked on this, so I apologize, I'm not exactly sure what to resize. Is the nav button the one that is pressed on the right hand menu to open the TOG config? I have included a screenshot of what I'm talking about. I don't have RuneLite open at the moment

image

I looked through the repo and the only image I had was this one: https://github.com/jcarbelbide/tog-crowdsourcing/blob/master/src/main/resources/tog-icon.png

Or is it possibly the overlay I'm generating for the plugin? https://github.com/jcarbelbide/tog-crowdsourcing/blob/master/src/main/java/com/togcrowdsourcing/ToGCrowdsourcingOverlay.java#L148

Apologies again, it has been a while since I've looked at this.

Adam- commented 1 year ago

Hi @Adam-, sorry about that, and thank you for creating this issue. It's been a while since I worked on this, so I apologize, I'm not exactly sure what to resize. Is the nav button the one that is pressed on the right hand menu to open the TOG config? I have included a screenshot of what I'm talking about. I don't have RuneLite open at the moment

image

I looked through the repo and the only image I had was this one: https://github.com/jcarbelbide/tog-crowdsourcing/blob/master/src/main/resources/tog-icon.png

Or is it possibly the overlay I'm generating for the plugin? https://github.com/jcarbelbide/tog-crowdsourcing/blob/master/src/main/java/com/togcrowdsourcing/ToGCrowdsourcingOverlay.java#L148

Apologies again, it has been a while since I've looked at this.

Yes, the nav button. https://github.com/jcarbelbide/tog-crowdsourcing/blob/master/src/main/resources/tog-icon.png. It is 114KB as a compressed png, but when Java loads it expands to 5mb due to how large the image dimensions are. The nav buttons are only 20x20 px or so.

jcarbelbide commented 1 year ago

understood, thank you for explaining! Let me upload a new one that is compressed to something around 20x20 px

jcarbelbide commented 1 year ago

Sized down to 30x30 px, hope that is okay: https://github.com/jcarbelbide/tog-crowdsourcing/pull/5

jcarbelbide commented 1 year ago

Opened PR on plugin-hub. Let me know if it needs to be smaller, or if I missed anything. Thank you for your help!

https://github.com/runelite/plugin-hub/pull/4378

jcarbelbide commented 1 year ago

https://github.com/runelite/plugin-hub/pull/4378 has been merged, closing this as resolved