Link to home
Start Free TrialLog in
Avatar of mrmut
mrmutFlag for Croatia

asked on

PHP slice image and output embedded in HTML

I am looking for a way to protect images from download. Figured out the simplest solution would be to slice-up large images into a tile, and if anyone is that persistent to get all those together, than I wish him all the luck :-)

I would need a PHP script that will take source image, split it into a tile of, say, 10x10, and output that in a HTML file as a data stream in a table.

script takes -> [INPUTIMAGE] -> divides it to 10x10 pieces -> returns 10x10 table and fills it with pieces

If there is not anything outright finished, some directions how to write my own script are welcome!


Thanks!
Avatar of COBOLdinosaur
COBOLdinosaur
Flag of Canada image

Why do you think slicing it is going to keep someone from taking it.  All they need to do is use a screen capture and then parse it in any graphics program.

In any case if you really want to do the extra work, just use photoshop to create the slices.

Cd&
Avatar of mrmut

ASKER

For thousands of images? It can be done, but I think it isn't worth the while. Light discrepancies could create problem later on, so why not just do everything inside php script?
ASKER CERTIFIED SOLUTION
Avatar of COBOLdinosaur
COBOLdinosaur
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dave Baldwin
I agree with Cd& on this, you're wasting your time.  If you put it on the screen, I can get it and you can't stop me.
Avatar of mrmut

ASKER

Thanks COBOLdinosau, that is the answer.

Re both comments above; if you take big picture in account you are both wrong. First of all, bloat is essentially nonexistent for gzipped HTML with embedded images. Secondly, it is enough of a deterrent. It takes time to get either native or well-croppped webshot. For the webserver load, that is of no importance for rarely run-scripts.
Are you sure?  This took about 15 seconds.
User generated image
Avatar of mrmut

ASKER

Don't you see analog with computer software for which you still have software keys to enter?
I don't know what you mean.
@Dave,
Perhaps a case of Dunning–Kruger so there is no point is trying to educate if there is no desire to learn.

Cd&
Could be.
Avatar of mrmut

ASKER

What I wanted to say that software packs have keys to enter, while you can easily both obtain the software and circumvent the trivial key protection where it serves only as a deterrent. What I am doing is the same, where the idea is to create a deterrent sufficient enough that most of the users won't be able to get to the complete 1:1 high resolution image, without some effort or satisfying themselves with browser-downsampled version. This is one of the methods, several of which should be implemented to achieve some filtering. This would dramatically reduce image stealing occurrence, and would make me easier to hunt down those that do. 3-4 vs hundreds.

Apart from that, I haven't yet had the privilege to be insulted on Experts Exchange, so I will take this opportunity to report you two. - You can take your garbage to newsgroups and free forums, but not on paying site for professionals.
Please do, they know us well.  Somehow, I thought we were the professionals and we don't agree with some of the things you have said.  Like this...
First of all, bloat is essentially nonexistent for gzipped HTML with embedded images.
That is simply wrong.  Images are Not downloaded as part of the HTML,  They are downloaded separately and if you download 100 slices (10x10) instead of one image, that is 99 more file requests than are needed.

I don't know about Cd& but I feel a little insulted that you're not interested in listening to us.
Before I get insulted I just consider the source and decide if I want to get down to a level where I have to ignore all I have learned by working with Firefox code on MDN an debating whether utter nonsense is worth a response. In this case the nonsense is not worthy of any comment.

However "but not on paying site for professionals" does require a response.  Your payment arrangement is with EE, not me.  I volunteer my time on this site.  If you want someone to confirm that your strange ideas are valid my current billing rate is $160 an hour but if you want I can make one of my staff available to tell you how great your ideas are for about half of that.  

BTW, If you want to complain, the easy way to do it is the "request attention" link at the bottom right of your question.


Cd&
Avatar of mrmut

ASKER

@Dave Baldwin - You are wrong. There would be only one request, bar css and scripts. Images would be embedded, as specified in original question.

@COBOLdinosaur - I made that comment mainly with EE in mind. Being a payed service, moderation is excellent, which I expect will kick in here. Re your approach, you can exercise it as much as you wish on those who will/have-to tolerate it.

*I will now respond to this thread anymore.