Skip to main content
April 12, 2007
Question

What is the property of best JPG quality?

  • April 12, 2007
  • 9 replies
  • 605 views
Hello,
When i load an external JPG file in a movieclip, how can i get the best quality of
this external JPG file?

I know for video it is Smoothing, but for external jpg files i really don't know.

Regards,

Micheal.
This topic has been closed for replies.

9 replies

Inspiring
April 13, 2007
I just found something that might help you. Especially if you're publishing to flash player 8. I was intrigued by the notes about the differences mentioned in the livedocs page I posted on MovieClip._quality.

Read this old post, it explains a workaround for a difference (that might still exist) in flash player 8 (& 9?). You need to load the jpeg, copy it to a bitmap and then delete and recreate the movieclip using attachBitmap with its smoothing flag set to true. There's a code example in the page.

http://www.kaourantin.net/2005/08/fixing-one-bug-at-time-in-flash-player.html#112553553671951064

read the posts from : Wednesday, August 31, 2005 5:45:00 PM onwards
Participant
April 19, 2007
Flash 8 Documentation
ActionScript 2.0 Language Reference > ActionScript classes > MovieClip > _highquality (MovieClip._highquality property)
_highquality (MovieClip._highquality property)

public _highquality : Number

Deprecated since Flash Player 7. This property was deprecated in favor of MovieClip._quality.

Specifies the level of anti-aliasing applied to the current SWF file. Specify 2 (best quality) to apply high quality with bitmap smoothing always on. Specify 1 (high quality) to apply anti-aliasing; this smooths bitmaps if the SWF file does not contain animation. Specify 0 (low quality) to prevent anti-aliasing. This property can overwrite the global _highquality property.

Availability: ActionScript 1.0; Flash Player 6
Example

The following ActionScript specifies that best quality anti-aliasing should be applied to the SWF file.

my_mc._highquality = 2;
kglad
Community Expert
Community Expert
April 13, 2007
you're welcome.

because jpgs are bitmaps they cannot scale-up without looking pixelated unless you start with an image that looks good at the largest size you need.

then scale it down, use it and when scaled-up, it will still look good.
Inspiring
April 12, 2007
kglad: lol I just googled it too. Seems there were changes with Flash 8 vs. older versions in terms of how this worked.

Anyhow, it does look like this setting is just for the embedded images in the swf... i.e. the size of the swf generated, not the quality of the rendering. Which means that Michealnl, I think you're just left with the _quality setting we both mentioned earlier.
April 13, 2007
Thanks GWD and kglad,

It seems more compex then i tought, because

I tried al these things:

movieclip_mc._quality = "BEST";

moveiclip_mc._highquality = 2;

( i found this in the help file, i effects more the vector based animations). If set to 0, an animation is really crapy.

http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00002749.html

And also i tried publishing the flash with jpg quality set to 100, but that does not effect external loaded jpg.

I think i know what causes the edge of a person in a photo that is not smooth. I rescaled the movieclip.

What i don't understand is when you have a video you can use the property
myvideo.smoothing = true;

When rescaling it still looks very good.

Why did they not use the same technique for JPG?

Also when you import jpg files in your library you can use the property of this jpg and set
the smoothing to 100% quality. This really does it's work with GIF's and makes the edge very smooth.

Too bad you can't use smoothing to a movieclip :(




kglad
Community Expert
Community Expert
April 12, 2007
ok, if you right click a jpg in the library, click properties and untick use imported jpg data, you can affect jpg quality using the flash settings.
kglad
Community Expert
Community Expert
April 12, 2007
lol. the jpg settings have no effect on jpegs. i think it affects gifs and pngs.
Inspiring
April 12, 2007
me neither... I thought the publish setting was more for controlling the size embedded images and therefore of the swf that is generated... In which case it would have no effect on externally loaded ones. But I don't know for sure either.
kglad
Community Expert
Community Expert
April 12, 2007
i'm not sure. i've never paid attention to jpg quality. but because it's a global property i suspect it does affect loaded jpg.
kglad
Community Expert
Community Expert
April 12, 2007
jpeg quality can be set in your publish settings.

you can set it for movieclips using the _quality property but i think it will be global anyway.
Inspiring
April 12, 2007
kglad: does the publish settings for jpg affect externally loaded jpgs? I don't think it does.
Inspiring
April 12, 2007
The major factor with external jpgs is the quality they were saved at. Then I suspect for flash rendering its just the movieclip ._quality property. Check out in livedocs:

http://livedocs.adobe.com/flash/8/main/00002509.html#wp370194

Read the comments at the bottom of the page though... it appears as if you may only need to set it once and you can't do it by individual clips