It’s been a while since I zoomed anything in VASSAL. The zoom feature is now freezing my desktop. After quite a long wait, the image updates. The image zoom is just crawling. Is it working fine for everyone else?
I was zooming today with 4636 from 40 to 100% and back.
Did not notice any problems
Post generated using Mail2Forum (mail2forum.com)
Interesting. I’m looking at a particularly small map too. I shall have to investigate…
2008/12/7 Tim McCaron <timothy.mccarron@sbcglobal.net (timothy.mccarron@sbcglobal.net)>
Post generated using Mail2Forum (mail2forum.com)
I’ve had no problems on large maps with jre6. Didn’t someone else report something like this recently and it turned out to be a JRE version issue?
B.
Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org
Post generated using Mail2Forum (mail2forum.com)
Uhm… I opened the map image in GIMP and resaved it. Problem vanished.
I suspect the original wasn’t the default RGBA encoding and VASSAL was struggling to swap the bytes around. I don’t know. It ultimately finishes the zoom, but it takes an inordinate amount of time and the CPU runs at 100%.
The original came from an ImageMagick conversion of a PhotoShop PSD file that was originally CMYK, so obviously ImageMagick had to do some heavy processing. But I’ve never had an issue with ImageMagick before.
- M.
2008/12/7 Brent Easton <b.easton@exemail.com.au (b.easton@exemail.com.au)>
–
Michael Kiefte, Ph.D.
Associate Professor
School of Human Communication Disorders
Dalhousie University
Halifax, Nova Scotia, Canada
tel: +1 902 494 5150
fax: +1 902 494 5151
Post generated using Mail2Forum (mail2forum.com)
The original came from an ImageMagick conversion of a PhotoShop PSD file
that was originally CMYK, so obviously ImageMagick had to do some heavy
processing. But I’ve never had an issue with ImageMagick before.
I have never been able to convert a CMYK image to RGB using ImageMagick without having the colors change. I get my source to save the image from Photoshop as a PNG for me.
B.
Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org
Post generated using Mail2Forum (mail2forum.com)
In this case, it seems to have worked well. I’ve never had that experience.
- M.
2008/12/7 Brent Easton <b.easton@exemail.com.au (b.easton@exemail.com.au)>
The original came from an ImageMagick conversion of a PhotoShop PSD file
that was originally CMYK, so obviously ImageMagick had to do some heavy
processing. But I’ve never had an issue with ImageMagick before.I have never been able to convert a CMYK image to RGB using ImageMagick without having the colors change. I get my source to save the image from Photoshop as a PNG for me.
B.
Post generated using Mail2Forum (mail2forum.com)
Thus spake “Michael Kiefte”:
Uhm… I opened the map image in GIMP and resaved it. Problem vanished.
I suspect the original wasn’t the default RGBA encoding and VASSAL was
struggling to swap the bytes around. I don’t know. It ultimately finishes
the zoom, but it takes an inordinate amount of time and the CPU runs at
100%.The original came from an ImageMagick conversion of a PhotoShop PSD file
that was originally CMYK, so obviously ImageMagick had to do some heavy
processing. But I’ve never had an issue with ImageMagick before.
What kind of image was it? Was it a JPEG with a color profile? Could I see
the offending image?
–
J.
Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org
Post generated using Mail2Forum (mail2forum.com)
Thus spake “Michael Kiefte”:
Uhm… I opened the map image in GIMP and resaved it. Problem vanished.
I suspect the original wasn’t the default RGBA encoding and VASSAL was
struggling to swap the bytes around. I don’t know. It ultimately finishes
the zoom, but it takes an inordinate amount of time and the CPU runs at
100%.The original came from an ImageMagick conversion of a PhotoShop PSD file
that was originally CMYK, so obviously ImageMagick had to do some heavy
processing. But I’ve never had an issue with ImageMagick before.
- M.
I had a thought just now: Maybe we should have the editor convert images
to a more friendly type at save-time, so that we pay the cost of this once,
rather than at load-time, where we pay the cost over and over?
–
J.
Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org
Post generated using Mail2Forum (mail2forum.com)
I had a thought just now: Maybe we should have the editor convert images
to a more friendly type at save-time, so that we pay the cost of this once,
rather than at load-time, where we pay the cost over and over?
Good idea. But many people refresh the images in the module by opening it up and manually copy a new set of images in. Perhaps a menu option to just load a directory full of images into the module? I would find that useful as Zip support on Windows is crap. (Though I have just discovered 7-zip which helps).
Another thought - we have this on-going issue of how to delete unused images. We know it is a fair bit of work to do it automatically. How about letting users do it themselves easily. Have a menu option to display the names and sizes of all the images in the image dir (i.e. read and display the Zip entries), allow sorting by name or size, and allow the user to flag images to be deleted. Next time the module is saved, flagged images are not copied to the new module.
B.
Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org
Post generated using Mail2Forum (mail2forum.com)
Thus spake “Michael Kiefte”:
Uhm… I opened the map image in GIMP and resaved it. Problem vanished.
I suspect the original wasn’t the default RGBA encoding and VASSAL was
struggling to swap the bytes around. I don’t know. It ultimately finishes
the zoom, but it takes an inordinate amount of time and the CPU runs at
100%.The original came from an ImageMagick conversion of a PhotoShop PSD file
that was originally CMYK, so obviously ImageMagick had to do some heavy
processing. But I’ve never had an issue with ImageMagick before.
I was looking that image you sent, and noticed that it has a color profile
in it. The problem might have something to do with that.
What version of Java, which VASSAL build, what OS is this hapening under?
–
J.
Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org
Post generated using Mail2Forum (mail2forum.com)
I was looking that image you sent, and noticed that it has a color profile
in it. The problem might have something to do with that.What version of Java, which VASSAL build, what OS is this hapening under?
I’m up to r4613. Java 1.6 under Ubuntu.
- M.
Post generated using Mail2Forum (mail2forum.com)
Thus spake “Michael Kiefte”:
Java 1.6 under Ubuntu.
Sun or OpenJDK? Which version exactly?
–
J.
Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org
Post generated using Mail2Forum (mail2forum.com)
java-6-sun-1.6.0.07.
- M.
2008/12/8 Joel Uckelman <uckelman@nomic.net (uckelman@nomic.net)>
Thus spake “Michael Kiefte”:
Java 1.6 under Ubuntu.
Sun or OpenJDK? Which version exactly?
–
J.
Messages mailing list
Messages@forums.vassalengine.org (Messages@forums.vassalengine.org)
http://forums.vassalengine.org/mailman/listinfo/messages_forums.vassalengine.org
Post generated using Mail2Forum (mail2forum.com)
Thus spake “Michael Kiefte”:
java-6-sun-1.6.0.07.
- M.
Huh, that’s interesting. I tried this with Sun’s 1.6.0_11, and I see the
same problem you do. It works fine for me with OpenJDK.
Ill have to check in the debugger what’s going on.
–
J.
Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org
Post generated using Mail2Forum (mail2forum.com)
Thus spake Joel Uckelman:
Thus spake “Michael Kiefte”:
java-6-sun-1.6.0.07.
- M.
Huh, that’s interesting. I tried this with Sun’s 1.6.0_11, and I see the
same problem you do. It works fine for me with OpenJDK.Ill have to check in the debugger what’s going on.
No, scratch that. It happened for me with 1.6.0_11 because I just happend
to have an unrelated runaway process at exactly the same time as VASSAL
was trying to read the image. I can’t reproduce this, with either 1.6.0_11
or OpenJDK 1.6.0_0-b12.
–
J.
Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org
Post generated using Mail2Forum (mail2forum.com)
Weirdness.
I just tried it again with the image I sent you and total lock up for two minutes. Can’t be a heap problem – larger images work fine. Resaving the image in GIMP solves the problem.
It looks like I’ll have to dig out the profiler.
- M.
2008/12/8 Joel Uckelman <uckelman@nomic.net (uckelman@nomic.net)>
Thus spake Joel Uckelman:
Thus spake “Michael Kiefte”:
java-6-sun-1.6.0.07.
- M.
Huh, that’s interesting. I tried this with Sun’s 1.6.0_11, and I see the
same problem you do. It works fine for me with OpenJDK.Ill have to check in the debugger what’s going on.
No, scratch that. It happened for me with 1.6.0_11 because I just happend
to have an unrelated runaway process at exactly the same time as VASSAL
was trying to read the image. I can’t reproduce this, with either 1.6.0_11
or OpenJDK 1.6.0_0-b12.–
J.
Messages mailing list
Messages@forums.vassalengine.org (Messages@forums.vassalengine.org)
http://forums.vassalengine.org/mailman/listinfo/messages_forums.vassalengine.org
Post generated using Mail2Forum (mail2forum.com)
Thus spake “Michael Kiefte”:
Weirdness.
I just tried it again with the image I sent you and total lock up for two
minutes. Can’t be a heap problem – larger images work fine. Resaving the
image in GIMP solves the problem.It looks like I’ll have to dig out the profiler.
Use a debugger. Try jdb.
Add this monstrosity of an option to java when you run the player:
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n
It will tell you what port it’s using, and then you can attach to that:
jdb -attach XXXXX
Once you have the image loading, give jdb the ‘suspend’ command, then dump
the stacks for all of the threads (‘where all’) to see what’s going on.
–
J.
Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org
Post generated using Mail2Forum (mail2forum.com)
It looks like SinglePixelPackedSampleModel.getDataElements(int x, int y, Object obj, DataBuffer data). After that is effectively native methods.
Could be dragged down by the packed sample model?
- M.
2008/12/8 Joel Uckelman <uckelman@nomic.net (uckelman@nomic.net)>
Thus spake “Michael Kiefte”:
Weirdness.
I just tried it again with the image I sent you and total lock up for two
minutes. Can’t be a heap problem – larger images work fine. Resaving the
image in GIMP solves the problem.It looks like I’ll have to dig out the profiler.
Use a debugger. Try jdb.
Add this monstrosity of an option to java when you run the player:
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n
It will tell you what port it’s using, and then you can attach to that:
jdb -attach XXXXX
Once you have the image loading, give jdb the ‘suspend’ command, then dump
the stacks for all of the threads (‘where all’) to see what’s going on.–
J.
Post generated using Mail2Forum (mail2forum.com)
Thus spake “Michael Kiefte”:
It looks like SinglePixelPackedSampleModel.getDataElements(int x, int y,
Object obj, DataBuffer data). After that is effectively native methods.Could be dragged down by the packed sample model?
- M.
Well, I think every PNG which is not indexed will be loaded to a
BufferedImage with a SinglePixelPackedSampleModel.
–
J.
Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org
Post generated using Mail2Forum (mail2forum.com)