Swing: Obtain Image of JFrame

ComponentImageCapture.java import java.awt.BorderLayout; import java.awt.Component; import java.awt.Image; import java.awt.Graphics; import java.awt.image.BufferedImage; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; import java.awt.event.KeyEvent; import java.awt.event.InputEvent; import javax.swing.*; import javax.swing.border.TitledBorder; import javax.imageio.ImageIO; import java.io.File; /** Create a screenshot of a component. @author Andrew Thompson */ class ComponentImageCapture { static final String HELP = “Type Ctrl-0 to get a screenshot of the current … Read more

Prevent screen capture in an iOS app

I’ve just wrote simple extension of UIView that allows to hide it from screen-capturing, Airplay mirroring and so on. The solution uses ability of UITextField to hide a password from capturing. extension UIView { func makeSecure() { DispatchQueue.main.async { let field = UITextField() field.isSecureTextEntry = true self.addSubview(field) field.centerYAnchor.constraint(equalTo: self.centerYAnchor).isActive = true field.centerXAnchor.constraint(equalTo: self.centerXAnchor).isActive = true … Read more

Convert web page to image [closed]

Real answers: http://cutycapt.sourceforge.net/ http://iecapt.sourceforge.net/ http://www.websitescreenshots.com/ http://www.princexml.com/ http://khtml2png.sourceforge.net/ http://linkpeek.com/ https://htmlcsstoimage.com/ (Uses Google Chrome) https://gofullpage.com/ – Full Page Screen Capture (Chrome extension) – see this superuser answer for more info (Don’t know of one to use Mozilla’s renderer, though.)

Capture the Screen into a Bitmap

You can use the Graphics.CopyFromScreen() method. //Create a new bitmap. var bmpScreenshot = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, PixelFormat.Format32bppArgb); // Create a graphics object from the bitmap. var gfxScreenshot = Graphics.FromImage(bmpScreenshot); // Take the screenshot from the upper left corner to the right bottom corner. gfxScreenshot.CopyFromScreen(Screen.PrimaryScreen.Bounds.X, Screen.PrimaryScreen.Bounds.Y, 0, 0, Screen.PrimaryScreen.Bounds.Size, CopyPixelOperation.SourceCopy); // Save the screenshot to the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)