Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. My bare hosting costs are currently not met so please consider donating by either clicking this text or the Patreon link on the right.

Patreon

Recommended Posts

Posted

This is going to be my final project for VB III when it's all done... I started this to fill out my snapshot and title collection, and to add boss snaps and game-over screens to as many as I can. I'm only on the first tab, but this proggy is already able to do a print screen, manipulate the ratio of the image, save it as a user selected file type, and save it to a directory. Next I'm making an emu options tab that you put in the emu's working path and EXE, it launches the game for you, takes the snap (via hot key or timer), and saves it as the ROM name in the folder you select. Eventually I want to make it parse GameEx for image directories, do a match based on images vs roms, and fill out your collection. Same with the Artwork Download Utility, except I'll import the MISS.TXT and work off of that. Like I said, I only just made it functional with the image manipulation. The hot key assignment is turning out to be a real bitch. Any help of getting my window to detect a keypress event would be helpful. :)

Thoughts, questions, or suggestions are welcome!

GameSnapper.png

Posted

Screw nice. I just want it to work! :)

I'm gonna go check that out right now. I was looking at trying to do a RegisterHotKey and just couldn't get it to work the way I wanted. If I do. GetAsyncKeyState it should detect fine without losing focus eh? So I was going about it all wrong. Go figure. :)

Thanks for the tip. :)

Posted

Yeah, but would you give me an A on it if you were my professor? Is there an API for that? LOL!

Posted

Man I wish I could learn how to program stuff like that. For me personally, I'd definately use it. Sure, Circo's site has a TON of content already, but there are always a few snaps in a romset that are missing. This program would work great for doing that. Granted, GameEx does this too, but to have an external program designed specifically for that purpose would be great.

Posted

That's kinda the way I felt about it when I started this. Thanks to Tom I got over the hot key hurdle with the API call and a timer/loop. Progress is a good thing!

When I'm ready to bug test you're welcome to give it a spin. :)

Posted

I heart Fraps but this looks great man! Only capturing still at the moment or will it eventually evolve into video?

Posted

I don't know if I'm confident enough with attempting video capture ATM, but I can probably add a tab for FRAPS for those of us that use it. I'm sure this will evolve over time as I get more comfortable with my coding skills (or lack thereof). :)

Posted

May i just chime in and say that this looks like an awesome idea! I have soooo many sets with zero snaps its not funny! One feature i think that would make this proggy stand out from the rest would be to have an auto-cropping type feature, as most screen capture apps always (in my experience) grab the WHOLE screen - borders and all! :( My way of getting around this is to create a script in GIMP, then run it from my desired snap folder using a batch file. It works but is a pain in the arse! If you could integrate this into your prog i would worship you, really, i would :P

Check this page to get an idea of what i mean. Maybe you could even use gimp itself, create some custom scripts then let us run them straight from your proggy (choose crop size & offset, point to folder, execute). Just an idea i thought i'd throw out there :)

But good luck with the prog! i will be keeping an eye out for this one for sure!

laters

Daz

Posted

Hmmm I hadn't thought about this since I was assuming the emulator will be launched in full screen so Windows won't be an issue for most emulators. There's no reason why I can't use the crop/rezize options Windows already uses (I could easily write a function for this), but it may need to be in he finishing process as opposed to the early betas. There's so much going on here I want to be sure it works before I start adding finesse.

Shouldn't need to use Gimp at all (my goal is to remove dependencies on any outside programs besides the emulators of course).

I do like the suggestion though and will probably implement it. :)

I'm actually working with INI files ATM, and progress is painfully slow (my eyes are obviously bigger than my belly!) but I'll get this out there. :)

Posted

I was playing with some Process.Start code in a side project (I work on little projects and try stuff before I actually impliment the code in the app)... what is the GIMP command line you use to run that batch file which auto-crops for you? I might release a standalone to remove your need to run a batch file on every image seperately. I use Photoshop so I'm not fully in the loop as far as approach from CLI.

  • 2 weeks later...
Posted

what is the GIMP command line you use to run that batch file which auto-crops for you?

A bit late on the reply here - been busy with saints the third ^^ the reason my method is such a pain is because for each batch i have to edit the GIMP script itself which gets tedious. A good example is the Game Gear set i just downloaded from EmuMovies, most snaps are fine but around a fifth of them were like this:

6477391345_c432cdd365.jpg

Obviously no one like borders, especially if it takes up half the snap! So this is the crop script i run:

batch-crop.scm

  (define (batch-crop pattern)
(let* ((filelist (cadr (file-glob pattern 1))))
(while (not (null? filelist))
(let* ((filename (car filelist))
(image (car (gimp-file-load RUN-NONINTERACTIVE
filename filename)))
(drawable (car (gimp-image-get-active-layer image))))

(gimp-image-crop image 160 144 80 28)

(gimp-file-save RUN-NONINTERACTIVE
image drawable filename filename)
(gimp-image-delete image))
(set! filelist (cdr filelist)))))

