Saving thumb nail preview with JCrop, JQuery and asp.net - asp.net

I've been dabbling with JCrop and I can get it working so far as uploading an image, selecting a region and then saving what I've selected to a cropped version of the original image. I can also get the thumbnail preview working, so that whatever I've selected (however big or small fits into a 150px*150px region)..so far all good.
The only problem I'm having now is saving what is in the thumbnail preview which is 150*150 and as mentioned contains whatever I have selected...
I've had a good look around on google and can't see anything to save the thumbmail preview..
Anyone come across this before?

Ok bascially what I'm doing is saving the cropped image and then saving it again but resizing it to whatever dimensions are in the preview pane....I'm not sure it gives me the an exact replica of what's in the preview pane in terms of quality but it's not so bad I guess.

Related

Needing guidance on image preview for wordpress

Hey guys I am needing some guidance on what this kind of image feature is called. I tried googling around but cant seem to find the correct name of the image feature. Its where there a bunch of small images surround a bigger image and when a smaller image is selected or hovered over then it will be shown on the bigger image place as seen here.
I am trying to add this feature into a clients website in wordpress but dont know the correct term to look for or if a plugin exists that allows me to do this sort of thing in wordpress.
Thank you all for your time!

How to handle image content display in responsive website?

I'm working in a project of building a responsive website. The painful thing we're having is to deal with the content of the image in different display modes. Please be noted: the image content.
The thing is: in almost pages at PC view, the images are displayed in landscape, with great ratio between width and height. Now when bringing them to mobile view, we have to display it in a different frame. And as you might imagine, now the content of the image was scaled and cropped and then exported to some very weird images on mobile view. Like a wide picture with people are almost in left side, but after being cropped there are only non-sense objects in the picture left.
IMHO, via technical solutions we are only processing the technical attributes of the image (resizing, scaling), we are unable to deal with the image content, that's really a human matter, right?
I'm thinking about 4 solutions:
1 - Despite the customer feelings, we just scale the picture (keep
all content, just resizing it). The output sometimes will be very
ridiculous I guess because of resizing a landscape picture to a
portrait or square one. But that's mostly the easiest way to come up.
2 - Considering to image frame size on mobile view, and auto crop the
picture by picking the center area of the picture. As I said above,
it produced the non-sense picture after all.
3 - Informing customer, whenever they upload a picture, they have to upload 2 copies of it, 1 for desktop view and 1 for mobile view, and they're definitely responsible for the content displaying at front side. Tons of effort need to be spent by customers, but easier for development.
4 - Advanced feature: user can upload only 1 picture, we provide the
different view-ports and a cropper for them to decide how the image
displays on those after being cropped.
I don't have much experience in dealing with these stuff, and not sure how the world out there handling this case. As I see for now Wordpress is only requiring users to upload only 1 picture and it will automatically scale it (my 1st option). Does anyone have experience on this? Can you please share me your solutions and also your thoughts about my above solutions? Thank you.
you can build a simple web application for them to upload the picture and provide your client with a preview of how the pictures with look like for both desktop and mobile. in php, there is the GD library and it is quite easy to use for cropping and resizing.
Apply the 4th and the 1st option so you don't have to deal with it,
Crop and scale with the options you have AND let the customer decide if they want to change it and choose how the image is been displayed.
in case they ask you can say they have the option to fix it, in case they don't want to you already handle the best technological option.

Instant article and repeating image

I received this general warming:
General Warnings: Repeating Cover Image and First Image: The cover image and the image '9iememaison.quebec_v1xi5heeg9_8dqdz.png' seem to be the same or almost the same image. Please consider removing or replacing one of the images.
So I dug into the internet and I found nothing - except this:
https://wordpress.org/support/topic/same-image-displayed-twice
"I performed the preg replace on function "get_the_content()" of "class-instant-articles-post.php" just before returning the variable $this->_content;"
But my problem is that my cover image and first image are the same. How do I either remove the cover image, or rename the first image in a way like WordPress and instant article thing? It's an other image but at the moment it's the same image, because my feature image on my website and the thumbnail generate and image use in post are all the same. I don't use different image, so the best way is maybe like making a WordPress function that:
Copies the image
Renames the image
Puts that link in the post and if image is update then this image also.
Or maybe I'm just going to deep and there is an easier way to fix this.I didn't find it after checking all the instant article wp support, and looking through the web.
The best way to solve this, if you often have this situation, is probably to disable the Cover Image entirely by hooking into the plugin.
This can apply even if the error/warning doesn't show. I have found it doesn't show a warning when the images are pretty much exactly the same, which is strange, only when they are very different in size but same content/name.
Haven't found a solution for disabling Cover Image. Will hopefully update this if I end up having to create one.
Here's another relevant thread:
https://wordpress.org/support/topic/general-warningrepeating-cover-image-and-first-image/#post-8731646
and a very relevant github ticket:
https://github.com/Automattic/facebook-instant-articles-wp/issues/57

"Unable to find image named XXX on watch" when I use image cache

I use - (BOOL)addCachedImage:(UIImage *)image name:(NSString *)name API of WKInterfaceDevice to store images.
The issue is that most of the time, when I try to use those cached image by using setImageNamed: on WKInterfaceImage, I get this Unable to find image named XXX on watch error that results in an empty image on screen.
I insist on the fact that this does NOT happen all the time.
This occurs both on simulator and on device.
Go to Assets.xcassets in the Project Navigator on the left sidebar in XCode.
There choose the image that is not found.
For me it worked as soon as I had the image placed in the "2x" placeholder.
If you just import the images they are placed in the 1x spot, but the Apple Watches seem to need at least the 2x resolution. Just optimize your images and it will all work seamlessly.
I figured out that image names that are too long (character count > 255) lead to the bug. As soon as the image name used to cache the image is shorter, I don't get the error anymore.
Seems like an Xcode bug, I am facing this issue in Xcode 7 beta 4 but not in beta 2. I researched and experimented many things including various suggestions, and it turns out that if the images are set at Universal they are not getting picked up (http://iphone.tagsstack.com/unable_to_find_image_named_ldquo_xxrdquo_on_iwatch_error). However, if you select them separately for each of the watch size, they will show up and the issue is resolved.

Images appear like they are CMYK when uploaded to web. However, they are RGB

I have worked with images/Photoshop for a long time and have never had this problem. Basically, I tried uploading a few images to WordPress and they appear like this:
As you can see, the one highlighted in green turns out fine. However, the other two for some reason come out looking like they are in CMYK mode. The images are RGB and saved for web so I'm not sure what the problem might be. Can anyone help me make sense of this?
Here is the file for one of the images that come out wrong (which is strange because it comes out fine here, maybe it's a strictly WordPress issue?):
I think your comment about CMYK is a red herring. Looking at your screen shot, it appears you may have inadvertently selected the images in the window; your browser has highlighted them to show this, which gives them a slight blue overlay. Try simply reloading the page and opening that window again and see if the issue goes away.
Ive had strange things happen from images that appeared ok in windows photo viewer but when loaded into adobe fireworks the colours go wrong in a similar way.
Im assuming that the pictures display incorrectly on the 'front end' of Wordpress too, therefore i think its some weird .jpg format issue.
If you have just a few images maybe worth manually screen grab and edit screen grab if you have a viewer that works, then save out and try to re-upload to wordpress.
Or batch process the files into a different format, say bump and use a wordpress plugin like insanity that has the option to automatically convert to .jpg, to in effect clean or at least change the image format on upload.
I had the same issue- If you delete the image from wordpress, change the size of the image file to something closer to the size of the page width, that might work. It worked for me. I can't explain why that happens, but it does!

Resources