resize-crop

Remove specific class after this jquery plugin load

北城余情 提交于 2020-02-08 06:57:05
问题 I am trying to remove .lazy-hidden class from element(image). I have simple jquery plugin given below that can resize and crop the image to correct size by tweaking the image url. So it call re-sizing function after LazyloadXT loding of image. Problem is Image has loaded and croped, But unable to remove .lazy-hidden class from element and it's opacity=0 . Fiddle >> Crop Js: $.extend($.lazyLoadXT, { onload: myfunc }); function myfunc() { var w = 200; var h = 150; $('.crop').find('img').each

Crop an image from gallery in android

戏子无情 提交于 2019-12-23 03:18:10
问题 I want to crop an image in my application when it is selected from gallery.My cropping code work from the simulator but not properly work on phones. I set outputX=400 and outputY =487. In my simulator i get the output bitmap with 400 x 487 resolution,but when i cropped the image from phone gallery i get the output bitmap with 145 x 177 resolution. Why does it happen? My code for cropping is given below Intent intent = new Intent("com.android.camera.action.CROP"); intent.setType("image/*");

Xaml, wpf image position and crop issue

无人久伴 提交于 2019-12-13 16:36:01
问题 I have images of 600px width and 600px height. we have three sizes of circles. all have the center in the middle. Some have reflection as shadow beneath it. I would like to crop the image for display purposes. So the largest circle as shown above has a diameter of about 500 pixels, but the medium and small ones have less. I know in the code which size I have of object type Product . Because of the size differences I have to place them differently and used three placeholder images for it, like

Crop image to correct size by tweaking the image url

拟墨画扇 提交于 2019-12-12 06:35:48
问题 I am trying to crop Lazyload image to correct size. So i have simple jquery plugin given below that can resize and crop the image to correct size by tweaking the image url. This jQuery code automatically crop the image to the correct size. But when i use Lazyload plugin for load image the script not able to crop image. JS: var w = 200; var h = 150; $('#crop').find('img').each(function(n, image){ var image = $(image); image.attr({src : image.attr('src').replace(/s\B\d{2,4}/,'s' + w + '-h' + h

Android cropped image quality issue

狂风中的少年 提交于 2019-12-11 14:48:32
问题 I am trying to save an image as cropped from android and then show it in my app. I am using the code below, but when I try to view the image in my app the image quality is not good as in the attached image. Am doing anything wrong? Any help would be great. My code is: dipToPixel = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 1, getResources().getDisplayMetrics()); public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode,

Crop an image from gallery in android

☆樱花仙子☆ 提交于 2019-12-06 16:04:38
I want to crop an image in my application when it is selected from gallery.My cropping code work from the simulator but not properly work on phones. I set outputX=400 and outputY =487. In my simulator i get the output bitmap with 400 x 487 resolution,but when i cropped the image from phone gallery i get the output bitmap with 145 x 177 resolution. Why does it happen? My code for cropping is given below Intent intent = new Intent("com.android.camera.action.CROP"); intent.setType("image/*"); intent.setAction(Intent.ACTION_GET_CONTENT); intent.putExtra("crop", "true"); intent.putExtra("aspectX",

Crop image to square - Android

寵の児 提交于 2019-12-04 17:04:10
问题 How can I cut rectangular image (600 x 300) from left and right to fit in square ImageView ? I don't want to resize image, I just want to crop it, to be 300 x 300. [SOLUTION] As @blackbelt said Bitmap cropImg = Bitmap.createBitmap(src, startX, startY, dstWidth, dstHeight); is great for cropping images. So how can you automatically crop images with different sizes. I create this simple code for that: // From drawable Bitmap src= BitmapFactory.decodeResource(context.getResources(), R.drawable

Clip an image in a specific shape .NET

隐身守侯 提交于 2019-12-02 19:14:32
问题 I have a page in my MVC4 project where user can add its company logo using the file upload control. These images/logos are then shown on map in mobile application. We need to crop these images so that they can look like a Flag. We need to take only the part of image inside the flag frame and leave the rest. Can it be done using code in C#? If yes, how it can be done. Please help me with some code samples and links. I need to show a flag frame over the uploaded image, so that user can adjust

Clip an image in a specific shape .NET

拥有回忆 提交于 2019-12-02 09:27:25
I have a page in my MVC4 project where user can add its company logo using the file upload control. These images/logos are then shown on map in mobile application. We need to crop these images so that they can look like a Flag. We need to take only the part of image inside the flag frame and leave the rest. Can it be done using code in C#? If yes, how it can be done. Please help me with some code samples and links. I need to show a flag frame over the uploaded image, so that user can adjust its image in that frame, what it wants to be in the frame. Please suggest me with some APIs and code

Crop a diagonal area from an image in WPF

≯℡__Kan透↙ 提交于 2019-12-01 13:45:58
I want to crop from an image using user-drawn rectangles on a canvas. The rectangles can be moved, re-sized, and rotated. When the user selects "Get Cropped Image", the area inside the rectangle should be saved in a second image location on the page, which I can do perfectly well, so long as the rectangle is not rotated. (Straight-forward use of CroppedBitmap.) However, when the rectangle is at an angle I do not know how to perform the crop. This is what I want to do (forgive my poor MS Paint skills): My questions are: 1) How do I correctly track or calculate the points of the rectangle? and,