This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
bruegge's profile picture

icon to array/table

Started by bruegge, 03 March 2018 - 02:01 AM
bruegge #1
Posted 03 March 2018 - 03:01 AM
hallo,

I tested the openPeripherals addIcon command… now I'm interested in reading out the pixels of the icon.
Is there a command to convert the icon to a table/array? or is there a command to read out the RGB values of a pixel inside the icon?

best regards!

Bruegge =)
bruegge #2
Posted 06 March 2018 - 05:27 PM
hallo,

is there no way to read out the colorvalues(RGB) of an item icon?

best regards

Bruegge =)
Bomb Bloke #3
Posted 07 March 2018 - 10:27 AM
OpenPeripherals is a separate mod to ComputerCraft, and one which is rather poorly documented - to get any information as to how the peripherals in a given version work, you pretty much have to install that version. As such, it's difficult to provide any answers about the mod off-hand.

So… what version are you using? What peripheral is offering this "addIcon" function? It may also be helpful for you to provide a sample script that makes use of that function.

Additionally, for what purpose do you want to use these colour values? Is there any particular reason you're trying to get them through addIcon? There might be an easier way that doesn't rely on OpenPeripherals at all.
bruegge #4
Posted 13 March 2018 - 12:33 PM
hello,

sorry for replying so late… I had some private problems the last few days :/
I try to get the item icons outside of minecraft. If you use the terminal glasses, you can use the addIcon command with a item fingerprint, to display the icon onto the screen.
I need a picture of this Icon as a table/array to paste it via pastebin outside of minecraft. So if there is a way to get the RGB Color values from an icon, that would be nice.
An alternative is to use a webside to get the icon. for example minecraft.gamepedia.com. But I think there are not all items from all mods. also I only have the fingerprint to identify the item. I think it would be better to have an inside minecraft icon table with color values and export it via pastebin. But at the end I don't care how to get the icon…
So, if you know a way to get icons via fingerprint it would be awesome.

I am using:
minecraft 1.7.10
computercraft 1.75
openPeripherals 0.5.1
with the modpack beachblocks modsplosion

Best regards
Bruegge