I am working on a web application using PHP and application consist lots of images.We are also using same image when creating a PDF in our application and users can also download/save from PDF. I am worried that these can easily be taken by unscrupulous individuals. Is there any way to protect these images ? Any suggestion would be appreciable.
Thanks in advance :)
It is absolutely impossible to protect the images that user see.
If you aren't convinced, a simple evidence: you can simply take a screenshot. And voila! Here are your images. Even if you came up with the wittiest solution ever invented.
The only possible ways of securing your images are:
very ugly - adding a watermark
reducing the image size - assuming it's only worthy in hi-quality
Also, keep in mind that even if you came up with cool technology, eventually cooler guy would come down and crack your security. So my advice is, don't try wasting your time on this idea. Instead, try planning better access-to-these-images work model and/or limit the number of valuable images shown to just few.
If the user has access to view the image, they can screen print it. You cannot protect it unless it is behind a login area for instance. You could add a watermark to help deter this but they can still take the image and crop the watermark off.
Related
Let's say I'm making some kind of PHP-based single-page image board that shows 100 small (<10kb) user-uploaded images. The oldest image is deleted from the server as soon as a new image is uploaded. Because the images come and go so rapidly I feel like there's not much of an advantage to caching them. It occurs to me that I could just embed the images as strings directly in the page's HTML, and that would also minimize the number of requests to my server. However, I feel like this must be a "bad thing". I'm wondering what input you knowledgeable folks have? Thank you!
It will be faster as much less connections are used. But you need to ask yourself if one particular user browsing through your site will see those images more than once, if yes than let the Web Server do the rest ( 304 response or similar )
i am developing a cake-php application, under this i want to show powerpoint slideshow for the end user but the condition is that the user can only be able to see the show, not be able to download the slideshow.
Can any one plz suggest the best way to do it.
If the slideshow is based on images you can split each image into 9,16 or more squares and display the tiled image. That way if the user decides to 'Save-as' the image he will get only 1/9, or 1/16-th of the real image. If the slideshow is quite big it will be a pain to put together all the pieces and will discourage the users to try and save the slide.
You can see such implementation here - http://whatismycar.com/info/16540/ - the 4 images below the header are in fancybox and if you try to 'Save-as' one of them you will save only a small tile of the original image.
Hope this helps.
It is impossible prevent downloading images from internet, but you can make it hard for users with this. Also you can hide source html image path with php check it here
While I am no expert on this subject, something worth noting is what Youtube seems to be doing.
Ever notice how the whole video never loads if you pause it?
Upon monitoring the network tab during a video you will see that they are actually making hundreds or even thousands of requests for video segments from their server and most likely using JS to clear the cache of parts you've watched.
^^ this is why going back to an earlier point in the video causes it to stall for a bit while it re-downloads the segment which you wish to see.
At the end of the day, PrtScn will trump all of your efforts because the web browser does not have the privilege to control the keyboard outside of it's own environment.
I'm trying to create a mosaic type script in Javascript and PHP, which makes up a big image with many different images made from small square tiles. The idea was to "fake" the effect by having a background image and laying over the tiles on top of it, and making their opacity 50% or so. This works decently enough, but it definitely doesn't look as good as I want.
My question is, does anyone have any recommendations on alternatives to this method? I know there are definitely ways to do this in Flash, such as the Mario Lemieux mosaic:
http://www.mariomosaic.com/mosaic/
But I would like to avoid flash if possible.
edit: added live example
So I haven't touched the JS layer yet, this has all been server-side stuff. There's no pre-loader or anything really in terms of making it more usable, that will come soon. But here's what I've got so far:
http://www.mtimofiiv.net/mosaic_example/
The little tiny image tiles are created from images uploaded by a user, and they're run through a class I've built to generate them. I used GD2 to make them grayscale so they will absorb the color of the background image better, and I "pixelated" the background image in Photoshop.
If anyone wants to see any part of the code let me know and I'll add it to this post. Also when this project's done I intend to make it available on Github in its entirety for whoever wants to do the same.
Perhaps the fact that your demo HTML is 733KB might dissuade you from this particular approach. I think if you want to do something like this, you really ought to employ the canvas element, and work in some kind of "ajax" loading. That could actually be kind of interesting. However, if you are going to generate this much HTML...you might consider having a client-side script do it, if possible. Just some thoughts...
Gallery - http://schnell.dreamhosters.com/wallpapers.php
The purpose of this gallery is simple - store a lot of wallpapers and sort them by resolution and/or aspect ratio for people to browse and download as they like. There's a few features I've wanted to work in, but I'm not quite sure how best to do them or how to do them at all. The presentation is in HTML 4, CSS, Javascript and jQuery + plugins. The work behind the scenes is done in PHP.
1 - Make the images downloadable without 'Save Image As...'. Right now I'm using a contrivance whereby clicking the Download link in the bottom-right of each image's box opens a new box with instructions telling the user to 'Right Click. Save Image As...'. I'd like to avoid this entirely if possible.
2 - Make the searching and sorting faster and more efficient. Right now all the images are stored in a folder on my webspace and I use a shell command and a lot of fancy filtering in PHP to get the images I want based on the filters (the page number I'm on and the aspect ratio or resolution I chose). I thought of maybe doing something with MySQL, but I haven't quite figured out yet how I'd do that and maintain the structure my page has.
3 - Make the images load faster. There's probably no easy coding solution to this, so this one is more of a 'I wish' than a 'I want to'.
4 - Improve the layout. This one is more subjective and 'artsy' I suppose, but any suggestions would be nice.
5 - An upload system. Give the ability to upload your own wallpapers and maybe include a short description or some tags. I have absolutely no idea how to handle this as I've never worked with uploading of files before. And this also leads to...
6 - A tagging system or some other type of user-made sorting system. Again, no experience here.
Any insight on any of these issues would be great, and feel free to throw in any suggestions of your own.
Send the files with the MIME type "application/octet-stream" to make a browser download rather than display them
It would definitely be better to store information about the images in a database rather than exploring the filesystem
The images really aren't loading slowly for me, so I can't really suggest anything here. If your site gets larger (much larger) you might want to look into CDNs
The layout is OK but it needs some design, it's incredibly plain at the moment. It would also be nice to see more information on the images - what they are of, where they're from, who made them, etc (don't forget: correct copyright attribution)
You probably want to read the PHP handbook section on handling file uploads. To handle description and tags, you'll definitely want a database of some sort.
Also not hard if you have a correctly formed database. If you've never designed a schema before you probably want to learn a little about normalisation and many-to-many relationships to do the tags.
Lastly you didn't ask for it, but it'd be nice if it were possible to have the same image in multiple resolutions (quite common on image sites - think Flickr, Deviantart, etc).
I am developing a web application using php and I need to process thousands of images which are watermarked. How do I remove the watermarked text programmatically from the image and save them?
You can't, this is impossible. That's the point of watermarks.
Visual recognition - as in the case of differentiating a watermark from the rest of an image - is in the domain of artificial intelligence, and it requires A LOT of neural network training.
If you can write a perfect algorithm for this one, you can break any CAPTCHA too. So good luck if you manage to do it! That said, you might be way over your head on this one.
Images with watermarks got them for a reason (Often due to copyright).
Removing them can lead their author to sue you.
That said, you can't do it automatically or/and programaticaly. If you really need to remove them, do it manually and buy Photoshop©
If anyone can remove the watermark of the image by just putting a simple code, then what is the use of firstly putting them on the images? It is of no use if anyone can easily remove it.
It can be removed by image editing by tools like Photoshop etc. But that will make you violate the copyrights law of the image owner. If you really need that image, request the owner via email or something.
Don't try to remove. Try to guess the link without watermark
Ex:
watermarked
http://domain.com/36436/34fdhfh_wtm.jpg
no watermark
http://domain.com/36436/34fdhfh_nwm.jpg
:) of course it is not that simple (depends on the website owner) but somehow there might be a rule though