private void FromXbox(string image) { if (!File.Exists(image)) { return; } imgCounter++; Log("Converting file " + imgCounter + " of " + (imagesXbox.Count() + imagesDDS.Count())); Log(" - " + Path.GetFileName(image)); var format = Path.GetExtension(image).Replace(".", "").Trim().ToLowerInvariant(); try { // Save the image Bitmap bitmap = RBImageConvert.GameImageFileToBitmap(image); if (chkXboxBMP.Checked) { bitmap.Save(Path.ChangeExtension(image, "bmp"), ImageFormat.Bmp); } if (chkXboxPNG.Checked) { bitmap.Save(Path.ChangeExtension(image, "png"), ImageFormat.Png); } if (chkXboxJPG.Checked) { bitmap.Save(Path.ChangeExtension(image, "jpg"), ImageFormat.Jpeg); } //if clean up box checked, delete originals if (chkCleanUpXbox.Checked) { Tools.SendtoTrash(image); } Log("Converted from " + format + " format successfully"); } catch { Log("Error converting from " + format + " format"); } }
private void FromPS3(string image) { if (!File.Exists(image)) { return; } imgCounter++; Log("Converting file " + imgCounter + " of " + imagesPS3.Count()); Log(" - " + Path.GetFileName(image)); try { // Save the image Bitmap bitmap = RBImageConvert.GameImageFileToBitmap(image); if (chkPS3BMP.Checked) { bitmap.Save(Path.ChangeExtension(image, "bmp"), ImageFormat.Bmp); } if (chkPS3PNG.Checked) { bitmap.Save(Path.ChangeExtension(image, "png"), ImageFormat.Png); } if (chkPS3JPG.Checked) { bitmap.Save(Path.ChangeExtension(image, "jpg"), ImageFormat.Jpeg); } //if clean up box checked, delete originals if (chkCleanUpPS3.Checked) { Tools.SendtoTrash(image); } Log("Converted from png_ps3 format successfully"); } catch { Log("Error converting from png_ps3 format"); } }