Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
sergeynikitin is currently offline  sergeynikitin
Messages: 748
Registered: January 2008
Location: Moscow, Russia
Contributor

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"
index.php?t=getfile&id=2574&private=0
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

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Scatter:
Next Topic: SystemLog for Ultimate++
Goto Forum:
  


Current Time: Sat Jul 05 22:58:12 CEST 2025

Total time taken to generate the page: 0.03563 seconds