crop

Edit and crop uploaded image

一个人想着一个人 提交于 2019-12-10 11:42:57
问题 Can you help me to edit this code? function insert_lenses(){ // to get userid $reg=$_SESSION['myusername']; $result_users = mysql_query("SELECT * FROM users WHERE user_name='$reg'"); while($row_users = mysql_fetch_array($result_users)) { $uid=$row_users[id]; } $uploader = $_POST['uploader']; $path = 'photos/'; $image=$_FILES['img_name']; $img_title=$_POST['title']; $img_tag=$_POST['tags']; $img_desc=$_POST['description']; $img_status=$_POST['status']; $lenses_id=$_POST['lenses']; $cam_id=$

Image crop with custom rectangle

孤人 提交于 2019-12-10 11:08:57
问题 I'm creating app for image scan with WIA. But my images has a lot of unused space if scanned document size is not big. I need to crop that unused space like in Paint with Cross cursor and rectangle. How to do that in WPF? Code of image cropping is: private static Image cropImage(Image img, Rectangle cropArea) { Bitmap bmpImage = new Bitmap(img); Bitmap bmpCrop = bmpImage.Clone(cropArea,bmpImage.PixelFormat); return (Image)(bmpCrop); } 回答1: Put the Image control in a Canvas and add an

ImageAreaSelect: preselect biggest thumbnail possible respecting aspectRatio

只愿长相守 提交于 2019-12-10 10:55:01
问题 This is how I first tried: $('#thumbnail').imgAreaSelect({ x1: 5, y1: 5, x2: $('#thumbnail').width(), y2: $('#thumbnail').width()*0.66, aspectRatio: '1:0.66' }); But some of the cropped image stay off the overflow... This seems to make a preselection for most of the image resolutions I tried... var thwidth = $('#thumbnail').width(); var thheight = $('#thumbnail').height(); aspectRatio = 0.66; $('#thumbnail').imgAreaSelect({ x1: 5, y1: 5, x2: thwidth - 80, y2: (thwidth - 80) * aspectRatio,

Typo3 Fluid Image crop of with and height failure

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 00:00:54
问题 Using this code: <f:image src="/uploads/extkey/{image}" alt="" width="115c" height="70c" /> Produces following HTML output: <img src="typo3temp/_processed_/csm_testimage_31f6051846.gif" width="115" height="92" alt=""> The image has a wrong height now and there are white bars at top and bottom. I figured out that "92" comes from its proportion (original image is: 1280 × 1024). I guess if the white bars at top and bottom are cut out the height of 70 will be reached. Any ideas why Typo3 is doing

PHP Memory Limit 25MB Exhausted - File Upload/Crop/Resize

♀尐吖头ヾ 提交于 2019-12-09 23:47:31
问题 I'm using a single image upload/crop/resize script for files up to 10MB. When testing, I set php_ini memory limit to 25M and that is exhausted when uploading a file only about 1.4MB. "Allowed memory size of 26214400 bytes exhausted (tried to allocate 10368 bytes)" This seems strange to me, isn't 10368 < 26214400? (Rhetorical Question) Or does that mean I went 10368 bytes over 25MB? Should my script be using this much memory? Code: function make_thumbnails($updir, $img) { $thumbnail_width =

How to crop a circle shaped image and then set it inside another image?

久未见 提交于 2019-12-09 22:55:31
问题 I'm working on an pet finding app and I need to crop the pet's avatar into a small circle that will later be "merged"/combined with an outline and then passed as a Marker to static google maps. I want to make this on the front-end, because doing this on the back-end would require (if the service expands or grows too much) some more space management for images. This is the outline: The result should look like this: The profile picture might be of any size bigger than the outline, so they will

how to crop image with particular shape in Blackberry?

霸气de小男生 提交于 2019-12-09 18:48:06
问题 Hi all thanks to read my answer hope you can help me I am working on Image cropping in blackberry. In my application contain 3 main things. 1)Load the image on the screen 2)select the shape of the cropping area 3)display that cropping image on next screen with out losing its shape Step1: i can done the image loading part step2: using Menu i just add the 4 types of shapes 1)Circle 2)Rectangle with rounded shape 3)Star 4)Cloud using menu when he click on any menu item ,then that particular

How to crop image after taken from UIImagePicker Camera?

荒凉一梦 提交于 2019-12-09 17:41:03
问题 I'm trying to allow the user to take 16x9 aspect ratio images to look like they are nice HD photos. I'm using the cameraViewOverlay to overlay black bars on both ends, but when the image is taken, how do I crop the top and bottom without resizing or changing the scale of the image? Thanks. 回答1: There are various posts around on how to scale/crop a UIImage you get back from the camera, like this one. It's a little trickier than you'd expect, because camera images are rotated, so you have to

setting wallpaper through code

岁酱吖の 提交于 2019-12-09 07:12:29
问题 I was trying to make an app which also had the facility to let user select wallpaper he would like to set. I have managed this by calling the Gallery Intent. Once the user selects a specific image, the data path of the image is returned to me which then i preview to the user by setting the image onto an imageview. The problem crops up when the image size (and/or resolution) is greater than what android expects. This results in failure of my module. And as if this was not enough, wen the user

CSS clip property - is there an alternative for cropping images?

纵然是瞬间 提交于 2019-12-08 21:42:43
I have an image gallery and I want the thumbnails to be cropped at 150px x 150px. The images aren't square - they are rectangular and all different sizes, so I can't set the width and height to 150px because the images will be all squashed and distorted. I'm wondering what other methods there are to do cropping for thumbnails apart from the CSS clip property. Are there any other CSS solutions or perhaps jQuery scripts? You can use negative margins to achieve this. DEMO <p class="crop"> <a href="http://templatica.com" title="Css Templates"> <img src="http://blogs.sundaymercury.net/weirdscience