Home » Developing U++ » UppHub » EditImage - editing image as String (for storing graphical information in DataBase)
Re: EditImage - editing image as String (for storing graphical information in DataBase) [message #26876 is a reply to message #26875] |
Sat, 05 June 2010 03:25   |
|
How to use it?
Very simple.
1. Add Package "EditImage" in your project.
2. Add in the beginning "#include <EditImage/EditImage.h>"
3. In the layout designer Add Control "EditImage"

That's all.
To read an image from the database I use code like this.
SQL * Select(ANK_PHOTO).From(ANKETA).Where(ANK_ID == dlg.Qptr);
if (SQL.Fetch()) {
dlg.tabPInf.editimage.FromString(SQL[ANK_PHOTO]);
}
To write the image into the database using such a code.
SQL * SqlUpdate(ANKETA)(ANK_PHOTO,SqlBinary(dlg.tabPInf.editimage.ToString())).Where(ANK_ID == dlg.Qptr);
Another nuance! When you record images in this control all scaled to the dimension of 300x300, saving aspect (as in the database must be stored, for example, a standard-size photo).
To change this use SetStoredDimension(Size sz);
SergeyNikitin<U++>( linux, wine )
{
under( Ubuntu || Debian || Raspbian );
}
[Updated on: Sat, 05 June 2010 09:03] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sat Jul 05 22:58:12 CEST 2025
Total time taken to generate the page: 0.03563 seconds
|