Stop an iPad from being able to copy images - c#

I am creating a photography website so I have stopped browsers on PC/Macs from being able to download the image. When I viewed the site on an iPad, I was able to copy the image. Is there a way of stopping this from happening?

You're fighting for a lost cause here: You can't win. It's a bit like the classic DRM/data encryption issue: If you want to use it, you have to decrypt it. If you can decrypt it, it's no longer protected.
You can avoid users being able to hot-link images (which still can be faked/circumvented) and you can try to make it harder to download images with standard tools (like the browser's context menu), but in general you just can't avoid it, because you don't have control over the client.
What you can do - which will make downloading a bit harder without screwing with basic functionality etc. - is not using <img/> but rather a <div/> with the image set as its background-image.
But if you really care about your own images, I'd do the following rather than trying to screw with users just appreciating your work (they might want to set a nice picture as their desktop background, which might even get them to tell others about your site):
Add a small watermark to your images, like a signature line or provide only limited resolutions. You can offer higher quality/non-watermarked copies upon request (or link some printing service).
Invite people liking your pictures to download them for private, non-commercial use.
Offer them an easy way to contact you in case they want to use the images for something else.
Add social network buttons for an easy way for visitors to show their friends your work. They don't have to copy anything if they can just link the stuff the easy way - plus this will net you some more traffic for free!
There are reasons sites allowing people to share their photographs, artworks, etc. (deviantART, instagram, etc.) are so popular: People like to use them, they appreciate the involved work, etc.
And don't forget: Just because you don't "protect" your content with some nasty tricks doesn't mean you don't own the rights or aren't any longer allowed to fight others abusing it. You can still legally fight against others violating your copyright or other rights, even if you offer it for download for free (unless you give them proper permission, e.g. with some creative commons license).

Related

Is there a way to capture a view and save it?

We have many element(s) in a ContentPage. The goal is to take a picture of a specific element and then have access to that data - to save it or possibly other things such as cropping it.
So this question is twofold - is there a way to photographically capture a given element? Is there a way to do this if the element is not fully in view? Example a ScrollView would potentially have some of its elements not currently in view.
Our attempt at this is to use device specific screenshots and crop them to a given element. The screenshots are working, but we aren't having luck with cropping. Not to mention in the case as described above the screenshot will not work as the view isn't fully visible.
Is there a way to obtain the "graphical" (photo) data of an element at a given time even if it's not currently visible/partially visible?
Thanks for reading in advance.
After a lot of talking, this is what I understand
The Users of your application are the Workers of Your company
The application is for managing the accounts of your companies Customers
The Customers have no access to their data, in any shape or form
Part of the Customer Data is their Email Adress
You want to send a copy of their Data to the Customers
As Emails do not allow formating that well, you want to send that Data as a Screenshot of the UI.
If I got all that right:
You are neck-deep in a XY Problem. Or rather a ((XY)Y)Y Problem - a XY problem of the 3rd Generation.
The obvious solution would be to fix point 3 and give your customers access to their Data already:
You can do that via a extra Programm, App, a Webpage or anything similar. If they can receive emails, they can download a app or open a Webpage and see their data there. May need a login, but nothing special. There are even ways to encode data/direct links into Emails and register your Programm with a custom Format. Indeed, that is how Steam Links on the Desktop work.
Meanwhile the In-House user get a "Customer Management" Programm that allows more direct access to the Customers Data in the Database (I asume you got a backend Database. But it is at least possible you do not).
If you can not fix Option 3 for stupid Boss/Legal Reasons (these are the only Valid reasons I can Imagine. And I can not stress enoug how stupid the boss would have to be in that), you should at least be able to fix at Point 5/6:
The first Option would be to send Text Emails. People often underestimate jsut how much is possible with pure Text. It is basically like writing on a Console, but even that is enough medium to make a Art in it.
The other ways involve Managing the HTML limitations:
Save HTML Mail
The main security issue with HTML mails, is "downloading external content" part. Those operations can not be reliable scanned by Virus scanners and the like - especially in the age of HTTPS. Unless we talk about Kaspersky and the stupid Idea they had.
And even if they can be scanned reliable, even just the request of those files can be used for spam senders to verify the Email Adress is still in use. So it is a no-go too.
So you will need to Inline as much as possible. Inlining images is not that possible. While HTML totally has a Standart for that - you Base64 encode the binary into the HTML - this does not work reliably. At least Microsoft Outlook is known to interpret all Base64 images in the Email as Attachments - even the inlined ones. And even if they fixed this or it is no longer a relevant issue, inlining images tends to increase the HTML size significantly.
You can use CSS to some degree. But aside from inlining it, you might have to go back a step or two. In the end, Email Programms are really weak web-browsers. So they do not nessesarily support all the latest stuff instantly. Anything below CSS 3.0 should reliably work by now. But you better ask someone once you got more specific Requirements for this Email.
PDF Attachment
Somewhat more established is to create a .PDF file and send it. All those bills/other stuff in .PDF format you get - those have been created on demand from a Database, by the same code that also send the Email. In many cases the demand was automated too or the Sending Programm was a outright Background Process.
.PDF allows all Formating you could want. It can take up images inline. And there is plenty of ways to create .PDF from code. And as you can send it as a attachment, the Virus scanner has time to go over it. And we are not in the last Millenium, where a PDF Reader was a uncommon programm to have installed (I still remember the times when a current Version of Acrobat PDf Reader was delivered on every CD with a .PDF Format Handbook).
If you are stil dead serious about the whole "make a Image of the UI to send that", my only question is: How many Years have been aloted for that?

get HTML page sources from multiple sites

There several websites that use AJAX to update the contents periodically and I would like to monitor them. That's why it is necessary to keep multiple webpage windows always open and to grab page sources periodically.
I am searching for an approach for getting HTML sources from these webpages! Could you recommend something? I need it for statistical analysis.
Here are my thoughts so far:
approach. Opening separate Chrome windows manually. Using Handles to find the window. The problem is that it is nearly impossible to grab the HTML of the webpage.. (except the rich text)
Approach. writing an extension for Chrome/Firefox and a C# program. Program will send requests to extension and the extension will return HTML contents of the webpage. That's the theory. Google didn't put my hopes high so I am not sure if that is possible...
Approach. The most realistic one. Using the embed browser such as CefSharp, Awesomium, etc.. But as I mentioned - they have to support multiple opened windows! Any problems here?
So, these are my thought after hours of study..
Personally I would love to implement approach 2 because it is the most awesome.. but others will do too. What would be the easiest and most bulletproof?
Additionaly I would love a feature to do some input operations in these windows. ex: Login/navigate.
If IE browser is an option, look at implementing a managed add-on that will allow you to hook into notifications when document is loaded, access to live DOM of the document, possibly notifications when DOM changes, and so on. The same can be done in FF/Chrome. With IE, look into IObjectWithSite COM interface. This article seems to be a decent tutorial, though I'm not vouching for its accuracy.

Creating winforms help file

I'm looking to create a indexable help file for a winforms app, but how do you get started?
The Microsoft MSDN is rubbish, it says "create a new project" but doesn't specify which type to create.
How do I go about creating a help file for my applications?
Are you looking for this
Integrating "Help" into WinForms Application?
Maybe this doesn't count as a real answer:
I would vote against those help files. 5-6 years back we had real context sensitive help files on a per-dialog-basis in our applications, and it was a lot of effort to maintain those.
Therefore, we changed this to shipping "simple" PDF files that appear on F1. We never got any complaints from users.
Recently we started migrating this to real HTML websites with lots of individual pages, a search function, "prev" and "next" navigation, and a printer-friendly format. This enables us to update the manual much quicker and makes it more "linkable" compared to PDF.
Personally, I really never get warm with those help files. E.g. I still do not understand why some files need to be trusted, before I can open and view them.

Programmatically changing the destination printer for a WinForms WebBrowser control

I'm trying to use an invisible WebBrowser control to print a very simple HTML document. Our application requires that we be able to print several documents this way, and that they all can be sent to different printers. Unfortunately, I haven't been very successful in making the output go to the right printer.
The way it works right now is that before printing a document, the application determines which printer is to receive it, and sets the default printer accordingly. To do this it uses SetDefaultPrinter() imported from WinSpool.drv. If I step the code in debug mode I can clearly see that the default printer changes (and this change is reflected in the control panel UI), but the WebBrowser still insists on using the original default printer.
The MSDN documentation, from what I've seen, doesn't really provide a solution for this scenario. I would greatly appreciate some input on how I can accomplish this programmatically.
Given what you've said, perhaps if you restart the process which contains the web browser control (or the process which is the web browser control), after you change the default printer? That's the kind of thing I see happening here, for example.
I suppose it would be possible to fork off a background process that does the actual printing, but I'm really hoping for a simpler solution.
Forking was my first thought towards a probably-simplest solution.
Some other alternatives are as follows.
1). IE, which the webbrowser control is wrapping, exposes APIs via ActiveX. One of its/those APIs might let you specify the destination printer.
2). Some executables (I don't know about IE) have printto entries in the registry. For example, Acrobat Reader has an entry whose value is as follows:
""C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe"" /t "%1" "%2" "%3" "%4"
That's used for specifying the syntax of the command-line which you can use to print and specify a (non-default) printer. You can also Google for printto, see e.g. PrintTo command in the ShellExecute.
3). I have implemented an HTML control for .NET of my own, which doesn't depend on IE. You say that your HTML (and CSS I presume) are simple, so perhaps I can render it, either out of the box or with only a little extra development effort. I don't support printing, but printing is quite easy for a user control to implement. Getting me to implement that for you would cost you several hundred but, who knows, maybe it's worth it to you. It would be quite a light-weight solution, and perhaps well supported. You could email me if you want to discuss that further.
4). You might also find other controls, similar to mine, more or less famous/expensive; or other applications, e.g. OpenOffice etc etc.
5). You could consider converting the HTML (somehow) to another format (e.g. PDF) for which you have an application which gives you better support for printing.
I've had the exact same problem, and incorporated this control instead of the standard .NET WebBrowser to work around it.
This works on .NET 3.5, if not before
this.webBrowser1.ShowPrintDialog();

