Adventures in Image Processing

So here’s an interesting mystery / conundrum / process I recently went through in trying to create a new workflow.

For reasons or not wanting to subscribe to software, I’m still using the CS5 versions of Adobe Apps for Surfing The Deathline. The original documents are heavily constructed in Photoshop, then all the text, sound effects etc are done in InDesign, which makes them rather non-portable to other solutions.

It had been so long since I’d done a serious update of the books, that I’d forgotten parts of my workflow, and so had started some things from Scratch.

Surfing The Deathline uses .png format images for its pages. Although they take up a lot more space than .jpg versions, they have an advantage of being colour-accurate. A major problem of .jpg is that for images in black & white, a single pixel of colour will shift the white and black values away from their correct tones. So, where you get two pages butting up against each other at the spine, the greys might not match.

InDesign CS5 has no direct png output option, so the workflow is:

  1. PageExporterUtility script to output the pages as individual .pdf files
  2. Convert the .pdfs to .pngs
  3. rename the .pngs and move them to the appropriate EPUB document’s image directory.

I had created an Automator action, which took in the .pdf files, and converted them to .png, and saved them to disk. It took about 3-5 minutes to do all 236 pages.

But there was a problem with he output…

Certain pages, seemed to have red & blue fringing on their text. Going through the .pdf files, it bcame apparent that it was linked to the pages which had a specific masterpage controlling their appearance. Looking at that masterpage, the thing that suggested itself as problematic, was the page number – it was frontmost in the layering stack. So, I deleted and recreated the page number object in the masterpage, applied it to the pages, and reran the .pdf to .png workflow.

Problem solved. Almost.

My large sound effects were still showing red/blue colour fringing. After a couple of days research, it became apparent that this was caused by the system applying sub-pixel antialiasing to the .pdf file during the render.

After experimenting with commandline options for disabling it, I found out there was actually a checkbox for it in the System Preferences app. Unfortunately switching it off makes the system’s display look worse, so what I needed was a way to toggle it off, run the image processing steps, then switch it back on.

After some experimenting, and asking on forums, I was able to get an Applescript that did the job, and add it to my Automator action:

What this does is:

  1. run an Applescript to open System Preferences, test if the checkbox is ticked, untick it if it is, close System Preferences, then,
  2. run all the pdf files through the Render PDF Pages as Images function to create png files, then,
  3. move the converted versions to a new location. Then,
  4. open System Preferences, test the antialiasing setting, and switch it back on, then close System Preferences.

It was fantastic – I had a wonderful system that, once  I’d output the .pdfs from InDesign, could after selecting all of them, render them all to .png in a single right-click.

But there was a problem…

Images which crossed the spine of the EPUB book weren’t aligning correctly. Clearly, something was wrong with the way the Automator renderer was converting .pdf into .png. It didn’t matter what scale I rendered it at – even at the full native 300dpi, the problem remained.

When I compared it against doing the same process manually in Photoshop, it also became apparent that the math behind Automator’s conversion was out – files were always cropped 1-2 pixels smaller from Automator, than they were from Photoshop.

Then I started researching if there was an alternative commandline image processor in macOS – something I could call from an Applescript, to replace Render PDF Pages as Images. Thankfully, there was – SIPS, Scriptable Image Processing System.

After a bunch more research, I managed to sort out the appropriate commands, and gave SIPS a go on my pdf files. The results were the same. I tried it manually with Preview, the results were the same, again. It appears SIPS is the core image processor all these built-in macOS tools use, and it’s SIPS that has the bad math function for rendering PDF files as images.

Sips also produced pretty garbage image quality, compared to Photoshop.

So now I was looking for an alternative to SIPS, and I managed to find one – ImageMagick, a cross-platform commandline image processor. It uses Ghostscript, an opensource alternative to Postscript to render the .pdf, so everything about it will be separate from the SIPS processes. After a couple of days trying to figure out how to install it (hey, opensource projects, try making your basic documentation an educational resource for people who haven’t used your tools previously), I was able to make it work…

It delivered fantastic results, but took 30 seconds per image to process the .pdf files. In contrast, Photoshop, which was so slow I was looking for an alternative, takes 8 seconds.

You might question why I don’t use Affinity Photo, which can tear through the entire 236 pages in around 8 seconds total (gotta love that multithreaded action). Well, unfortunately, Affinity Photo’s pdf renderer can’t handle the edge effects of my InDesign speech bubbles.

So I’m back to where I began, using a ancient versions of Photoshop and InDesign, and needing to take a 35 minute break so Photoshop’s Image Processor script can do its thing, every time I want to run a set of updates from InDesign to EPUB.

