You are not logged in.

Dear visitor, welcome to Jabaco - Community. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

HardDrive

Beginner

  • "HardDrive" is male
  • "HardDrive" started this thread

Posts: 12

Date of registration: Sep 22nd 2009

Location: London

Occupation: IT Consultant

Hobbies: inline skating, chess

  • Send private message

1

Tuesday, December 22nd 2009, 1:01pm

Graphics/Images/Pictures format

Hi



Wich Graphics/Images/Pictures formats are avaialable in Jabaco?



I can use JPG and GIF without a problem but will not take TIF.



Can you help?



Thank you



Merry Xmas

  • "StefanSchnell" is male

Posts: 102

Date of registration: Mar 13th 2009

Location: Oberirsen - Germany

Occupation: Senior Software Engineer

Hobbies: Programming aund Photography

  • Send private message

2

Monday, December 28th 2009, 12:43am

Hello Harddrive,

so far I know, in Java, and also in Jabaco, you can use the graphics formats JPG, GIF and PNG.

Try this to get the supported image reader formats:

Jabaco Source

1
2
3
4
5
6
Dim ImgTypes() As String
   Dim i As Long
   ImgTypes = javax#imageio#ImageIO.getReaderFormatNames()
   For i = 0 To UBound(ImgTypes)
     Debug.Print ImgTypes(i)
   Next i


Look here for further explanation: http://www.exampledepot.com/egs/javax.im…GetFormats.html
and here: Resources

Cheers
Stefan
Visit my personal or commercial site
If you have questions or suggestions, write me an eMail or
meet me here

HardDrive

Beginner

  • "HardDrive" is male
  • "HardDrive" started this thread

Posts: 12

Date of registration: Sep 22nd 2009

Location: London

Occupation: IT Consultant

Hobbies: inline skating, chess

  • Send private message

3

Thursday, December 31st 2009, 3:46am

Graphics/Images/Pictures format

Thanks for it StefanSchnell



But, maybe what I need is to use this http://java.sun.com/products/jimi/




JIMI Software Development Kit



Jimi is a class library for managing images. Its primary function is image I/O. Jimi was formerly a product of Activated Intelligence. Sun is making it available for developers who have code with dependencies on Jimi or for those who need image I/O functionality in applications running under 1.1.x versions of the Java Platform. Jimi's range of supported formats includes GIF, JPEG, TIFF, PNG, PICT, Photoshop, BMP, Targa, ICO, CUR, Sunraster, XBM, XPM, and PCX, although some of these formats do not have complete support for all features.



I downloaded it but do not know how to add/use this with Jabaco.



Thanks in advance

A1880

Intermediate

  • "A1880" is male

Posts: 500

Date of registration: Jan 1st 2009

Location: Hanover, Germany

Occupation: Software Engineer

Hobbies: Hilbert Curves

  • Send private message

4

Thursday, December 31st 2009, 4:40pm

Download/copy the JIMI files on to your disk and add the path to JimiProClasses.zip to your Jabaco project.
Within the Jabaco IDE, just press F2 and add something like C:\......\Jimi\JimiProClasses.zip as external Jar file.
A Jar file is just a Zip file.

Success!

A1880

  • "StefanSchnell" is male

Posts: 102

Date of registration: Mar 13th 2009

Location: Oberirsen - Germany

Occupation: Senior Software Engineer

Hobbies: Programming aund Photography

  • Send private message

5

Friday, January 1st 2010, 7:02pm

Hello HardDrive,
thanks for your hint to the graphic library - cool.

Here a small snippet to use the library with Jabaco:

Jabaco Source

1
2
3
4
5
6
7
8
9
10
Dim img As Image
  Dim canvas As JimiCanvas
  
  Set img = com#sun#jimi#core#Jimi.getImage("c:\\dummy\\audi.bmp")
  
  Set canvas = New JimiCanvas(img)
  canvas.setBounds(0, 0, Picture1.Width, Picture1.Height)
  
  Picture1.add(canvas)
  Picture1.Refresh


Cheers
Stefan
Visit my personal or commercial site
If you have questions or suggestions, write me an eMail or
meet me here

HardDrive

Beginner

  • "HardDrive" is male
  • "HardDrive" started this thread

Posts: 12

Date of registration: Sep 22nd 2009

Location: London

Occupation: IT Consultant

Hobbies: inline skating, chess

  • Send private message

6

Sunday, January 3rd 2010, 6:06pm

Graphics/Images/Pictures format

Thanks for you help

Here it is how I intend to use it:

Jabaco Source

1
2
3
4
5
6
7
8
9
10
11
12
13
Dim myJavaImage As Image = com#sun#jimi#core#Jimi.getImage("C:\WINDOWS\Web\Wallpaper\00000001.TIF") 
HX = myJavaImage.getHeight(Null) 
WX = myJavaImage.getWidth(Null) 
If WX > HX Then 
HX = Int(HX * (736 / WX)) 
WX = 736 
Else 
WX = Int(WX * (580 / HX)) 
HX = 580 
End If 
Dim myImage As IResource = New VBImage(myJavaImage.getScaledInstance(WX,HX,0)) 
Picture1.Picture = myImage 
Picture1.Refresh

Rate this thread
WoltLab Burning Board