Is there an application that can manipulate images for ASP.NET?

Basically functionality i need is:
easy integration with ASP.NET application.
user ability to crop image with handle prior to save
image optimization from any image type to jpg (compression levels) during the save
saving images with proper h/w ratios during the save
user ability to rotate the image prior to save
ability to translate application to foreign language as it won't be used on international site
If you know any application which fits my needs even if it costs money, give me a twit...
Our company has implemented a photo cropper in an ASP.Net MVC application using Atalasoft's DotImage. I did not implement this myself, but I currently maintain the whole of that application (and consequently the cropping component).
Based on the way you phrased your question, I feel that I should explicitly point out that Atalasoft's DotImage only provided the functionality to manipulate images. Other answers referenced ImageMagick and GDI+. In the same vein, these libraries also only provide the functionality to manipulate images.
We had to implement the UI and workflow ourselves. This was, while not rocket science, still far from trivial. While we used a pre-built component for fancy, AJAX-y file uploads (for the source photos) - we still had to integrate that into the application and manage persistence of the files and database records associated with them. (Similarly, as a convenience we allow import photo from url - another feature we had to explicitly create)
I would suggest that you will not find any general purpose component to integrate that will give you cropping functionality and a Web UI. I suppose there may be one made by a ASP.Net component vendor, but I am certainly not aware of any off-hand.
The problem tends to involve lots of pieces that span from the client to the server, and consequently I think what you are looking for will involve a fair amount of specific-to-your-application development and integration.
You can try ImageMagick, it supports hundreds of image formats and it comes with a .NET wrapper.
Have found exactly what i was looking for iLoad
Does exactly what i asked and doesn't cost that much compared to other suggested solutions. Haven't tried it yet but demo is impressive.
Have a look at mcImageManager

Categories

Resources