Update 23 April 2021:

In experiments with image sizes for Photoshop’s scaling when it renders the PDF file to TIFF, I’ve hit upon a target size that seems to be in some sort of mathematical sweet spot for Photoshop, because the processing time has gone down to about 1 second per image, from ~8 seconds.

Surveying the catastrophe.

If there is one trend that is clear, it’s that a greater and greater percentage of economic “value” will be concentrated into fewer, and fewer people and companies. Automation will destroy more jobs, and concentrate more economic extraction to fewer individuals, than new industries will produce.

It begs the question, why a political party would base their campaign on providing “jobs”, rather than providing income? “We promise to keep you busy with tasks” – hardly the most inspiring of messages, is it?

There is too much that too many people do, which requires more skill and more time, than people have money to pay for it to be done.

UBI, at a level considerably higher than the current unemployment rate, is inevitable – large economic extractors (including wealthy individuals) are going to have to pony up radically higher taxes, and that money is going to have to go directly to people, because through Covid we’ve seen both the future of what happens when too few people have enough, and how effective “just giving people money” is in blunting that catastrophe.

So again, IF you were a political party hoping to win government, why would you double down on an obsolete paradigm?

2020 – A Wrapup

What a year.

Things were going ok for the first ten or so weeks – I bit the bullet an began gearing up to do some welding, to finally make a push to get some sculpture done. I was offered another arts residency, which would be a wonderful expansion of Noosa Mnemonic, in cooperation with the local regional art gallery…

…then the plague hit, and hit HARD.

By week 12 we entered a kind of non-time, in which things drifted and became unfixed. Public events went away, my residency was cancelled. So I ploughed ahead with my home welding setup, and designing the Studio-in-a-box.

I received an Arts Qld grant that covered my costs for the Studio-in-a-box, which was also a nice little notch to add to the artist’s cv. A big part of this year was figuring out quantity surveying for materials, and mapping out cut-charts for steel lengths.

There were some big upgrades for my protective clothing kit this year – with a new powered respirator welding helmet, and an (as-yet untested) powered water-cooling suit. When all this stuff is combined, I should be kitted up like an astronaut, and able to work safely and comfortably in more or less any conditions.

I solved a problem of flakey power supply during the storm season, by dropping a bunch of cash on a honking great UPS.

In photography my processes had some issues to overcome, adapting to a new photo processing / management tool. It produces better images, but has worse management features. So I’m effectively now working in two apps. I also updated my monitor configuration for my workstation to 3 screens. Sadly, these changes really didn’t work out too well – 2020 is definitely the year I fell out with technology. I have to learn to not allow anyone to provide an “ecosystem” to me, and instead build one myself.

I finished an update to The Metaning, which frees it from Apple Books, and a European publishing standards group released an Ebook reader for Mac, Linux & Windows that can read the fixed-layout EPUB format, so that clears the way for me to ditch Apple for selling my books, and move to direct sales.

The other major thing this year, was 15 minutes of fame, after a tweet thread I started about my time in high school was picked up and retweeted by a bunch of folks. Had a lot of people relating to me their childhood horrors from the same school.

Overall, 2020 was a year in which a lot of long-term plans and strategies played out, and produced results that weren’t all I’d hoped. Of course, across everything hangs the pall of Covid, so it’s hard to put the achievements of the year in any greater context of where I thought I’d be by the end of it.

2019 – A Wrapup.

2019 started with high hopes for diving back into EPUB development. I put huge amounts of time into redesigning my EPUB books to be able to have their text on a separate layer, so different translations could be done, and to allow the artwork to be user-selectable between finished, sketch, and thumbnail versions.

Weeks were spent trying to get the image outputting from InDesign to work correctly, and I had more or less cracked it, and knew theoretically how it would all be achieved.

Unfortunately, updates to Apple’s books platform broke the core functionality I relied upon, and all my books on the Apple Books store are now broken.

My uncle, Travor Ashton, a wonderfully generous man, sadly passed away.

I entered a major outdoor sculpture festival, and put a bunch of work in to applying for a grant to cover training costs to refresh my welding skills.

Unfortunately, my grant application was unsuccessful, and the sculpture, once repaired, displayed some significant structural weaknesses when exposed to driving wind, that meant i would be unable to install it at the event, so I had to pull out.

I had a new residency project, Noosa Mnemonic – a VR recreation of Noosa, based on people recreating in VR, places they love in Noosa, working only from memory. The goal was to have all the separate places added together into a single VR environment. I created a really interesting new VR location, and arranged for other artists to contribute locations.

