GitXplorerGitXplorer
E

UniViewer

public
0 stars
0 forks
1 issues

Commits

List of commits on branch master.
Unverified
04e503a84b6e7349b2e9d993bab9a2c983c9263b

Update README.md #2

IImmortalTurtle committed 7 years ago
Unverified
c4b750c22c0de4a46e84cc7ea6d615b1ff8d8392

Update README.md

IImmortalTurtle committed 7 years ago
Unverified
f313d3ed215dc945945c9dd41479e2b33b02041d

Small changes, cleanup mostly. Finished BMP standart.

EEgorNemchinov committed 7 years ago
Unverified
7064df1e5d8ea82024e8e90334102218ac17a206

Command-line arguments are parsed. App doesn't crash on unsupported BMP versions.

EEgorNemchinov committed 7 years ago
Unverified
420ec908ee404e536c5fb038f20366fb79a0ee5a

Adds JUnit tests for BMP with some images for testing.

EEgorNemchinov committed 7 years ago
Unverified
946380056eda3ef2e1b0303dfa6402eb4f48ef73

Parsing for 24-bits and 32-bits BMP.

EEgorNemchinov committed 7 years ago

README

The README file for this repository.

UniViewer

Console-application able to view files of certain types. Even though the only supported type is BMP, one of the main advantages of this MVC architecture is that new modules (image formats, user interfaces, etc.) are easy to add.

Isolation

Each part of the project know as little as possible about the structure of another one. This is accomplished via creating interfaces for each part of the application:

  • Controller interface: openFile(path) .
  • View interface: drawImage(image)
  • Parser interface: parseFile(bytes)
  • Image format template contains width and height Modules communicate (pass information between each other) using a Observer.

How does it work

Here's diagram, I think that's quite enough to get basic understanding: Diagram

Algorithm for adding new file format

  • Create Parser for the format
  • Create ImageInfo for that format
  • Change ParserFactory to return certain Parser for this extension

Try it out

To run all the tests, execute src/test/kotlin/BmpTest.kt