Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
ImNotVarun authored May 7, 2024
1 parent 2a426eb commit d335204
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 25 deletions.
17 changes: 0 additions & 17 deletions A_Execute.bat

This file was deleted.

12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
# Rdr2_PhotoConverter

## 💎 Overview

#### - The RDR2 Photo Converter is a tool that converts screenshots taken from the inbuilt Photo mode to .jpg Format.

#### - After Converting you have to manual go to websites that converts jpg files to png or jpeg
- The RDR2 Photo Converter is a tool that converts screenshots taken from the inbuilt Photo mode to .jpg Format.

## ⚒️ Installation
- Download the [A_Execute](https://github.com/ImNotVarun/Rdr2_Photoconvertor/blob/main/A_Execute.bat)
- Copy or move the `A_Execute` file to `Documents\RockstarGames\Rdr2\Profiles\AAAAAAAAA` (depending on your RDR2 installation).
- Run the `A_Execute` It will create a Folder `JPG_Files` that have the copies of the orignal file with `.JPG` Extention
- Now Go to this [Jpg to PNG](https://jpg2png.com/) and convert the files from `JPG` to `PGN`
- Download the [Photo_converter.exe]()
- Copy and paste the `Photo_converter.exe` file to `Documents\RockstarGames\Rdr2\Profiles\AAAAAAAAA` (depending on your RDR2 installation).
- Run the `Photo_converter.exe` It will create a Folder `Images` that have the copies of the orignal file with converted Images

34 changes: 34 additions & 0 deletions Rdr2_Photo_converter.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import os
import errno

# Get the current working directory
current_dir = os.getcwd()
print("Searching in %s" % current_dir)


def mkdir_p(path):
try:
os.makedirs(path)
except OSError as exc:
if exc.errno == errno.EEXIST and os.path.isdir(path):
pass
else:
raise


def convert(name):
in_filename = os.path.join(current_dir, name)
out_filename = os.path.join("Images", os.path.splitext(name)[0] + '.jpg')
print("Converting %s " % in_filename)
with open(in_filename, 'rb') as in_file:
statinfo = os.stat(in_filename)
with open(out_filename, 'wb') as out_file:
out_file.write(in_file.read()[300:])
os.utime(out_filename, (statinfo.st_atime, statinfo.st_mtime))


mkdir_p("Images")

for filename in os.listdir(current_dir):
if filename.startswith('PRDR'):
convert(filename)

0 comments on commit d335204

Please sign in to comment.