Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


read tiff file

read tiff file

read tiff file

how to read tiff file with power builder 11.5
only for preview...

Thanks alot

RE: read tiff file

If you just need to display the file in the default application assigned to it you can use the run command with the file name. Windows will then launch the viewing app which then displays the file.


"Nature forges everything on the anvil of time"

RE: read tiff file

Here is the code to scan tiff files.you can have a look:
using System.IO;
using System.Drawing.Printing;
using RasterEdge.Imaging;
using RasterEdge.Imaging.Processing;
using RasterEdge.Imaging.MultipageTiff;

RasterEdgeImaging TIFF = new RasterEdgeImaging();
public class AcquisitionClass
private bool AcquireCanceled;
private Acquisition Acquisition = new Acquisition(this);
public void Scan()
AcquireCanceled = false;
Acquisition.AcquireCanceled += new EventHandler(OnAcquireCanceled);
Acquisition.AcquireFinished += new EventHandler(OnAcquireFinished);
Acquisition.ImageAcquired += new ImageAcquiredEventHandler(OnImageAcquired);
Device activeDevice = Acquisition.ShowSelectSource();
private void OnImageAcquired(object sender, AcquireEventArgs e)
if (e.Image != null)
TiffEncoder enc = new TiffEncoder(TiffCompression.Default, true);
FileStream fs = new FileStream("1.tif",FileMode.OpenOrCreate, FileAccess.ReadWrite);
enc.Save(fs, AtalaImage.FromBitmap(e.Image), null);
private void OnAcquireCanceled(object sender, EventArgs e)
AcquireCanceled = true;
private void OnAcquireFinished(object sender, EventArgs e)
if (AcquireCanceled)
TiffImageCollection col = new TiffImageCollection();
TiffDecoder dec = new TiffDecoder();
FileStream fs = new FileStream("1.tif", FileMode.Open, FileAccess.Read);
int frameCount = dec.GetFrameCount(fs);
for(int i=0; i< frameCount; i++)
col.Add(new TiffImage("1.tif", i, TiffCompressionType.Auto));

FileStream outStream = new FileStream("1.tiff", FileMode.OpenOrCreate, FileAccess.ReadWrite);
TiffEncoder enc = new TiffEncoder();
enc.Save(outStream, col, null);

RE: read tiff file

This is .Net code and isn't applicable to PowerBuilder unless exposed via COM.


"Nature forges everything on the anvil of time"

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close