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?
Related
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.
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.
I have developed a custom wordpress template based on theme twentythirteen.
The theme works fine on desktop, it's so so on tablets, and looks really wrong on smartphones.
The customized parts (the one that I made) resize correctly to take all the width possible, but the content structure that I kept of the original theme becomes more narrow that the screen. On smartphones the content width is like 20% of the available screen width.
How can I check what is wrong to fix it? I do suppose that it could be the other way around: the customizations stay too big, while the responsive layout resize itself correctly, with the result that the mobile browser scales everything to fit and I get my changes fine and the responsive part very small.
In that case, how could I fix the resize of my custom parts to fit nicely?
I looked for remote debugging and I solved my issue using this solution:
https://developers.google.com/chrome-developer-tools/docs/remote-debugging
I have a large WPF app and recently we have had icons disappear. We have the images as external resources that get loaded into memory. We have a custom button template where we set an ImageSource for the icons to show up. I used procmon to see that the image files are loaded into memory. I used WPF Snoop to see that the buttons have the images set correctly. Only some of the icons will disappear and then if you start the app again they might all be there. Using snoop if I change the imagesource to one of the files that loaded and are displayed, then that one will also show up, but if i put a "bad" one into a button that loaded fine before, the icon is still gone. When they disappear it is the same ones that disappear. And occasionally the wrong icon all together will appear on one of the buttons.
The button template has an Imagesource setup for the image to load and display.
This is really puzzling because one time everything loads just fine and the next, some of the icons are not loading. They are all png files.
Any ideas where to look next? Thanks.
One reason I can think of is that you just have one instance of each image, so if you use it one place it will disappear in other places. If you have the resources defined in XAML you can set x:Shared="false": http://msdn.microsoft.com/en-us/library/aa970778.aspx
Otherwise you'd have to create additional instances manually from your code.
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?