Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

jQuery and a div so user can crop an image?

Featured Replies

I just thought I'd post here to see if there's a more efficient method.

 

I want the user to be able to select a part of an image, then add an effect to it (Sepia, Black & White etc.) and then when they're done I can generate this new, cropped image with the effect.

 

I'm using jQuery UI to have a div that the user can drag and resize on top of the image.

 

I'm also using Pixastic to add the image effects in realtime on modern browsers (older browsers will have a note saying your browser sucks, the effects will be added in the next page)

 

Then using the divs position and size and the selected effect I can crop and apply the effects in PHP on the next page to create the actual image.

 

Is this a sensible way of going about it? I don't want to have to use HTML5 because then I'm waving goodbye to most IE users which isn't really a possibility...

 

Also if anybody could comment on the method I'm using with CSS clip to black out the rest of the image, that'd be helpful.

 

Edit: Link - http://dev.ashleybyrom.co.uk/dragresize/ I'm still playing with it so expect bugs. (If anybody knows how I could fix it so the rest of the image stays blacked out in Chrome when you add an effect that would be nice!) - Doesn't work fully in IE yet either so don't bother going on it in IE yet..

Edited by Ashley Byrom

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.