View Full Version : Image conversion quality
rcyeager
02-23-2006, 08:10 PM
I am noticing that JPG/GIF/PNG images are not rendered sharply within OpenLaszlo. (Doesn't seem to matter which mode, but my app is SOLO.)
I took a PNG file and converted it to SWF using an external conversion program. When the SWF is loaded via OpenLaszlo, the image looks much sharper.
Can anything be done to improve the runtime rendering quality of non-SWF images?
rajubitter
02-24-2006, 12:48 AM
I have the same problem with my images. Yes, exporting them in SWF format solves the problem. If the quality is not good enough that is probably connected to the transcoding software used. The Wiki states that OpenLaszlo uses Jgenerator 2.2
Media transcoding within both the compiler and server is implemented by the Java Transcoder class.
(WEB-INF/classes/lps/server/src/org/openlaszlo/media/Transcoder.java)
Actual transcoding of media types is done in JGenerator-2.2 within the Bitmap class.
(WEB-INF/lps/server/jgenerator-2.2/src/org/openlaszlo/iv/flash/api/image/*)
The JGenerator software can be found here:
http://www.flashgap.com/
Maybe there is some way to set up the quality of the SWFs produced?
Best, Raju
This interesting article (http://www.darcynorman.net/2005/09/22/pachyderm-asset-transformation-dilemma) suggests switching from JGenerator to Ming .. and the "OpenLaszlo fork" to amend Jgenerator.
rcyeager
02-24-2006, 08:22 AM
Thanks for the info, but my question is related to runtime image loading and rendering from within the client, not compile-time or server-side rendering.
I don't believe JGenerator is in scope for my question, although I have also noticed fuzzy images being generated by it, too (i.e. if I include a PNG as a compile-time resource).
I have poked around the source code and didn't find any obvious hooks to the client-side runtime rendering.
Is the OpenLaszlo client relying on the Flash engine for runtime rendering?
I find it very frustrating that a software tool that is supposed to excel at creating Rich Internet Applications cannot display images without fuzziness. JPEG/GIF/PNG formats are ubiquitous for internet media.
benjamin
02-24-2006, 09:05 AM
There was a bug with rendering bitmaps offset by half a pixel, and thus "fuzzy," in earlier versions of the LPS. The latest community release, LPS 3.2, fixes this.
-ben shine
software engineer
laszlo systems
rcyeager
02-24-2006, 05:36 PM
Hi Ben -
I have downloaded v3.2cr2 and performed some testing with PNG and GIF image rendering.
You are correct, PNGs do render a lot better with v3.2cr2 vs. 3.1.1.
But I was still seeing fuzziness with my PNG images.
I did some more experimenting and discovered that changing my <object> embed properties from "swf8" to "swf7" in the HTML file results in a big improvement in appearance of my non-SWF graphics. Basically, the non-SWF images look perfect with "swf7" in the embed. When I reset the embed to "swf8", the images look fuzzy again. Same thing happens with LzEmbed().
Besides my own graphics, this also affects all PNG-based OpenLaszlo component artifacts...especially the richbutton component...suddenly my entire application looks sharp and clear!
What could be causing this?
benjamin
02-24-2006, 05:58 PM
You're right, this really needs to work properly; we should be displaying bitmaps in all their glory. I think you've found a case in which things aren't working right. I'm going to move this conversation onto the laszlo-dev mailing list, where the other developers can see.
You say the "richbutton" component looks different; I don't think we have a richbutton. Can you be more specific?
This is related to two OpenLaszlo bugs, both of which are (theoretically) resolved:
"png's appear fuzzy when used in Flash 8 apps"
http://www.openlaszlo.org/jira/browse/LPP-808
and
"bitmaps rendered differently when compiled for swf7 vs swf8"
http://www.openlaszlo.org/jira/browse/LPP-1441
The bitmap resources are indeed rendered by the flash player, but OpenLaszlo does the positioning of those images. A half-pixel shift causes fuzziness, but I thought that was all fixed in LPS3.2cr2.
-ben shine
software engineer
laszlo systems
rcyeager
02-24-2006, 08:19 PM
Ben -
You'll find the richbutton.lzx underneath the /doc subdirectories within the laszlo distribution...it's not a component per-se, but it does seem to work rather well as one.
You'll see that the rounded corners will look fuzzy when embedding w/ "swf8", sharp w/ "swf7".
[I am also in anticipation of seeing how the new Flash8 image scaling APIs will improve image quality...my application uses a lot of image scaling for zooms...think I read about this somewhere in JIRA.]
Robert
ranzhang
05-09-2006, 11:08 AM
Hi,
Does 3.2.0 server runs as 3.1.1 if I set canvas.version = "3.1.1.0" in my lzx app ?
benjamin
05-09-2006, 12:40 PM
Originally posted by ranzhang
Hi,
Does 3.2.0 server runs as 3.1.1 if I set canvas.version = "3.1.1.0" in my lzx app ?
Nope. The server version just is what it is.
ranzhang
05-09-2006, 01:04 PM
quote is from 3.2 LZX Reference Manual
The version for this lzx app. If set below the current version, may enable backwards compatible behaviors.
As what you said, they probaby need to update The Reference Manual.
ebrentnelson
01-20-2007, 03:55 PM
Was there ever a legitimate solution to this problem? I am compiling my app using 3.3.1 as a SWF8 and my icons are blurry. I need to use FlashPlayer 8 because of some of the functionality is supports (or I wouldn't care compiling it as SWF7).
Thanks.
ebn
rcyeager
01-20-2007, 06:51 PM
I haven't experienced any further trouble with image quality w/ the latest releases of LPS3
Robert
benjamin
01-20-2007, 07:25 PM
Was there ever a legitimate solution to this problem? I am compiling my app using 3.3.1 as a SWF8 and my icons are blurry. I need to use FlashPlayer 8 because of some of the functionality is supports (or I wouldn't care compiling it as SWF7).
Reviewing the comments for LPP-1441, this seems to have been resolved by reworking the art assets. The comment from Max Carlson indicates that the art assets we were using were a bitmap shoved into a swf file, and offset by half a pixel. How were your art assets generated? Do you see fuzziness if you display
http://svn.openlaszlo.org/test/bugs/lpp-1441/box.swf
and
http://svn.openlaszlo.org/test/bugs/lpp-1441/icon_folder.swf ?
If all is well, there will not be fuzziness on box.swf, and there will be fuzziness on icon_folder.swf, because box.swf was generated correctly, as pure-vector, and icon_folder.swf was generated oddly, as a bitmap-in-a-swf.
The moral of the story is, if you're trying to display art that was created as a bitmap, you should use png resources, not swf.
rajubitter
01-22-2007, 04:03 AM
Yes, Ben. It's exactly as it should be on my machine. box.swf looks good, icon_folder.swf is fuzzy.
- raju
ebrentnelson
02-01-2007, 10:05 AM
I am using PNG resources, but they are still fuzzy. Would it be the fact that I am embedding them as resources? I can't (read: don't want to) dynamically load them, when I do that they are sharp... when they are embedded they are fuzzy..
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.