Yes that's right, if the picture has the same name (and is the same type, whether .png or .jpg) and is in the same place, then the code will find it. You would have to delete the old one though, can't have two files in same folder with same name. The code doesn't care what that picture actually looks like, just what the file name and location are.
Now, you will want the old and new logos to be the same size, otherwise you might have to make more changes. You can download the current logo picture from MODX, (go to the assets/images folder, right click, and click download), then take note of the number of pixels in the height and width of the logo picture. Make sure the new picture file has these same values. It doesn't matter how big the file is, just the pixel height and width.