Unfortunately, by the end of the year, it seemed to have become moribund, lacking for funding, and a reduced scope that makes the vision more of less moot. After breaking myself on the previous year’s major project for the Drone Racing course, I resolved to be less emotionally invested in this project, so C’est la vie.

I did some more VR outreach projects for the Library Makerspace – I really wonder if I’ve missed my true calling, because I love doing public outreach events.

My bike was serviced, and I was able to get back into riding periodically. It’s good for my mental health. The bike works better now than it ever had since new. I bought a helmet-mounted action-cam, and took to videotaping all my rides, so as to protect myself from incompetent drivers.

We sold my late father’s house, and dissolved his estate. It was finally over. I find myself on occasion missing him, missing that ability to have someone to talk to, who was largely removed from my life, but towards the end, there wasn’t much left to say. His ideas and opinions had been so poisoned by the right-wing internet, that in the end, I was left with very little in the way of happy memories about him.

I started investigating drop-shipping my photo prints as I dipped a toe into Instagram, but then Instagram changed the ability to see metrics of user interaction with posts, and it became yet another platform that one has to question if it’s worth the effort.

More upgrades and updated to my 10 year old Mac Pro tower. it’s such a dependable tank of a machine, frankensteined to hell as it is.

Toward the last third of the year, gearing up for internatonal travel to Japan, gained a sense of urgency, and I designed and had fabricated a set of camera mounting plates to let me better mount my camera on a backpack, while remaining connected to my sling-strap. The design was a pretty amazing success.

Then, I was in Japan, and three of the happiest weeks of my life. Magical country, and I wish I could live in a country mountain town, with the constant sound of running water. The cities weren’t so much my thing, but I could spend months travelling around on local trains, seeing the little farming communities.

Once I came back, there was a lot of lost time – administrative things, medical things – I saw The Sisters Of Mercy play live – a lifelong ambiton, and they were “meh”.

The year ended sitting on inflatable pool chairs with friends, drinking margaritas in the pool, watching Return of The Living Dead on a projector I’d rigged up to screen onto the side of the building.

It was a year of highs and lows, but then aren’t they all?

Noosa Mnemonic

My latest residency project with Noosa Library Service.

The overall goal was to get multiple artists, starting with me, to recreate their favourite places in Noosa, purely from memory. Each artist will create the location within Virtual Reality, using an application called Tilt Brush, from Google.

Once the places were all created, the goal is to incorporate all of them into a single read-only VR environment, which will have its default state as a 3D topographical map of Noosa.


Continue reading “Noosa Mnemonic”

2018 – A Wrapup

A year in retrospect. It’s been all over the place – a year in which there was no silver lining that couldn’t tarnish.

The big events of the year, the project for Rent, my VR residency with the library, and the death of my father, all in quick succession in the first half of the year, cast a pall over the second half.

In technology, this was the year in which everything broke.

I came into the year with a Mac that could post directly to Facebook from its share sheet, and with third-party Twitter clients that made Twitter a truly powerful platform for connectivity, and with Twitter able to post directly to my Facebook feed.

By the end of the year, my Mac couldn’t post directly to Facebook, and neither could my Twitter account. My third-party Twitter apps were smoking ruins of their former selves, and the best outlet I had to connect to the outside world from my regional town, had been effectively ruined.

I started on a TIG welding course, and got a few weeks in, before it became apparent that being the one TIG student in a MIG class, that was being run without any semblance of professionalism, meant I spent half a 3 hour class waiting for my non-working machine (which I had told the tutor about at the beginning of the class), and ended up in a shouting match with the tutor, who tried to blame me for not spending hours chasing him around an OH&S-unsafe workshop to get him to come fix my machine.

I build some nestled table workbenches for my room, with the hope they’d be something I could show my father, that he might get some joy seeing me making. But he died from his cancer while I was in the process, and so I don’t know if he ever really saw them.

I built a huge sculpture that went on stage at QPAC. It was a project from hell, marked primarily by a department lead who wanted me for my talent, but didn’t credit me with any actual expertise to know what I was doing when it came to the technical side of things, and so didn’t listen to my specific technical demands. She alternated between being angry that I wan’t keeping her in the loop, and complaining that I was overwhelming her with pointless information when I actually tried to tell the the specific information that informed my technical requirements for what I needed the production to provide, and what the consequences of choices I needed her to make would be.

I had to do a huge cleanout at my father’s house in victoria, to get it on the market to sell. What a headfuck of a shitshow.

I did my first VR residency, learning about sculpting in VR, and 3D printing. The tools demonstrate great potential, but are also not fully baked.

My public outreach roles for the library continued – It’s a fun passtime.

