crop

disable cropping featured image in wordpress [closed]

安稳与你 提交于 2019-12-13 00:34:02
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . I am using featured image as a post image but on uploading a image it crops while setting it as featured image, i dnt find any solution for it, Can any one help? Wordpress Admin panel screenshot: - This image is

Resize UIImage's canvas and fill the empty place with color?

≡放荡痞女 提交于 2019-12-12 19:25:11
问题 In simple words I want to "revert" the crop operation. In crop you choose a rect and cut the image to the specified rect. In my case I need to do the opposite thing - to add empty space around the image and fill it with color. Note - image may have transparent background so I can't just draw one image over another image. All the input data (rects and image) I already have. How to solve this task? 回答1: Basic process: Create a solid-color UIImage Get a CGContext Clear a rect in the center of

Permission Denial: writing android.support.v4.content.FileProvider uri

早过忘川 提交于 2019-12-12 18:54:42
问题 Good day.I have an weird issue to which none of examples in stack overflow has worked.I am opening an gallery,after which i am redirecting user to crop intent.Important to mention that this only happens on android N and not below devices.The issue is that this exception is thrown as soon as the crop is done..I dont know what causes this,but actually here is how i start crop intent. Intent cropIntent = new Intent("com.android.camera.action.CROP"); cropIntent.addFlags(Intent.FLAG_GRANT_WRITE

Swift: Square video composition

ぐ巨炮叔叔 提交于 2019-12-12 14:37:58
问题 I am following the below code for square video composition func completeWithVideoAtURL(input: NSURL) { let asset = AVAsset(url: input as URL) let output = NSURL(fileURLWithPath: NSHomeDirectory() + "/Documents/Video.mp4") let session = AVAssetExportSession(asset: asset, presetName: AVAssetExportPresetMediumQuality)! session.videoComposition = self.squareVideoCompositionForAsset(asset: asset) session.outputURL = output as URL session.outputFileType = AVFileTypeMPEG4 session

Thin white lines being added when cropping an image (Objective-C OSX)

回眸只為那壹抹淺笑 提交于 2019-12-12 11:35:32
问题 I am cutting up a large image and saving it into many different images. I first implemented this in iOS and it is working fine, but when I try and port the code to OSX , a thin white line (1 pixel) appears on the top and right of the image. The line is not pure white, or solid (see sample below). Here is the iOS code to make one sub-image, that works like a champ: -(void)testMethod:(int)page forRect:(CGRect)rect{ NSString *filePath = @"imageName"; NSData *data = [HeavyResourceManager

Imagecrop without saving the image

做~自己de王妃 提交于 2019-12-12 11:03:21
问题 I have a bunch of product preview images , but they are not the same dimensions . So i wonder, is it possible to crop an image on the go, without saving it? These two links should show what i mean: http://xn--nstvedhandel-6cb.dk/alpha_1/?side=vis_annonce&id=12 http://xn--nstvedhandel-6cb.dk/alpha_1/?side=vis_annonce&id=13 回答1: Yes it's possible here's how i do it: //Your Image $imgSrc = "image.jpg"; list($width, $height) = getimagesize($imgSrc); $myImage = imagecreatefromjpeg($imgSrc); //

How to crop an image while uploading?

孤街浪徒 提交于 2019-12-12 09:47:40
问题 I am doing an social networking project ,where i have an option to add/edit photos ,When user clicks the button the image will be uploaded to the database and it will be updated...is it possible to crop the image before it is saved to the database. 回答1: simply call this function ..with param source ,destination and size what u want :) function cropImage($source,$dest,$whsize) { $size = getimagesize($source); $w = $size[0]; $h = $size[1]; $xratio=$w/$whsize; $yratio=$h/$whsize; if($xratio >

Cropping image in iPhone

时光怂恿深爱的人放手 提交于 2019-12-12 09:26:12
问题 I like to crop a image in UIImageView. Can you provide me the full source code that will helpful for me. 回答1: It may help You UIImage* whole = [UIImage imageNamed:@"whole.jpg"]; //I know this image is 300x300 CGImageRef cgImg = CGImageCreateWithImageInRect(whole.CGImage, CGRectMake(x, y, 100, 100)); UIImage* part = [UIImage imageWithCGImage:cgImg]; UIImageView* Croppedimage = [[UIImageView alloc] initWithImage:part]; and Below is the link more-usefull how to crop image in to pieces

capture image from camera and crop not working

风流意气都作罢 提交于 2019-12-12 06:57:21
问题 here is my camera intent. File file = getExternalFilesDir(Environment.DIRECTORY_DCIM); file.mkdirs(); File output = new File(file, "profile_image"); if (output.exists()) { output.delete(); } Intent captureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); captureIntent.putExtra(MediaStore.EXTRA_OUTPUT, output); startActivityForResult(captureIntent, PublicValues.IMAGE_FROM_CAMERA); in onActivityresult if (requestCode == PublicValues.IMAGE_FROM_CAMERA) { if (mPhotoUri != null) { performCrop

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