Jump to content

[1.0.x] Image viewer 0.3 13/9/2015


agises

Recommended Posts

Hi there, here's a plugin to view images ingame (Delta-v transfer plots? this?). Uses toolbar if available, if not you can open the viewer by "Alt + i" or the images list by "Control + i" , put your images in "GameData\img_viewer\Plugins\PluginData\Images\" directory.

0.3 release: Added resize buttons, fix some nres.

Features:

-Just an ingame image viewer.

-Remember last image open, windows positions and visibility status.

-Zoom.

Screenshot:

e8V28hv.png

Download:

https://github.com/hashashin/ksp-img_viewer/releases/download/0.3/img_viewer-0.3.zip

mirror: http://spacedock.info/mod/80

Source/bugs/changelog/code suggestions:

https://github.com/hashashin/ksp-img_viewer

License GPLv3

Salud.

Edited by agises
release update
Link to comment
Share on other sites

Your Notes and Kalculator are already indispensable to me. Now I can already think of some great applications for this one. :D

Thanks, I think I should give a little love to the Kalculator, maybe next target when I have free time.

Salud.

Link to comment
Share on other sites

You just keep turning out amazing stuff, don't you!?

This is gonna be *so* useful. I'm always alt-tabbing to check out a plane's line drawing while recreating it...

EDIT: Dang, misunderstood. Any way you could load images on the fly? That is, OnGUI read a list of all files under viewer/PluginData/ and then when one is selected read it into a Texture2D, and unload it when done? As it stands it looks like all images must be available before KSP starts, and all images will therefore take up texture memory (and be subject to ATM, too).

Edited by NathanKell
Link to comment
Share on other sites

You just keep turning out amazing stuff, don't you!?

This is gonna be *so* useful. I'm always alt-tabbing to check out a plane's line drawing while recreating it...

EDIT: Dang, misunderstood. Any way you could load images on the fly? That is, OnGUI read a list of all files under viewer/PluginData/ and then when one is selected read it into a Texture2D, and unload it when done? As it stands it looks like all images must be available before KSP starts, and all images will therefore take up texture memory (and be subject to ATM, too).

You can add images to the Images directory while running, then just press the refresh button on the list window. Right now the plugin just ignores the textures the game loads at init (weird yeah) but that way you can add or remove images at runtime with no trouble. So if you have a bunch of images or very big ones, could be better if you let the game load then copy the images to the Images dir. That way only the image loaded in that moment uses memory.

Salud.

Link to comment
Share on other sites

Ah, ok!

You should then put the images under a PluginData folder; anything in PluginData folders (or subfolders) isn't loaded on KSP startup.

I did not know that, I was thinking about remove the images from the gamedatabase in the main menu, but it's easier and cleaner your way XD. Thanks for the tip.

Link to comment
Share on other sites

  • 2 months later...
  • 2 weeks later...
Very useful. If I might suggest a minor tweak, the menu stays on too long while hovering over in blizzy's toolbar, often blocks the other buttons when my mouse just happened to pass over this one.

I changed a little how the button work, take a look on 1st post I released 0.2.2.

Salud.

Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...

Hey,

First of all this is a great mod! I love to be able to see my dV maps ingame!! :P

Now my game works with this mod and many other mods (probably too many mods but yeah.. :P), but i had some FPS drops and whatnot and started looking at the debug window and ksp log etc. and found out I had a constant stream of Argument Out of Range Exceptions.. While looking at the KSP log they seem to originate from your mod.. :s Because I have loads of mods I cant be sure but I thought i would post it here.. Ill try loading my game without this mod and see if the exception persists!!

this is what Keeps getting spammed in the Debug and KSP log.txt:

[EXC 12:25:14.612] ArgumentOutOfRangeException: Argument is out of range.

Parameter name: index

System.Collections.Generic.List`1[system.String].get_Item (Int32 index)

img_viewer.ImgViewer.Update ()

EDIT: Loaded without ImgViewer 0.2.2 and i dont get the Exceptions any more so it seems to be caused by your mod.. Or your mod in conjunction with another mod... :s Hope you can fix it or tell me what I might be doing wrong... :)

Edited by 0phoff
Loaded without ImgViewer
Link to comment
Share on other sites

Hey,

First of all this is a great mod! I love to be able to see my dV maps ingame!! :P

Now my game works with this mod and many other mods (probably too many mods but yeah.. :P), but i had some FPS drops and whatnot and started looking at the debug window and ksp log etc. and found out I had a constant stream of Argument Out of Range Exceptions.. While looking at the KSP log they seem to originate from your mod.. :s Because I have loads of mods I cant be sure but I thought i would post it here.. Ill try loading my game without this mod and see if the exception persists!!

this is what Keeps getting spammed in the Debug and KSP log.txt:

[EXC 12:25:14.612] ArgumentOutOfRangeException: Argument is out of range.

Parameter name: index

System.Collections.Generic.List`1[system.String].get_Item (Int32 index)

img_viewer.ImgViewer.Update ()

EDIT: Loaded without ImgViewer 0.2.2 and i don't get the Exceptions any more so it seems to be caused by your mod.. Or your mod in conjunction with another mod... :s Hope you can fix it or tell me what I might be doing wrong... :)

Hi 0phoff, for some reason I stop receiving forums mails... anyway can you confirm you have no images in "GameData\img_viewer\Plugins\PluginData\Images\" ? I bet that's the problem, if no images there bad things happens(you can blame me). Exception spam will stop if you put any image there. I need to fix that in code, but that should work as poor man fix for now.

Salud.

Edited by agises
Link to comment
Share on other sites

First off, I absolutely love this mod!

On that note, I've decided to share with you all a small set of pictures taken from an Elon Musk (my inspiration) AMA at the beginning of the year, alongside with a few pictures I keep on hand for ease of access to some (of my most looked into) data on KSP. By no means is this complete but It's just my own reference and I thought maybe you will find it useful too. :)

Original AMA Link: Elon Musk AMA on Reddit

Imgur Link: AMA nit-picked QA pictures (does not include other pictures in folder)

Download: Mega.co.nz Link

*Credit to all those who contributed to all data provided on the wiki and other sources.*

EDIT: These pictures were assembled using Paint so do not expect professional quality :P

Edited by crunchynut
Link to comment
Share on other sites

Hi 0phoff, for some reason I stop receiving forums mails... anyway can you confirm you have no images in "GameData\img_viewer\Plugins\PluginData\Images\" ? I bet that's the problem, if no images there bad things happens(you can blame me). Exception spam will stop if you put any image there. I need to fix that in code, but that should work as poor man fix for now.

Salud.

Sorry for the late response but I stopped checking this thread after a while... :)

And i had image in my folder, which i could access

Link to comment
Share on other sites

  • 3 months later...
This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...