Showing posts with label image. Show all posts
Showing posts with label image. Show all posts
Tuesday, January 27, 2015
Responsive image carousel using bootstrap
Hai now a days bootstrap becoming more popular using bootstrap we can easily design our web application and it also provides various custom jQuery plugins. Go to official website of twitter bootstrap to learn the different features of bootstrap. Because of the popularity of bootstrap, im creating horizontal responsive image carousel using bootstrap. Some times image carousel is also called as image slider.
The main feature of this carousel is responsive. Responsive means we can use and view this carousel on different screen sizes. Whenever the screen size changes the carousel size also automatically change according to screen size it is known as responsive. Now way days most of the websites and web applications are responsive because of the increased usage of smart phones, tablets. Lets start our example.


Note: This carousel is based on bootstrap v2.3.2 so please download the exact version of bootstrap and give the correct path of bootstrap.css, bootstrap.min.js and images.
The main feature of this carousel is responsive. Responsive means we can use and view this carousel on different screen sizes. Whenever the screen size changes the carousel size also automatically change according to screen size it is known as responsive. Now way days most of the websites and web applications are responsive because of the increased usage of smart phones, tablets. Lets start our example.
Sample Screenshot


Note: This carousel is based on bootstrap v2.3.2 so please download the exact version of bootstrap and give the correct path of bootstrap.css, bootstrap.min.js and images.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Responsive Image Carousel using Bootstrap</title>
<link href="css/bootstrap.css" rel="stylesheet" type="text/css">
<!-- HTML5 shim for IE backwards compatibility -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js">
</script>
<![endif]-->
</head>
<body>
<div class="carousel slide" id="imageslider">
<div class="carousel-inner">
<div class="item active">
<img src="img/pic1.jpg" alt="One Hour Sand Timer. ">
<div class="carousel-caption">
<h4>Wallpaper 1</h4>
<p>Here we can write caption for images.For ex:-This is wallpaper 1.</p>
</div>
</div>
<div class="item">
<img src="img/pic2.jpg" alt="Half an Hour Sand Timer.">
<div class="carousel-caption">
<h4>Wallpaper 2</h4>
<p>----------This is wallpaper 2.----------</p>
</div>
</div>
<div class="item">
<img src="img/pic3.jpg" alt="1 Min Timer.">
<div class="carousel-caption">
<h4>Wallpaper 3</h4>
<p>----------This is wallpaper 3.----------</p>
</div>
</div>
</div>
<a href="#imageslider" class="left carousel-control" data-slide="prev">‹
</a>
<a href="#imageslider" class="right carousel-control" data-slide="next">›
</a>
</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>
<script src="js/bootstrap.min.js"></script>
<script>
$("#imageslider").carousel({
interval:5000,
cycle:true
});
</script>
</body>
</html>
Saturday, January 17, 2015
KirSizer Flex AIR Image Sizer app Part 5
In this tutorial we will add the ability to choose, whether to select subfolders when selecting a folder, and the ability to remove items from the selection.
Go to the folderSelected() function and use the Alert class to ask the user if they want to select subfolders or not. Give two answer choices - YES or NO. Add a listener which checks the answers and calls doFolder, setting the second parameter to true if the answer was "yes" and to false if it was "no":
In the doFolder() function, add a second parameter - a boolean called isRecursive. Check for its value when youre checking if the child file is a folder in the first loop:
Now, the removing functionality.
Go to the first NavigatorContent and do 2 things: set TileLists selectionColor and rollOverColor property values to red and pink colors (to make sure they stand out), set its allowMultipleSelection value to true, and add a button which will be responsible for removing items.
Set its label to be dynamic and follow the pattern: "Remove <num> items" where <num> is the number of currently selected items (using mouse). Make it enabled only if there are any selected items, and set its click event handler to removeSelected():
In the removeSelected() function we loop through all selectedItems of tileList using a while loop, and remove the items one by one using selectedIndices property of tileList. Then we update the total file count:
Thanks for reading!
Go to the folderSelected() function and use the Alert class to ask the user if they want to select subfolders or not. Give two answer choices - YES or NO. Add a listener which checks the answers and calls doFolder, setting the second parameter to true if the answer was "yes" and to false if it was "no":
private function folderSelected(evt:Event):void {
var file:File = evt.currentTarget as File;
Alert.show("Do you want to select subfolders too?", "Recursive selection?", Alert.YES | Alert.NO, null, warningClose);
function warningClose(ev:CloseEvent):void {
if (ev.detail == Alert.YES) {
doFolder(file, true);
}
if (ev.detail == Alert.NO) {
doFolder(file, false);
}
}
}
In the doFolder() function, add a second parameter - a boolean called isRecursive. Check for its value when youre checking if the child file is a folder in the first loop:
private function doFolder(file:File, isRecursive:Boolean):void {
var picturesInFolder:int = 0;
var childFiles:Array = file.getDirectoryListing();
for (var i:int = 0; i < childFiles.length; i++) {
if (childFiles[i].extension == "png" || childFiles[i].extension == "jpg" || childFiles[i].extension == "jpeg") {
picturesInFolder++;
}
if (childFiles[i].isDirectory && isRecursive) {
doFolder(childFiles[i], true);
}
}
if (picturesInFolder > 0) {
var alreadySelected:Boolean = false;
for (var a:int = 0; a < selectedFiles.length; a++) {
if (selectedFiles[a].type == 1 && selectedFiles[a].path == file.nativePath) {
alreadySelected = true;
}
}
if (!alreadySelected) selectedFiles.addItem( { type:1, path:file.nativePath, name:file.name, num:picturesInFolder } );
updateTotalFiles();
}
}
Now, the removing functionality.
Go to the first NavigatorContent and do 2 things: set TileLists selectionColor and rollOverColor property values to red and pink colors (to make sure they stand out), set its allowMultipleSelection value to true, and add a button which will be responsible for removing items.
Set its label to be dynamic and follow the pattern: "Remove <num> items" where <num> is the number of currently selected items (using mouse). Make it enabled only if there are any selected items, and set its click event handler to removeSelected():
<s:NavigatorContent width="100%" height="100%" hideEffect="fadeOut" showEffect="fadeIn">
<s:VGroup width="100%" height="100%" paddingLeft="10" paddingTop="10" paddingRight="10" paddingBottom="10">
<s:Label id="labelSelected">0 files selected</s:Label>
<mx:TileList id="tileList" width="282" height="100%" dataProvider="{selectedFiles}" itemRenderer="TileRenderer" columnWidth="60" rowHeight="60" columnCount="4" allowMultipleSelection="true" selectionColor="0xff0000" rollOverColor="0xff8888" />
<s:Button label="Add folder" width="100%" click="addFolder();" />
<s:Button label="Add files" width="100%" click="addFiles();" />
<s:Button label="{Remove + tileList.selectedItems.length + items}" width="100%" enabled="{tileList.selectedItems.length>0}" click="removeSelected();" />
<s:Button label="Continue" width="100%" click="contentStack.selectedIndex = 1;" />
</s:VGroup>
</s:NavigatorContent>
In the removeSelected() function we loop through all selectedItems of tileList using a while loop, and remove the items one by one using selectedIndices property of tileList. Then we update the total file count:
private function removeSelected():void {
while (tileList.selectedItems.length > 0) {
selectedFiles.removeItemAt(tileList.selectedIndices[0]);
}
updateTotalFiles();
}
Thanks for reading!
Tuesday, January 13, 2015
Convert Image into Icon Online!
Creating icons is somewhat difficult task. The giant photo editing tool I mean Adobe Photoshop has no option to convert an image into icon. Even the graphics master Adobe Illustrator doesnt have any icon format save option. But there are some converters which can convert image into icon. And most of these tools are premium. In Marks PC Solution, I hardly discuss about premium tools. :)
What is Icon?
Icon is a special type of image format. And normally its not used to share photos or images. Usually icons are used in folder or hard disk drive to distinguish it from others. And normally icon is small in size. It maybe 16x16, 32x32 or 64x64.
Do you remember, In 2012, I wrote a post about Showing Picture on USB Flash Drive. And that custom picture must be an icon. That means the picture format must be .ico in order to show in USB drive.
Show Custom Picture on Pen Drive
iConvert Icons: Convert Icons Online for Free!
This is a free online tool. This site allows you to create icon online. Though this site offers premium offline version of icon converter, but Im happy with the free online version! Hit on the image below to start-
To convert an image into icon, hit on the above image or directly follow this URL. And then you can easily create icons.
- Hit on the Browse button to locate your image from Hard Disk.
- Now choose image from your PC and hit on the Convert button.
- And believe me, with a single click you will get icons for Windows, Mac and Linux!
All the three icon format .ico, .icns and .png will be available to download. Hit on the download button which you like.
Before converting an image, hit on the Options button to choose what format do you need. And what will be the size. Tick mark the options.
Supported Formats:
iConvert supports the following file types:
| .icns | .ico | .svg | .gif | .png | .tif |
| .tga | .cur | .bmp | .jpg | .xpm | .rsrc |
Drag n Drop Feature:
If you are bored with browsing and choosing the image from your hard disk then you dont need to be upset. iConvert has drag and drop option too!
Drag and Convert
Go to the above link. Drag an image or icon into the following area of that page. Within few seconds, your image will be uploaded and converted.
After finishing the conversions you will get your image in the following icon formats.
Hit on the format that you wanna download. Or you can download all format icons if you need. Remember-
- ICO is for Windows
- ICNS for Mac
- PNG for Linux
Hope this will be helpful for you. To get more tips, please visit our Tips n Tricks Page.
Stay with Marks PC Solution to get more interesting IT topics!
Monday, January 12, 2015
Twist Image by Liquify Effect

