List Info

Thread: Importing Images (BLOB data)




Importing Images (BLOB data)
country flaguser name
United States
2007-12-11 10:36:34
I just read the tutorial about building a photo database
here:
http://www.kde
developers.org/node/2163

I would like to create something similar, however, I don't
want to enter my
images by hand--I have hundreds of images and I will have to
update them all
regularly.  Is there a way to import tables of object data?
My perl is
passable so I can massage my data into whatever format would
work.  

Any advice?  

p.s. Kexi is a nice tool.  Thanks!  
-- 
View this message in context: http://www.nabble.com/Importing-I
mages-%28BLOB-data%29-tp14255116p14255116.html
Sent from the Kexi General mailing list archive at
Nabble.com.

_______________________________________________
Kexi mailing list
Kexikde.org
https://ma
il.kde.org/mailman/listinfo/kexi

Re: Importing Images (BLOB data)
country flaguser name
Poland
2007-12-12 03:47:31
genomicist said the following, On 2007-12-11 17:36:

> I just read the tutorial about building a photo
database here:
> http://www.kde
developers.org/node/2163
> 
> I would like to create something similar, however, I
don't want to enter my
> images by hand--I have hundreds of images and I will
have to update them all
> regularly.  Is there a way to import tables of object
data? My perl is
> passable so I can massage my data into whatever format
would work.  

Hello genomicist,
I've put my answer for a general case here:
http://kexi-project.org/wiki/wiki/index.
php?HOWTOs%2FDatabase%20Handling

-- 
regards / pozdrawiam, Jaroslaw Staniek
  Sponsored by OpenOffice Polska (http://www.openoffice
.com.pl/en) to work on
  Kexi & KOffice (http://www.kexi.pl/en, http://www.koffice.org/ke
xi)
  KDE Libraries for MS Windows (http://windows.kde.org)
_______________________________________________
Kexi mailing list
Kexikde.org
https://ma
il.kde.org/mailman/listinfo/kexi

Re: Importing Images (BLOB data)
country flaguser name
United States
2007-12-14 04:16:18
In review,
I read the tutorial here:
http://www.kde
developers.org/node/2163
and asked how to import images in batches

Jaroslaw Staniek provides a nice answer here:
http://kexi-project.org/wiki/wiki/index.
php?HOWTOs%2FDatabase%20Handling

This advice mostly worked for me, but here are few comments
that might help
other folks trying to do the same thing.

First here is a perl script to convert a binary file to a
hex string, which
is needed to create the BLOB data:

sub Bin2HEX {
  my $bin_file = shift;
  open (BIN, "$bin_file") or die "Could not
open $bin_filenn";
  binmode BIN;
  my $bin;
  while ( read (BIN, $bin, 1 ) and printf("%02X",
ord($bin))){};
  close BIN;
}

Lastly, when using images in forms, if I declare an image
box read-only, no
image is displayed, and the database crashes when I close
the form (signal
6).  I'm using Kexi 1.1.0, so maybe an update will help.

Otherwise it works well so far. 

Thanks,
 Andrew Hufton

-- 
View this message in context: http://www.nabble.com/Importing-I
mages-%28BLOB-data%29-tp14255116p14333181.html
Sent from the Kexi General mailing list archive at
Nabble.com.

_______________________________________________
Kexi mailing list
Kexikde.org
https://ma
il.kde.org/mailman/listinfo/kexi

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )