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
For row = 1 To 8 | |
For col = 1 To 8 | |
Dim bmp As Bitmap = New Bitmap(1100, 1100) | |
For i = 100 To 1000 Step 200 | |
For j = 100 To 1000 Step 200 | |
If Rnd() > 0.5 Then | |
For k = j To j + 100 Step 10 | |
Using g As Graphics = Graphics.FromImage(bmp) | |
g.FillRectangle(New SolidBrush(Color.Black), New Rectangle(i, k, 100, 5)) | |
End Using |
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
using System; | |
using System.Drawing; | |
namespace Test | |
{ | |
static class Colorizer | |
{ | |
private static double _RainbowIDX; | |
public static Color GetNextRainbowColor() |
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
let MakeIDs (ax:float, ay:float, | |
bx:float, by:float, | |
cx:float, cy:float, | |
apx:float, apy:float, | |
bpx:float, bpy:float, | |
cpx:float, cpy:float, | |
ox:float, oy:float, | |
device:bool, nullRegion:bool) : ID[] = | |
[| | |
for n in 0. .. cy-1. do |
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
using System; | |
using System.Drawing; | |
using System.Threading; | |
using System.Runtime.InteropServices; | |
namespace ConsoleApp1 | |
{ | |
class Program | |
{ | |
[DllImport("user32.dll", SetLastError = true)] |
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
// Components.cs // | |
public static void Initiliaze() | |
{ | |
try | |
{ | |
Components.Cam = new Camera(); | |
OpenCamera(); | |
} | |
catch (Exception) |
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
from PIL import Image, ImageFont, ImageDraw, ExifTags | |
import pathlib | |
import os | |
imageExtensions = ['.png', '.jpg', '.jpeg', '.tiff', '.bmp', '.gif'] | |
basewidth = 600 # Adjust output file size | |
# Make output dir | |
if not os.path.exists('watermark'): | |
os.makedirs('watermark') |
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
using System; | |
using System.Drawing; | |
using System.IO; | |
namespace XYZmanipulator | |
{ | |
class Program | |
{ | |
static void Main() | |
{ |
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
using System; | |
using System.Collections.Generic; | |
using System.Drawing; | |
namespace PiePrep | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
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
public static Point ZoomMousePos(Point click) | |
{ | |
PictureBox pbx = Components.Vision; | |
float BackgroundImageAspect = pbx.BackgroundImage.Width / (float)pbx.BackgroundImage.Height; | |
float controlAspect = pbx.Width / (float)pbx.Height; | |
PointF pos = new PointF(click.X, click.Y); | |
if (BackgroundImageAspect > controlAspect) | |
{ | |
float ratioWidth = pbx.BackgroundImage.Width / (float)pbx.Width; | |
pos.X *= ratioWidth; |
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
public static void OpenWithDefaultProgram(string path) | |
{ | |
using (Process fileopener = new Process()) | |
{ | |
fileopener.StartInfo.FileName = "explorer"; | |
fileopener.StartInfo.Arguments = "\"" + path + "\""; | |
fileopener.Start(); | |
} | |
} |
OlderNewer