I worked on a new project for the library, constructing racing gates and obstacles for their drone racing programme. It was fun, but the work was so intense, the deadlines so tight, the stress so high, that I caused my health to fuck up again, and gave myself some (so far) permanent neurological damage in my spine, with phantom sensation as a result.

All in all, not a great year.

Add a Blackrapid slider to a Lowepro Toploader camerabag.

One of the problems when carrying a DSLR, is that occasionally you might want to go somewhere with your camera, where you want to take the minimum amount of bag to protect it, but not have a second strap around your neck / shoulders when you take your camera out to shoot.

Another problem, is that you might go somewhere that doesn’t allow you to carry even a small bag into a venue (some art galleries, for example), but you still want your camera on a strap.

Here’s a solution that ads a Blackrapid connector, on a slider that runs along the small bag’s shoulder strap, and which, when you detach the strap from the bag and join its ends together, turns it into effectively a standalone Blackrapid camera strap.

The donor equipment

In this case, the bag is a Lowepro Toploader 70AW. This is a bag that can take a full size pro body, with a medium sized lens like a 24-70 still attached.

Lowepro 70AW (discontinued, replaced by the 70AW II).

Two key features of this bag, the first is that the zipper that closes it – it’s one continuous length, even though there’s two zips and a buckle in the middle. That’ll be important later. The second, the shoulder strap clips on at both ends, so can be removed.

For the dropper to connect the Blackrapid connector, I’m using a Blackrapid Backpack Strap as the donor for all the parts.

Blackrapid Backpack Strap (Discontinued, replaced by Backpack Strap Breathe).

This has the advantage that it comes with all the bits you need – the BR connector, the safety catch to cover the thumbscrew (not shown in this pic), and importantly, the webbing has a loop sewn on the end.

The Backpack strap has two plastic carabiners on it (the updated version only has one). One is connected to the full length of the strap, the other, to a short loop (left and right images above, respectively).

The other parts you’ll need, are a nice smooth stainless steel d-shackle, wide enough to fit the bag’s strap, but narrow enough that it won’t be able to slide over the clips, and off the end, and a safety splitring.

  1. First Step, you need to cut through the eyelet of the plastic carabiner that’s connected to the long section of the strap. The sewn loop on the end of that strap is something we need to preserve.
  2. You need to cut the pull tag (next to the blackrapid logo left pic) off the end of the strap, so you can unthread the full length of the strap from the cleat (right pic).
  3. You need to cut the short strap and carabiner free of the cleat, so you have it as a separate piece.

Now, you’re ready to reassemble.

You’ll want to seal the cut end of the webbing with a bit of fire (I’ll leave it to you as to how to create that). The difficult part is getting it back through the cleat, which isn’t strictly designed for a double layer of webbing. It’s doable, just difficult. When you’re heat-sealing it, try to squash it flat, so it’ll feed through more easily. You could then double it over with glue / stitching so that it can’t possibly go back through.

Don’t forget to thread on the Blackrapid clip in the process.

The splitring is optional, but what it does, is prevent the pin in the shackle from turning, so that it can’t come loose.

Going back to the advantage of the Lowepro bag having a single zipper – once you connect your camera to the Blackrapid you can now put it in the bag while leaving it connected, and then close the bag behind it.

Not shown – The safety tether I use with any connection system. In this case, I attach it to the shackle, since the split ring means it isn’t capable of undoing.


If this article was of use, a donation would help support my projects.

Pop Will Eat Itself / Jim Bob / Caligula @ The triffid

If there was one thing I wish I could do with this review, it’s to show you what this gig looked like. From the back of the venue, a view over the silhouetted throng of fans, the band ripping it up in full flight amidst the colour and smoke, the giant spray-stencil banner in the background like an industrial-music altarpiece, and the repeated perpendicular structural ribs of the drum-vaulted corrugated iron roof, that formed a perfect semicircle over the crowd, catching and outlined by the light, creating such a precise repetition in linear-perspective from stage to circle, that Kubrick himself could have set the scene.

I’d LIKE to show you that.

However, after buying tickets to the gig, driving 2 hours down to Brisbane, paying for a hotel room and parking for the night, phoning the venue and leaving a message asking them to let me know if there were any problems with cameras, packing seven grand worth of pro DSLR and some of the finest wide-angle optics ever made into a compact “body & lens only” camerabag, so that I could show you this near-religious vision of industrial music performance, I discovered at the door, that despite their website’s FAQ having no mention of this rule, The Triffid is yet another venue that has fallen victim to this idiotic policy of banning “professional” cameras from entry.

So, I can’t show you that.

