Rick1234567S
unread,Apr 3, 2026, 6:40:13 PMApr 3Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Meaningless nonsense
unit scramble;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Buttons, StdCtrls, ExtCtrls,clipbrd, ComCtrls, Menus;
type
Tscramble1 = class(TForm)
Label23: TLabel;
SpeedButton67: TSpeedButton;
Panel25: TPanel;
Image10: TImage;
BitBtn54: TBitBtn;
Panel22: TPanel;
Image5: TImage;
BitBtn61: TBitBtn;
Label37: TLabel;
BitBtn60: TBitBtn;
Label34: TLabel;
Label29: TLabel;
BitBtn55: TBitBtn;
BitBtn58: TBitBtn;
BitBtn59: TBitBtn;
Label24: TLabel;
Label25: TLabel;
Label27: TLabel;
Label28: TLabel;
Label30: TLabel;
Panel24: TPanel;
Image8: TImage;
Button1: TButton;
Label1: TLabel;
Label2: TLabel;
BitBtn1: TBitBtn;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Shape1: TShape;
SpeedButton1: TSpeedButton;
Label9: TLabel;
Label10: TLabel;
Label11: TLabel;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Button5: TButton;
Label12: TLabel;
Label13: TLabel;
bg1: TProgressBar;
Button6: TButton;
Label14: TLabel;
Label15: TLabel;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
RadioButton3: TRadioButton;
Shape2: TShape;
MainMenu1: TMainMenu;
Original1: TMenuItem;
LoadFromPaintWindow1: TMenuItem;
LoadFromDisk1: TMenuItem;
LoadFromClipboard1: TMenuItem;
KeyIMage1: TMenuItem;
LoadFromDisk2: TMenuItem;
LoadFromClipbaord1: TMenuItem;
argetImage1: TMenuItem;
ScrambleImage1: TMenuItem;
UnscrambleOriginal1: TMenuItem;
N1: TMenuItem;
estUnscramble1: TMenuItem;
N2: TMenuItem;
PreparetosendorstoreasGIF1: TMenuItem;
PreparetosendorstoreasBMP1: TMenuItem;
PreparetosendorstoreasJPG1: TMenuItem;
Help1: TMenuItem;
FInished1: TMenuItem;
Clearimagesonthispageandexit1: TMenuItem;
Label16: TLabel;
CopyContentsof2ontotheclipboard1: TMenuItem;
Label17: TLabel;
Label18: TLabel;
Label19: TLabel;
Label20: TLabel;
SpeedButton2: TSpeedButton;
SpeedButton3: TSpeedButton;
Label22: TLabel;
Label21: TLabel;
Label26: TLabel;
Label31: TLabel;
SpeedButton4: TSpeedButton;
procedure SpeedButton67Click(Sender: TObject);
procedure BitBtn54Click(Sender: TObject);
procedure BitBtn61Click(Sender: TObject);
procedure BitBtn58Click(Sender: TObject);
procedure BitBtn55Click(Sender: TObject);
procedure Image5Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure BitBtn60Click(Sender: TObject);
procedure BitBtn59Click(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure Image8Click(Sender: TObject);
procedure Image10Click(Sender: TObject);
procedure SpeedButton1Click(Sender: TObject);
Procedure rotittRight;
Procedure rotittLeft;
procedure Button2Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
procedure Button6Click(Sender: TObject);
procedure LoadFromPaintWindow1Click(Sender: TObject);
procedure LoadFromDisk1Click(Sender: TObject);
procedure LoadFromClipboard1Click(Sender: TObject);
procedure LoadFromDisk2Click(Sender: TObject);
procedure LoadFromClipbaord1Click(Sender: TObject);
procedure ScrambleImage1Click(Sender: TObject);
procedure estUnscramble1Click(Sender: TObject);
procedure UnscrambleOriginal1Click(Sender: TObject);
procedure PreparetosendorstoreasGIF1Click(Sender: TObject);
procedure PreparetosendorstoreasBMP1Click(Sender: TObject);
procedure PreparetosendorstoreasJPG1Click(Sender: TObject);
procedure Help1Click(Sender: TObject);
procedure Clearimagesonthispageandexit1Click(Sender: TObject);
procedure SpeedButton2Click(Sender: TObject);
procedure SpeedButton3Click(Sender: TObject);
procedure CopyContentsof2ontotheclipboard1Click(Sender: TObject);
procedure SpeedButton4Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
scramble1: Tscramble1;
implementation
uses Pbook, imview, scrntest;
{$R *.dfm}
{$RANGECHECKS OFF}
Procedure Tscramble1.rotittRight;
var
tmap2,tmap:tbitmap;
num1,num2,i,j:integer;
prog,prog2:real;
begin
try
tmap:=tbitmap.create;
tmap2:=tbitmap.create;
tmap.assign(image8.Picture.bitmap);
tmap2.Width:=tmap.Height;
tmap2.Height:=tmap.Width;
prog:=tmap.height/25;
prog2:=prog;
for j:= 0 to tmap.height -1 do
begin
if j > prog then
begin
bg1.Position:=bg1.position+1;
prog:=prog+prog2;
end;
for i:= 0 to tmap.width - 1 do
tmap2.Canvas.pixels[j,i]:=
tmap.Canvas.Pixels[i,j];
end;
image8.Width:=tmap2.width;
image8.Height:=tmap2.Height;
image8.Picture.bitmap.Assign(tmap2);
finally
tmap.free;
tmap2.Free;
end;
end;
Procedure Tscramble1.rotittLeft;
var
tmap2,tmap:tbitmap;
num1,num2,i,j:integer;
prog,prog2:real;
begin
try
tmap:=tbitmap.create;
tmap2:=tbitmap.create;
tmap.assign(image8.Picture.bitmap);
tmap2.Width:=tmap.Height;
tmap2.Height:=tmap.Width;
prog:=tmap.height/25;
prog2:=prog;
for j:= tmap.height -1 downto 0 do
begin
if j > prog then
begin
bg1.position:=bg1.position+1;
prog:=prog+prog2;
end;
for i:= tmap.Width - 1 downto 0 do
tmap2.Canvas.pixels[j,i]:=
tmap.Canvas.Pixels[(tmap.Width-1)-i,(tmap.Height-1)-j];
end;
image8.Width:=tmap2.width;
image8.Height:=tmap2.Height;
image8.Picture.bitmap.Assign(tmap2);
finally
tmap.free;
tmap2.Free;
end;
end;
procedure Tscramble1.SpeedButton67Click(Sender: TObject);
var
myext:string;
s1:string;
begin
with pbook1.openpicturedialog1 do
begin
if execute then
if filename <> '' then
begin
myext:=ExtractFileExt(filename);
myext:=AnsiUpperCase(myext);
{if myext='.GIF' then
begin
notifygif;
exit;
end;}
if (myext='.JPG') or (myext='.JPEG') then
picform1.Scale.ItemIndex:=0;
if (myext='.JPG') or (myext='.JPEG') or
(myext='.GIF') or(myext='.BMP') or (myext='.EMF')
or (myext='.ICO')or (myext='.WMF')then
if picform1.openthefile(filename) then
begin
image10.picture.Bitmap.Assign(picform1.Image1.picture.bitmap);
application.processmessages;
picform1.image1.Picture.bitmap:=nil;
picform1.Image1.picture.bitmap.Width:=50;
picform1.Image1.picture.bitmap.height:=50;
picform1.Caption:='Temp.bmp';
image10.Repaint;
label22.Caption:=filename;
end;
end;
end;
end;
procedure Tscramble1.BitBtn54Click(Sender: TObject);
begin
image5.picture.Bitmap.assign(pbook1.ptbox1.Picture.bitmap);
application.processmessages;
end;
procedure Tscramble1.BitBtn61Click(Sender: TObject);
var
myext:string;
s1:string;
begin
with pbook1.openpicturedialog1 do
begin
if execute then
if filename <> '' then
begin
myext:=ExtractFileExt(filename);
myext:=AnsiUpperCase(myext);
{if myext='.GIF' then
begin
notifygif;
exit;
end;}
if (myext='.JPG') or (myext='.JPEG') then
picform1.Scale.ItemIndex:=0;
if (myext='.JPG') or (myext='.JPEG') or
(myext='.GIF') or(myext='.BMP') or (myext='.EMF')
or (myext='.ICO')or (myext='.WMF')then
if picform1.openthefile(filename) then
begin
picform1.cnvtbit;
image5.picture.Assign(picform1.Image1.picture);
image5.width:=image5.picture.bitmap.width;
image5.height:=image5.picture.bitmap.height;
application.processmessages;
picform1.image1.Picture.bitmap:=nil;
picform1.Image1.picture.bitmap.Width:=50;
picform1.Image1.picture.bitmap.height:=50;
picform1.Caption:='Temp.bmp';
image5.Update;
end;
end;
end;
end;
procedure Tscramble1.BitBtn58Click(Sender: TObject);
var
sts:string;
begin
if pbook1.wbstart then
pbook1.wbstart:=false;
picform1.Image1.Picture.bitmap.Assign(image8.Picture.Bitmap);
sts:=extractfilepath(paramstr(0))+'CLPCACHE\TMPSCRAMBLE';
if radiobutton3.Checked then
begin
sts:=sts+'.jpg';
picform1.saveasjpg(sts);
end;
if radiobutton1.checked then
begin
sts:=sts+'.gif';
picform1.saveasgif(sts);
end;
if radiobutton2.Checked then
begin
sts:=sts+'.bmp';
picform1.Image1.picture.Bitmap.SaveToFile(sts);
end;
picform1.Show;
picform1.do_openweb(sts);
end;
procedure Tscramble1.BitBtn55Click(Sender: TObject);
var
prog,prog2:real;
sts:string;
varnum2,varnum:longint;
tmap3,tmap2,tmap:tbitmap;
cr,cg,cb,i,j:integer;
begin
if image5.picture.Bitmap=nil then exit;
if image10.picture.Bitmap=nil then exit;
cursor:=crhourglass;
try
tmap:=tbitmap.create;
tmap2:=tbitmap.create;
tmap3:=tbitmap.create;
tmap.assign(image10.picture.Bitmap);
tmap2.Assign(image5.Picture.bitmap);
tmap3.Width:=tmap2.Width+270;
tmap3.Height:=tmap2.Height+1;
realizepalette(tmap.Canvas.Handle);
varnum:=0;
prog:=tmap2.height/25;
prog2:=prog;
for j:=0 to tmap2.height - 1 do
begin
if j > prog then
begin
bg1.Position:=bg1.position+1;
prog:=prog+prog2;
end;
cr:=getrvalue(tmap.Canvas.Pixels[varnum,varnum2]);
cg:=getgvalue(tmap.Canvas.Pixels[varnum,varnum2]);
cb:=getbvalue(tmap.Canvas.Pixels[varnum,varnum2]);
for i:= 0 to tmap2.width - 1 do
begin
varnum:=varnum+1;
if varnum > tmap.Width - 1 then
begin
varnum:=0;
if varnum2 > tmap.Height-1 then
varnum2:=0;
end;
if j mod 3 = 0 then
tmap3.Canvas.Pixels[(260+i-cr),j]:= tmap2.Canvas.Pixels[i,j]
else
if j mod 2 = 0 then
tmap3.Canvas.Pixels[i+cg,j]:= tmap2.Canvas.Pixels[i,j]
else
tmap3.Canvas.Pixels[260+i-cb,j]:= tmap2.Canvas.Pixels[i,j];
end;
varnum2:=varnum2+1;
if varnum2 > tmap.Height-1 then
varnum2:=0;
end;
image8.picture.Bitmap.Assign(tmap3);
finally
tmap.free;
tmap2.Free;
tmap3.Free;
cursor:=crdefault;
end;
image8.Repaint;
application.processmessages;
end;
procedure Tscramble1.Image5Click(Sender: TObject);
begin
screentest1.image1.Picture.assign(image5.Picture);
screentest1.ClientWidth:=image5.picture.bitmap.width;
screentest1.ClientHeight:=image5.picture.bitmap.height;
screentest1.show;
end;
procedure Tscramble1.Button1Click(Sender: TObject);
begin
image10.Picture.bitmap:=nil;
image5.Picture.bitmap:=nil;
image8.Picture.bitmap:=nil;
label22.Caption:='';
screentest1.Image1.picture.Bitmap:=nil;
close;
end;
procedure Tscramble1.BitBtn60Click(Sender: TObject);
begin
image10.Picture.bitmap:=nil;
image5.Picture.bitmap:=nil;
image8.Picture.bitmap:=nil;
label22.Caption:='';
screentest1.Image1.picture.Bitmap:=nil;
close;
end;
procedure Tscramble1.BitBtn59Click(Sender: TObject);
var
sts:string;
prog,prog2:real;
varnum2,varnum:longint;
tmap3,tmap2,tmap:tbitmap;
cr,cg,cb,i,j:integer;
begin
if image8.picture.Bitmap=nil then exit;
cursor:=crhourglass;
try
tmap:=tbitmap.create;
tmap2:=tbitmap.create;
tmap3:=tbitmap.Create;
tmap3.Assign(image8.Picture.bitmap);
tmap2.width:=tmap3.Width-270;
tmap2.Height:=tmap3.Height-1;
tmap.Assign(image10.Picture.bitmap);
realizepalette(tmap.Canvas.Handle);
varnum:=0;
prog:=tmap2.Height/25;
prog2:=prog;
for j:=0 to tmap2.height - 1 do
begin
if j > prog then
begin
bg1.Position:=bg1.position+1;
prog:=prog+prog2;
end;
cr:=getrvalue(tmap.Canvas.Pixels[varnum,varnum2]);
cg:=getgvalue(tmap.Canvas.Pixels[varnum,varnum2]);
cb:=getbvalue(tmap.Canvas.Pixels[varnum,varnum2]);
for i:= 0 to tmap2.width - 1 do
begin
varnum:=varnum+1;
if varnum > tmap.Width - 1 then
begin
varnum:=0;
if varnum2 > tmap.Height-1 then
varnum2:=0;
end;
if j mod 3 = 0 then
tmap2.Canvas.Pixels[i,j]:= tmap3.Canvas.Pixels[(260+i-cr),j]
else
if j mod 2 = 0 then
tmap2.Canvas.Pixels[i,j]:= tmap3.Canvas.Pixels[i+cg,j]
else
tmap2.Canvas.Pixels[i,j]:= tmap3.Canvas.Pixels[260+i-cb,j];
end;
varnum2:=varnum2+1;
if varnum2 > tmap.Height-1 then
varnum2:=0;
end;
image8.picture.Bitmap.Assign(tmap2);
finally
tmap.free;
tmap2.Free;
tmap3.Free;
cursor:=crdefault;
end;
image8.Repaint;
application.processmessages;
end;
procedure Tscramble1.BitBtn1Click(Sender: TObject);
var
sts:string;
prog,prog2:real;
varnum2,varnum:longint;
tmap3,tmap2,tmap:tbitmap;
cr,cg,cb,i,j:integer;
begin
if image5.picture.Bitmap=nil then exit;
if image10.Picture.bitmap=nil then exit;
cursor:=crhourglass;
try
tmap:=tbitmap.create;
tmap2:=tbitmap.create;
tmap3:=tbitmap.Create;
tmap3.Assign(image5.Picture.bitmap);
tmap2.width:=tmap3.Width-270;
tmap2.Height:=tmap3.Height-1;
tmap.Assign(image10.Picture.bitmap);
realizepalette(tmap.Canvas.Handle);
varnum:=0;
prog:=tmap2.Height / 25;
prog2:=prog;
for j:=0 to tmap2.height - 1 do
begin
if j > prog then
begin
bg1.Position:=bg1.Position+1;
prog:=prog+prog2;
end;
cr:=getrvalue(tmap.Canvas.Pixels[varnum,varnum2]);
cg:=getgvalue(tmap.Canvas.Pixels[varnum,varnum2]);
cb:=getbvalue(tmap.Canvas.Pixels[varnum,varnum2]);
for i:= 0 to tmap2.width - 1 do
begin
varnum:=varnum+1;
if varnum > tmap.Width - 1 then
begin
varnum:=0;
if varnum2 > tmap.Height-1 then
varnum2:=0;
end;
if j mod 3 = 0 then
tmap2.Canvas.Pixels[i,j]:= tmap3.Canvas.Pixels[(260+i-cr),j]
else
if j mod 2 = 0 then
tmap2.Canvas.Pixels[i,j]:= tmap3.Canvas.Pixels[i+cg,j]
else
tmap2.Canvas.Pixels[i,j]:= tmap3.Canvas.Pixels[260+i-cb,j];
end;
varnum2:=varnum2+1;
if varnum2 > tmap.Height-1 then
varnum2:=0;
end;
image8.picture.Bitmap.Assign(tmap2);
finally
tmap.free;
tmap2.Free;
tmap3.Free;
cursor:=crdefault;
end;
image8.Repaint;
application.processmessages;
end;
procedure Tscramble1.Image8Click(Sender: TObject);
begin
screentest1.image1.Picture.assign(image8.Picture);
screentest1.ClientWidth:=image8.picture.bitmap.width;
screentest1.ClientHeight:=image8.picture.bitmap.height;
screentest1.show;
end;
procedure Tscramble1.Image10Click(Sender: TObject);
begin
screentest1.image1.Picture.assign(image10.Picture);
screentest1.ClientWidth:=image10.picture.bitmap.width;
screentest1.ClientHeight:=image10.picture.bitmap.height;
screentest1.show;
end;
procedure Tscramble1.SpeedButton1Click(Sender: TObject);
begin
if clipboard.hasformat(CF_BITMAP)=false then
ClipBoard.SetAsHandle(CF_BITMAP,pbook1.Acfbitmap);
if clipboard.hasformat(CF_BITMAP) then
begin
clipboard.Assign(image8.picture.bitmap);
end
else
MessageBox(handle,'Clipboard Unavailable.','Clipboard Error', MB_OK);
end;
procedure Tscramble1.Button2Click(Sender: TObject);
begin
rotittRight;
end;
procedure Tscramble1.Button4Click(Sender: TObject);
var
tmap:tbitmap;
begin
bg1.Position:=0;
bg1.Visible:=true;
image8.Visible:=false;
image5.Visible:=false;
try
tmap:=tbitmap.create;
tmap.Assign(image5.Picture.bitmap); {save the bitmap}
BitBtn55Click(Sender); {bg1 at 25}
rotittRight; {at 50}
image5.Picture.bitmap.Assign(image8.picture.bitmap);
BitBtn55Click(Sender); {at 75}
rotittLeft; {at 50}
image5.Picture.bitmap.Assign(image8.picture.bitmap);
BitBtn55Click(Sender); {at 75}
application.ProcessMessages;
image5.picture.bitmap.assign(tmap);
finally
tmap.Free;
bg1.Position:=0;
bg1.Visible:=false;
image8.Visible:=true;
image5.Visible:=true;
end;
end;
procedure Tscramble1.Button5Click(Sender: TObject);
var
tmap:tbitmap;
begin
bg1.Position:=0;
bg1.Visible:=true;
image8.Visible:=false;
image5.Visible:=false;
try
tmap:=tbitmap.create;
tmap.Assign(image5.Picture.bitmap);
BitBtn59Click(Sender);
rotittLeft; {at 50}
image5.Picture.bitmap.Assign(image8.picture.bitmap);
BitBtn59Click(Sender);
rotittRight;
image5.Picture.bitmap.Assign(image8.picture.bitmap);
BitBtn59Click(Sender);
application.ProcessMessages;
image5.picture.bitmap.assign(tmap);
finally
tmap.Free;
bg1.Position:=0;
bg1.Visible:=false;
image8.Visible:=true;
image5.Visible:=true;
end;
end;
procedure Tscramble1.Button6Click(Sender: TObject);
var
tmap:tbitmap;
begin
bg1.Position:=0;
bg1.Visible:=true;
image8.Visible:=false;
image5.Visible:=false;
try
tmap:=tbitmap.create;
tmap.Assign(image5.Picture.bitmap);
image8.picture.Bitmap.assign(image5.Picture.bitmap);
BitBtn59Click(Sender);
rotittLeft; {at 50}
image5.Picture.bitmap.Assign(image8.picture.bitmap);
BitBtn59Click(Sender);
application.ProcessMessages;
rotittRight;
image5.Picture.bitmap.Assign(image8.picture.bitmap);
BitBtn59Click(Sender);
application.ProcessMessages;
image5.picture.Bitmap.assign(tmap);
application.ProcessMessages;
finally
tmap.Free;
bg1.Position:=0;
bg1.Visible:=false;
image8.Visible:=true;
image5.Visible:=true;
end;
end;
procedure Tscramble1.LoadFromPaintWindow1Click(Sender: TObject);
begin
BitBtn54Click(Sender);
end;
procedure Tscramble1.LoadFromDisk1Click(Sender: TObject);
begin
BitBtn61Click(Sender);
end;
procedure Tscramble1.LoadFromClipboard1Click(Sender: TObject);
begin
SpeedButton3Click(Sender);
end;
procedure Tscramble1.LoadFromDisk2Click(Sender: TObject);
begin
SpeedButton67Click(Sender);
end;
procedure Tscramble1.LoadFromClipbaord1Click(Sender: TObject);
begin
SpeedButton2Click(Sender);
end;
procedure Tscramble1.ScrambleImage1Click(Sender: TObject);
begin
Button4Click(Sender);
end;
procedure Tscramble1.estUnscramble1Click(Sender: TObject);
begin
Button5Click(Sender);
end;
procedure Tscramble1.UnscrambleOriginal1Click(Sender: TObject);
begin
Button6Click(Sender);
end;
procedure Tscramble1.PreparetosendorstoreasGIF1Click(Sender: TObject);
begin
radiobutton1.checked:=true;
radiobutton2.checked:=false;
radiobutton3.checked:=false;
BitBtn58Click(Sender);
end;
procedure Tscramble1.PreparetosendorstoreasBMP1Click(Sender: TObject);
begin
radiobutton1.checked:=false;
radiobutton2.checked:=true;
radiobutton3.checked:=false;
BitBtn58Click(Sender);
end;
procedure Tscramble1.PreparetosendorstoreasJPG1Click(Sender: TObject);
begin
radiobutton1.checked:=false;
radiobutton2.checked:=false;
radiobutton3.checked:=true;
BitBtn58Click(Sender);
end;
procedure Tscramble1.Help1Click(Sender: TObject);
begin
pbook1.dohelp('Getting Started.RTF');
end;
procedure Tscramble1.Clearimagesonthispageandexit1Click(Sender: TObject);
begin
BitBtn60Click(Sender);
end;
procedure Tscramble1.SpeedButton2Click(Sender: TObject);
begin
if clipboard.hasformat(CF_BITMAP)=false then
ClipBoard.SetAsHandle(CF_BITMAP,pbook1.Acfbitmap);
if clipboard.hasformat(CF_BITMAP) then
begin
image10.picture.Bitmap.assign(clipboard);
end
else
MessageBox(handle,'Clipboard Unavailable.','Clipboard Error', MB_OK);
end;
procedure Tscramble1.SpeedButton3Click(Sender: TObject);
begin
if clipboard.hasformat(CF_BITMAP)=false then
ClipBoard.SetAsHandle(CF_BITMAP,pbook1.Acfbitmap);
if clipboard.hasformat(CF_BITMAP) then
begin
image5.picture.Bitmap.assign(clipboard);
end
else
MessageBox(handle,'Clipboard Unavailable.','Clipboard Error', MB_OK);
end;
procedure Tscramble1.CopyContentsof2ontotheclipboard1Click(
Sender: TObject);
begin
SpeedButton1Click(Sender);
end;
procedure Tscramble1.SpeedButton4Click(Sender: TObject);
begin
picform1.Show;
picform1.do_purchase;
end;
end.