Alexey-T / CudaText

Cross-platform text editor, written in Free Pascal
Mozilla Public License 2.0
2.54k stars 174 forks source link

Open image as binary/hex file #5771

Closed bahusoid closed 2 weeks ago

bahusoid commented 2 weeks ago

Current behavior: when I open some jpeg image in CudaText it's displayed as image and I can't change it: image

Expected behavior: Similarly to opening binary files I want to see options to see image as binary or hex file. So would be nice to see options in status bar: Viewer: Image, Viewer: Binary, Viewer: Hex ... image

Alexey-T commented 2 weeks ago

In the wiki topic about binary viewer, you see info, how to open a file in binary viewer. Pls follow it. It must work also for jpeg.

bahusoid commented 2 weeks ago

Are you referring to "Open in hex viewer" action? Yeah I know about it. But option to change viewer mode from status bar would be nice addition.

Alexey-T commented 2 weeks ago

Statusbar additional item for pictures? Will be just bloat because ppl who see pictures 99.99% dont need it.

bahusoid commented 2 weeks ago

Instead of static text "Image 1400x1400" I want to see a button (exactly what is done for other viewers) with options. So it doesn't clutter status bar with any additional elements.

ppl who see pictures 99.99% dont need it.

Maybe... but I don't know people who use text editor for watching pictures. Some advanced option to disable image viewer completely would also fix my problem :)

Alexey-T commented 2 weeks ago

Simple plugin - it disables opening of picture files (see the python code for possible file-types: png/jpg/bmp). instead it opens files in hex viewer.

cuda_disable_picture_viewer.zip

edit: updated/fixed version is now uploaded to Github: https://github.com/CudaText-addons/cuda_disable_picture_viewer

bahusoid commented 2 weeks ago

Awesome! Thanks for quick reply.