Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Monday, November 20, 2017 4:04:58 PM(UTC)
Christopher Thompson

Groups: Tech Support, Administrators
Posts: 34

Was thanked: 1 time(s) in 1 post(s)

LEADTOOLS has a very simple method for Loading and Saving various file types.
Both of the attached console applications utilize the latest from LEADTOOLS v20.

C#
Code:
using Leadtools;
using Leadtools.Codecs;

namespace simpleSave_20
{
    class Program
    {
        static void Main(string[] args)
        {
            //Enter you license here
            RasterSupport.SetLicense("", "");

            RasterCodecs codecs = new RasterCodecs();
            RasterImage image = codecs.Load(@"/*Input File path*/", 0, CodecsLoadByteOrder.Bgr, 1, 1);

            codecs.Save(image, @"/*Output File path*/", RasterImageFormat.Cmp, 8, 1, 1, 1, CodecsSavePageMode.Overwrite);
        }
    }
}


VB
Code:
Imports Leadtools
Imports Leadtools.Codecs

Module Module1

    Sub Main()

        'Enter you license and ke files here
        RasterSupport.SetLicense("", "")

        Dim codecs As New RasterCodecs()

        Dim image As RasterImage = codecs.Load("Enter the File getting loaded here", 0, CodecsLoadByteOrder.Bgr, 1, 1)

        codecs.Save(image, "Enter the File path and file name being saved to here", RasterImageFormat.Png, 16, 1, 1, 1, CodecsSavePageMode.Overwrite)

        image.Dispose()
        codecs.Dispose()


    End Sub

End Module


Below are the simple Load and Save files that are displayed above.
C#
File Attachment(s):
simpleSave_20.zip (1,461kb) downloaded 160 time(s).

VB
File Attachment(s):
simpleSaveVB_20.zip (1,637kb) downloaded 144 time(s).
Chris Thompson
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Friday, April 20, 2018 9:23:25 AM(UTC)
Christopher Thompson

Groups: Tech Support, Administrators
Posts: 34

Was thanked: 1 time(s) in 1 post(s)

This is a modified version of the above simpleSave_20 project that is now set up to take an SNP file and convert it to a PDF.

File Attachment(s):
saveSNP_20.zip (170kb) downloaded 126 time(s).
Chris Thompson
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2018, Yet Another Forum.NET
This page was generated in 0.141 seconds.