Android Get Width And Height Of Image From Resource

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 =

Read More

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

Read More

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

Read More

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

Read More

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”/>

Read More

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,

Read More