Background Image Issue with IOS - codenameone

I am using the "FlatBlueTheme" and I modified the Form to have a background image.
On Android: background image shows elegantly
On Simulator: background image shows elegantly
On IPad Mini (32bit) : background images shows on first form -- when switching to a new Form().show() the background of the form goes solid black.

This will happen if the image is either really big and thus exceeds the GPU threshold on iOS (typically 4096 pixels but this can vary).
This can also happen if the format of the image isn't supported on iOS e.g. jpeg2000 possibly gif or some other format. Make sure you use either PNG or regular JPEG.
You see the image initially because of the screenshot process described in the iOS section of the developer guide.

Related

How to keep Launch Screen Image Consistent Size

I have a xcode project and in the LaunchScreen I have added an Image View.
However, in different phone/phone sized, the image does not reflect properly. It seems that the image view is not dynamically fitting for all resolutions.
How can I get the image to show the same consistently?

Images become very light

I wonder, icons which already worked in iOS 10 is not working on iOS 11 (image become very light). While compiling through Xcode 8.3.3 is working and with Xcode 9 beta 4 it's become very light. Advice on the same.
I found that images with color description file would show welll but the images without that would show very light. Fix the images which does not have color description will solve your problem even if it is a very heavy work.
info of two images left image shows well ,right image shows very light

How can I find the dimensions of an image on a responsive web page?

I am working as a graphic designer. They wanted me design some slider images on a page. But nobody knows the dimensions. I have seen that there are 4 different dimensions for an image when I inspect the page.
Large
Medium
Small
XSmall
So when you enter the website with a mobile phone Xsmall image appears..etc.
I have tried some ruler and responsive view extensions; but it didnt help me.
How can I find exact dimensions?
The exact steps might depend on what browser you are using. Here are some instructions for Chrome (they will be similar for other browsers):
Resize the window to get the image in the smallest dimensions.
Right click the image and "Inspect Element"
You will see a tab for "Computed". This indicates the computed CSS attributes for this image. From this view, you can read the height and width in pixels.
Resize your window and repeat this for each of the image sizes.
A more advanced approach: depending on how they implemented responsive web design, you may be able to view the CSS the page is loading, and look for #media queries which control the size of the image depending on the viewport of the browser. Read more about #media here.

BackGrond gets distored while building application in code name one

I am building a application in codename one which has a log-in age.
I have a created a UI as the requirements but when i build the application from codename one's server for android then i see that a streamed background image gets distorted and convert in to lines.
The background image has a gradient from 3 dimension to center top.
I checked it in codename one simulator its looks fantastic but in android emulator background image gets distorted.
Please check attached image for it. i have added two image 1st is of codename one's emulator and 2nd one is android emulator.
Please let me know that i do.
You have a background gradient, the devices have a limited number of colors so the background will be distorted to some degree as the colors are adapted to the lower color count on the device.
This is assuming you didn't use a mutable image or a round rect border (not image border), in those two cases the number of colors might be lower because of drawing to an image surface that might be 16bit.

How to set a placeholder for a Image control (while it downloads)?

I have an app that show a list of images. The image source is set to a http URL, and the images are downloaded and display automatically.
However, while the app is taking time to download, the image control shows nothing. The user experience is not good this way.
How may I display a loading placeholder image, or a loading gauge, for each of the image control?
While an image is loading, it is drawn transparently. You can use this to your advantage to display an element underneath the image while it is loading. For example, you could have a stock image that is bundled with your XAP that represents a default avatar for example. Or you could display a XAML loading animation. Then when the image is finished loading, it will obscure the element behind it.
Mick's suggestion is a good one if you need to minimize your visual tree and if your scenario allows for a code solution. This suggestion is not perfect but it does make it easier to deal with the case where your placeholder image is unscaled/centered but the loaded image is scaled/stretched.
You could set the image source to your placeholder then when ImageOpened fires, change it to the remote url and let that run it's course.
In addition to the 2 other suggestions (from Josh & Mick) you could display a placeholder in the xaml and then, in code, download the actual desired image in the background using HttpWebRequest. Then when the image has fully downloaded save it to isolated storage and then update the source to the displayed image.
Yes this is more complex than the other solutions but would simplify the visual tree and avoid a blank image being displayed while the image is downloaded.
It would also give you offline caching of images too.
Interesting how many options there are for tackling this problem.
You might also like to consider Ben Gracewood's image caching implementation or what appears to be a development on that idea in his blog comments.
One-time Cached Images in Windows Phone 7 « Ben.geek.nz
Peter Nowaks Mobile Blog - “Intelligent” Image Caching for WP 7
Some background on the discussion leading up to this here if it's of interest.
Image control cache duration?

Resources