This line:

(gimp-image-crop image 160 144 80 28)

is what needs to be determined each batch, the first and second set of numbers being the final crop size in pixels (160,144) and the third and fourth being the starting coordinates or offset of the crop itself (80,28). I do this by loading an image in gimp and just draw a select box to determine the crop size & offset - like i said tedious but i'm familiar with GIMP and you can crop 1000 images in 5 seconds this way (using the batch com).

The command itself is simple:

gimp-2.6 -i -b "(batch-crop \"*.png\")" -b "(gimp-quit 0)"

-i = no gui

-b = batch command

(batch-crop \ = the script to be called

"*.png\") = the file filter which can obviously be changed to *.jpg or whatever format your snaps are in

So yeah i just run that command from the snap folder itself (after i've already moved the bad ones to their own directory!) and et voila all files batch cropped in the blink of an eye:

teh result

6477391419_c7eda6c5c8_m.jpg

Now, although this method is effective as you can see there are annoyances in the procedure! First locating the uncropped snaps, moving them to their own directory, determining offset & crop size, altering the script blah blah :P

And i understand you wanting to get rid of dependencies and if you can do it, as i said before, i WILL worship you ^^ infact i'll even make a new sig with "I belong to the church of Adultery" in it!

Oh and count me in on the beta, i have THOUSANDS of snaps that need to be created hehehe

Posted

Honestly I could just have you select a bounding box and do a crop based on the dimensions of the box and do a batch crop if you'd be willing to pull out the ones that need to be cropped... No need for all the extra shazam when I could do most of what you described in the Paint class. :)

Posted

Honestly I could just have you select a bounding box and do a crop based on the dimensions of the box and do a batch crop if you'd be willing to pull out the ones that need to be cropped... No need for all the extra shazam when I could do most of what you described in the Paint class. :)

And THAT sir would be exactly why i'd chose your proggy over anything else - to be able to create snaps AND crop them all in one hit :D but yeah i was thinking of a bounding box type scenario when imagining it in my head, something like load the 1st snap in the folder, we then click the top-left (start of crop) then click bottom-right (end of crop) your proggy has all the info it needs and then boom! run command through all snaps in folder. i like it already even though it's only an idea at this stage lol

And ofcourse i would (and i think most would in the circumstance) be willing to pull the offending snaps! I don't think anyone really expects a "One Button Hit" wonder proggy ^^ Anyone who does probably shouldn't be allowed on a computer :)

But oooo i just had a spark, if the directory contained both cropped and uncropped images like the game gear set i mentioned (the already cropped were 160x144, and uncropped 320x200) maybe your prog could check if the image is already of cropped dimensions or smaller as set in your bounding box funtion and if so skip to next file.

Sorry man i keep throwing ideas at you and you've only just started it lol i'll leave you to it ;)

Posted

No I thought about that too... like a compare attribute calc. :)

Posted

To be honest, there are quite a few that expect a program to do everything for them, including their spouses. ;) Sad but true. That is why I love being able to use plug-ins and modules so I can pick and choose which options I want rather than have a program that is so bloated trying to satisfy the masses that it becomes inefficient and inoperable - kinda like government.

Posted

Exactly, obviously when my script encounters an image where it cannot possibly crop it using the defined dimensions ie image is too small then it returns an error and halts - good for catching them "uncropped" images that have actually been scaled down (probably using a batch command ironicaly!) and therefore useless - as ofcourse if you manually cropped a scaled down image that still has borders you'll probably end up with an image that is 56x50 or something worse?! But it can be real frustrating to "pull ALL the baddies", run the script only to have it halt repeatedly because of said scaled down images that look to me at a glance to be just uncropped!

If you used a compare arguement then it would simply skip said offending files and continue batch command - right? Would save a helluva lot of hassle! :D

Ofcourse i am only chucking these thoughts out there, last thing i wan't is for y'all to think "who dis dude comin in here shoutin shxt" :o lol not my attention at all :) it's just if i see potential in something and i have ideas i get on it ;) i'm aware i am only a "noob" here :P

EDIT: @ Draco

To be honest, there are quite a few that expect a program to do everything for them, including their spouses. ;)

i lol'd at this!

Posted

Actually I'd probably have it move the file to an "unprocessed" folder and spit out the errors in a log. ;)

Posted

So how come I get to be both? ;)

Artist, coder, and musician. :D

Think like all three = epic win!

Posted

So how come I get to be both? ;)

Artist, coder, and musician. :D

Think like all three = epic win!

Good answer, actually dito ^^ guitarist? please don't coz i will freak lmao (actuallay not picked mine up in around 4 years :o - tragic yo)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...