working on it ...

Filters

Explore Public Snippets

Sort by

Found 14k snippets matching: process

    public by antlong  489249  15  7  1

    Extract JPG images from a PDF

    A command line tool to extract jpg images from pdf files.
    #!/usr/bin/env python
    import sys
    
    
    def main():
        """Extract JPG's from PSD's.
        
        Usage:
          python extract.py filename.pdf
        
        Note:
          All extracted images will be saved to the directory 
          the script is initialized in.
        """
        try:
            pdf = file(sys.argv[1], "rb").read()
        except Exception:
            print "Usage: `python extract.py filename.pdf`"
            return
    
        startmark, endmark = "\xff\xd8", "\xff\xd9"
        startfix, endfix, i, njpg = 0, 2, 0, 0
    
        while True:
            istream = pdf.find("stream", i)
            if istream < 0:
                break
            istart = pdf.find(startmark, istream, istream+20)
            if istart < 0:
                i = istream+20
                continue
            iend = pdf.find("endstream", istart)
            if iend < 0:
                raise Exception("Couldn't find end of stream.")
            iend = pdf.find(endmark, iend-20)
            if iend < 0:
                raise Exception("Couldn't find end of JPG.")
         
            istart += startfix
            iend += endfix
            jpg = pdf[istart:iend]
            with open("jpg%d.jpg" % njpg, "wb") as _f:
                _f.write(jpg)
            njpg += 1
            i = iend
    
        print "Extracted %s JPG files." % njpg
    
    main()
    

    public by lbottaro  406564  1  7  9

    Simple CORBA java server

    This code shows an example of simple corba server in java. A CORBA server needs a local ORB object. The server instantiates an ORB and registers its servant objects so that the ORB can find the server when it receives an invocation for it. the server is a process that instantiates one or more servant objects. Each servant implements the
    // The package containing our stubs.
    import HelloApp.*;
    
    // HelloServer will use the naming service.
    import org.omg.CosNaming.*;
    
    // The package containing special exceptions thrown by the name service.
    import org.omg.CosNaming.NamingContextPackage.*;
    
    // All CORBA applications need these classes.
    import org.omg.CORBA.*;
    
    public class HelloServer 
    {
      public static void main(String args[])
      {
        try{
           // Create and initialize the ORB
          ORB orb = ORB.init(args, null);
          
          // Create the servant and register it with the ORB
          HelloServant helloRef = new HelloServant();
          orb.connect(helloRef);
          
          // Get the root naming context
        org.omg.CORBA.Object objRef = 
    orb.resolve_initial_references("NameService");
          NamingContext ncRef = NamingContextHelper.narrow(objRef);
          
          // Bind the object reference in naming
          NameComponent nc = new NameComponent("Hello", "");
          NameComponent path[] = {nc};
          ncRef.rebind(path, helloRef);
          
          // Wait for invocations from clients
          java.lang.Object sync = new java.lang.Object();
          synchronized(sync){
            sync.wait();
          }
              } catch(Exception e) {
            System.err.println("ERROR: " + e);
            e.printStackTrace(System.out);
          }  
      }
    }
    
    class HelloServant extends _HelloImplBase
    {
      public String sayHello()
      {
        return "\nHello world!!\n";
        }
    }
        

    public by sTiLL-iLL  307912  0  5  14

    my nonblocking, threadsafe file writer/appender for nodejs. works great with clustered servers, and child processes that write to shared or static file-stores

    my nonblocking, threadsafe file writer/appender for nodejs. works great with clustered servers, and child processes that write to shared or static file-stores: scribbles.js
    // scribbles.js a nonblocking, threadsafe file writer/appender for nodejs
    
    var fs = require('fs'),
    	pth = require('path'),
    	cueMngr = {};
    
    function Scribbles(fileNm) {
    	this.handle = fileNm;
    	this.canWrite = false;
    	this.actionsRoster = [];
    };
    
    var scribbles = Scribbles.prototype;
    
    scribbles.action = function (err, dta, actionCue) {
    	if (err) {
    		throw err;
    	}
    	return actionCue();
    }
    
    scribbles.assign = function (func) {
    	this.action = func;
    	return this;
    }
    
    scribbles.scribble = function (dta, func) {
    	if (this.canWrite) {
    		this.actionCue = dta;
    		if (func) {
    			this.actionsRoster.push(func);
    		}
    	} 
    	else {
    		this.canWrite = true;
    		var slf = this,
    			taskProxy = {};
    		fs.appendFile(this.handle, dta, function (err) {
    			function actionCue() {
    				slf.canWrite = false;
    				if (slf.actionCue) {
    					var dta = slf.actionCue;
    					slf.scribble(dta);
    					slf.actionCue = null;
    				}
    			}
    			slf.action(err, dta, actionCue);
    			while (taskProxy = slf.actionsRoster.shift()) {
    				return taskProxy(err);
    			}
    			if (func) {
    				return func(err);
    			}
    		});
    	}
    	return this;
    };
    
    module.exports = function (fil) {
    	var nm = pth.resolve(fil);
    	return (cueMngr[nm] = cueMngr[nm] || new Scribbles(fil));
    }
    
    

    public by dave83  223923  8  7  0

    How to run methods in class marked with specific Java annotation

    The snippet shows how to invoke only methods of a class marked with specific annotation. The list of methods class (MyTest) is returned using reflection. Annotations are returned via getAnnotation() method. The method is executed via invoke() method.
    import java.lang.reflect.Method;
    
    public class MyTest {
    
        @MyAnnotation
        public void method1() {
          System.out.println("method1");
        }
    
        public void method2() {
          System.out.println("method2");
        }
        
        @MyAnnotation
        public void method3() {
          System.out.println("method3");
        }
        
        public static void main(String[] args) {
    
            MyTest runner = new MyTest();
            Method[] methods = runner.getClass().getMethods();
    
            for (Method method : methods) {
                MyAnnotation annos = method.getAnnotation(MyAnnotation.class);
                if (annos != null) {
                    try {
                        method.invoke(runner);
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                }
            }
        }
    } 
                            

    public by cghersi @ MailUp API DEV  206862  8  6  1

    MailUp REST API - How to subscribe to a particular list several contacts with the "Confirmed Optin" Procedure

    This snippet takes advantage of the MailUp .NET SDK to setup the secure communication towards the server through OAuth2 two leg authentication. You can start digging into the MailUP API world by reading this content: http://help.mailup.com/display/mailupapi/REST+API An instance of MailUpClient class is able to manage one user at a time. A MailU
    public static void SubcribeRecipientsWithDoubleOptin(string clientID, string clientSecret, string username, string password)
    {
        // 1) Setup the MailUp Client:
        MailUpClient client = new MailUpClient(clientID, clientSecret);
        try
        {
            client.RetrieveAccessToken(username, password);
        }
        catch (MailUpException ex)
        {
            Console.WriteLine("Unable to access the service due to " + ex.Message);
            return;
        }
    
        // 2) Subscribe recipients:
        int idList = 1;
        List<ConsoleRecipientItem> recipients = new List<ConsoleRecipientItem>();
        ConsoleRecipientItem recipient1 = new ConsoleRecipientItem()
        {
            Email = "test1@mailup.com",
            Name = "First New Recipient" + DateTime.Now.ToFileTimeUtc(),
            MobileNumber = "3331234567",
            MobilePrefix = "39",
            Fields = new List<ConsoleRecipientDynamicFieldItem>()
            {
                new ConsoleRecipientDynamicFieldItem() { Id = 1, Value = "Name1_" + DateTime.Now.ToFileTimeUtc() },
                new ConsoleRecipientDynamicFieldItem() { Id = 2, Value = "LastName1_" + DateTime.Now.ToFileTimeUtc() }
                //here you can add all the fields you want to add...
            }
        };
        ConsoleRecipientItem recipient2 = new ConsoleRecipientItem()
        {
            Email = "test2@mailup.com",
            Name = "Second New Recipient" + DateTime.Now.ToFileTimeUtc(),
            MobileNumber = "3337654321",
            MobilePrefix = "39",
            Fields = new List<ConsoleRecipientDynamicFieldItem>()
            {
                new ConsoleRecipientDynamicFieldItem() { Id = 1, Value = "Name2_" + DateTime.Now.ToFileTimeUtc() },
                new ConsoleRecipientDynamicFieldItem() { Id = 2, Value = "LastName2_" + DateTime.Now.ToFileTimeUtc() }
                //here you can add all the fields you want to add...
            }
        };
        recipients.Add(recipient1);
        recipients.Add(recipient2);
        int subscriptionResult = 0;
        try
        {
            subscriptionResult = client.AddRecipientsToList(idList, recipients, true);
        }
        catch (Exception ex)
        {
            Console.WriteLine("Cannot perform the operation due to " + ex.Message);
            return;
        }
    
        // 2.1) wait for the end of import task:
        if (subscriptionResult > 0)
        {
            Console.WriteLine("Recipients Import started; import ID:" + subscriptionResult);
    
            //optionally we can check the import status:
            bool completed = false;
            do
            {
                ConsoleImportStatus importStatus = client.CheckImportStatus(subscriptionResult);
                if (importStatus == null)
                {
                    Console.WriteLine("Cannot check the import status for import task #" + subscriptionResult);
                    return;
                }
                completed = importStatus.Completed;
            } while (!completed);
            Console.WriteLine("Recipients Added!");
        }
        else
        {
            Console.WriteLine("An error occurred while adding the recipients.");
            return;
        }
    
        // 3) Retrieve the sendingID of the confirmation email related to the previous task:
        int sendingID = -1;
        try
        {
            sendingID = client.GetSendingIDForImport(subscriptionResult);
        }
        catch (Exception ex)
        {
            Console.WriteLine("Cannot retrieve sending ID due to " + ex.Message);
            return;
        }
        if (sendingID <= 0)
        {
            Console.WriteLine("Cannot retrieve sending ID.");
            return;
        }
    
        // 4) Send the confirmation email:
        EmailSendingItem sendingResult = null;
        try
        {
            sendingResult = client.SendEmailMessage(sendingID);
        }
        catch (Exception ex)
        {
            Console.WriteLine("Cannot send email due to " + ex.Message);
            return;
        }
        if (sendingResult == null)
            Console.WriteLine("Cannot send confirmation email.");
        else
            Console.WriteLine("Confirmation email sent!");
    }
                

    public by boloka  129821  1  5  0

    process time

    How much time running is my php process? Calculate this time. Very simple.
    PHP
    $start_time = microtime(true);
    
    // code...
    
    $end_time = microtime(true);
    
    $process_time = $end_time - $start_time;
    echo 'This code running is: ' . $process_time . ' sec.';

    public by sherazam  120642  0  5  0

    How to Set Line Spacing of a Paragraph in an Excel Shape or Textbox inside .NET Apps

    This technical tip shows how to Set Line Spacing of the Paragraph in a Shape or Textbox in .NET applications. You can set the line space of the paragraph, its space before and space after using the TextParagraph.LineSpace, TextParagraph.SpaceBefore and TextParagraph.SpaceAfter respectively. The following example shows how to Set Line Spacing of the
    // Enter here the actual content of the snippet.            
    
    //[C# Code]
     
    // For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
    // The path to the documents directory.
    string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
    
    // Create a workbook
    Workbook wb = new Workbook();
    
    // Access first worksheet
    Worksheet ws = wb.Worksheets[0];
    
    // Add text box inside the sheet
    ws.Shapes.AddTextBox(2, 0, 2, 0, 100, 200);
    
    // Access first shape which is a text box and set is text
    Shape shape = ws.Shapes[0];
    shape.Text = "Sign up for your free phone number.\nCall and text online for free.";
    
    // Acccess the first paragraph
    TextParagraph p = shape.TextBody.TextParagraphs[1];
    
    // Set the line space
    p.LineSpaceSizeType = LineSpaceSizeType.Points;
    p.LineSpace = 20;
    
    // Set the space after
    p.SpaceAfterSizeType = LineSpaceSizeType.Points;
    p.SpaceAfter = 10;
    
    // Set the space before
    p.SpaceBeforeSizeType = LineSpaceSizeType.Points;
    p.SpaceBefore = 10;
    
    // Save the workbook in xlsx format
    wb.Save(dataDir + "output_out_.xlsx", SaveFormat.Xlsx); 
    
    //[VB.NET Code]
    
    ' For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
    ' The path to the documents directory.
    Dim dataDir As String = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType)
    
    ' Create a workbook
    Dim wb As New Workbook()
    
    ' Access first worksheet
    Dim ws As Worksheet = wb.Worksheets(0)
    
    ' Add text box inside the sheet
    ws.Shapes.AddTextBox(2, 0, 2, 0, 100, 200)
    
    ' Access first shape which is a text box and set is text
    Dim shape As Shape = ws.Shapes(0)
    shape.Text = "Sign up for your free phone number." & vbLf & "Call and text online for free."
    
    ' Acccess the first paragraph
    Dim p As TextParagraph = shape.TextBody.TextParagraphs(1)
    
    ' Set the line space
    p.LineSpaceSizeType = LineSpaceSizeType.Points
    p.LineSpace = 20
    
    ' Set the space after
    p.SpaceAfterSizeType = LineSpaceSizeType.Points
    p.SpaceAfter = 10
    
    ' Set the space before
    p.SpaceBeforeSizeType = LineSpaceSizeType.Points
    p.SpaceBefore = 10
    
    ' Save the workbook in xlsx format
    wb.Save(dataDir & Convert.ToString("output_out_.xlsx"), SaveFormat.Xlsx) 
    
    

    public by cghersi @ MailUp API DEV  113014  11  5  0

    How to Retrieve your personal information with MailUp .NET SDK

    This snippet takes advantage of the MailUp .NET SDK to setup the secure communication towards the server through OAuth2 two leg authentication. You can start digging into the MailUP API world by reading this content: http://help.mailup.com/display/mailupapi/REST+API An instance of MailUpClient class is able to manage one user at a time. A MailU
    public static void GetPersonalDataFields(string clientID, string clientSecret, string username, string password)
    {
        // 1) Setup the MailUp Client:
        MailUpClient client = new MailUpClient(clientID, clientSecret);
        try
        {
            client.RetrieveAccessToken(username, password);
        }
        catch (MailUpException ex)
        {
            Console.WriteLine("Unable to access the service due to " + ex.Message);
            return;
        }
    
        // 2) Prepare the input:
        //nothing to do here...
    
        // 3) Invoke the web method:
        CollectionOf<ConsoleDynamicFieldItem> result = null;
        try
        {
            result = client.GetPersonalDataFields();
        }
        catch (Exception ex)
        {
            Console.WriteLine("Cannot perform the operation due to " + ex.Message);
            return;
        }
    
    
        if (result != null)
            Console.WriteLine("Personal Data Fields Retrieved: " + result.Count);
        else
            Console.WriteLine("Cannot retrieve Personal Data Fields.");
    }
    

    public by cghersi @ MailUp API DEV  1993  20  5  0

    MailUp REST API - How to authenticate with 3 leg process flow

    This snippet takes advantage of the MailUp .NET SDK to setup the secure communication towards the server through OAuth2 3 leg authentication. You can start digging into the MailUP API world by reading this content: http://help.mailup.com/display/mailupapi/REST+API An instance of MailUpClient class is able to manage one user at a time. A MailUpC
    @using MailUp.Sdk.Base
    @using MailUp.Framework.Contracts.API.Base
    @using MailUp.Framework.Contracts.API.DataContracts.Console
    
    @{  
        Layout = "~/_SiteLayout.cshtml";
        Page.Title = "Welcome to the sample client to interact with MailUp REST API";
        
        MailUpClient mailUp = Session["MailUpClient"] as MailUpClient;
        string receivedCode = Request["code"];
        string redirUri = string.Empty;
        string accessTokenRetrieval = "Your application has been granted. You are now able to consume MailUp API!";
        if (string.IsNullOrEmpty(receivedCode))
        {
            // Phase 1: the authorization flow should be started with the redirection towards MailUp login form
            redirUri = mailUp.GetLogOnUri(Request.Url.AbsoluteUri);
        }
        else
        {
            // Phase 2: the MailUp login form redirected the user back to this page, with the code to be exchanged
            // with access token to securely consume REST API:
            try
            {
                mailUp.RetrieveAccessToken(receivedCode);
                
                //invoke a sample API:
                CollectionOf<ConsoleListItem> lists = mailUp.GetLists("", "idList ASC", 1);
                if ((lists != null) && (lists.Count > 0))
                {
                    accessTokenRetrieval += " E.g. your first list is named '" + lists[0].Name + "'";
                }
            }
            catch (MailUpException ex)
            {
                accessTokenRetrieval = "Unable to access the service due to " + ex.Message;
            }
        }
    }
    <p>
        Click here to start the authorization process. <br />
        The MailUp login page will be displayed and you will be able to enter your username and password. <br />
        Then, you will be redirected back here, with a valid access token that can be used to perform all the REST calls. <br />
        <br />
        @if (string.IsNullOrEmpty(receivedCode))
        {
            <input id="authFlowBtn" type="button" value="Login" onclick="javascript:document.location='@redirUri';" />
        }
        else
        {
            <text>@accessTokenRetrieval</text>
        }
    </p>            

    public by Geometry  859  0  4  0

    Read and process FITS header. After the header is read stream pointer will point to data or extension.

    Read and process FITS header. After the header is read stream pointer will point to data or extension.
    // Read and process FITS header. After the header is read stream pointer will
    // point to data or extension.
    private static FITSImageInfo ReadHeader(Stream stream)
    {
        byte[] headerRecord = new byte[80];
        int recordsRead = 1;
        bool endKeyWasFound = false;
    
        FITSImageInfo imageInfo = new FITSImageInfo();
    
        // read first record and check for correct image
        if (
            (Tools.ReadStream(stream, headerRecord, 0, 80) < 80) ||
            (Encoding.UTF8.GetString(headerRecord, 0, 8) != "SIMPLE  "))
        {
            throw new FormatException("The stream does not contatin FITS image.");
        }
        else
        {
            // check if the image has standard FITS format
            if (Encoding.UTF8.GetString(headerRecord, 10, 70).Split('/')[0].Trim() != "T")
            {
                throw new NotSupportedException("The stream contains not standard FITS data file.");
            }
        }
    
        // read header and locate data block
        while (true)
        {
            // read next record
            if (Tools.ReadStream(stream, headerRecord, 0, 80) < 80)
            {
                throw new ArgumentException("The stream does not contain valid FITS image.");
            }
            recordsRead++;
    
            // get keyword
            string keyword = Encoding.UTF8.GetString(headerRecord, 0, 8);
    
            // skip commenct and history
            if ((keyword == "COMMENT ") || (keyword == "HISTORY "))
                continue;
    
            // check if it is end of header keyword
            if (keyword == "END     ")
                endKeyWasFound = true;
    
            if (endKeyWasFound)
            {
                if (recordsRead % 36 == 0)
                {
                    // found data or extension header
    
                    // make a small check of some header values
                    if ((imageInfo.BitsPerPixel == 0) || (imageInfo.Width == 0) || (imageInfo.Height == 0))
                    {
                        imageInfo.TotalFrames = 0;
                    }
    
                    // let's return here and let other routines process data
                    break;
                }
            }
            else
            {
                // get string representation of value/comments
                string strValue = Encoding.UTF8.GetString(headerRecord, 10, 70);
    
                // check important keywords
                if (keyword == "BITPIX  ")
                {
                    int value = ExtractIntegerValue(strValue);
    
                    if ((value != 8) && (value != 16) && (value != 32) && (value != -32) && (value != -64))
                    {
                        throw new NotSupportedException("Data format (" + value + ") is not supported.");
                    }
    
                    // bits per pixel
                    imageInfo.BitsPerPixel = (value == 8) ? 8 : 16;
                    imageInfo.OriginalBitsPerPixl = value;
                }
                else if (Encoding.UTF8.GetString(headerRecord, 0, 5) == "NAXIS")
                {
                    // information about data axis
                    int value = ExtractIntegerValue(strValue);
    
                    // check axis
                    switch (headerRecord[5])
                    {
                        // number of axis
                        case (byte)' ':
                            switch (value)
                            {
                                case 1:
                                default:
                                    throw new NotSupportedException("FITS files with data dimension of " + value + " are not supported.");
                                case 0:
                                    // the stream does not have an image, do nothing
                                    break;
                                case 2:
                                    // the stream has 1 2D image
                                    imageInfo.TotalFrames = 1;
                                    break;
                                case 3:
                                    // the stream has 3D image - series of 2D images
                                    break;
                            }
                            break;
                        // length of 1st axis
                        case (byte)'1':
                            imageInfo.Width = value;
                            break;
                        // length of 2nd axis
                        case (byte)'2':
                            imageInfo.Height = value;
                            break;
                        // length of 3rd axis
                        case (byte)'3':
                            imageInfo.TotalFrames = value;
                            break;
                    }
                }
                else if (keyword == "TELESCOP")
                {
                    imageInfo.Telescope = ExtractStringValue(strValue);
                }
                else if (keyword == "OBJECT  ")
                {
                    imageInfo.Object = ExtractStringValue(strValue);
                }
                else if (keyword == "OBSERVER")
                {
                    imageInfo.Observer = ExtractStringValue(strValue);
                }
                else if (keyword == "INSTRUME")
                {
                    imageInfo.Instrument = ExtractStringValue(strValue);
                }
    
                // --- for debugging ---
                /* if ( keyword[0] != ' ' )
                {
                    System.Diagnostics.Debug.Write( keyword );
                    if ( headerRecord[8] == '=' )
                    {
                        System.Diagnostics.Debug.WriteLine( " = " + strValue );
                    }
                    else
                    {
                        System.Diagnostics.Debug.WriteLine( "" );
                    }
                } */
                // --- ---
            }
        }
    
        // scan all available data to find minimum and maximum values,
        // which will be used for scaling. the scan is done here (not while
        // reading actual frame) because FITS file may have set of images
        // packed into data cube, so entire scan of all the data is required.
    
        // if is stream is seekable
        if (!stream.CanSeek)
        {
            throw new ArgumentException("The stream must be seekable.");
        }
    
        // remember current position
        long dataPos = stream.Seek(0, SeekOrigin.Current);
    
        // data size
        int lineLength = imageInfo.Width * (Math.Abs(imageInfo.OriginalBitsPerPixl) / 8);
        int totalLines = imageInfo.Height * imageInfo.TotalFrames;
        int originalBitsPerPixel = imageInfo.OriginalBitsPerPixl;
    
        byte[] buffer = new byte[lineLength];
        byte[] temp = new byte[8];
    
        // min and max values
        double min = double.MaxValue;
        double max = double.MinValue;
    
        for (int i = 0; i < totalLines; i++)
        {
            // read next line
            if (Tools.ReadStream(stream, buffer, 0, lineLength) < lineLength)
                throw new ArgumentException("The stream does not contain valid FITS image.");
    
            // scan the line
            for (int j = 0; j < lineLength; )
            {
                double value = 0;
    
                // read values accordint to their format
                switch (originalBitsPerPixel)
                {
                    case 8:    // 8 bit unsigned integer
                        value = buffer[j++];
                        break;
                    case 16:    // 16 bit signed integer
                        {
                            short tempValue = 0;
                            unchecked
                            {
                                tempValue = (short)((buffer[j++] << 8) | buffer[j++]);
                            }
                            value = tempValue;
                            break;
                        }
                    case 32:    // 32 bit signed integer
                        {
                            temp[3] = buffer[j++];
                            temp[2] = buffer[j++];
                            temp[1] = buffer[j++];
                            temp[0] = buffer[j++];
    
                            value = BitConverter.ToInt32(temp, 0);
    
                            break;
                        }
                    case -32:   // 32 bit float
                        {
                            temp[3] = buffer[j++];
                            temp[2] = buffer[j++];
                            temp[1] = buffer[j++];
                            temp[0] = buffer[j++];
    
                            value = BitConverter.ToSingle(temp, 0);
                            break;
                        }
                    case -64:   // 64 bit double
                        {
                            temp[7] = buffer[j++];
                            temp[6] = buffer[j++];
                            temp[5] = buffer[j++];
                            temp[4] = buffer[j++];
                            temp[3] = buffer[j++];
                            temp[2] = buffer[j++];
                            temp[1] = buffer[j++];
                            temp[0] = buffer[j++];
    
                            value = BitConverter.ToDouble(temp, 0);
                            break;
                        }
                }
    
                if (value > max)
                    max = value;
                if (value < min)
                    min = value;
            }
        }
    
        imageInfo.MaxDataValue = max;
        imageInfo.MinDataValue = min;
    
        // restore stream position to the begining of data
        stream.Seek(dataPos, SeekOrigin.Begin);
    
        return imageInfo;
    }
    • Public Snippets
    • Channels Snippets