Databending picture files loaded under U-Law not working

Help for Audacity on Windows.
Forum rules
ImageThis forum is for Audacity on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".


Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
arkmabat
Posts: 4
Joined: Tue Sep 27, 2016 6:14 am
Operating System: Windows 8 or 8.1

Databending picture files loaded under U-Law not working

Post by arkmabat » Tue Sep 27, 2016 6:17 am

Hello, I was trying to figure out how I can load an image file and databend it with audacity. Past tutorials exist but they don't seem to work with the updated version. Importing a .tif with A-Law works for a 3rd of the image but the rest doesn't save correctly for some reason. Any help appreciated.

Trebor
Posts: 9953
Joined: Sat Dec 27, 2008 5:22 pm
Operating System: Windows 8 or 8.1

Re: Databending picture files loaded under U-Law not working

Post by Trebor » Tue Sep 27, 2016 8:47 am

arkmabat wrote:...I was trying to figure out how I can load an image file and databend it with audacity ...
I followed these instructions (using Audacity 2-1-2) .... https://www.youtube.com/watch?v=cXjwJPz4qi0

And got this ...
Obama, before-after wah-wah glitch in Audacity 2-1-2.jpg
My first photo glitch in Audacity : I didn't know it would make Obama white
Obama, before-after wah-wah glitch in Audacity 2-1-2.jpg (114.22 KiB) Viewed 5453 times

steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Databending picture files loaded under U-Law not working

Post by steve » Tue Sep 27, 2016 11:40 am

I followed those instructions, applied WahWah effect, and got this:
WahWahElvis.png
WahWahElvis.png (192.5 KiB) Viewed 5451 times
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Trebor
Posts: 9953
Joined: Sat Dec 27, 2008 5:22 pm
Operating System: Windows 8 or 8.1

Re: Databending picture files loaded under U-Law not working

Post by Trebor » Tue Sep 27, 2016 12:15 pm

Wah-Wah Elvis matches the video, I must have done something different :
somehow* I've split it into R G B channels producing the white/normal/dark Obamas.

The video tutorial said U-law, arkmabat said A-law, maybe that's the source of their problem, (evidently it's not Audacity's fault).

* I omitted to select "planar" ...
Technicolour Obama.jpg
Technicolour Obama.jpg (120.06 KiB) Viewed 5449 times

steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Databending picture files loaded under U-Law not working

Post by steve » Tue Sep 27, 2016 12:52 pm

Trebor wrote:The video tutorial said U-law, arkmabat said A-law, maybe that's the source of their problem, (evidently it's not Audacity's fault).
So long as:
  • The Gimp Import format matches the Gimp Export format,
  • The image format is not a compressed format,
  • The Audacity Export format matches the Audacity Import format,
  • The format in Audacity is mono and not compressed,
you will usually get 'something' that is at least vaguely meaningful.

The way to test is to export from Gimp and write down the export settings, then import (RAW and mono) into Audacity and write down the import settings. Then, without doing anything to the audio track, export from Audacity using the same settings as the import, then import ("open") in Gimp using the same settings as the export, and the image should be roughly the same. The difference between the new image and the original image shows how much data loss there has been.

For best results, turn off "High quality conversion > dither" (see: http://manual.audacityteam.org/man/qual ... ences.html)

Headerless formats are generally better because then you are only dealing with the image data.
You will get different results when processing depending on the formats used. There is no direct correlation between pixel values in the image and amplitude or frequency in the audio track, it's just a relationship between pixel values and sample values, so the process is all rather hit and miss.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Databending picture files loaded under U-Law not working

Post by steve » Tue Sep 27, 2016 1:19 pm

Selecting the "planar" option when exporting from Gimp gives you all the "red" data first, then the "green", then the "blue".
The "normal" (RGB) option gives you an audio file containing RGB values for each pixel in order, starting from the top left corner, then scanning left to right working down the picture.

So if you want to operate on colour channels, chose the "planar" option. If you want to work on the image in "top to bottom" fashion, select "normal" (RGB).
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Trebor
Posts: 9953
Joined: Sat Dec 27, 2008 5:22 pm
Operating System: Windows 8 or 8.1

Re: Databending picture files loaded under U-Law not working

Post by Trebor » Tue Sep 27, 2016 1:42 pm

The images are surprisingly robust : it takes a lot of "moshing"in Audacity before they become unrecognizable ...
Warhol-ish Obama.jpg
Warhol-ish Obama.jpg (239.49 KiB) Viewed 5449 times

steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Databending picture files loaded under U-Law not working

Post by steve » Tue Sep 27, 2016 1:45 pm

8-bit unsigned seems to work pretty well.
Here's a bit of "channel moshing"

The inverted part of the image was by "reversing" part of the waveform.
The colours were enhanced in Gimp for the final image.
elvis0bbb.png
elvis0bbb.png (11.74 KiB) Viewed 5448 times
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

arkmabat
Posts: 4
Joined: Tue Sep 27, 2016 6:14 am
Operating System: Windows 8 or 8.1

Re: Databending picture files loaded under U-Law not working

Post by arkmabat » Tue Sep 27, 2016 11:44 pm

Thank you. It was an incorrect file format and converting to raw .data fixed it. Thanks.

steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Databending picture files loaded under U-Law not working

Post by steve » Wed Sep 28, 2016 2:11 pm

arkmabat wrote:Thank you. It was an incorrect file format and converting to raw .data fixed it. Thanks.
Excellent.

Are you going to share a couple of pictures with us?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply