I hear this often but there is a (little) bit of a misconception here. The reason macs don't get viruses and malware as often isn't because they have better security. It's simply because people aren't writing viruses for Macs since they're nowhere near as popular as Windows devices. As macs have been getting more popular, mac specific malware has as well.Like stated above it is unlikely that it is turned on. Since they no longer boot, get an adapter for the hard drive and connect it to your computer to remove the files.
'There is a lot of information on this site on how to do almost anything on a Mac, I'm sure you can find free software links to use to change the picture format to jpeg, but it should be a straight forward operation.
If that was true I would still be running a desktop... I switched to a 27" iMac in 2011 after about 7 Dell, Hp, Compaq desktops/laptops, all in the $1000 up range. All Windows crap, blue screen, black screen, virus up the a$$, random ransomware from my sons gaming sites. All that BS GONE! I still running that Mac, on High Sierra that was replaced in 2018, still no anti-virus, no anti crap... still no viruses and the Mac still runs like new with only one upgrade, a switch from the HD to an SSD. I don't think anyone can say the same thing out of a Windows OS.
Since then I bought an HP Omen 15 with almost every upgrade available, following recommendations from the dean at my college as I was about to start my cyber classes... within 2 weeks I started getting a fail to boot error. wipe out and re-loaded every thing, including new Windows 10 Pro, worked good, but still had the occasional fail to boot. Finished the class and gave it to my son. Will never spend that kind of money into a Win based piece of crap, will do virtual desktop if I need to run Windows for something inside my Mac.
If you really want to have a no-virus experience just get yourself linux and you can emulate windows or mac skin on it. There's maybe 10 other people using Linux as their computer OS so you'll be safe.