Half the audience can block people’s view by holding up a cellphone, to take mediocre pictures that offer greater potential pixel detail than a “pro” camera could achieve 10 years ago. They can shoot video that would have required a steadycam-harnessed cine-camera that cost more than a luxury car 5 years ago, but apparently a DSLR, which will only block the user’s own view, is such a big problem, it requires blanket bans.

Sorry Ashley, but we missed Caligula (and the beginning of Jim Bob) walking back to the hotel to leave the gear – because again, when a venue has an unadvertised “no cameras” policy, you’d think they’d have enough of a clue as to have a proper security check-in situation with lockers, not “leave your camera here at the ticket booth” – an idea from which they retreated, when I told them what it cost.

Anyway, on to the music.

Jim Bob. Hmm, how to put this… Carter USM is consistently one of my favourite bands. They hold a deep sentimental spot for me because they were a high rotation band when I first got into the goth scene, and were on a couple of the played-to-death mix tapes I had back then. They’re also one of those bands that through poor timing, I never managed to see live. What Carter did, along with other contemporaries like the Poppies, even The KLF in their stadium house monsterworks, is construct huge, rich sounds, from so many dissonant sources, that you could just be overwhelmed by the music.

Jim Bob on his own with an acoustic guitar is not that. I don’t know what I was expecting – maybe the JB doing Carter tracks with a backing band, maybe with the Poppies actually doing the backing band stuff, I’m not sure. Even Carter’s acoustic tracks, like “The Man Who Bought The World”, have more in them. He joked several times about people being disappointed by the “is that it?” of it all, so I suppose he’s heard that reaction before.

In the end, it was an interesting performance, and thinking about it from the perspective of a soloist, doing acoustic protest songs, I’d have enjoyed it more if I was better prepared for that reality. As a positive, Jim Bob’s voice is still in great form. His anecdotes and chatter had the audience, myself included, laughing, but for someone hoping to see the indoor-nuclear-detonation opening of Surfin’ USM… maybe next time?

On to PWEI, or “PWEI Mk 2.5” as Mary Byker described them.

Holy freaking hell, they’ve so got it. Epic – there’s no other way to describe them. A big band, six musicians on stage – two vocalists, live drums, everyone looking like proper rock stars… except Graham, who in his grey, short-sleeved, button up collared shirt, looks like someone’s dad got lost in the wings, and ended up on stage. It’s adorable, and he looks like he’s really enjoying performing, so madprops, because nothing could detract from just how goddamn good, and how real, crunchy and live the band sounds.

It’s hard to say much more about them – how many superlatives can you come up with? Poppies fans in Melbourne, Sydney and Perth, you’re in for a freaking treat.

UrbEx / Landscape Photography setup

I’ve finally succeeded in getting my Urban Exploration / Urban Landscape photography kit together, so I thought I’d document it here.

backpack
Heavy UrbEx.

The goal was to have a single backpack that I could travel with, which didn’t scream “tactical gear bag”, and which could handle a versatile photographic load.

Here’s the loadout.

Peak Design Everyday Backpack 20L, with:

Nikon d8XX with the 14-24 2.8, with a modified 3 Legged Thing QR-11 L-Plate. Umbrella in side pocket. Headphones and small medikit with hand sanitiser, paracetamol etc. Godox V860II & X1-n. Blackrapid Sport Breathe. GSI low-profile water battle in side pocket. 3 Legged Thing Leo with Airhed Switch.

It all packs in very snug, and there’s some modifications to the dividers to scavenge every last millimetre in width across the bag (not such a big commitment now they sell them separately). There’s also lens tissues, lens covers, remote release cable, camping knife-spork and a couple of cable adapters in the interior side pockets. Wallet and a protein bar in the top compartment, and still space for an iPad in the laptop sleeve.

Inside, there’s one vertical divider at the bottom to separate the camera onto the left, and tripod on the right, then one horizontal divider across the top of that.

The horizontal is folded up on the right to make one tall space for the tripod on the right. One layer of the folded up part on the horizontal divider is removed to give 5-10mm more room in the top left compartment. The vertical divider has a layer removed from the folding section as well, to give more room to the L-Plate on the camera, so as to stop the grip from poking out through the side. That vertical divider also has an extra row of velcro sewn onto it, so the whole side adheres to the inner surface of the bag, rather than just the stock tab. The Blackrapid bag packs in behind the tripod in the space it creates where the carbon fibre of the legs is exposed. The trimmed parts removed from the folding sections of the dividers are velcro-ed into the bottom of the bag with adhesive-backed velcro strips, to provide a bit of padding for the lens and bottom of the tripod.


If this article was of use, a donation would help support my projects.