This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ========================================================================================================= | |
# if you like to reset your DPI Scaling to the DEFAULT, you can use the registry (Option five) from here: | |
# https://www.tenforums.com/tutorials/5990-change-dpi-scaling-level-displays-windows-10-a.html#option5 | |
# | |
# But, since the default value is different on various monitors, if you like to force 100%, | |
# you need the following trick: | |
# for each monitor - set DPIValue to 0xFFFFFFFF (which is -1 in DWord) | |
# | |
# Last update: 18 December 2018 | |
# Created by: Itsho |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.util.Random; | |
public class MonochromaticBMPGeneratorWithText { | |
public static void main(String[] args) { | |
long start1 = System.currentTimeMillis(); | |
int width = 1280; | |
int height = 640; | |
int imageSize = (width + 31) / 32 * 4 * height; // Image size (in bytes) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
width=1280 | |
height=640 | |
imageSize=$((($width + 31) / 32 * 4 * $height)) # Image size (in bytes) | |
pixelDataOffset=54 # Offset to pixel data | |
# BMP header | |
printf "B" > monochromatic_with_text.bmp | |
printf "M" >> monochromatic_with_text.bmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import struct | |
import time | |
import random | |
import subprocess | |
import platform | |
start_time = time.time() # Record the start time | |
# Function to set a pixel to white (255) at the specified coordinates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import struct | |
import time | |
import random | |
import subprocess | |
import platform | |
import threading | |
import signal | |
import os | |
start_time = time.time() # Record the start time |