Not Another Image Viewer (NAIV) is a java based, platform independent image viewer and database, aimed to carry more features and customizability than other software of the same nature. PS it is free.
Be the first to post a text review of Not Another Image Viewer. Rate and review a project by clicking thumbs up or thumbs down in the right column.
pre 12 Java Advanced Imaging vs Standard Java Display Images Yes using PlanarImage Yes using Image or ImageIcon Scalable Images Yes using ParameterBlock and JAI.create Yes native with ImageIcon Performance on par (but not sufficient testing done - appears fast) base line PROS - JAI incorporates many functions which are of importance - already implemented, to future release of naiv (the naiv base feature in particular) - greater support for image file types CONS - appears higher in memory consumption - also high in memory consumption (gc can reclaim, but raises questions about peak usage) Hopefulls - hoping for better performance Incidental outcomes: It has been observed that JAI is faster at processing images, and a restructuring of the code, which instead of passing an object (ie the image) arround, uses an object local to the class (ie using the this. context), means that there should always be an image available for display, albeit not a scalled one. > JAI displays ________ -> Backdrop color doesn't work (contentpane OR scrollpane.viewport) ... Fixed -> images aren't centred in the window ... Fixed -> maybe put the scrollpane into a panel, with borderlayout: ________ scrollpane fills all available area, but if the image is smaller than the contentpane ________ set the panel to the size of the image (else to the size of the contentPane), then add ________ to the contentPane in borderlayout.center ... Not Quite: A DisplayJAI is a JPanel with the ability to display an image, so by setting its layout ________ to BorderLayout, and then adding the image to the center, with an offset derived from ________ the size of the content pane and the image, it is possible to use the mechanism intended ... Done -> fix the backdrop color setting issue ... Done -> verify variable, fixed and fullscreen window modes ... problems identified -> offset's are not correct if there is a toolbar, because the toolbar effectively covers ________ part of the contentPane ... Done -> display frame does not redraw when regaining focus / rescaled - no handler?? ... Done -> images are not being scaled ... Fixed -> likely that the values to scale with are not being set (maybe static??) ... they weren't static actually -> ACTUAL problem though was that the actualImage was never replaced by the imgScaled ________ -> ETF was not working the logic gate was reversed ... Fixed -> misc miss interprations resulting from implementation of scale variable ... Fixed -> pre-cached images (ie loaded during initial build) don't get scalled right/at all ... Fixed -> STF_ONLY (ie total image) and STF_WSF_CA (ie best fit) meaning were swapped ... Fixed -> occasional glitch where the cache appears to empty ... isolated: -> NAIV_Viewer.regenerateCacheAndReloadFile(); no longer the way to do this, instead use ________ NAIV_ImageAccess.requestStageTwoCacheRebuild(). ________ -> make sure that the function is replaced where appropriated ... Done -> misc bug fixes relating to functions using this ... Done -> regenerateCacheAndReloadFile() rewritten ... Done -> cache does not build ... Fixed -> added code that copes with persistent files that are moved / deleted (goes to parent) ... Done -> resizing the window, or overlaying the window makes the frame contents the same color as ________ the viewport color - now grey ... Fixed -> the viewport doesn't appear to get cleared ... Fixed -> windowmode selection is currently disabled ... Enabled -> add Option for statusbar in fullscreenmode ... Done -> modify NAIV_Config (and related) ... Done -> modify NAIV_OptionFrame (and related) ... Done -> add to NAIV_DisplayFrame ... Done -> keyscrolling broken ... Fixed -> popup / shortcut menu does not respond (right click not registered?) ... Done -> modify ImageAccess so it does persistence internally on filesVector instead of breaking OO ... Done/Fixed > DisplayFrame mouse operation implementations _______ -> wrap around scrolling does not work ... Done/Fixed NOTE the scaling routine scales correctly (though frame borders aren't right) _______ -> fix the offset calculation ... Done -> DisplayFrame.getWrapScrollAxis() - isn't there a config that determines if axis _______ changing is optional? ... NO - Implicit only -> If so, update the function to short circ eval. ... NO - Implicit only -> check width of image against width of contentpane && WSF_CA ... Something like that yeah -> Keyscrolling wrapscroll feature (start at the bottom if going back?) ... Done (more by necessity) -> Add option to option frame and language ... Done -> add to config, set default disabled, add access methods ... Done -> add discriminator to display(image, bool) ... Done (key flick back trigger added) -> STF_WSF_CA - change Axis does not happen (probably not coded) ... CORRECT -> works on the basis of ImageLayout (NAIV_DisplayFrame) - which is not set; IMPLEMENT ... Done -> missing some logic -> needs to consider what image axis is larger than display area ________ -> implement in display, by also passing the "relative" imageLayout ... Done -> imageProcessing will need to provide this value (goes in scaleUsingXRatio()) ... Something like that ... see next note also -> a class should be generated which can be used to pass the image and related data. ... Done -> NAIV_ImagePassing ________ (That way the function does not need to baloon out) ________ SPECS: ________ Image itself (Planar image) Ready to display (ie unprocessed) ________ File (with path) ________ A Constructor setting the above ________ Access methods to get the above as well as: ________ getOriginalWidth(), getOriginalHeight() ________ giving boolean if image scaled based on dimension equality ________ giving layout of image ________ giving filename as file ________ -> Document ... Done -> tidy ... Done -> removed constructory actiong on file and image: unsave a file that does not ________ relate to the image could be passed ... could be handled, but why bother? this ________ class is supposed to handle the loading of images for the entire program ... Done -> check images are not being loaded anywhere else ... Done (all good) -> removed getImageDimension() ambigious in what it does / should deliver ... Done -> removed getWidth() and getHeight() .. again ambigious and not needed ... Done -> UPDATE - getWidth(), getHeight() ... Done -> UPDATE - original size passed in (but extract from image passed in instead) ... Done -> - pass forward imgConfig (rather than doing it in NAIV_ImageAccess ... Done -> ADD - getScaledImage() - calls NAIV_ImageProcessing ... Done -> NAIV_TwoStageCache will need to return NAIV_ImagePassing ________ .loadOnDemand() (two functions - needs to cease using getPlanarImage()) ... Done .get...() ________ -> Previous ... Done -> Next ... Done -> Current ... Done -> Others are automatic? ________ -> First ... Yes -> Last ... Yes -> Convert return Object to return NAIV_ImagePassing ... Done .get() has a size verifiction line removed which will still be needed - reactivate ... Completely Revised instead of get[Planar]Image() will need to use getPassableImage() ... DOESN'T EXIST??? -> NAIV_ImageAccess will need to return NAIV_ImagePassing ________ -> reloadCurrentImage ... Done .get(int imageToGet) ... Done .get_retImage() ... Done .getCurrent() ... Done move to NAIV_Image package ... Done -> NAIV_ImageProcessing will need to return NAIV_ImagePassing ________ .getImage() rename getPlanarImage() ... Completely Revised add .getPassableImage() ... Completely Revised move to NAIV_Image package ... Done .verifyImageSize() may need to return NAIV_ImagePassing - mv autocorrectImageSize() ... Completely Revised -> added processedImage object ... Done -> set by scaleImage() ... Done -> returned by processImage() ... Done -> Tidy access methods ________ -> add access methods for images ... NO!!! -> remove unused functions ... Done -> document ... Done -> add debug time output for the time it takes to scale the image ... Done -> add debug time output for loading files ... Done (There is a significant lag ... although multi threading is going to happen ________ it might be interesting to know how long that process takes when compared ________ against the time it takes to flick the image (atm, without scale ahead about ________ 1-2 sec on 1280x1024 images) ________ ODD - takes ~ 4 or 5 milliseconds, I doubt that's for real, my guess is that ________ JAI bumps it onto a lower priority thread (or thread either way) and returns ________ the reference where the object will be. ________ I'm hoping now, that either ________ 1) I can find some documentation on how to fix that issue (I need something ________ tangible for JAI either way (re deprecation), AND ________ 2) that forcing the image to be pre-scaled causes the scaling to force the ________ load through the pipeline to thus speed up the process ________ -> Consider Multithreading the scaling process ... Done -> null processedImage in constructor ... Done -> Start a thread to generate a scalled image in constructor ... Done -> make the processImage() function check if an instance exists ... Done AND matches in size to what we want now ... No, not needed WRONG - is necessary, make it so ... Done (See "New Guaranteed Sizing Algorithm" below) ________ if good !!, else scale now ... Done -> Will also need a change in NAIV_ImagePassing.getScaledImage(): ________ move the creation of the imageProcessor to local constructor ... Done -> Will also need a change to Config: ________ -> processing logic refined, made more generic by converting byHeight and byWidth into________ fn's that call a central one with different arguments ... Done -> document ... Done -> fixed bug where nothing display if STF and ETF are disabled ... Done -> FIX - while program is running and zoom operation prefs are changed, do not take ________ effect until next restart ... config objects recreated / re referenced? ... Fixed CAUSE - Integers are immutable (that's what the class being Final means i think) ________ RESULTION - one option is to re instantiate imageAccess but that takes AGES ... ________ - alt. create a new instance of the config and update interested parties ________ (used alt) ________ AFTERMATH - misc changes to code facilitating better operation (mostly documented) ________ - works with new Guarranteed Sizing Routine (below) even ... Bonus -> NAIV_DisplayFrame ________ display() ________ -> NEEDS DETAILED REWORK as it replicates some of naiv_imagepassing functionality ... Done -> Added a designated object to store the scrollPaneSize ... Done -> add object which reduces the size by offsets (to be set to 3 for now) ... Done -> added a constant to NAIV_ImageProcessing, set to 3 ... Done -> use that object for scaling operation instead ... Math op instead -> added update routine into createContentPane ... Done -> modified code so scroll pane is not destroyed ... Done -> FIX - startup fails because scroll pane size not set right (works with a reload) ... Done -> CAUSE - scrollpane size was wrong, so processing failed ________ -> RESOLUTION - at the end of the startup in viewer a display of current is requested ________ -> FIX - popup menu appearing issue ... Done -> CAUSE - the interface engine was being added as the mouselistener twice. Once in ________ -> invoker not set (remed out ?? but there is something appearing ...) ________ the viewer, and once in the display frame ________ -> RESOLUTION - removed instruction from NAIV_VIEWER ________ -> AFTERMATH - removed NAIV_Viewer.instantiateDisplay() ... Done -> FIX - mouse wheel scrolling -> down flicks multiple pics, -> up fails completely ... Done -> CAUSE - the setupScrollPane() was being called every time createContentPane() was ________ -> RESOLUTION - moved the function call to just after scrollArea is instantiated ________ -> removed from the createContentPane() ________ -> AFTERMATH - check why createContentPane() is called as often as it is & document used in 4 locations -> Autoflick does not work ... Done -> IT works IF no cache is used. SO it is part of the cache re-write stuff ________ -> NAIV_DisplayFrame get*ScrollPaneSize() functions in "disarray" ... tidied -> Sort out mouse scrolling interactions... all over the place (seriously edited) ... Done -> if stops working change scrollImage to return 0 on image flick ________ -> NOT sure if the logic for wrap scrolling is solid - see "which means" comments ... test OK in scrollImage() ________ -> Wrap Scroll direction not set it would appear ... it's set -> check wrap scrolling code takes proper actions - problem in scrollImage() - was ________ second guessing the direction, but the proper action is being passed as an arg ... Fixed -> BROKE AGAIN - FINALLY FIXED: ... FIXED -> updateScrollBar() - when calculating the maximum value, was using the value of ________ the relative, previous image, meaning in sequences of very different sized ________ images this failed, fixed by: ________ -> scrollImage returning a -1 when the scrollValue should be the max of the new ________ image / scrollbar. if updateScrollbar gets the -1 it lets display() do it's ________ thing, else it uses the calculated value (which does the scrolling still) ________ -> Option to scale based on Image size not logical in code ... should be "fixed value"________ (Since by image size is the same as by scrollbars ... so remove one and change to ________ "Fixed Value") ... Done -> FIX - by directional flicking on anything by fixed stepping fails ... Fixed CAUSE - Some moron (me) told scrollImage() to calculateSteppingAmount() based on________ whether or not the direction is the forward direction. Clearly this is ________ wrong (so much so, that as soon as i saw the line i knew). The direction________ does not influence the axis (but direction). ________ -> RESOLUTION - changed the assignment to use plane determination routine ________ -> AFTERMATH - spinner model is still wrong and needs fixing before all is well ... see below -> FIX - spinner model change on this change does not work ... Fixed CAUSE - the default stepping was set to 0, so the up and down did not work ________ RESOLUTION - set the stepping on percentage to 1 ________ AFTERMATH - check other stepping values ... Done -> Changed window sized calculation of stepping to use the scroll pane instead ... Done > New Guaranteed sizing algorithm implemented via NAIV_ImageProcessing.getProcessedImage(): ________ central coke point for getting the image, checks the size of the image based on the ________ transform performed on it during the processing. Checks active size against scrollPane size ________ capable of differentiating between actual size and adjusted size ... Done -> should be added into the cache (if there is one) ... NO -> done on delivery - is in cache but is part of the object the cache contains, rather ________ than being the sole object there ... Done -> test without cache ... Works -> developed with cache (so it's tested) ... Works -> Because the verification is based on how the image was scaled in the first place, there ________ is a low chance that there is an error in the routine, if this fails then it is almost ________ certain that the reason the image is size wrong is due to a bug in the scaling routine ________ -> test on various stf /etf settings ... no problems observed (was not entirely exaustive though) ________ -> Incindentally, was coded with failsafe, that is if the image fails size verification, the ________ image is reloaded from the original file, so as not to polute the image by pixel rot. ________ The interesting thing is that this was not required: ________ -> findout why no pixel rot occured in rescaling when smaller images were used update: UPDATE: this entire routine was completely re-designed and the related functions / classes________ were too. As a result these issues can not be replicated. HOWEVER, in fixing a bug________ it was noted that on certain occurances the NAIV_DisplayFrame was re-initialized ________ which caused similar issues. I'm guessing the problem is in the sequence in which ________ the display pane / scroll pane is updated cause occasional hangs which result in ________ the area being scrolled not being updated correctly, thus causing "pixel rot". ________ > Options ________ -> persistentWindow should also store windowmode at shutdown and reload it ... Done -> add tooltip hookins ... Done -> switch to internationalization instead of Language ________ -> see http://java.sun.com/docs/books/tutorial/i18n/ ________ -> make sure there are no // comments in the language properties file ... Done requires addition of: ________ import java.util.ResourceBundle; ________ import java.util.Locale; ________ ________ private Locale currentLocale; ________ private ResourceBundle languageBundle; ________ ________ private void i18n() ________ { ________ currentLocale = new Locale(this.config.getLanguage()); ________ languageBundle = ResourceBundle.getBundle("NAIV_LanguageBundle", currentLocale); ________ } ________ ________ languageBundle.getString("") ________ -> Options Frame ... Done -> Display Frame ... Done -> Menubar ... Done -> About ... Done -> PopupMenu ... Done -> Statusbar ... Simplified -> ...? ??? - anything else? -> make keyscrolling options .setEnabled switching ... Done > Add an algorithm that waits for a specifiable amount of time, before: ________ -> Frame redraw / Image resize ________ -> redrawing the screen when resizing the window ________ -> rescaling the images in light of the resized window ________ -> Cache Rebuild ________ -> during the upgrade / downgrade (when it builds outwards) ________ Instantiate the object ________ -> set a static field to the object's memory reference (unique) ________ -> sleep specified time (could be another static) ________ -> after sleep finishes, if object's memory reference is not the same as static field do ________ nothing ________ -> implicitly means that the Waiter Object is specific to the task ________ -> needs to be passed in the object it will act on, and ________ -> will need to know what function to call ________ OR (EVEN BETTER) ________ -> use a fire event which is listened for by the instantiating object - MAKES IT DYNAMIC ________ -> code class ... Done -> test on resize ________ -> test without distilation, but action ... slow as -> test without threading, but event driven ... still runs sequentially ... -> test with extra class (one class fits all) ... still runs sequentailly, because: Because the resize events still get fired sequentailly. So even if this is implemented ________ the overall load on the system means that the are still processed in sequence and the ________ thread distillation does little to help ________ -> test with custom class per incident No Point -> CONCLUSION _________________ ________ The source of the resize is the problem, ie the display frame. The same thing will be ________ true for successive image flicks; the anticipated solution (next point) might be the ________ solution, but won't cater for flicking. ________ -> CAN the resize be resolved easier by waiting for a mouse button released??? Not Investigated -> identify other places to implement Not Investigated -> cache upgrade/downgrade Not Investigated -> (implement make sure resize of frame calls upgrade / downgrade / rebuild ) Not Investigated -> ... Not Investigated -> and implement No, Update: -> The image processing and passing routine was completely re-designed and re-implemented ________ to facilitate JAI's much faster operation at scaling the images, due to this the resizing________ is much faster (still not brilliant) but bearable. For now this will be deemed as not so ________ bad. (Let's face it ... it's virtually instant, but your CPU will feel it ... and you may________ notice that it's not totally fast, that said, it is awesome compared to the last version.________ > Statusbar________ -> check code that calls enabledStatusbar() might be replicating logic gate ... Done -> re-enable filename display ... Done -> hook into NAIV_ImagePassing data ... Done -> add a function to NAIV_ImagePassing that massages the filename: ... Done giving filename to n letters ie /home/chakkerz/pics/Xmas2005/family/whateva.jpg to ________ 20 becomes ~/...ly/whatever.jpg or if not users own directory /...ily/whateva.jpg ________ NOTE: Probably would be best do marry the constants relating to layout into class. ________ -> might clash with layout manager behaviour altering the label that displays this data ... Works -> IMPLEMENTATION: ________ -> updates of it's own accord every 100 milliseconds ... Done -> is updated whenever display() is called ... Done -> is started manually towards the end of the program startup ... Done -> add a field to the current cache node that indicates if the image has been scalled, ________ then make the scaling routine automatically bail out if the flag is set. ... Done differently (This is meant to elimiate the Shrinking Window bug, when the window goes into ________ variable mode and constantly shrinks the window to suit the shrinking image) ________ -> flag needs to be unset by resize operation, at the completion of which the rescale ________ takes place ... Done differently : Checks the size of the image against the size it needs to be at delivery time ... Done like this > Longish standing BUGS -> Window persistence triggered on open image Can't replicate -> linked to change in the stf settings ________ (A LOT has changed in pre-12 - may have been caught in the crossfire) ________ -> Statusbar does not report cache build on startup Tagged for rewrite There is a chance that the cache and relating structures will be replaced with an alternate________ data structure in the pre12 release - as such it doesn't seem like the best idea to work on________ this for now. ________ -> REWRITE: ________ -> SEE NAIV_ImagePassing and Statusbar sections below ________ -> the image on startup, if not specified, is the first image in directory - this is not ________ logical when order is random or reverse ... moved to pre13 bug section There is a chance that the cache and relating structures will be replaced with an alternate________ data structure in the pre12 release - as such it doesn't seem like the best idea to work on________ this for now. ________ -> changing the window size does not regenerate the cached images ... FIXED -> See "New Guaranteed Sizing Algorithm" below ________ > BUGS -> updated deleteFile() functionality so that it works ... Done -> Startup on new systems (ie if the .naiv directory doesn't exist) ... FIXED Added to load attempt, if no file loaded, checks if dir exists, and if not creates it ________ -> add a use defaults routine that also writes the file (and then implement its usage) ... Done -> Noisy FileNotFoundExceptions looking for the npf files - could probably be quiet ... Addressed -> Fails to save files because the NAIVDIR does not exist - ________ added directory creation routine to load config attempt ... Done -> OptionFrame Tabbed Pane looks dodgy ... FIXED Switched to CrossPlatfrom Look and Feel in NAIV.java ________ -> Splash screen does not stay at the front anymore ... Fixed -> CAUSE : Lord knows ________ -> Resolution: set the window to always be on top ________ -> Aftermath: ________ -> splashscreen advances - verify the number is right ... Done -> even the advances out (might be a pre-13 issue) ... Done -> fires in ImageAccess initialization ... not fires though ... Done -> Document the splashscreen class ... Done -> tidy startup (the order in Viewer is right ... but why?) ... Done -> FIX - caching preferences are not being written ... possible other faults (non observed) ... Fixed -> CAUSE - someone got over zealous and modified all the set fn's to use .valueOf() ________ this does not set the value to the argument, rather it just converts .... ________ -> RESOLUTION - create new Object instead, and re-reference ... ________ -> AFTERMATH - searching the project for other mis-uses of this showed there was a fault ________ in NAIV_Image_Config ... ... Fixed -> FIX - fullscreen issue 1: Statusbar (which at this stage isn't working anyway ... Fixed CAUSE ... a line that had it's logic wrong ... minor fix ________ -> FIX - fullscreen issue 2: no popup menu & once clicked on window, no key listener ... Fixed -> CAUSE: popupmenu: on Mac and Windows fullscreen mode takes over the output device ________ as a result the fullscreen is always on top, so the popup menu displays, but ________ is behind the rest of the window. it is even interactive. (which mostly does ________ not help) ________ no key listener: actually that also still works, but because the popup menu ________ has focus, the main window does not respond ... so it all comes back down to ________ getting the popup menu to display ________ -> RESOLUTION: do a conditional resize of window into FIXED SIZE window mode, at full ... Done screen size. and at setVisible(false) resize back to FULLSCREEN size ________ saving the windowmode which should never be saved (via config??) ... Disabled for now -> re-enable but don't use -1 ... save positives only (-1 = full) ... Done -> document WHY this is so (so i don't have to work it out again) ... Done can't set size right - need to determine max and use that instead ... Fixed of pre-set literals ________ popup menu does not get rendered ... Fixed popup menu in wrong location ... Fixed popup menu does not appear to have mouse listening for menues?? ... Needed Invoker set will need very detailed documentation ... Done fullscreen startup has statusbar & -1 startup fails to display img ... Fixed make fullscreen start in fullscreen window mode cancel of preferences screen does not cause a windowmode verification -> changing window mode causes malfunctions ... Fixed -> Check that AutoFlick does change sequence as requested (and that sizing changes hold up) ... Done -> FIX - Persistent file list makes it impossible to change directory ... Fixed -> CAUSE - persistent settings were confusing the logic. Granted that means the code is ________ not elegant, but rather than screwing with something that (mostly) works, i ________ (RES) simply added a short circuit evaluation triggered by open file logic, which ________ thus ignores the persistent settings. As the logic defaults to use persistence ________ all is well. ________ -> AFTERMATH - code needs to be re-evaluated and documented more stringently. Already ________ tagged to do this. May be pushed to pre 13 though ________ -> BUG - added error trap routine to NAIV_ImagePassing's file - added TODO tag to fix cause ... Done -> keyscrolling appears to always mimic wrap scrolling ... Fixed -> CAUSE - Logic change in the execution path to make mouse based reliable, unfortunately ________ caused the removal of the feature initially added to make Keyscrolling function________ RES - Added a flag that tags whether the image was flicked by mouse or key ________ Sadly this adds complexity to the firing of image flicks, but this shouldn't ________ present too much of an issue in the future. ________ AFTERMATH - removed the remnants of the old logic ________ -> transition from maxed window to fullscreen mode, fails to size properly ... Fixed -> variable and fixed size window can get stuck into odd behaviour where the window width ________ exceeds the bounds of the screen ... Fixed -> popup menu not triggered reliably ... Fixed -> added extra matchable conditions beside e.isPopupTrigger() ... Done -> test on Windows / Linux ... Worked fine -> Keyscrolling fails in variable Window mode (works in windowed mode) ... Done -> updates do occur left right, but not on the up down ... primarily down ________ -> CAUSE - not sure ________ RES - added a repaint at the end of the interpretation of the scroll keys ________ > Misc Documentation & Code tidying ________ -> check object = null and replace with .finalize() (where possible) ... all good -> Document ________ -> ImageAccess (changes - indepth to come) ... Done -> imageProcessing ... Done -> TwoStageCache (changes - indepth to come) ... Done -> DisplayFrame ... Done -> scrolling execution path ... Done -> more... (still some documentation to be done, but pre13 will work in this class too) ... Done -> more yet ... all functions should have an introductory explanation ... Done -> NAIV_PERS_Window ... Done -> Readme updates ... Done -> WRAPSCROLLING direction is the way the mouse wheel scrolls the image _______ -> IMAGE FLICKING direction affects the which direction the image order is mapped _______ -> presistence ... Done -> delete to ... Done -> human readable config file ... Done -> Options ... Done -> startup without config data causes faulty behaviour - added alternate default setter ... Done -> added check that JAI is installed... Done -> Version number ... Done NAIV Structure -> Moved classes into packages ... Done > Window Settings / Behaviour -> set initial window size if no persistent size saved (800 x 600) and relative to null ... Done -> OR (come to think of it) 80% of the resolution setting ... Done -> Variable window operation - correct window sizing ... Done -> Variable Windowmode offset calculation in DisplayFrame.setVisible() fail ... Fixed -> the scrollpane size needs to match the image size ... Yep -> one can compare the scrollpane size aganst the content pane size ... true -> and the content pane size against the frame size ... or do it in one go NOTE on Mac OS X at least the window HEIGHT is not set to larger than the space available ________ the WIDTH on the other hand is sized as large as it needs to be. There is some stuff ________ in the pre13 to do list which deals with options that regulate this (to go not beyond ________ the bounds of the max screen dimensions and then kick in scaling ... so i'll deal with________ this down the line... for now this works very nicely ... relatively speaking ________ -> added conditional processing of resize events so it doesn't get processed by viewer ... Done when in variable window mode. ________ -> make startup in empty cache more definitive - ie less/no errors to the console ... Done -> display() try catch granularity poor, especially for startup ... should be ok > 0.4.0 Pre12 Cache considerations post JAI implementation ________ ________ There are two scenarios of utility for a two stage cache: ________ ________ 1) The cache contains the original size image and the image is scaled on the fly when about ________ to be displayed. ________ Pro: ________ -> eliminates need for cache rebuilds (in particular rescaling of images) post ________ - resize; ________ - option changes to ETF/STF; ________ -> accellerates cache maintenance, even in rapid flicking (cache trashing) by user; ________ -> may lend itself to maintenance of larger caches; ________ -> may reduce memory needs; ________ -> should reduce need to process GC; ________ -> would allow more definitive thread prioritization (not implemented as yet); ________ ________ Con: ________ -> slows display of image as the image is scaled on the fly (but still faster than ________ uncached as IO from loading is eliminated; (PROVIDED image needs to be scalled) ________ It could be argued that images today are predominantly smaller than modern screens. ________ Also, JAI scaling is faster than equivalent ImageIcon scaling routines. ________ ________ Bottom line: ________ -> overall better performance because it cuts out hundreds of wasted scaling operations ________ which occur when the user is pushing what naiv can do. ________ ________ 2) The cache maintains scaled instances of the images (current implementation) ________ Pro: ________ -> superior performance under ideal (unrealistc?) setting; ________ ________ Con: ________ -> requires extensive overhead and (currently) implements on the fly scaling to guard ________ against incorrect operation. (This can certainly be eliminated); ________ -> observed to be extremely slow in real life operation; ________ -> observed high memory utilization ________ -> the above two issues lead to crashes/hangs. ________ ________ I think that option 1 is the best way to go. Note that the current (20051030) algorithm ________ load the image when the sizing is not verified. If the cache stores the image in full size ________ this would not be neccessary. ________ > Cache -> implement option 1 (erradicate option 2) ... Done -> NAIV_ImageProcessing ________ -> remove all access methods that currently exist to get at an image ... methods replaced -> Constructor (NAIV_Config_Image) ________ -> store constructor args as statics ... Done -> make sure source Objects are updated, rather than being recreated: >> Done via Pass-By-Reference -> sizeToScaleTo <-> displayFrame.scrollPaneSize ... Done -> scaleToPaths <-> config.... ... Done -> scalingAlgorithm <-> config.... ... Done -> windowMode <-> config.... NONSENSE!!! (it's processing images, it doesn't need to know if it should or shouldn't) ________ -> Config / OptionFrame ________ -> Changed AutoFlick STF from Boolean to Integer ... Done -> ensure this works as intended ... Done -> nope does not, is using Scale to best fit ... .. Changed apply() -> FIX - autoflick does not start, but results in NPXs - either the cache build ... Fixed does not finish or finish initializing, OR ________ (more probable) the object gets re-referenced ________ -> CAUSE - logic errors in setVisible, apply & where the comboboxes are setup ________ -> may need runtime variables in config (or a new runtime object?) runtime object: -> create NAIV_Image_Config, in Image Access & passed to NAIV_Image_passing ... Done -> add rotate method (4 private data members rotate to 2 public) ... Done -> FIX - rotate function has no effect, not called OR just not working ... verified -> Seems to have been right, but there was an issue in that the change did not________ trigger a display of the image in right mode ... the may be other related ________ bugs ... I admit it i make mistakes (tagging in bugs section) ... Done -> make active in NAIV_Viewer (autoflick enabled / disabled) ... Done -> add to NAIV_ImageAccess constructor (start) ... Done -> add functions for NAIV_Viewer to trigger changes on status change ... Done -> create a Dimension ScrollPaneSize object in NAIV_DisplayFrame ... Done -> link to scrollpaneSize ... Done -> pass to imageAccess and then imgConfig ... Done -> create valve logic - use get Fn's ... No - ACTUALLY no point ... would require extreme changes to NAIV_Config NOT for now -> NOTE - NAIV_Config is only exposed on these objects, not all of them ... Peace of Mind :) - Add to pre13 research section ... Done -> Document (NAIV_Image_Config) ... Done -> change NAIV_Image* to use NAIV_Image_Config (statics) ... Done -> Image Processing functions: ________ -> Due to the imgConfig object the processor knows the target size, the scale path to ________ follow; so all it needs is the actual image OR the file. BUT file is not needed ________ since NAIV_ImagePassing has that information, THUS: ________ -> public PlanarImage processImage(PlanarImage) -- implement ... Done This is to be called by ImagePassing on delivery to the displayFrame ________ -> BUG - function gives a nullpointer in getScaledImage() ... Fixed Nullpointer caused by imgConfig (or at least the ScrollPaneSize reference ... Fixed -> NAIV_TwoStageCache ________ -> Extended Data Stage should contain NAIV_ImagePassing object, not a processor ... Done (YES the default stage already contains the file name... I know) ________ -> add NAIV_ImagePassing(File file) constructor; capable of loading an image ... Done -> implement usage in TwoStageCache ... Done -> change first and last image to be NAIV_ImagePassing ... Done -> access methods fixed ... Done -> error in getLast fixed ... Done -> change getNext, Current and Last ... Done -> jumpTo currently returns PlanarImage, should most likely be a NAIV_ImagePassing ... Not Needed -> Look into usage throughout project ... Not Needed -> change if should be OR document why it shouldn't be ... Not Needed -> NAIV_DisplayFrame -> Try to make it so the scrollPane is not constantly replaced ... Done -> BUG - imagePassing appears to not contain data (Cache Build issue?) ... Non issue -> Change statusbar to use ImagePassing data, this will show if there is data there ... has it's own section -> Should not be needed: Since the constructor uses Object references, if these tie to ________ the right datum, they will be automatically updated. NOT NEEDED -> setDefaultScaleToDimension(Dimension sizeToScaleTo) ________ -> setDefaultScaleToPath(int scaleToPath) ________ -> setDefaultScalingAlgortihm(int scalingAlgorithm) ________ -> NAIV_Config.set() fn's changed to use .valueOf rather than creating new Objects ... Done -> may need a scaleToPath group variable ... referenced directly -> considering a runtime status for displayFrame ... Not Needed -> moved NAIV_ImageAccess to NAIV_Image Package ... Done -> can NAIV_ImageAccess.imgConfig go? ... needed for Autoflick on/off -> imgConfig in NAIV_Viewer used instead ... Done -> NAIV_ImageAccess.imgConfig removed... no longer needed (well never really needed) ... Done > Cache Changes: -> Removed scaleImage from prepImage routine in NAIV_ImageProcessing ... Done -> Insert certain on demand scaling (see above for Passable image changes that related ... Done (see above) -> create two packages: ... Scraped (more than two)
Be the first person to add a text review.
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use
Thanks for your rating!
Would you also like to write a review?