In Android to get the width and height of an image from your res folder do the following: BitmapDrawable bd = (BitmapDrawable) this.getResources().getDrawable(R.drawable.icon); int height = bd.getBitmap().getHeight(); int width = bd.getBitmap().getWidth(); If you want the width and height depending the target density you can use the intrinsic values: BitmapDrawable bd = (BitmapDrawable) this.getResources().getDrawable(R.drawable.icon); int imageHeight =
Tag: image
Xcode Missing Retina 4 Launch Image
Updating Xcode with SDK 6.0 gives you an error when trying to compile your project. Missing Retina 4 launch image. A launch image named “Default-568@2x.png” is required to run at native resolution on Retina 4 devices. Would you like Xcode to add this image for you? This is solved easily by pressing “Add”. Under Project
Mac Show Image Dimension
Mac does not display file information by default. You can change this so it will show the image dimension in Finder, Windows and Desktop. In Finder go to the menu View -> Show View Option or press Cmd + J. Select “Show Item Info”, remember to check “Use as Defaults” which will make all folders
Xcode Create Launcher Image
iPhone app got a launcher image to fool the users to think the app starts very quickly. To create this launch image can be create from the Organizer from Xcode. Open Xcode and go to menu Window -> Organizer or the Organizer icon in the topright corner of Xcode. Remember to connect your iPhone to
Capture An Image Of An Android Screen
If you want the get a screenshot on your Android mobile you can do that simply by holding down the power + volume down button for one second. In Eclipse to capturing an image from your Android device or simulator go to the DDMS perspective. In Eclipse go to the menu Window -> Open Perspective
Removing Spaces Between Images in HTML
When using images in HTML you might want to remove the white spaces in between. There are two things you should be aware of when using images. First thing is to make sure there is no spaces between the <img> tags. Like in this example there is an unwanted gap between image1 and 2: <img src=”img1.gif”/>
Capture An Image Of An iPhone Screen
Taking a picture of your iPhone screen is quick and painless. Press and hold the Home button, then press the Sleep/Wake button. Your screen flashes and the picture appears in your Camera Roll.
PowerPoint Watch Out For Oversize Image Files
PowerPoint files (.ppt, .pptx, .pps and .ppsx) can sometimes become very large and slow, whether that is due to a large number of slide or heavy use of images you can easily exceed 50mb or another limit you might have. Watch out for oversize image files. Images don’t need to be much larger than 1024 ×
CSS3 Gradient Generator
Using gradient color can be cool and be completed with css style. Making a gradient color in css can be completed as following: [sourcecode language=”css”] <script type="text/css"> .txt { background-image: linear-gradient(bottom, rgb(132,170,193) 15%, rgb(159,204,232) 58%, rgb(191,245,255) 79%); background-image: -o-linear-gradient(bottom, rgb(132,170,193) 15%, rgb(159,204,232) 58%, rgb(191,245,255) 79%); background-image: -moz-linear-gradient(bottom, rgb(132,170,193) 15%, rgb(159,204,232) 58%, rgb(191,245,255) 79%); background-image: -webkit-linear-gradient(bottom,