How to create a Facebook-style Thumbnail Selector using .Net - asp.net-mvc

I'm looking at implementing a Facebook-style thumbnail creator using ASP.Net MVC but haven't a clue where to start.
The feature in question is most easily-recognised when you upload a new profile picture. After uploading the image, you are presented with a frame that you can drag around the image to select the area that will appear as your FB profile thumbnail (for your wall, etc).
I'm picking I'd want to use the jQuery UI framework and take advantage of the Draggable feature, but how do I get the coordinates from the chosen position and how do I pass those to .Net to then use as the basis for creating the thumbnail? Not having much experience at all with image manipulation in .Net (or any other language for that matter), I'm hoping someone will be able to point me to good code samples, tutorials or other general suggestions on how I can achieve what I'm after.

Check this:
jQuery Image Crop Plugin
Crop Image in ASP.NET using JCrop, JQuery

Related

Is Using HTML5 canvas a good idea for Electron.JS?

I want to make an electron app that is similar to scratch in which it uses drag and drop features. I want to make these features using canvas. However, I don't know if this is a good idea as I tried searching it up and never got Electron and HTML5 Canvas in the same sentence.
I'm using canvas for rendering charts in my project and it works correctly. I have been researching a bit and I have not found any better alternative to replace it

Implementing PSD processing in web (like in society6.com)

Is there a Windows server with Photoshop running that process all these templates? It just happens too quickly. How did they achieve that?
I've been looking for the answer for quite a long time and didn't find anything worthy.
A way something like this would be done would be to have an overlay template that you'd place your image under and then all of the shading and such would would go on top of it. Then it's just a mater of rotating and skewing the angle of the picture underneath the overlay to get the right perspective. This can be done programmatically in a language of your choice like PHP, Python, C#, etc.
I believe what you're describing may be achieved using the Adobe Photoshop API. Click on try demo and take a look at the various options, including the Smart Object demo.

How can I cleanly draw on a PDF both statically and dynamically on iOS?

I am currently working on an app where we would like to download a PDF from a remote server and then draw on it. We would like to draw Google Maps pin-like annotations on the PDF (the static draw part). Furthermore, we would like to detect if a user has touched a pin and then draw a calloutBox over this PDF (dynamic draw part). We obviously would like the pdf to be scrollable/zoomable. Does anyone know of a good way to achieve this?
Things I have researched:
1) Render in a UIWebView. This seems like a great solution but its not clear to me how to then implement the draw code on the PDF. I have heard people say create a transparent UIView above the UIWebView for the drawing. This seems to come with its issues, how will it handle zooming and scrolling?
2) Use Quartz 2D and generate my own PDF from the PDF I fetch from the server. As I draw my own PDF content I can draw the static marker pins. Once I have this PDF, I can then shove it in a WebView. The problem with this approach however is I still need to handle the dynamic drawing of the call-out boxes when a user taps on the pin and this then kinda takes me back to problem 1.
You're correct that Apple does not offer much in terms of this issue. There's UIWebView which can preview and show PDF documents, but it's really not suited to adding annotations, and any "solution" with views will be very fragile, if you manage to do it at all. It's meant as a black box to read PDF documents, not for annotating.
You have to go all the way back to CGContextRef and take over the scrolling, zooming and touch handling/drawing yourself. Apple's ZoomingPDFViewer example is a good start.
I have been working on this problem since 2010 and we offer a commercial solution for PDF annotating for iOS, Android and Web called PSPDFKit. We ship a custom renderer which is better and more exact than Apple's CoreGraphics renderer, but the more interesting part is that we can deal with all common PDF annotation types. You can use note annotations to represent your pins and move them around, add notes, interact/override the default tap handling (and e.g. show your own popover when people tap on them). They are also always the same size - so they can be anchored at an exact point in the PDF and then you can zoom in while they stay the same size. The best part is that this is all part of the PDF spec, so they will also work with Apple's Preview app or Adobe Acrobat, so people can save/customize the markup and then everything can be saved in the PDF. The architecture is flexible so you can also simply save everything in a database or sync it back up to your server and simply use it for touch handling.
You can also build that yourself - the basic architecture is a UIScrollView and views that are managed. It quickly gets tricky when you do zooming and have views that need to stay the same size + touch handling and maybe you also want things like multi-select or regular ink drawing. You will also want to add some sort of image caching layer, since rendering PDF documents can be quite slow on mobile devices. Oh, and if you want to make text selectable or implement search, be ready for a rabbit hole that is called the Adobe CMap and CIDFont
Files Specification.

AV Foundation Capture Image

My basic task is to capture a part of an image and then use it. To give you an overview, I am creating an app based on OCR, I allow to user to take a picture using camera. However, rather than processing the entire image, I only want some part of it to be selected and send for processing (Preferably a rectangle). So, to sum it up, I want an overlay to be provided, and I want the image inside that overlay to be further used rather than the entire clicked image.
Now, by my understanding, I realize that AVFoundation is the tool to capture the image, however in my app I have used UIImagePicker. I am totally confused since I am a newbie and not sure hot to proceed ahead. Appreciate all for the help. Thanks again
There is fine open source library for OCR in iOS :
https://github.com/nolanbrown/Tesseract-iPhone-Demo
This will work best if the image resolution is 150 * 150 . For more in formation of other libraries you can also refer the SO question:OCR Lib

Is there a ready made RMagick image editor out there?

I am about to build a basic online image editor for my web application using rails and rmagick. I did a bit of googling but couldn't find any existing solution, however I'd like to be sure before I spend a lot of time rolling my own.
Is anyone aware of a plugin/gem that provides a pre-rolled image editor with undo/redo and minimal image degradation on multiple edits?
Thanks!
I know this exists: Rails Image Editor
http://github.com/heurionconsulting/rails_image_editor/tree/master
It might be too late but I'm building one too. I'm using the Pixastic and Raphael libraries to generate live previews. So people can actually preview the resulting image, without having to wait for the server to process it.
Features are:
Quick fit (make the image instantly fitting a given width, height or width and height)
Crop
Resize
Rotate left and right 90º (animated)
Flip horizontal and/or vertical
Colorize (color picker)
Make warmer (slider)
Make colder (slider)
Make greyscale (one click)
Make sepia (one click)
Glow (slider)
Blur (slider)
Sharpen (slider)
Brightness (slider)
Contrast (slider)
Details:
It is provided as a Rails plugin.
Currently it only works on Paperclip attachments.
Integration is piece of cake (js include and a link in the view, that's it!)
It is displayed as a lightbox-like overlay
All requests are Ajax (so no page reloading)
I skipped RMagick and built a dedicated ImageMagick module for serverside image processing
The whole frontend is based on Q, a javascript toolset providing a slider, color picker, floating windows, growl-like feature, I18n for javascript, decent Cookie management and much more.
configurable with a single YAML file
integrated languages are US English and Dutch
Possible downsides:
Live preview on color correction is not available on IE due to lack of HTML5 canvas support
The Q library is not free for commercial domains (only €49 per domain or €249 for a wildcard version)
This plugin will be available for free next month in Alpha release.

Resources