By default, Adobe Photoshop contains numerous attractive effects/ filters. And you can also add third party filters if you want. Today I will show the use of liquify filter which can be used to twist an image or object. And its really a useful tool when you need to distort the photos of your friends! You can make their faces bizarre! :)
Im using Photoshop CS5 Extended Version. Hopefully the commands and options will be almost same with other versions of Photoshop. Lets start -

Im using Photoshop CS5 Extended Version. Hopefully the commands and options will be almost same with other versions of Photoshop. Lets start -
- Run Photoshop and open an image from your hard disk.
- Now go to the Filter Menu and choose Liquify (Shift+Ctrl+X).
- Now your image will be opened in a new window.
- Mouse pointer will take the form of a plus sign with circle.
- Hit and move the pointer over the image.
- Rotate and twist the image as your wish.
- If youre done press OK. Or if you wanna cancel, hit the Cancel button or press Esc.
There are some additional options too! Look at the tools panel of liquify filter -
By default, youre getting the first tool selected. You can also try the other tools. They will produce a completely different result.
You may need to adjust the brush size. Press and hold the right bracket ] to increase the brush size. And press and hold down the left bracket [ to decrease the brush size.
Also try the Tool options from the right panel. Here you can change the Brush Size, Density, Pressure etc. Hit OK to save your changes to the image. Or press cancel if you dont like to distort the image.
And dont forget to try the other commands of Filter menu. These are really cool!
Hope youve enjoyed this post. If you have any query please leave a comment . . .
Stay with Marks PC Solution to get more interesting IT topics!
Subscribe to:
Posts (Atom)