-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2a426eb
commit d335204
Showing
3 changed files
with
38 additions
and
25 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |