Highlighted

DrawBitmapWithQuality not working.. Driving me nuts [HELP]

Engaged ,
Apr 28, 2016

Copy link to clipboard

Copied

No matter what I do ..  .draw or .drawBitmapWithQuality  .. the capture looks terrible. It looks like a jpg compressed at least 50% 

I'm running in GPU mode on an iPhone6 S Plus if that means anything.

Has anyone else run in to this or know a way around it ?

This is what I am using

myObject.myBitmapData.drawWithQuality(object_mc, new Matrix(1, 0, 0, 1, 0,0), null, null, null, false, StageQuality.BEST);

TOPICS
Development

Views

237

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

DrawBitmapWithQuality not working.. Driving me nuts [HELP]

Engaged ,
Apr 28, 2016

Copy link to clipboard

Copied

No matter what I do ..  .draw or .drawBitmapWithQuality  .. the capture looks terrible. It looks like a jpg compressed at least 50% 

I'm running in GPU mode on an iPhone6 S Plus if that means anything.

Has anyone else run in to this or know a way around it ?

This is what I am using

myObject.myBitmapData.drawWithQuality(object_mc, new Matrix(1, 0, 0, 1, 0,0), null, null, null, false, StageQuality.BEST);

TOPICS
Development

Views

238

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 28, 2016 0
Engaged ,
Apr 28, 2016

Copy link to clipboard

Copied

I wonder if this has something to do with the high dpi screens?  It looks the same as when you don't make a 2X image for a retina display.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 28, 2016 0
Engaged ,
Apr 28, 2016

Copy link to clipboard

Copied

I have somewhat narrowed the problem.

Everything is fine until I use scaleX / scaleY on the image. It seems capturing a bitmap of an image that has had scaleX or scaleY done to it causes the bitmap to render terribly.

Now..  to try and find a workaround.  ... 

Colin Holgate​ - You're the only person I can think of that may have experience with this issue.

Any help is appreciated.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 28, 2016 0
Adobe Community Professional ,
Apr 28, 2016

Copy link to clipboard

Copied

I have done a lot of drawwithquality, but not seen problems. Try doing a SWF test instead of AIR, to see if that is any different.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 28, 2016 0
Engaged ,
Apr 28, 2016

Copy link to clipboard

Copied

After 6 hours of testing I can verify now that when I dont apply any scaleX or scaleY and draw the bitmap .. its perfect.  If I make any adjustment with scaleX / scaleY and then draw the bitmap it is a huge difference in quality.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 28, 2016 0
Adobe Community Professional ,
Apr 28, 2016

Copy link to clipboard

Copied

So, don't do that.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 28, 2016 0
Engaged ,
Apr 28, 2016

Copy link to clipboard

Copied

I have to.. its an app that lets users load an image from their camera roll. When it loads the image in it makes sure to scale the image to fit appropriately in the view.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 28, 2016 0
Engaged ,
Apr 28, 2016

Copy link to clipboard

Copied

Here is some screens from a test app I just made to verify this.

This step shows me loading an image from the camera.  Nothing applied to it. No scaleX or scaleY

beforedrawingNoScaleXY.PNG

Now I bitmapDrawWithQuality and place it in the same spot .. You can see ,.. both are the same,

bitmapdrawnNoScaleXY.PNG

Now .. this time I grab the image from the camera roll and auto scale it down using scaleX / scaleY..  Image still looks pretty good.

beforedrawingScaleXY.PNG

Now I bitmapDrawWithQuality the scaled image and this happens.  It looks terrible!

afterdrawingScaleXY.PNG

HELP! .. My app is useless if the user can't scale / rotate their images.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 28, 2016 0
Engaged ,
Apr 28, 2016

Copy link to clipboard

Copied

More progress..

I've now discovered that every time you make a change to scaleX or scaleY  bitmapSmoothing resets to false.  So have to call bitmapSmoothing after every adjustment to scale of the image.

So it's much better now than it was... but there is still a downgrade in quality that I cant figure out what is happening.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 28, 2016 0
Engaged ,
Apr 28, 2016

Copy link to clipboard

Copied

Colin Holgate​ - I think more than smoothing may be reset when you scale or rotate a bitmap. This is really interesting.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 28, 2016 0