Low quality image after v2.70

yiankos1

Well-Known Member
Licensed User
Longtime User
I have a problem after update. Just compiled again my app (with v2.70) and i figured out that my images are low quality. Do you have any idea??
 

Attachments

  • tet.png
    69.4 KB · Views: 357

yiankos1

Well-Known Member
Licensed User
Longtime User
If i use that code fixes quality. But i think its a bug....
B4X:
ImageView3.Bitmap=LoadBitmap(File.DirAssets,"sign-info-icon.png")
   ImageView2.Bitmap=LoadBitmap(File.DirAssets,"star-icon (1).png")
   ImageView1.Bitmap=LoadBitmap(File.DirAssets,"facebook-icon.png")
 

yiankos1

Well-Known Member
Licensed User
Longtime User
Here are the files Erel. Waiting for your response!
 

Attachments

  • first.bal
    4.8 KB · Views: 264
  • sign-info-icon.png
    10.6 KB · Views: 295
  • star-icon (1).png
    18.4 KB · Views: 289
  • facebook-icon.png
    16 KB · Views: 295

syncmaster13

Member
Licensed User
Longtime User
HI
I have the same problem after updating to 2.70

I’m using designer. Labels that are set as BitmapDrwable, have “”.png assigned to it with gravity “fill”
On galaxy note, nexus 7 and emulator those labels show low quality
 

jmon

Well-Known Member
Licensed User
Longtime User
I am having the same problem with an image of 256px x 256px displayed in an imageview of 64dip x 64dip. The aliasing of the edges is very bad.

(windows 7 x64)

(edit)
Then if I assign the bitmap from the IDE, not the designer, the picture displays nicely.
 
Last edited:

FJS

Active Member
Licensed User
Longtime User
Good afternoon,

I have the same problem with .png files, but it hapens with bitmapdata elements, but not with imageview elements...:sign0148:

Thank you very much for your help

Best regards
 

FJS

Active Member
Licensed User
Longtime User
Good morning,

I mean bitmapdata objets:

Dim a as bitmapdata
Dim b as imageview

In both case I use the following sentence to load the picture:

a.Bitmap=LoadBitmap(File.DirAssets,"examplea.png")
b.Bitmap=LoadBitmap(File.DirAssets,"exampleb.png")

But when run the app in the movilphone, I find "b" objets have a good quality, but the "a" objets have a very poor quality, however with the previus issue of program, it didnot happend

Thank you for the support
 

CidTek

Active Member
Licensed User
Longtime User
I don't know if this observation helps in troubleshooting but my home screen has 2 images based on orientiation. These images are loaded in the designer script by "image1.image=xxx.png"

When I start the app in portait mode the first image looked fine. If I rotate the phone the landscape image was poor quality and when I rotate back to portrait mode then it also was poor quality.

None of the above was an issue prior to 2.70.

With 2.70 I fixed it by using loadbitmap statements in the activity_resume sub and the images now look fine on all devices from phones to the tablet I tested it on.
 

CidTek

Active Member
Licensed User
Longtime User
Note that you only need to set the layout in Activity_Create.

V2.71 will be released in a week or two and will fix this issue.

But Activity_Resume handles refreshing the image from a new bitmap load each time the orientation changed. Are you saying Create is a better location for this?
 
Last edited:

FJS

Active Member
Licensed User
Longtime User
Is examplea.png a very large image? Are there any messages in the logs about memory issues?

Good afternoon Erel,

I often design the image around 25kb at most, I think is not too much. I have more than 15 gv. elements (layout of bitmapdata), but also I think is not too much, In fact with the previously version it worked, with a great quality and it didnt depend on the size of screen (I mean that I have HTC desire X 4", and Asus transformer 10", and it worked with high quality in both).
Even there is not any messages in the logs about memory issues.

I hope these comments help you. And obviously, thank you very much for your support, as always

If the next issue will have a improvement about that, it will be great
:sign0098:
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
But Activity_Resume handles refreshing the image from a new bitmap load each time the orientation changed. Are you saying Create is a better location for this?
Activity_Create will be called when there is an orientation change. It will also work if you put it in Activity_Resume, however Activity_Resume is called even if the Activity is just resumed (user presses on the Home button and then returns to your app for example).
 

Kevin

Well-Known Member
Licensed User
Longtime User
For some reason I got the impression that it would only down-res if memory was low. I noticed this on an emulator but didn't think it would happen on a real device. Hopefully nobody will complain until this gets fixed because the main GUI in my app is nothing but high-res graphical buttons.

Would it be possible to also offer an option to NOT automatically do this?

For the record, all of my images are used with the designer... none are loaded through code.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…