Skip to content

Commit

Permalink
v0.9.3
Browse files Browse the repository at this point in the history
  • Loading branch information
bartlomiejduda committed Jan 20, 2025
1 parent 3c6e7f6 commit d59b086
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ Pillow==10.4.0
pre-commit==4.0.1
pytest==8.3.3
rawutil==2.8.1
ReverseBox==0.24.6
ReverseBox==0.24.9
tkhtmlview==0.3.1
7 changes: 0 additions & 7 deletions src/GUI/gui_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,6 @@ def _step_up_by_byte_by_shortcut(event): # decrease offsets by byte
pass
if curr_start_offset <= curr_end_offset:
self.img_start_offset_spinbox.invoke("buttondown")
if curr_end_offset <= self.gui_params.total_file_size and curr_start_offset > 0:
self.img_end_offset_spinbox.invoke("buttondown")
self.master.focus()

def _step_down_by_byte_by_shortcut(event): # increase offsets by byte
Expand Down Expand Up @@ -250,25 +248,20 @@ def _step_down_by_row_by_shortcut(event): # increase offsets by row

def _step_up_by_row_by_shortcut(event): # decrease offsets by row
curr_start_offset: int = 0
curr_end_offset: int = 0
curr_width: int = 1
current_pixel_format: str = self.pixel_format_combobox.get()
image_format: ImageFormats = ImageFormats[current_pixel_format]
bpp: int = get_bpp_for_image_format(image_format)
bytes_per_pixel: int = convert_bpp_to_bytes_per_pixel(bpp)
try:
curr_start_offset = int(self.current_start_offset.get())
curr_end_offset = int(self.current_end_offset.get())
curr_width = int(self.current_width.get())
except Exception:
pass
row_size: int = curr_width * bytes_per_pixel
new_start_offset: int = curr_start_offset - row_size
new_end_offset: int = curr_end_offset - row_size
if new_start_offset >= 0:
self.current_start_offset.set(str(new_start_offset))
if new_end_offset >= 0:
self.current_end_offset.set(str(new_end_offset))
self.reload_image_callback(event)
self.master.focus()

Expand Down
6 changes: 4 additions & 2 deletions src/Image/heatimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ def _image_decode(self) -> bool:
ImageFormats.RGBA4444,
ImageFormats.ARGB4444,
ImageFormats.XRGB4444,
ImageFormats.ABGR4444,
ImageFormats.XBGR4444,
ImageFormats.RGBX4444,
ImageFormats.BGRA4444,
ImageFormats.BGRX4444,
Expand All @@ -180,7 +182,6 @@ def _image_decode(self) -> bool:
ImageFormats.XRGB8888,
ImageFormats.RGBX8888,
ImageFormats.BGRX8888,
ImageFormats.RGBX8888_old,
ImageFormats.RGBM8888,
ImageFormats.R32,
ImageFormats.G32,
Expand Down Expand Up @@ -228,7 +229,8 @@ def _image_decode(self) -> bool:

ImageFormats.PAL16_IA8,
ImageFormats.PAL16_RGB565,
ImageFormats.PAL16_RGB5A3
ImageFormats.PAL16_RGB5A3,
ImageFormats.PAL16_RGBA8888
):

if (self.gui_params.palette_loadfrom_value == 1 and self.gui_params.img_file_path is not None) \
Expand Down
2 changes: 1 addition & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from src.GUI.gui_main import ImageHeatGUI

VERSION_NUM: Final[str] = "v0.9.2"
VERSION_NUM: Final[str] = "v0.9.3"

logger = get_logger("main")

Expand Down

0 comments on commit d59b086

Please sign in to comment.