Git Product home page Git Product logo

neimagetools's Introduction

neImageTools

neImageTools is a set of components which extends the TImageList and TImage functionality by enabling them to load image files directly from a directory during design and in run time

neImageList

neImageList loads image files from a directory

The component exposes the following properties:

  1. BaseScale: The component needs to calculate the size of the images in order to load them to a MultiResBitmap property. This is the scale that is considered of factor 1x
  2. DelimiterString: The filenames of images, typically, include the scale factor (e.g. [email protected]). This property indicates the separator string, which is '@' by default
  3. Directory: The directory with the image files. Relative directories are accepted. Multiple directories can be supplied separated by ';'
  4. FilterTag: Sometimes it is more convenient to load a specific set of images, eg. all the add_button* images. This property filters the filenames to be loaded

neImage

neImage extends the classic TImage and adds properties to load images from a directory. The properties are the same as in neImageList with the difference of the FilterTag. In neImage the property is called ImageTag and it is compulsory

Many times you want to supply images programmatically. TneImage has a dedicated event (OnGetBitmap) which exposes the Bitmap of TneImage and fires just before Paint is called.

How To Use

Build and install the package in SourceCode/Packages/Dxxx according to the Delphi installation you want to use. Then, just drag and drop the components to a multi-device form

Documentation

There is documentation about the classes, the methods and properties. Please check the "Documentation" folder.

To-do/Known Issues

  1. The image files are being loaded in a normal procedure. A threaded approach would improve responsiveness
  2. The processing of the directories with the images is not thread-safe
  3. When an image or a list of images are loaded in the components and the application is executed in Windows, the images show correctly. On Android, the components do not store the images in memory unless the image paths are supplied programmatically. It is unclear whether the images in Android are indeed not loaded to memory or the directories in design-time are lost under Android
  4. There are some cases where the component in the IDE is not responsive although the directory and the other properties are correct. If this is the case provide a wrong directory, hit Enter and then re-enter the correct one. This should enforce the component to reload the files. Alternatively, drop a new components

*Please feel free to provide suggestions or pull requests *

Bugs, Suggestions, Comments and General Contact

I hope you find the component useful. If you have any comments or ideas, have spotted any bugs or have any suggestions about changes to the code use the "Issues" tab on github or drop me an email at [email protected]

Thanks!

John

neimagetools's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.