Image.getPixel/setPixel & ImagePainter – editing JME3 Images

Putting everything in one class is not an end goal. If theres different kinds of data you access it with different kinds of objects. Just like you have to access the Geometry for the material and the Mesh for the vertices.

@Zarch

Can’t you could just use your old stuff instead? Wasn’t it both faster and easier to use? This is ridiculous.

@androlo



All else being equivalent I’d rather be working off core rather than my own patched fork - long term stability is much better this way.



Changes were made to ImageRaster which (I’m told, not confirmed myself yet) meant it wasn’t massively far behind on performance so I don’t mind switching over to it - it’s just a matter of having time to do it.



(Zero Separation Press Release is why I have no time at all at the moment).

@zarch Hi there, I just read this articl and read the source of ImagePainter.java (dunno if it’s the latest version). I though I’d make this request/question before you released it as a plugin. Would it be possible to add a ‘setImage(Image image)’ method to ImagePainter, the reasoning is that if you have multiple Images then you can swap them out with your existing ImagePainter instance. I’m not sure if this is feasible, but I do think it would be handy when dealing with multiple Image instance.



All-in-all, it looks pretty sweet!.

That would be possible (although it would accept an ImageRaster not an Image) and I don’t see any major harm in adding it. Generally though it is safer to create new ImagePainter objects rather than having the risk that you recycle what you think is a finished-with ImagePainter only to suddenly find yourself modifying the wrong ImageRaster.

hey @zarch!

I am using ImagePainter.java, it works very well! but I had to update it to work with ImageRaster.
http://hub.jmonkeyengine.org/forum/topic/dinamically-create-a-texture-from-a-string/#post-300299

I saw that there is a working netbeans jme3 plugin, so that code surely is updated; I wonder how I could just add that one to my project, instead of having to copy it from the OP link and update/fix it?

EDIT: solved http://hub.jmonkeyengine.org/forum/topic/dinamically-create-a-texture-from-a-string/#post-300345

Hi @teique, I’ve not been very active recently on the jME front (too much other stuff going on) but I’ll probably be around more soon. Did the problems get fixed or does something still need doing with ImagePainter?

it is running great thanks! :slight_smile: