Security records consoles now uploads the center 32x32 of a photo when putting photos in (#36597)

* Sec console centering photos

* Update security.dm

* whoever coded this before me is triple meme
This commit is contained in:
kevinz000
2018-03-26 19:03:48 -07:00
committed by CitadelStationBot
parent c579d81f4c
commit 40776d5ee5
+16 -2
View File
@@ -608,9 +608,16 @@ What a mess.*/
var/obj/item/photo/P = active1.fields["photo_front"]
P.show(usr)
if("upd_photo_front")
var/icon/photo = get_photo(usr)
var/obj/item/photo/photo = get_photo(usr)
if(photo)
qdel(active1.fields["photo_front"])
//Lets center it to a 32x32.
var/icon/I = photo.img
var/w = I.Width()
var/h = I.Height()
var/dw = w - 32
var/dh = w - 32
I.Crop(dw/2, dh/2, w - dw/2, h - dh/2)
active1.fields["photo_front"] = photo
if("print_photo_front")
if(active1.fields["photo_front"])
@@ -623,9 +630,16 @@ What a mess.*/
var/obj/item/photo/P = active1.fields["photo_side"]
P.show(usr)
if("upd_photo_side")
var/icon/photo = get_photo(usr)
var/obj/item/photo/photo = get_photo(usr)
if(photo)
qdel(active1.fields["photo_side"])
//Lets center it to a 32x32.
var/icon/I = photo.img
var/w = I.Width()
var/h = I.Height()
var/dw = w - 32
var/dh = w - 32
I.Crop(dw/2, dh/2, w - dw/2, h - dh/2)
active1.fields["photo_side"] = photo
if("print_photo_side")
if(active1.fields["photo_side"])