Note that there are some explanatory texts on larger screens.

plurals
  1. POhow we can achive these functionality on image uploading
    primarykey
    data
    text
    <p>My task is:</p> <p>Step 1a: User uploads the image</p> <p>Input: Original size of image (fixed width variable height) – it can be of any dimension.</p> <p>Limitation:</p> <p>A. TYPE: JPG / BMP / PNG etc</p> <p>B. MAX DIMENSION</p> <p>-example 1024X1024px.</p> <p>Step 1b: After upload, the system checks the criteria matching with our criteria.</p> <p>Criteria : CHECKS MAX DIMENSIONS</p> <p>If Yes:</p> <p>If matches criteria ask user to create thumbnail image of size(145 x 190)</p> <p>If No:</p> <p>Again ask user to re size image until it fits in our criteria</p> <p>Final OUTPUT:</p> <p>2) 145 x 190 (Search result Image)(thumbnail)</p> <p>3) 30% thumbnail</p> <p>4) For profile pic we will define fixed width depending on which height will vary.(width not decided yet)</p> <hr> <p>This Is my task . In these task i am able to achive image upload ,check dimention . But not step wise . please help me to achive this task. I am New in Jquery only have 1 month of experience and this task is very complicated for me.. Hope you understand my Question.</p> <p>My coading is(for checking dimention): html:</p> <pre><code>&lt;input type="file" id="file" /&gt; </code></pre> <p>jQuery:</p> <pre><code>var _URL = window.URL || window.webkitURL; $("#file").change(function(e) { var file, img; if ((file = this.files[0])) { img = new Image(); img.onload = function() { alert(this.width + " " + this.height); }; img.onerror = function() { alert( "not a valid file: " + file.type); }; img.src = _URL.createObjectURL(file); } }); </code></pre> <p>My coading is(for upload image): Html:</p> <p></p> <p>Jquery:</p> <pre><code>function readURL(input) { if (input.files &amp;&amp; input.files[0]) { var reader = new FileReader(); reader.onload = function (e) { $('#blah') .attr('src', e.target.result) .width(thumbWidth) .height(thumbHeight); }; reader.readAsDataURL(input.files[0]); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload