So you guys have probably seen my videos before where I show you how to integrate OpenAI (which is the ChatGPT engine) into your Microsoft Access database and use it for all kinds of cool things. Well, tonight I spent a little time playing around with image generation using the OpenAI API, and while it's not quite as good as what you can get with the web-based ChatGPT interface, you can get it to do some pretty cool things, and you can control that with your Access database.
You basically use code very similar to what I've built before. You write a prompt like you would on the web, send it to a particular page, and then it will return a URL to a picture generated based on your prompt, which you can then download and save locally and display in your Access database. Then you can do whatever you want with it.
I put together a simple database where you put a prompt in and specify what your images folder is. You can set a couple of things: HD or standard quality (obviously it's an API, so you have to have an API key, and standard quality images cost less than HD images). Then you can pick a few options: vivid or natural style. Vivid is like the colors really pop, whereas natural is a little more muted. I made a list of a whole bunch of different types of styles (like ink wash, impressionist, fantasy, hand drawn, pencil, that kind of stuff), futuristic, sci-fi, so you could pick one of those just to give you some ideas.
Down below are some sample images that I generated with this, and it takes about 5-10 seconds to generate an image, so it's not bad at all. Then you've got them to use with your database. You can automate this, so if you want to make multiple images for different things, you can. I'm curious how many of you would like to see a set of videos on this and how I did it. If enough of you are interested, maybe I'll put something together. And if not, then I'll just put this together as a template, and you guys can play with it and figure it out on your own lol.
Then I played it around with a couple of different settings. I tried to get one vibrant and bright with neon accents, which came out pretty good. This looks like the older images that ChatGPT itself would create.
And sadly, it doesn't produce very photorealistic images like you can get from ChatGPT. Like if you've seen the ones I've produced with my Captain's Log, like Star Trek stuff like Picard and Spock and that. In chatting with ChatGPT, it says that the API has stricter guardrails for intellectual property reasons. It won't let you generate things that are super photorealistic. And they don't want people making them for deepfakes and stuff. So I get it. But if you want a simple image generator that you can tie into your database and run batches and stuff, this is pretty cool.
You can see the prompt I used there. This is nowhere near 1980s TSR fantasy art. Dungeons and Dragons stuff like Larry Elmore and Jeff Easley who are two of my favorite illustrators. This looks nothing like it and he's holding a sword and he's got his bow and the arrow is knocked but by what? It just doesn't make sense but it's something it's not bad. For a cheesy illustration but I can see this being better for non-realistic stuff like the last batch of photos or images.
That was actually the first one I tried doing, and it looks like it doesn't look like DND style art, it looks like a 1990s video game art. But that's better than nothing. I'm sure it will get better, and I'm sure they'll make it more realistic. Compare that to some of the stuff I've created with just ChatGPT...
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Captain's Log.