PNG Document Viewer - javascript

I would like to make an image viewer that can display multiple images in a document format. Basically my web application server right now is sending me an array of base64 png files that I need to display in a viewer that looks like a document. A good example for my requirements would be the following picture:
Also I should be able to animate the pages by rotating them, moving the page from one place to another or deleting a page by either clicking on the thumbnail or scrolling through the page and performing the necessary action. Currently my frontend imageviewer looks like this:
Which is mostly for testing purpose but I would prefer it looks more like the first example Image. Is there any library that can help me with this or any suggestion on how to start about it. Any advice would be grateful!.
Thank you!

Related

Html Image source from scaled down of original image

I'm looking for a way to hide the original image source. For proper example let's think of user profile picture. I don't want anyone to access original high resolution user profile picture. Currently i use but if someone goes to inspect they can access full size profile picture of them. How can i prevent it ?
I thought about that; in register when user upload their profile picture, first it scales down and saved to the related directory. And when using i will call it like But not sure if this is the right approach to the case.
Thanks and regards.
Doing that is impossible with HTML, CSS or JS. Because if Chrome can view the source, so can the user.
Maybe there's a way of doing this with e.g. PHP. But if you would take a look at other social medias you will find that every image or video can be found through the source.

Image Magnifiers and Clickable Content

I'm currently using an application that generates large images for organizational maps, unfortunately the content is quite small due to the volume of data being output. I would like to find a way that allows the user to view segments of the map in an intuitive manner, yet still allow the user to click content inside of the map.
The first thing that came to mind was an image magnifier using something similar to the loupe jQuery plugin. This works great for magnifying the image, but I can't select content once magnified. If anyone has any suggestions for possible solutions to this issue I would greatly appreciate the help.
Thanks!
You might try Etalage: http://frique.me/demos/etalage/ -- if you click on the image, the link works (triggers the javascript alert), almost no other image zoomer seems to do that.
I'm trying to find something that returns the coordinates on a click, so I can ask users to zoom and and find things within a picture, and then I'll have the coordinates to crop the picture to extract the items they've found. But I haven't found a script that does that yet, either.

jQuery Image slider for ASP.net

I want an image slider similar to what is shown in the link below.
http://blog.dreamcss.com/wp-content/uploads/example/
I have customized the script to my needs but I'm not able to find a way to change the image transition effect, rather than moving image from right to left I want image to dissolve & show other image that would make this script really code. I am open to new jQuery based Image Effect Slider/Gallery With similar look. This is the client's request so the design will remain same.
I would appreciate if i can change the image effect or if some one can provide me link for similar image slider.
I have to use this with ASP.Net and possible modify this script to integrated with database using c#
Thanks in Advance..
I use Flex slider http://flex.madebymufffin.com/ , it is very customisable and lightweight and should do what you want
Take a look at these Javascript Image and Photo Galleries. I would recommend using the existing APIs provided by these script libraries using JSON to pass data to the client from the server as opposed to modifying the script -- keeps it simple.
Alternatively, you could look at some of the stuff on CodePlex: Image Gallery if you wanted a server control to use with your solution.

How can you change how pictures load on webpages? (e.g. lower resolution)

how can I change the way an image loads on a web page? I presume using javascript to do this. I'm looking for a way to have the picture load at a lower resolution and then get "sharper". As appose to loading downward, if that makes sense. Facebook does this with their "theater" picture pop-up window.
This is actually due to the way that the image is encoded, namely images that are interlaced will have this effect.
http://en.wikipedia.org/wiki/Interlacing_(bitmaps)
Check to see if your image editing utility has this feature, applications such as photoshop definitely will but something as simple as paint won't.
Sounds to me a lot like progressive loading in jpg images. That's something you have to adjust while creating the image. I'm only familiar with the gimp, there you have to check a checkbox while exporting to jpg. Check out this screenshot.
Another way to achieve this is to initially point the images on the webpage to smaller images and then do some stuff with some jQuery plugin. I'm not sure right now but I think there was one called jQuery.lazyload or sth. like that.
Hope it helps you!
To do this you don't need javascript. It is actually part of how you saved your image. You should make your image with progressive option. It adds a little weight on the image, but it will show parts of image as it is loading.
To do this on Photoshop:
Open your images file
Choose File
Choose Save for Web... option.
On the opened Dialog select jpg
On the upper right corner there are few options. Check 'Progressive' option
You are done!
Now replace your image and all the browser will show that image as they are loading it.

Javascript Image loading Facebook style

so I was browsing through this page: http://360langstrasse.sf.tv/
It basically is a Javascript-Street View, but only allowing one direction. Therefore its kinda like playing a movie.
When moving fast I notived that the images are grainy/pixelated, the same way as when browsing through Facebook.
I was wondering how to implement this?
I tried with sending small base64 encoded images in the markup, and then draw it on a canvas until the 'real' image was loaded.
This worked fine, but left me thinking if this would indeed increase performance, or do sites like facebook do it differently?
Thanks in advance for any help.
Regards Jens
Edit: Or do they only display the images differently? Have another render process than usual?
As I don't see any small images beeing loaded?
Edit 2: The below mentionewd option to load small images first is descriped nicely here: http://www.phpied.com/picassa-progressive-image-rendering/
But basically it is pretty simple.
I suppose caching (having in-page) bad-resolution images and fetching better is a real way to accomplish this.
The other way would be linking to small images in a normal way, and fetching bigger with JS - small images should load really fast, or you can subscribe to their load event (tricky in IE) and show the page (remove some overlay) once they are loaded.
BTW, instead of using canvas you can put base64 directly into src
<img src="data:image/png;base64,...
The answer is Progressive JPEG's!
One create such with imagemagick for example. This way the browser renders progressively until aborted or completed. Those images may be bigger than normal images, but not always.
Furthermore they provide the ability to be seen before completely downloaded.
Thanks for the help!

Categories