Here are pix of 3 battery chargers I bought that run directly from 12vdc.
The Viatek on the right and the Alkacharger on the left are advertised as being able to recharge alkaline batteries. The Radio Shack Enercell charger in the middle is not and will flash an error code if your try, but it does seem to charge anyway if you ignore the warning.
The Viatek is junk manufacturing. The 9-volt port broke almost the first time it was used and the lid hinges didn't last much longer. But the Viatek actually recharges alkalines and does so quickly. I do not intend to return the Viatek for a replacement because the construction is so poor a replacement won't last any longer. The 9-volt port is riveted to 1/16" cheap plastic. To repair the crack I used 2 part epoxy and then back-stopped the port underneath with 2 layers of double-sided foam tape. That properly secures the top half of the shell to the bottom and eliminates the space between the two which contributed to the break.
The Viatek isn't consistent about what it considers a full battery if you measure voltage. It may be checking internal resistance.
The batteries I wanted recharged are the Chinese made D-cells in the picture. Those came with touch-less paper towel dispensers and were used up to 6 months until the voltage was about 1.25. That those recharge at all and do not leak amazes me. The Viatek needs a cold boot to restart after a full cycle. Power disconnect, remove batteries, repeat. Simply using the on-off button doesn't do it.
Another major weakness of the Viatek is it requires two strong fingers or a flat tool to insert D-cells. The return springs are too stiff and there is no spare room to push back the negative contact to get a D-cell in.
There is a wall wart version of the Viatek that charges AA, AAA and 9-volt cells, but I gave that to my father because I want only direct 12v appliances.
The Radio Shack Enercell is the only one of the three with a USB charging port.
The Alkacharger trickle charges and will not raise the voltage as high as the Viatek. The D-cells that were 1.24v never went about 1.37 when left in the Alkacharger, but it took more than one recharge cycle in the Viatek to make the higher voltages stick. The Alkacharger is also powered with a negative pin/positive shell plug unlike most appliances that use external adapters. That meant I had to make a dedicated adapter cord for it. The diode behind the power port got hot enough to discolor the wafer board, and now doesn't even get warm, so it's probably burned out, but the charger still seems to work.
The open voltage of the Alkacharger is 1.61 and 9.09. Both of those are safe for AA-AAA and "9v" batteries, respectively. The real resting voltage on a AA, AAA, C or D is somewhere between 1.55 and 1.65 depending on the maker and freshness.
The Alkacharger does a lot of cell at once, but it takes days to recharge even NiMH or NiCads. The Alakcharger has battery management chips that allow you recharged batteries to float indefinitely. If it takes a week, you can leave it plugged in that long. The Viatek has an on-off buttom, but the Alkacharger's switch is built into the lid.
The major design flaw of the Alkacharger is that leaking batteries drip right down on the electronics. There is a hole with a spring contact under each cell. I had a AA cell leak the first week I used it and had to disassemble the charger and clean it up to prevent permanent damage. The only safe way to use the Alkacharger is sideways. That way leaks are contained in the cell tube.