Click here to Skip to main content
14,695,406 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi friends,
I am working on image cropping facility.

I have a image box in which an image is coming.
What i want,
1- giving cropping facility.
2- image re-sizing facility or zoom in or zoom out facilty.

Something like facebook time line in which we can upload and then fit image on that box after drag up or down,

I am searching since long but haven't find anything related this.
If any of you have any idea or any suggestion how i could create this then please share with me.


var $ = jQuery;
var i = $("#name1").val();
src: "sdf.jpeg", 
update_on_resize: false,
                       zoom_animation: false,
                       mousewheel: false,
                       onMouseMove: function(ev, coords) { },
                       onStartDrag: function(ev, coords) { return false; }, //this image will not be dragged
                       onDrag: function(ev, coords) { }
                   $("#in").click(function(){ iv1.iviewer('zoom_by', 1); }); 
                   $("#out").click(function(){ iv1.iviewer('zoom_by', -1); }); 
                   $("#fit").click(function(){ iv1.iviewer('fit'); }); 
                   $("#orig").click(function(){ iv1.iviewer('set_zoom', 100); }); 
                   $("#update").click(function(){ iv1.iviewer('update_container_info'); });
                  var iviewer = {};
      var i = $("#name1").val();
                      src: 'pic/'+i,
                      initCallback: function()
                        iviewer = this;
                    return false;

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900