diff --git a/.gitignore b/.gitignore index 3c4efe2..256d87f 100644 --- a/.gitignore +++ b/.gitignore @@ -152,16 +152,16 @@ publish/ PublishScripts/ # NuGet Packages -*.nupkg +#*.nupkg # The packages folder can be ignored because of Package Restore -**/packages/* +#**/packages/* # except build/, which is used as an MSBuild target. -!**/packages/build/ +#!**/packages/build/ # Uncomment if necessary however generally it will be regenerated when needed #!**/packages/repositories.config # NuGet v3's project.json files produces more ignoreable files -*.nuget.props -*.nuget.targets +#*.nuget.props +#*.nuget.targets # Microsoft Azure Build Output csx/ diff --git a/packages/CommonServiceLocator.1.3/CommonServiceLocator.1.3.nupkg b/packages/CommonServiceLocator.1.3/CommonServiceLocator.1.3.nupkg new file mode 100644 index 0000000..8cdb1fd Binary files /dev/null and b/packages/CommonServiceLocator.1.3/CommonServiceLocator.1.3.nupkg differ diff --git a/packages/CommonServiceLocator.1.3/lib/portable-net4+sl5+netcore45+wpa81+wp8/Microsoft.Practices.ServiceLocation.XML b/packages/CommonServiceLocator.1.3/lib/portable-net4+sl5+netcore45+wpa81+wp8/Microsoft.Practices.ServiceLocation.XML new file mode 100644 index 0000000..dbfa9ae --- /dev/null +++ b/packages/CommonServiceLocator.1.3/lib/portable-net4+sl5+netcore45+wpa81+wp8/Microsoft.Practices.ServiceLocation.XML @@ -0,0 +1,268 @@ + + + + Microsoft.Practices.ServiceLocation + + + + + The standard exception thrown when a ServiceLocator has an error in resolving an object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with a specified error message. + + + The message that describes the error. + + + + + Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception. + + + The error message that explains the reason for the exception. + + + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + + The generic Service Locator interface. This interface is used + to retrieve services (instances identified by type and optional + name) from a container. + + + + + Get an instance of the given . + + Type of object requested. + if there is an error resolving + the service instance. + The requested service instance. + + + + Get an instance of the given named . + + Type of object requested. + Name the object was registered with. + if there is an error resolving + the service instance. + The requested service instance. + + + + Get all instances of the given currently + registered in the container. + + Type of object requested. + if there is are errors resolving + the service instance. + A sequence of instances of the requested . + + + + Get an instance of the given . + + Type of object requested. + if there is are errors resolving + the service instance. + The requested service instance. + + + + Get an instance of the given named . + + Type of object requested. + Name the object was registered with. + if there is are errors resolving + the service instance. + The requested service instance. + + + + Get all instances of the given currently + registered in the container. + + Type of object requested. + if there is are errors resolving + the service instance. + A sequence of instances of the requested . + + + + This class provides the ambient container for this application. If your + framework defines such an ambient container, use ServiceLocator.Current + to get it. + + + + + Set the delegate that is used to retrieve the current container. + + Delegate that, when called, will return + the current ambient container. + + + + The current ambient container. + + + + + This class is a helper that provides a default implementation + for most of the methods of . + + + + + Implementation of . + + The requested service. + if there is an error in resolving the service instance. + The requested object. + + + + Get an instance of the given . + + Type of object requested. + if there is an error resolving + the service instance. + The requested service instance. + + + + Get an instance of the given named . + + Type of object requested. + Name the object was registered with. + if there is an error resolving + the service instance. + The requested service instance. + + + + Get all instances of the given currently + registered in the container. + + Type of object requested. + if there is are errors resolving + the service instance. + A sequence of instances of the requested . + + + + Get an instance of the given . + + Type of object requested. + if there is are errors resolving + the service instance. + The requested service instance. + + + + Get an instance of the given named . + + Type of object requested. + Name the object was registered with. + if there is are errors resolving + the service instance. + The requested service instance. + + + + Get all instances of the given currently + registered in the container. + + Type of object requested. + if there is are errors resolving + the service instance. + A sequence of instances of the requested . + + + + When implemented by inheriting classes, this method will do the actual work of resolving + the requested service instance. + + Type of instance requested. + Name of registered service you want. May be null. + The requested service instance. + + + + When implemented by inheriting classes, this method will do the actual work of + resolving all the requested service instances. + + Type of service requested. + Sequence of service instance objects. + + + + Format the exception message for use in an + that occurs while resolving a single service. + + The actual exception thrown by the implementation. + Type of service requested. + Name requested. + The formatted exception message string. + + + + Format the exception message for use in an + that occurs while resolving multiple service instances. + + The actual exception thrown by the implementation. + Type of service requested. + The formatted exception message string. + + + + This delegate type is used to provide a method that will + return the current container. Used with the + static accessor class. + + An . + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Activation error occurred while trying to get all instances of type {0}. + + + + + Looks up a localized string similar to Activation error occurred while trying to get instance of type {0}, key "{1}". + + + + + Looks up a localized string similar to ServiceLocationProvider must be set.. + + + + diff --git a/packages/CommonServiceLocator.1.3/lib/portable-net4+sl5+netcore45+wpa81+wp8/Microsoft.Practices.ServiceLocation.dll b/packages/CommonServiceLocator.1.3/lib/portable-net4+sl5+netcore45+wpa81+wp8/Microsoft.Practices.ServiceLocation.dll new file mode 100644 index 0000000..95bbd51 Binary files /dev/null and b/packages/CommonServiceLocator.1.3/lib/portable-net4+sl5+netcore45+wpa81+wp8/Microsoft.Practices.ServiceLocation.dll differ diff --git a/packages/ControlzEx.3.0.2.4/ControlzEx.3.0.2.4.nupkg b/packages/ControlzEx.3.0.2.4/ControlzEx.3.0.2.4.nupkg new file mode 100644 index 0000000..12ba97d Binary files /dev/null and b/packages/ControlzEx.3.0.2.4/ControlzEx.3.0.2.4.nupkg differ diff --git a/packages/ControlzEx.3.0.2.4/lib/net40/ControlzEx.dll b/packages/ControlzEx.3.0.2.4/lib/net40/ControlzEx.dll new file mode 100644 index 0000000..1c229a1 Binary files /dev/null and b/packages/ControlzEx.3.0.2.4/lib/net40/ControlzEx.dll differ diff --git a/packages/ControlzEx.3.0.2.4/lib/net40/System.Windows.Interactivity.dll b/packages/ControlzEx.3.0.2.4/lib/net40/System.Windows.Interactivity.dll new file mode 100644 index 0000000..0419e95 Binary files /dev/null and b/packages/ControlzEx.3.0.2.4/lib/net40/System.Windows.Interactivity.dll differ diff --git a/packages/ControlzEx.3.0.2.4/lib/net45/ControlzEx.dll b/packages/ControlzEx.3.0.2.4/lib/net45/ControlzEx.dll new file mode 100644 index 0000000..6a3e41a Binary files /dev/null and b/packages/ControlzEx.3.0.2.4/lib/net45/ControlzEx.dll differ diff --git a/packages/ControlzEx.3.0.2.4/lib/net45/System.Windows.Interactivity.dll b/packages/ControlzEx.3.0.2.4/lib/net45/System.Windows.Interactivity.dll new file mode 100644 index 0000000..931c744 Binary files /dev/null and b/packages/ControlzEx.3.0.2.4/lib/net45/System.Windows.Interactivity.dll differ diff --git a/packages/ControlzEx.3.0.2.4/lib/net462/ControlzEx.dll b/packages/ControlzEx.3.0.2.4/lib/net462/ControlzEx.dll new file mode 100644 index 0000000..f1fbc0e Binary files /dev/null and b/packages/ControlzEx.3.0.2.4/lib/net462/ControlzEx.dll differ diff --git a/packages/ControlzEx.3.0.2.4/lib/net462/System.Windows.Interactivity.dll b/packages/ControlzEx.3.0.2.4/lib/net462/System.Windows.Interactivity.dll new file mode 100644 index 0000000..931c744 Binary files /dev/null and b/packages/ControlzEx.3.0.2.4/lib/net462/System.Windows.Interactivity.dll differ diff --git a/packages/MahApps.Metro.1.6.5/MahApps.Metro.1.6.5.nupkg b/packages/MahApps.Metro.1.6.5/MahApps.Metro.1.6.5.nupkg new file mode 100644 index 0000000..6d1223e Binary files /dev/null and b/packages/MahApps.Metro.1.6.5/MahApps.Metro.1.6.5.nupkg differ diff --git a/packages/MahApps.Metro.1.6.5/lib/net40/MahApps.Metro.dll b/packages/MahApps.Metro.1.6.5/lib/net40/MahApps.Metro.dll new file mode 100644 index 0000000..764b151 Binary files /dev/null and b/packages/MahApps.Metro.1.6.5/lib/net40/MahApps.Metro.dll differ diff --git a/packages/MahApps.Metro.1.6.5/lib/net40/MahApps.Metro.xml b/packages/MahApps.Metro.1.6.5/lib/net40/MahApps.Metro.xml new file mode 100644 index 0000000..929b7d9 --- /dev/null +++ b/packages/MahApps.Metro.1.6.5/lib/net40/MahApps.Metro.xml @@ -0,0 +1,5549 @@ + + + + MahApps.Metro + + + + + This CommandTriggerAction can be used to bind any event on any FrameworkElement to an . + This trigger can only be attached to a FrameworkElement or a class deriving from FrameworkElement. + + This class is inspired from Laurent Bugnion and his EventToCommand. + http://www.mvvmlight.net + See license.txt in this solution or http://www.galasoft.ch/license_MIT.txt + + + + + Identifies the dependency property + + + + + Gets or sets the command that this trigger is bound to. + + + + + Identifies the dependency property + + + + + Gets or sets an object that will be passed to the attached to this trigger. + + + + + Updates all glow windows (visible, hidden, collapsed) + + + + + Sets the opacity to all glow windows + + + + + Starts the opacity storyboard 0 -> 1 + + + + + Shows all glow windows + + + + + Gets or sets the bindable Password property on the PasswordBox control. This is a dependency property. + + + + + Handles changes to the 'Password' attached property. + + + + + Handle the 'PasswordChanged'-event on the PasswordBox + + + + + Called after the behavior is attached to an AssociatedObject. + + + Override this to hook up functionality to the AssociatedObject. + + + + + Called when the behavior is being detached from its AssociatedObject, but before it has actually occurred. + + + Override this to unhook functionality from the AssociatedObject. + + + + + + Sets the first TabItem with Visibility="" as + the SelectedItem of the TabControl. + + + If there is no visible TabItem, null is set as the SelectedItem + + + + + + + + + + + + Represents a border whose contents are clipped within the bounds + of the border. The border may have rounded corners. + + + + + BorderThickness Dependency Property + + + + + Gets or sets the BorderThickness property. This dependency property + indicates the BorderThickness. + + + + + Checks if the given Thickness is valid or not + + Thickness + + + + + Padding Dependency Property + + + + + Gets or sets the Padding property. This dependency property + indicates the Padding. + + + + + CornerRadius Dependency Property + + + + + Gets or sets the CornerRadius property. This dependency property + indicates the CornerRadius of the border. + + + + + Checks if the given CornerRadius is valid or not + + CornerRadius + + + + + BorderBrush Dependency Property + + + + + Gets or sets the BorderBrush property. This dependency property + indicates the BorderBrush with which the Border is drawn. + + + + + Background Dependency Property + + + + + Gets or sets the Background property. This dependency property + indicates the Background with which the Background is drawn. + + + + + OptimizeClipRendering Dependency Property + + + + + Gets or sets the OptimizeClipRendering property. This dependency property + indicates whether the rendering of the clip should be optimized. When set to true, + In order to optimize the rendering of the clipped Child, + the background is rendered with the same brush as the border. Any other brush set for + the background will be ignored. The Child will be rendered on top of it. + This is done to prevent any gaps between the border the the clipped Child (this is + evidently visible if both the Border and the Child are of same color). + This works best when the Child does not have any level of transparency and is opaque. + + + + + Updates DesiredSize of the ClipBorder. Called by parent UIElement. This is the first pass of layout. + + + Border determines its desired size it needs from the specified border the child: its sizing + properties, margin, and requested size. + + Constraint size is an "upper limit" that the return value should not exceed. + The Decorator's desired size. + + + + ClipBorder computes the position of its single child and applies its child's alignments to the child. + + + The size reserved for this element by the parent + The actual ink area of the element, typically the same as finalSize + + + + Here the ClipBorder's Child, Border and Background are rendered. + + Drawing Context + + + + Generates a StreamGeometry. + + An already opened StreamGeometryContext. + Rectangle for geomentry conversion. + The core points of the border which needs to be used to create + the geometry + Result geometry. + + + + Encapsulates the details of each of the core points of the border which is calculated + based on the given CornerRadius, BorderThickness, Padding and a flag to indicate whether + the inner or outer border is to be calculated. + + CornerRadius + BorderThickness + Padding + Flag to indicate whether outer or inner border needs + to be calculated + + + + A few very useful extension methods + + + + + Returns whether or not two doubles are "close". + + The first double to compare. + The second double to compare. + + bool - the result of the AreClose comparision. + + + + + Returns whether or not the first double is less than the second double. + + The first double to compare. + The second double to compare. + + bool - the result of the LessThan comparision. + + + + + Returns whether or not the first double is greater than the second double. + + The first double to compare. + The second double to compare. + + bool - the result of the GreaterThan comparision. + + + + + Returns whether or not the double is "close" to 1. Same as AreClose(double, 1), + but this is faster. + + The double to compare to 1. + + bool - the result of the AreClose comparision. + + + + + IsZero - Returns whether or not the double is "close" to 0. Same as AreClose(double, 0), + but this is faster. + + The double to compare to 0. + + bool - the result of the AreClose comparision. + + + + + Compares two points for fuzzy equality. This function + helps compensate for the fact that double values can + acquire error when operated upon + + The first point to compare + The second point to compare + Whether or not the two points are equal + + + + Compares two Size instances for fuzzy equality. This function + helps compensate for the fact that double values can + acquire error when operated upon + + The first size to compare + The second size to compare + Whether or not the two Size instances are equal + + + + Compares two Vector instances for fuzzy equality. This function + helps compensate for the fact that double values can + acquire error when operated upon + + The first Vector to compare + The second Vector to compare + Whether or not the two Vector instances are equal + + + + Compares two rectangles for fuzzy equality. This function + helps compensate for the fact that double values can + acquire error when operated upon + + The first rectangle to compare + The second rectangle to compare + Whether or not the two rectangles are equal + + + + Faster check for NaN ( faster than double.IsNaN() ) + IEEE 754 : If the argument is any value in the range 0x7ff0000000000001L through 0x7fffffffffffffffL + or in the range 0xfff0000000000001L through 0xffffffffffffffffL, the result will be NaN. + + Value to check + + + + + Rounds the given value based on the DPI scale + + Value to round + DPI Scale + + + + + Verifies if this Thickness contains only valid values + The set of validity checks is passed as parameters. + + Thickness value + allows negative values + allows Double.NaN + allows Double.PositiveInfinity + allows Double.NegativeInfinity + Whether or not the thickness complies to the range specified + + + + Method to add up the left and right size as width, as well as the top and bottom size as height + + Thickness + Size + + + + Verifies if the Thickness contains only zero values + + Thickness + Size + + + + Verifies if all the values in Thickness are same + + Thickness + true if yes, otherwise false + + + + Verifies if this CornerRadius contains only valid values + The set of validity checks is passed as parameters. + + CornerRadius value + allows negative values + allows Double.NaN + allows Double.PositiveInfinity + allows Double.NegativeInfinity + Whether or not the CornerRadius complies to the range specified + + + + Verifies if the CornerRadius contains only zero values + + CornerRadius + Size + + + + Verifies if the CornerRadius contains same values + + CornerRadius + true if yes, otherwise false + + + + Deflates rectangle by given thickness + + Rectangle + Thickness + Deflated Rectangle + + + + Inflates rectangle by given thickness + + Rectangle + Thickness + Inflated Rectangle + + + + Verifies if the given brush is a SolidColorBrush and + its color does not include transparency. + + Brush + true if yes, otherwise false + + + + Verifies if the given brush is the same as the otherBrush. + + Brush + Brush + true if yes, otherwise false + + + + Defines the method that determines whether the command can execute in its current state. + + + true if this command can be executed; otherwise, false. + + Data used by the command. If the command does not require data to be passed, this object can be set to null. + + + + Defines the method to be called when the command is invoked. + + Data used by the command. If the command does not require data to be passed, this object can be set to null. + + + + The DependencyProperty for the CharacterCasing property. + Controls whether or not content is converted to upper or lower case + Default Value: CharacterCasing.Normal + + + + + Character casing of the Content + + + + + The DependencyProperty for the RecognizesAccessKey property. + Default Value: false + + + + + Determine if the inner ContentPresenter should use AccessText in its style + + + + + This custom popup is used by the validation error template. + It provides some additional nice features: + - repositioning if host-window size or location changed + - repositioning if host-window gets maximized and vice versa + - it's only topmost if the host-window is activated + + + + + Gets/sets if the popup can be closed by left mouse button down. + + + + + Called when a cell has just switched to edit mode. + + A reference to element returned by GenerateEditingElement. + The event args of the input event that caused the cell to go into edit mode. May be null. + The unedited value of the cell. + + + + Synchronizes the column property. Taken from Helper code for DataGrid. + + + + + Taken from Helper code for DataGrid. + + + + + The DependencyProperty for the StringFormat property. + + + + + Gets or sets the formatting for the displaying value. + + + + + + + + The DependencyProperty for the Minimum property. + + + + + The DependencyProperty for the Maximum property. + + + + + The DependencyProperty for the Interval property. + + + + + The DependencyProperty for the HideUpDownButtons property. + + + + + The DependencyProperty for the UpDownButtonsWidth property. + + + + + The DependencyProperty for the FontFamily property. + Default Value: SystemFonts.MessageFontFamily + + + + + The font family of the desired font. + + + + + The DependencyProperty for the FontSize property. + Default Value: SystemFonts.MessageFontSize + + + + + The size of the desired font. + + + + + The DependencyProperty for the FontStyle property. + Default Value: SystemFonts.MessageFontStyle + + + + + The style of the desired font. + + + + + The DependencyProperty for the FontWeight property. + Default Value: SystemFonts.MessageFontWeight + + + + + The weight or thickness of the desired font. + + + + + The DependencyProperty for the Foreground property. + Default Value: SystemColors.ControlTextBrush + + + + + An brush that describes the foreground color. This overrides the cell foreground inherited color. + + + + + Method used as property changed callback for properties which need RefreshCellContent to be called + + + + + Rebuilds the contents of a cell in the column in response to a binding change. + + The cell to update. + The name of the column property that has changed. + + + + The base class for dialogs. + + You probably don't want to use this class, if you want to add arbitrary content to your dialog, + use the class. + + + + + Gets/sets the dialog's title. + + + + + Gets/sets arbitrary content on top of the dialog. + + + + + Gets/sets arbitrary content below the dialog. + + + + + Gets or sets the size of the dialog title font. + + + The size of the dialog title font. + + + + + Gets or sets the size of the dialog message font. + + + The size of the dialog message font. + + + + + Initializes a new MahApps.Metro.Controls.BaseMetroDialog. + + The window that is the parent of the dialog. + The settings for the message dialog. + + + + Initializes a new MahApps.Metro.Controls.BaseMetroDialog. + + + + + With this method it's possible to return your own settings in a custom dialog. + + + + + + + This is called in the loaded event. + + + + + Waits for the dialog to become ready for interaction. + + A task that represents the operation and it's status. + + + + Requests an externally shown Dialog to close. Will throw an exception if the Dialog is inside of a MetroWindow. + + + + + A last chance virtual method for stopping an external dialog from closing. + + + + + + Gets the window that owns the current Dialog IF AND ONLY IF the dialog is shown externally. + + + + + Gets the window that owns the current Dialog IF AND ONLY IF the dialog is shown inside of a window. + + + + + Waits until this dialog gets unloaded. + + + + + + An implementation of BaseMetroDialog allowing arbitrary content. + + + + + Gets the default instance if the dialog coordinator, which can be injected into a view model. + + + + + Creates a LoginDialog inside of the current window. + + The window that is the parent of the dialog. + The title of the LoginDialog. + The message contained within the LoginDialog. + Optional settings that override the global metro dialog settings. + The text that was entered or null (Nothing in Visual Basic) if the user cancelled the operation. + + + + Creates a InputDialog inside of the current window. + + The MetroWindow + The title of the MessageDialog. + The message contained within the MessageDialog. + Optional settings that override the global metro dialog settings. + The text that was entered or null (Nothing in Visual Basic) if the user cancelled the operation. + + + + Creates a MessageDialog inside of the current window. + + The MetroWindow + The title of the MessageDialog. + The message contained within the MessageDialog. + The type of buttons to use. + Optional settings that override the global metro dialog settings. + A task promising the result of which button was pressed. + + + + Creates a ProgressDialog inside of the current window. + + The MetroWindow + The title of the ProgressDialog. + The message within the ProgressDialog. + Determines if the cancel button is visible. + Optional Settings that override the global metro dialog settings. + A task promising the instance of ProgressDialogController for this operation. + + + + Adds a Metro Dialog instance to the specified window and makes it visible asynchronously. + If you want to wait until the user has closed the dialog, use + You have to close the resulting dialog yourself with . + + The owning window of the dialog. + The dialog instance itself. + An optional pre-defined settings instance. + A task representing the operation. + The is already visible in the window. + + + + Adds a Metro Dialog instance of the given type to the specified window and makes it visible asynchronously. + If you want to wait until the user has closed the dialog, use + You have to close the resulting dialog yourself with . + + The owning window of the dialog. + An optional pre-defined settings instance. + A task with the dialog representing the operation. + + + + Hides a visible Metro Dialog instance. + + The window with the dialog that is visible. + The dialog instance to hide. + An optional pre-defined settings instance. + A task representing the operation. + + The is not visible in the window. + This happens if hasn't been called before. + + + + + Gets the current shown dialog in async way. + + The dialog owner. + + + + Creates a LoginDialog outside of the current window. + + The window that is the parent of the dialog. + The title of the LoginDialog. + The message contained within the LoginDialog. + Optional settings that override the global metro dialog settings. + The text that was entered or null (Nothing in Visual Basic) if the user cancelled the operation. + + + + Creates a InputDialog outside of the current window. + + The MetroWindow + The title of the MessageDialog. + The message contained within the MessageDialog. + Optional settings that override the global metro dialog settings. + The text that was entered or null (Nothing in Visual Basic) if the user cancelled the operation. + + + + Creates a MessageDialog ouside of the current window. + + The MetroWindow + The title of the MessageDialog. + The message contained within the MessageDialog. + The type of buttons to use. + Optional settings that override the global metro dialog settings. + A task promising the result of which button was pressed. + + + + Use the dialog coordinator to help you interfact with dialogs from a view model. + + + + + Shows the input dialog. + + Typically this should be the view model, which you register in XAML using . + The title of the MessageDialog. + The message contained within the MessageDialog. + Optional settings that override the global metro dialog settings. + The text that was entered or null (Nothing in Visual Basic) if the user cancelled the operation. + + + + Shows the input dialog. + + Typically this should be the view model, which you register in XAML using . + The title of the MessageDialog. + The message contained within the MessageDialog. + Optional settings that override the global metro dialog settings. + The text that was entered or null (Nothing in Visual Basic) if the user cancelled the operation. + + + + Creates a LoginDialog inside of the current window. + + Typically this should be the view model, which you register in XAML using . + The title of the LoginDialog. + The message contained within the LoginDialog. + Optional settings that override the global metro dialog settings. + The text that was entered or null (Nothing in Visual Basic) if the user cancelled the operation. + + + + Creates a LoginDialog outside of the current window. + + Typically this should be the view model, which you register in XAML using . + The title of the LoginDialog. + The message contained within the LoginDialog. + Optional settings that override the global metro dialog settings. + The text that was entered or null (Nothing in Visual Basic) if the user cancelled the operation. + + + + Creates a MessageDialog inside of the current window. + + Typically this should be the view model, which you register in XAML using . + The title of the MessageDialog. + The message contained within the MessageDialog. + The type of buttons to use. + Optional settings that override the global metro dialog settings. + A task promising the result of which button was pressed. + + + + Creates a MessageDialog outside of the current window. + + Typically this should be the view model, which you register in XAML using . + The title of the MessageDialog. + The message contained within the MessageDialog. + The type of buttons to use. + Optional settings that override the global metro dialog settings. + A task promising the result of which button was pressed. + + + + Creates a ProgressDialog inside of the current window. + + Typically this should be the view model, which you register in XAML using . + The title of the ProgressDialog. + The message within the ProgressDialog. + Determines if the cancel button is visible. + Optional Settings that override the global metro dialog settings. + A task promising the instance of ProgressDialogController for this operation. + + + + Adds a Metro Dialog instance to the specified window and makes it visible asynchronously. + You have to close the resulting dialog yourself with . + + Typically this should be the view model, which you register in XAML using . + The dialog instance itself. + An optional pre-defined settings instance. + A task representing the operation. + The is already visible in the window. + + + + Hides a visible Metro Dialog instance. + + Typically this should be the view model, which you register in XAML using . + The dialog instance to hide. + An optional pre-defined settings instance. + A task representing the operation. + + The is not visible in the window. + This happens if hasn't been called before. + + + + + Gets the current shown dialog. + + Typically this should be the view model, which you register in XAML using . + + + + InputDialog + + + + + InitializeComponent + + + + + LoginDialog + + + + + InitializeComponent + + + + + An internal control that represents a message dialog. Please use MetroWindow.ShowMessage instead! + + + MessageDialog + + + + + InitializeComponent + + + + + An enum representing the result of a Message Dialog. + + + + + An enum representing the different button states for a Message Dialog. + + + + + Just "OK" + + + + + "OK" and "Cancel" + + + + + An enum representing the different choices for a color scheme in a Metro Dialog. + + + + + A class that represents the settings used by Metro Dialogs. + + + + + Gets or sets wheater the owner of the dialog can be closed. + + + + + Gets or sets the text used for the Affirmative button. For example: "OK" or "Yes". + + + + + Enable or disable dialog hiding animation + "True" - play hiding animation. + "False" - skip hiding animation. + + + + + Enable or disable dialog showing animation. + "True" - play showing animation. + "False" - skip showing animation. + + + + + Gets or sets a token to cancel the dialog. + + + + + Gets or sets whether the metro dialog should use the default black/white appearance (theme) or try to use the current accent. + + + + + Gets or sets a custom resource dictionary which can contains custom styles, brushes or something else. + + + + + Gets or sets which button should be focused by default + + + + + Gets or sets the default text (just the inputdialog needed) + + + + + Gets or sets the size of the dialog message font. + + + The size of the dialog message font. + + + + + Gets or sets the dialog result when the user cancelled the dialog with 'ESC' key + + If the value is the default behavior is determined + by the . + + + + +
+ + + + +
+
+ + + Gets or sets the size of the dialog title font. + + + The size of the dialog title font. + + + + + Gets or sets the text used for the first auxiliary button. + + + + + Gets or sets the maximum height. (Default is unlimited height, Double.NaN) + + + + + Gets or sets the text used for the Negative button. For example: "Cancel" or "No". + + + + + Gets or sets the text used for the second auxiliary button. + + + + + If set, stops standard resource dictionaries being applied to the dialog. + + + + + An internal control that represents a message dialog. Please use MetroWindow.ShowMessage instead! + + + ProgressDialog + + + + + InitializeComponent + + + + + A class for manipulating an open ProgressDialog. + + + + + This event is raised when the associated was closed programmatically. + + + + + This event is raised when the associated was cancelled by the user. + + + + + Gets if the Cancel button has been pressed. + + + + + Gets if the wrapped ProgressDialog is open. + + + + + Sets the ProgressBar's IsIndeterminate to true. To set it to false, call SetProgress. + + + + + Sets if the Cancel button is visible. + + + + + + Sets the dialog's progress bar value and sets IsIndeterminate to false. + + The percentage to set as the value. + + + + Gets/Sets the minimum restriction of the progress Value property + + + + + Gets/Sets the maximum restriction of the progress Value property + + + + + Sets the dialog's message content. + + The message to be set. + + + + Sets the dialog's title. + + The title to be set. + + + + Sets the dialog's progress bar brush + + The brush to use for the progress bar's foreground + + + + Begins an operation to close the ProgressDialog. + + A task representing the operation. + + + + The DependencyProperty for the ContentTemplate property. + + + + + The DependencyProperty for the ContentTemplateSelector property. + + + + + The DependencyProperty for the ContentStringFormat property. + + + + + Gets or sets the Content of this control.. + + + + + ContentTemplate is the template used to display the content of the control. + + + + + ContentTemplateSelector allows to provide custom logic for choosing the template used to display the content of the control. + + + This property is ignored if is set. + + + + + ContentStringFormat is the format used to display the content of the control as a string + + + This property is ignored if is set. + + + + + Reflects the parameter to pass to the CommandProperty upon execution. + + + + + Gets or sets the target element on which to fire the command. + + + + + Get or sets the Command property. + + + + + Indicates whether the Menu is visible. + + + + + Gets or sets an extra tag. + + + + + Gets or sets the dimension of children stacking. + + + + + Gets or sets the Content used to generate the icon part. + + + + + Gets or sets the ContentTemplate used to display the content of the icon part. + + + + + Gets/sets the button style. + + + + + Gets/sets the menu style. + + + + + Gets/sets the brush of the button arrow icon. + + + + + Gets/sets the brush of the button arrow icon if the mouse is over the drop down button. + + + + + Gets/sets the brush of the button arrow icon if the arrow button is pressed. + + + + + Gets/sets the visibility of the button arrow icon. + + + + Invoked when the property changes. + Information about the change. + + + + Executes the specified action asynchronously with the DispatcherPriority.Background on the thread that the Dispatcher was created on. + + The dispatcher object where the action runs. + An action that takes no parameters. + The dispatcher priority. + + + + A control that imitate a slideshow with back/forward buttons. + + + + + To counteract the double Loaded event issue. + + + + + Coerce SelectedIndexProperty's value. + + The object that the property exists on. + The new value of the property, prior to any coercion attempt. + The coerced value (with appropriate type). + + + + Computes the transition when changing selected index. + + Previous selected index. + New selected index. + + + + Gets the navigation buttons. + + Previous button. + Next button. + Inactive buttons. + + + + Applies actions to navigation buttons. + + Action applied to the previous button. + Action applied to the next button. + Action applied to the inactive buttons. + Any action is null. + + + + Sets the visibility of navigation buttons. + + Visibility of active buttons. + + + + Changes the current slide to the previous item. + + + + + Changes the current to the next item. + + + + + Brings the control buttons (next/previous) into view. + + + + + Removes the control buttons (next/previous) from view. + + + + + Gets or sets a value indicating whether the border for mouse over state is enabled or not. + + + + + Gets or sets the mouse hover border brush. + + + + + Gets or sets the mouse hover border thickness. + + + + + Gets/sets the text that is displayed in the FlipView's banner. + + + + + Gets/sets whether the FlipView's banner is visible. + + + + + Gets or sets a value indicating whether the navigation is circular, so you get the first after last and the last before first. + + + + + Gets/sets whether the FlipView's NavigationButton is visible. + + + + + A sliding panel control that is hosted in a MetroWindow via a FlyoutsControl. + + + + + + + An event that is raised when IsOpen changes. + + + + + An event that is raised when the closing animation has finished. + + + + + Gets/sets if the title is visible in this flyout. + + + + + Gets/sets if the close button is visible in this flyout. + + + + + Gets/sets if the close button is a cancel button in this flyout. + + + + + Gets/sets a command which will be executed if the close button was clicked. + Note that this won't execute when is set to false. + + + + + Gets/sets the command parameter which will be passed by the CloseCommand. + + + + + Gets/sets a command which will be executed if the close button was clicked. + + + + + Gets/sets whether this flyout is visible. + + + + + Gets/sets whether this flyout uses the open/close animation when changing the property. (default is true) + + + + + Gets/sets whether this flyout animates the opacity of the flyout when opening/closing. + + + + + Gets/sets whether this flyout stays open when the user clicks outside of it. + + + + + Gets/sets the mouse button that closes the flyout on an external mouse click. + + + + + Gets/sets whether this flyout is modal. + + + + + Gets/sets this flyout's position in the FlyoutsControl/MetroWindow. + + + + + Gets or sets the theme of this flyout. + + + + + Gets or sets the focused element. + + + + + Gets or sets a value indicating whether the flyout should auto close after AutoCloseInterval has passed. + + + + + Gets or sets the time in milliseconds when the flyout should auto close. + + + + + Gets or sets a value indicating whether the flyout should try focus an element. + + + + + A FlyoutsControl is for displaying flyouts in a MetroWindow. + + + + + + Gets/sets whether is ignored and all flyouts behave as if it was set to the value of this property. + + + + + Gets/sets whether is ignored and all flyouts behave as if it was set false. + + + + + Adapts the Flyout's theme to the theme of its host window. + + + + + Adapts the Flyout's theme to the theme of its host window, but inverted. + This theme can only be applied if the host window's theme abides the "Dark" and "Light" affix convention. + (see for more infos. + + + + + The dark theme. This is the default theme. + + + + + The flyouts theme will match the host window's accent color. + + + + + GlowWindow + + + + + InitializeComponent + + + + + The HamburgerMenu is based on a SplitView control. By default it contains a HamburgerButton and a ListView to display menu items. + + + The HamburgerMenu is based on a SplitView control. By default it contains a HamburgerButton and a ListView to display menu items. + + + The HamburgerMenu is based on a SplitView control. By default it contains a HamburgerButton and a ListView to display menu items. + + + The HamburgerMenu is based on a SplitView control. By default it contains a HamburgerButton and a ListView to display menu items. + + + The HamburgerMenu is based on a SplitView control. By default it contains a HamburgerButton and a ListView to display menu items. + + + + + Initializes a new instance of the class. + + + + + Override default OnApplyTemplate to capture children controls + + + + + Event raised when an item is clicked + + + + + Event raised when an options' item is clicked + + + + + Event raised when an item is invoked + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Gets or sets a template for the hamburger icon. + + + + + Identifies the dependency property. + + + + + Gets or sets a template for the hamburger icon. + + + + + Gets or sets main button's width. + + + + + Gets or sets main button's height. + + + + + Gets or sets main button's margin. + + + + + Gets or sets main button's visibility. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Gets or sets an object source used to generate the content of the options. + + + + + Gets or sets the Style used for each item in the options. + + + + + Gets or sets the DataTemplate used to display each item in the options. + + + + + Gets or sets the DataTemplateSelector used to display each item in the options. + + + + + Gets the collection used to generate the content of the option list. + + + Exception thrown if OptionsListView is not yet defined. + + + + + Gets or sets the visibility of the options menu. + + + + + Gets or sets the selected options menu item. + + + + + Gets or sets the selected options menu index. + + + + + Gets or sets a command which will be executed if an options item is clicked by the user. + + + + + Gets or sets the command parameter which will be passed by the OptionsItemCommand. + + + + + Executes the options item command which can be set by the user. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Gets or sets the width of the pane when it's fully expanded. + + + + + Gets or sets a value that specifies whether the pane is shown on the right or left side of the control. + + + + + Gets or sets a value that specifies how the pane and content areas are shown. + + + + + Gets or sets the width of the pane in its compact display mode. + + + + + Gets or sets the Brush to apply to the background of the Pane area of the control. + + + + + Gets or sets the Brush to apply to the foreground of the Pane area of the control. + + + + + Gets or sets a value indicating whether the pane is expanded to its full width. + + + + + Gets or sets an object source used to generate the content of the menu. + + + + + Gets or sets the Style used for each item. + + + + + Gets or sets the DataTemplate used to display each item. + + + + + Gets or sets the DataTemplateSelector used to display each item. + + + + + Gets the collection used to generate the content of the items list. + + + Exception thrown if ButtonsListView is not yet defined. + + + + + Gets or sets the selected menu item. + + + + + Gets or sets the selected menu index. + + + + + Gets or sets a command which will be executed if an item is clicked by the user. + + + + + Gets or sets the command parameter which will be passed by the ItemCommand. + + + + + Gets or sets wheather the ScrollBar of the HamburgerMenu is on the left side or on the right side. + + + + + Gets or sets wheather a selection indicator will be shown on the HamburgerMenuItem. + + + + + Gets or sets the default FocusVisualStyle for a HamburgerMenuItem. + This style can be override at the HamburgerMenuItem style by setting the FocusVisualStyle property. + + + + + Executes the item command which can be set by the user. + + + + + EventArgs used for the ItemClick and OptionsItemClick event. + + + + + Gets the clicked item + + + + + EventArgs used for the ItemInvoked event. + + + + + Gets the invoked item + + + + + Gets a value indicating whether the invoked item is an options item + + + + + The HamburgerMenuGlyphItem provides a glyph based implementation for HamburgerMenu entries. + + + + + Identifies the dependency property. + + + + + Gets or sets a value that specifies the glyph to use from Segoe MDL2 Assets font. + + + + + The HamburgerMenuIconItem provides an icon based implementation for HamburgerMenu entries. + + + + + Identifies the dependency property. + + + + + Gets or sets a value that specifies an user specific object which can be used as icon. + + + + + The HamburgerMenuImageItem provides an image based implementation for HamburgerMenu entries. + + + + + Identifies the dependency property. + + + + + Gets or sets a value that specifies a bitmap to display with an Image control. + + + + + The HamburgerMenuItem provides an implementation for HamburgerMenu entries. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Gets or sets a value that specifies label to display. + + + + + Gets or sets a value that specifies the page to navigate to (if you use the HamburgerMenu with a Frame content) + + + + + Gets or sets a value that specifies an user specific value. + + + + + Gets or sets a command which will be executed if an item is clicked by the user. + + + + + Gets or sets the command parameter which will be passed by the Command. + + + + + Gets or sets the element on which to raise the specified command. + + + Element on which to raise a command. + + + + + Gets or sets a value indicating whether this item is enabled in the user interface (UI). This is a dependency property. + + + true if the item is enabled; otherwise, false. The default value is true. + + + + + Gets or sets a value that specifies ToolTip to display. + + + + + Executes the command which can be set by the user. + + + + + The HamburgerMenuItemCollection provides typed collection of HamburgerMenuItem. + + + + + Represents an hour comparison operation that ensures that 12 is smaller than 1. + This ensures that in the control the first hour that is selectable is 12 (AM/PM). + + + This ensures that the first hour that is selectable is 12 (AM/PM).

+ This comparer is used only if in the corresponding the value for is false. +
+
+ + + Overrides the text case behavior for certain buttons. + When set to true, the text case will be preserved and won't be changed to upper or lower case. + + + + + DependencyProperty for property. + + + + + The CornerRadius property allows users to control the roundness of the button corners independently by + setting a radius value for each corner. Radius values that are too large are scaled so that they + smoothly blend from corner to corner. (Can be used e.g. at MetroButton style) + Description taken from original Microsoft description :-D + + + + + A helper class that provides various attached properties for the control. + + + + + Gets the Maximum number of characters the TextBox can accept. + + + + + Sets the Maximum number of characters the TextBox can accept. + + + + + Gets the Character casing of the TextBox. + + + + + Sets the Character casing of the TextBox. + + + + + A helper class that provides various controls. + + + + + Gets the value to handle the visibility of the DisabledVisualElement in the template. + + + + + Sets the value to handle the visibility of the DisabledVisualElement in the template. + + + + + The DependencyProperty for the CharacterCasing property. + Controls whether or not content is converted to upper or lower case + + + + + Gets the character casing of the control + + + + + Sets the character casing of the control + + + + + This property can be used to set the button width (PART_ClearText) of TextBox, PasswordBox, ComboBox, NumericUpDown + + + + + Sets the brush used to draw the focus border. + + + + + Gets the brush used to draw the focus border. + + + + + Sets the brush used to draw the mouse over brush. + + + + + Gets the brush used to draw the mouse over brush. + + + + + DependencyProperty for property. + + + + + The CornerRadius property allows users to control the roundness of the button corners independently by + setting a radius value for each corner. Radius values that are too large are scaled so that they + smoothly blend from corner to corner. (Can be used e.g. at MetroButton style) + Description taken from original Microsoft description :-D + + + + + Gets or sets a value indicating whether the child contents of the control are not editable. + + + + + Gets a value indicating whether the child contents of the control are not editable. + + + + + Sets a value indicating whether the child contents of the control are not editable. + + + + + Save the DataGrid. + + + + + Get the DataGrid. + + + + + Gets the value to define the DataGridCell selection behavior. + + + + + Sets the value to define the DataGridCell selection behavior. + + + + + Gets the value to define the DataGridCell selection behavior. + + + + + Sets the value to define the DataGridCell selection behavior. + + + + + Gets a value which indicates the preview cell editing is enabled or not. + + + + + Sets a value which indicates the preview cell editing is enabled or not. + + + + + Gets the value to define the DataGridRow selection behavior. + + + + + Sets the value to define the DataGridRow selection behavior. + + + + + A helper class that provides various attached properties for the Expander control. + + + + + + Gets the toggle button style used for the ExpandDirection Up. + + + + + Sets the toggle button style used for the ExpandDirection Up. + + + + + Gets the toggle button style used for the ExpandDirection Down. + + + + + Sets the toggle button style used for the ExpandDirection Down. + + + + + Gets the toggle button style used for the ExpandDirection Left. + + + + + Sets the toggle button style used for the ExpandDirection Left. + + + + + Gets the toggle button style used for the ExpandDirection Right. + + + + + Sets the toggle button style used for the ExpandDirection Right. + + + + + Gets or sets the background brush which will be used for the active selected item (if the keyboard focus is within). + + + + + Gets the brush the background brush which will be used for the active selected item (if the keyboard focus is within). + + + + + Sets the brush the background brush which will be used for the active selected item (if the keyboard focus is within). + + + + + Gets or sets the foreground brush which will be used for the active selected item (if the keyboard focus is within). + + + + + Gets the brush the foreground brush which will be used for the active selected item (if the keyboard focus is within). + + + + + Sets the brush the foreground brush which will be used for the active selected item (if the keyboard focus is within). + + + + + Gets or sets the background brush which will be used for a selected item. + + + + + Gets the background brush which will be used for a selected item. + + + + + Sets the background brush which will be used for a selected item. + + + + + Gets or sets the foreground brush which will be used for a selected item. + + + + + Gets the foreground brush which will be used for a selected item. + + + + + Sets the foreground brush which will be used for a selected item. + + + + + Gets or sets the background brush which will be used for an mouse hovered item. + + + + + Gets the background brush which will be used for an mouse hovered item. + + + + + Sets the background brush which will be used for an mouse hovered item. + + + + + Gets or sets the background brush which will be used for an mouse hovered and selected item. + + + + + Gets the background brush which will be used for an mouse hovered and selected item. + + + + + Sets the background brush which will be used for an mouse hovered and selected item. + + + + + Gets or sets the background brush which will be used for selected disabled items. + + + + + Gets the background brush which will be used for selected disabled items. + + + + + Sets the background brush which will be used for selected disabled items. + + + + + Gets or sets the foreground brush which will be used for selected disabled items. + + + + + Gets the foreground brush which will be used for selected disabled items. + + + + + Sets the foreground brush which will be used for selected disabled items. + + + + + Gets or sets the background brush which will be used for disabled items. + + + + + Gets the background brush which will be used for disabled items. + + + + + Sets the background brush which will be used for disabled items. + + + + + Gets or sets the foreground brush which will be used for disabled items. + + + + + Gets the foreground brush which will be used for disabled items. + + + + + Sets the foreground brush which will be used for disabled items. + + + + + Change the value of the slider if the user rotates the mouse wheel by the value defined for + + + + + Change the value of the slider if the user rotates the mouse wheel by the value defined for + + + + + Do not change the value of the slider if the user rotates the mouse wheel. + + + + + Change the value of the slider only if the control is focused. + + + + + Changes the value of the slider if the mouse pointer is over this element. + + + + + Gets the content of the RevealButton. + + + + + Sets the content of the RevealButton. + + + + + Gets the data template used to display the content of the RevealButton. + + + + + Sets the data template used to display the content of the RevealButton. + + + + + This property can be used to set vertical scrollbar left side from the tabpanel (look at MetroAnimatedSingleRowTabControl) + + + + + Identifies the VerticalScrollBarOnLeftSide attached property. + This property can be used to set vertical scrollbar left side from the tabpanel (look at MetroAnimatedSingleRowTabControl) + + + + + Gets whether the vertical ScrollBar is on the left side or not. + + + + + Sets whether the vertical ScrollBar should be on the left side or not. + + + + + Identifies the IsHorizontalScrollWheelEnabled attached property. + + + + + Gets whether the ScrollViewer is scrolling horizontal by using the mouse wheel. + + + + + Sets whether the ScrollViewer should be scroll horizontal by using the mouse wheel. + + + + + Gets or sets the brush of the thumb. + + + + + Gets the brush of the thumb. + + + + + Sets the brush of the thumb. + + + + + Gets or sets the brush of the thumb if the mouse is over the slider. + + + + + Gets the brush of the thumb if the mouse is over the slider. + + + + + Sets the brush of the thumb if the mouse is over the slider. + + + + + Gets or sets the brush of the thumb if the mouse button is pressed. + + + + + Gets the brush of the thumb if the mouse button is pressed. + + + + + Sets the brush of the thumb if the mouse button is pressed. + + + + + Gets or sets the brush of the thumb if the slider is disabled. + + + + + Gets the brush of the thumb if the slider is disabled. + + + + + Sets the brush of the thumb if the slider is disabled. + + + + + Gets or sets the brush of the track. + + + + + Gets the brush of the track. + + + + + Sets the brush of the track. + + + + + Gets or sets the brush of the track if the mouse is over the slider. + + + + + Gets the brush of the track if the mouse is over the slider. + + + + + Sets the brush of the track if the mouse is over the slider. + + + + + Gets or sets the brush of the track if the mouse button is pressed. + + + + + Gets the brush of the track if the mouse button is pressed. + + + + + Sets the brush of the track if the mouse button is pressed. + + + + + Gets or sets the brush of the track if the slider is disabled. + + + + + Gets the brush of the track if the slider is disabled. + + + + + Sets the brush of the track if the slider is disabled. + + + + + Gets or sets the brush of the track value. + + + + + Gets the brush of the track value. + + + + + Sets the brush of the track value. + + + + + Gets or sets the brush of the track value if the mouse is over the slider. + + + + + Gets the brush of the track value if the mouse is over the slider. + + + + + Sets the brush of the track value if the mouse is over the slider. + + + + + Gets or sets the brush of the track value if the mouse button is pressed. + + + + + Gets the brush of the track value if the mouse button is pressed. + + + + + Sets the brush of the track value if the mouse button is pressed. + + + + + Gets or sets the brush of the track value if the slider is disabled. + + + + + Gets the brush of the track value if the slider is disabled. + + + + + Sets the brush of the track value if the slider is disabled. + + + + + Gets/Sets the type how the value will be changed if the user rotates the mouse wheel. + + + + + Gets/Sets the type how the value will be changed if the user rotates the mouse wheel. + + + + + Gets/Sets the value when the slider will be changed. Possible values are if the slider is focused or if the mouse is over the slider. + + + + + Gets/Sets the value when the slider will be changed. Possible values are if the slider is focused or if the mouse is over the slider. + + + + + Specifies the underline position of a TabControl. + + + + Sets the Style and Template property to null. + + Removing a TabItem in code behind can produce such nasty output + System.Windows.Data Warning: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.TabControl', AncestorLevel='1''. BindingExpression:Path=Background; DataItem=null; target element is 'TabItem' (Name=''); target property is 'Background' (type 'Brush') + or + System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.TabControl', AncestorLevel='1''. BindingExpression:Path=(0); DataItem=null; target element is 'TabItem' (Name=''); target property is 'UnderlineBrush' (type 'Brush') + + This is a timing problem in WPF of the binding mechanism itself. + + To avoid this, we can set the Style and Template to null. + + + + Identifies the CloseButtonEnabled attached property. + + + + + Gets whether a close button should be visible or not. + + + + + Sets whether a close button should be visible or not. + + + + + Identifies the CloseTabCommand attached property. + + + + + Gets a command for the TabItem which executes if the TabItem will be closed. + + + + + Sets a command for the TabItem which executes if the TabItem will be closed. + + + + + Identifies the CloseTabCommandParameter attached property. + + + + + Gets a command parameter for the TabItem that will be passed to the CloseTabCommand. + + + + + Sets a command parameter for the TabItem that will be passed to the CloseTabCommand. + + + + + Defines whether the underline below the is shown or not. + + + + + Defines whether the underline below the or is shown or not. + + + + + Defines the underline brush below the or . + + + + + Defines the underline brush below the or of an selected item. + + + + + Defines the underline brush below the or if the mouse is over an item. + + + + + Defines the underline brush below the or if the mouse is over a selected item. + + + + + This property can be used to set the Transition for animated TabControls + + + + + A helper class that provides various attached properties for the TextBox control. + + + Password watermarking code from: http://prabu-guru.blogspot.com/2010/06/how-to-add-watermark-text-to-textbox.html + + + + + The clear text button behavior property. It sets a click event to the button if the value is true. + + + + + This property can be used to set the button width (PART_ClearText) of TextBox, PasswordBox, ComboBox, NumericUpDown + + + + + This property can be used to retrieve the watermark using the of bound property. + + + Setting this property to true will uses reflection. + + + + + Indicates if a TextBox or RichTextBox should use SpellCheck context menu + + + + + Indicates if the watermark is automatically retrieved by using the of the bound property. + + This attached property uses reflection; thus it might reduce the performance of the application. + The auto-watermak does work for the following controls: + In the following case no custom watermark is shown + + There is no binding + Binding path errors + Binding to a element of a collection without using a property of that element Binding Path=Collection[0] use: Binding Path=Collection[0].SubProperty + The bound property does not have a + + + + + Gets a value that indicates the horizontal alignment of the watermark. + + + One of the values that specifies the desired alignment. The default is . + + + + + Sets a value that indicates the horizontal alignment of the watermark. + + + + + Gets the text trimming behavior to employ when watermark overflows the content area. + + + One of the values that specifies the text trimming behavior to employ. The default is . + + + + + Sets the text trimming behavior to employ when watermark overflows the content area. + + + + + Gets how the watermark should wrap text. + + One of the values. The default is . + + + + + Sets how the watermark should wrap text. + + + + + Gets if the attached TextBox has text. + + + + + Gets the clear text button visibility / feature. Can be used to enable text deletion. + + + + + Sets the clear text button visibility / feature. Can be used to enable text deletion. + + + + + Gets the text button visibility. + + + + + Sets the text button visibility. + + + + + Gets the buttons placement variant. + + + + + Sets the buttons placement variant. + + + + + Gets the clear text button behavior. + + + + + Sets the clear text button behavior. + + + + + ButtonContentTemplate is the template used to display the content of the ClearText button. + + + + + This property can be used to handle the style for CheckBox and RadioButton + LeftToRight means content left and button right and RightToLeft vise versa + + + + + This property can be used to handle the style for CheckBox and RadioButton + LeftToRight means content left and button right and RightToLeft vise versa + + + + + A MetroTabControl (Pivot) that wraps TabItem/MetroTabItem headers on a single row. + + + + + Initializes a new instance of the MahApps.Metro.Controls.MetroAnimatedSingleRowTabControl class. + + + + + A MetroTabControl (Pivot) that uses a TransitioningContentControl to animate the contents of a TabItem/MetroTabItem. + + + + + Initializes a new instance of the MahApps.Metro.Controls.MetroAnimatedTabControl class. + + + + + Originally from http://xamlcoder.com/blog/2010/11/04/creating-a-metro-ui-style-control/ + + + + + Creates AutomationPeer () + + + + + The MetroHeaderAutomationPeer class exposes the type to UI Automation. + + + + + A reimplementation of NavigationWindow based on MetroWindow. + + + + MetroNavigationWindow + + + + + Gets an IEnumerable that you use to enumerate the entries in back navigation history for a NavigationWindow. + + + + + + Gets an IEnumerable that you use to enumerate the entries in back navigation history for a NavigationWindow. + + + + + + Gets the NavigationService that is used by this MetroNavigationWindow to provide navigation services to its content. + + + + + + Gets a value that indicates whether there is at least one entry in back navigation history. + + + + + + Gets a value that indicates whether there is at least one entry in forward navigation history. + + + + + + Gets or sets the base uniform resource identifier (URI) of the current context. + + + + + + Gets or sets the uniform resource identifier (URI) of the current content, or the URI of new content that is currently being navigated to. + + + + + + Adds an entry to back navigation history that contains a CustomContentState object. + + A CustomContentState object that represents application-defined state that is associated with a specific piece of content. + + + + + Removes the most recent journal entry from back history. + + The most recent JournalEntry in back navigation history, if there is one. + + + + + Navigates to the most recent item in back navigation history. + + + + + + Navigates to the most recent item in forward navigation history. + + + + + + Navigates asynchronously to content that is contained by an object. + + An Object that contains the content to navigate to. + true if a navigation is not canceled; otherwise, false. + + + + + Navigates asynchronously to content that is specified by a uniform resource identifier (URI). + + A Uri object initialized with the URI for the desired content. + true if a navigation is not canceled; otherwise, false. + + + + + Navigates asynchronously to content that is contained by an object, and passes an object that contains data to be used for processing during navigation. + + An Object that contains the content to navigate to. + A Object that contains data to be used for processing during navigation. + true if a navigation is not canceled; otherwise, false. + + + + + Navigates asynchronously to source content located at a uniform resource identifier (URI), and pass an object that contains data to be used for processing during navigation. + + A Uri object initialized with the URI for the desired content. + A Object that contains data to be used for processing during navigation. + true if a navigation is not canceled; otherwise, false. + + + + + Stops further downloading of content for the current navigation request. + + + + + + Occurs when navigation to a content fragment begins, which occurs immediately, if the desired fragment is in the current content, or after the source XAML content has been loaded, if the desired fragment is in different content. + + + + + + Occurs when a new navigation is requested. + + + + + + Occurs when an error is raised while navigating to the requested content. + + + + + + Occurs periodically during a download to provide navigation progress information. + + + + + + Occurs when the StopLoading method is called, or when a new navigation is requested while a current navigation is in progre + + + + + + Occurs when the content that is being navigated to has been found, and is available from the PageContent property, although it may not have completed loading + + + + + + Occurs when content that was navigated to has been loaded, parsed, and has begun rendering. + + + + + + InitializeComponent + + + + + A metrofied ProgressBar. + + + + + + Gets/sets the diameter of the ellipses used in the indeterminate animation. + + + + + Gets/sets the offset of the ellipses used in the indeterminate animation. + + + + + A standard MetroTabControl (Pivot). + + + + + Initializes a new instance of the MahApps.Metro.Controls.MetroTabControl class. + + + + + A base class for every MetroTabControl (Pivot). + + + + + Get/sets the command that executes when a MetroTabItem's close button is clicked. + + + + + An event that is raised when a TabItem is closed. + + + + + Event args that is created when a TabItem is closed. + + + + + Gets the MetroTabItem that will be closed. + + + + + An extended TabItem with a metro style. + + + + + Gets/sets whether the Close Button is visible. + + + + + Gets/sets the command that is executed when the Close Button is clicked. + + + + + Gets/sets the command parameter which is passed to the close button command. + + + + + Gets/sets the Close Button Margin. + + + + + The MetroThumbContentControl control can be used for titles or something else and enables basic drag movement functionality. + + + + + Adds or remove a DragStartedEvent handler + + + + + Adds or remove a DragDeltaEvent handler + + + + + Adds or remove a DragCompletedEvent handler + + + + + DependencyProperty for the IsDragging property. + + + + + Indicates that the left mouse button is pressed and is over the MetroThumbContentControl. + + + + + The MetroThumbContentControlAutomationPeer class exposes the type to UI Automation. + + + + + An extended, metrofied Window class. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Allows easy handling of window commands brush. Theme is also applied based on this brush. + + + + + Gets/sets whether the window's entrance transition animation is enabled. + + + + + Gets/sets the FlyoutsControl that hosts the window's flyouts. + + + + + Gets/sets the icon content template to show a custom icon. + + + + + Gets/sets the title content template to show a custom title. + + + + + Gets/sets the left window commands that hosts the user commands. + + + + + Gets/sets the right window commands that hosts the user commands. + + + + + Gets/sets the window button commands that hosts the min/max/close commands. + + + + + Gets/sets whether the window will ignore (and overlap) the taskbar when maximized. + + + + + Gets or sets resize border thickness + + + + + Using a DependencyProperty as the backing store for ResizeBorderTickness. This enables animation, styling, binding, etc... + + + + + Gets/sets the brush used for the titlebar's foreground. + + + + + Gets/sets whether the window will save it's position between loads. + + + + + Gets the window placement settings (can be overwritten). + + + + + Get/sets whether the titlebar icon is visible or not. + + + + + Get/sets whether dialogs show over the title bar. + + + + + Gets whether one or more dialogs are shown. + + + + + Gets/sets edge mode of the titlebar icon. + + + + + Gets/sets bitmap scaling mode of the titlebar icon. + + + + + Gets/sets icon scaling mode of the titlebar. + + + + + Gets/sets whether the TitleBar is visible or not. + + + + + Gets/sets whether the WindowStyle is None or not. + + + + + Gets/sets if the minimize button is visible. + + + + + Gets/sets if the Maximize/Restore button is visible. + + + + + Gets/sets if the close button is visible. + + + + + Gets/sets if the min button is enabled. + + + + + Gets/sets if the max/restore button is enabled. + + + + + Gets/sets if the close button is enabled. + + + + + Gets or sets whether if the close button should be enabled or not if a dialog is shown. + + + + + Gets/sets if the the system menu should popup on right click. + + + + + Gets/sets the TitleBar's height. + + + + + Gets/sets if the TitleBar's text is automatically capitalized. + + + + + Character casing of the title + + + + + Gets/sets the title horizontal alignment. + + + + + Gets/sets the brush used for the Window's title bar. + + + + + Gets/sets the brush used for the Window's glow. + + + + + Gets/sets the brush used for the Window's non-active glow. + + + + + Gets/sets the brush used for the Window's non-active border. + + + + + Gets/sets the brush used for the Window's non-active title bar. + + + + + Gets/sets the brush used for the dialog overlay. + + + + + Gets/sets the opacity used for the dialog overlay. + + + + + Gets or sets the overlay fade in storyboard. + + + + + Gets or sets the overlay fade out storyboard. + + + + + Begins to show the MetroWindow's overlay effect. + + A task representing the process. + + + + Begins to hide the MetroWindow's overlay effect. + + A task representing the process. + + + + Stores the given element, or the last focused element via FocusManager, for restoring the focus after closing a dialog. + + The element which will be focused again. + + + + Clears the stored element which would get the focus after closing a dialog. + + + + + Initializes a new instance of the MahApps.Metro.Controls.MetroWindow class. + + + + + Initializes various behaviors for the window. + For example , and . + + + + + Gets the template child with the given name. + + The interface type inheirted from DependencyObject. + The name of the template child. + + + + Gets the template child with the given name. + + The name of the template child. + + + + This class eats little children. + + + + + Sets the IsHitTestVisibleInChromeProperty to a MetroWindow template child + + The MetroWindow. + The name of the template child. + + + + + Sets the WindowChrome ResizeGripDirection to a MetroWindow template child. + + The MetroWindow. + The name of the template child. + The direction. + + + + Adapts the WindowCommands to the theme of the first opened, topmost && (top || right || left) flyout + + The MetroWindow + All the flyouts! Or flyouts that fall into the category described in the summary. + An optional brush to reset the window commands brush to. + + + + Enum NumericInput which indicates what input is allowed for NumericUpdDown. + + + + + Only numbers are allowed + + + + + Numbers with decimal point and allowed scientific input + + + + + All is allowed + + + + + Represents a Windows spin box (also known as an up-down control) that displays numeric values. + + + + + Event fired from this NumericUpDown when its value has reached the maximum value + + + + + Event fired from this NumericUpDown when its value has reached the minimum value + + + + + Gets or sets the amount of time, in milliseconds, the NumericUpDown waits while the up/down button is pressed + before it starts increasing/decreasing the + for the specified . The value must be + non-negative. + + + + + Gets or sets a value indicating whether the user can use the arrow keys and to change values. + + + + + Gets or sets a value indicating whether the user can use the mouse wheel to change values. + + + + + Gets or sets a value indicating whether the control must have the focus in order to change values using the mouse wheel. + + If the value is true then the value changes when the mouse wheel is over the control. If the value is false then the value changes only if the control has the focus. If is set to "false" then this property has no effect. + + + + + + Gets or sets a value indicating whether the user can enter text in the control. + + + + + Gets or sets a value indicating the culture to be used in string formatting operations. + + + + + Gets or sets a value indicating whether the +/- button of the control is visible. + + + If the value is false then the of the control can be changed only if one of the following cases is satisfied: + + + is true. + + + is true. + + + is true. + + + + + + + Gets or sets a value indicating whether the text can be changed by the use of the up or down buttons only. + + + + + Gets or sets a value indicating whether the value to be added to or subtracted from remains + always + or if it will increase faster after pressing the up/down button/arrow some time. + + + + + Gets or sets the formatting for the displaying + + + + + + + + Gets or sets the horizontal alignment of the contents of the text box. + + + + + Indicates if the NumericUpDown should show the decimal separator or not. + + + + + Gets or sets which numeric input for the NumericUpDown is allowed. + + + + + Indicates if the NumericUpDown should round the value to the nearest possible interval when the focus moves to another element. + + + + + Called when this element or any below gets focus. + + + + + When overridden in a derived class, is invoked whenever application code or internal processes call + . + + + + + Raises the routed event. + + + Old value of the property + + + New value of the property + + + + + Based on Greg Schechter's Planerator + http://blogs.msdn.com/b/greg_schechter/archive/2007/10/26/enter-the-planerator-dead-simple-3d-in-wpf-with-a-stupid-name.aspx + + + + + An Enum representing different positions, such as Left or Right. + + + + + Event arguments created for the RangeSlider's SelectionChanged event. + + + + + + The value of the new range's beginning. + + + + + The value of the new range's ending. + + + + + A slider control with the ability to select a range between two values. + + + + + Identifies the  dependency property. + + + + + Identifies the  dependency property. + + + + + Identifies the  dependency property. + + + + + Identifies the  dependency property. + + + + + Identifies the  dependency property. + + + + + Identifies the  dependency property. + + + + + Get/sets value how fast thumbs will move when user press on left/right/central with left mouse button (IsMoveToPoint must be set to FALSE) + + + + + Get/sets precision of the value, which displaying inside AutotToolTip + + + + + Get/sets the converter for the tooltip text + + + + + Get/sets tooltip, which will show while dragging thumbs and display currect value + + + + + Gets or sets the position of tick marks with respect to the of the . + + + A value that defines how to position the tick marks in a with respect to the slider bar. The default is . + + + + + Gets or sets the interval between tick marks. + + + The distance between tick marks. The default is (1.0). + + + + + Gets or sets the positions of the tick marks to display for a . + + A set of tick marks to display for a . The default is . + + + + + Get or sets IsMoveToPoint feature which will enable/disable moving to exact point inside control when user clicked on it + Gets or sets a value that indicates whether the two of a moves immediately to the location of the mouse click that occurs while the mouse pointer pauses on the tracks. + + + + + Gets or sets the orientation of the . + + + + + Get/sets whether possibility to make manipulations inside range with left/right mouse buttons + cotrol button + + + + + Get/sets whether possibility to make manipulations inside range with left/right mouse buttons + cotrol button + + + + + Get/sets whether whole range will be moved when press on right/left/central part of control + + + + + Get/sets the minimal distance between two thumbs. + + + + + Get/sets the beginning of the range selection. + + + + + Get/sets the end of the range selection. + + + + + Get/sets the minimum range that can be selected. + + + + + Gets or sets a value that indicates whether the displays a selection range along the . + + + if a selection range is displayed; otherwise, . The default is . + + + + + Gets or sets the smallest value of a specified selection for a . + + + The largest value of a selected range of values of a . The default is zero (0.0). + + + + + Gets or sets the largest value of a specified selection for a . + + + The largest value of a selected range of values of a . The default is zero (0.0). + + + + + Responds to a change in the value of the property. + + The old value of the property.The new value of the property. + + + + Responds to a change in the value of the property. + + The old value of the property.The new value of the property. + + + + RevealImage + + + + + InitializeComponent + + + + + Reflects the parameter to pass to the CommandProperty upon execution. + + + + + Gets or sets the target element on which to fire the command. + + + + + Get or sets the Command property. + + + + + Indicates whether the Popup is visible. + + + + + Gets or sets an extra tag. + + + + + Gets or sets the dimension of children stacking. + + + + + Gets or sets the Content used to generate the icon part. + + + + + Gets or sets the ContentTemplate used to display the content of the icon part. + + + + + Gets/sets the button style. + + + + + Gets/sets the button arrow style. + + + + + Gets/sets the popup listbox style. + + + + + Gets/sets the brush of the button arrow icon. + + + + + Gets/sets the brush of the button arrow icon if the mouse is over the split button. + + + + + Gets/sets the brush of the button arrow icon if the arrow button is pressed. + + + + Updates the current selection when an item in the has changed + The event data. + + + + A special animation used to animates the length of a . + + + + + + + Represents a container with two views; one view for the main content and another view that is typically used for + navigation commands. + + + + + Identifies the dependency property. + + The identifier for the property. + + + + Gets or sets the width of the pane in its compact display mode. + + + The width of the pane in it's compact display mode. The default is 48 device-independent pixel (DIP) (defined + by the SplitViewCompactPaneThemeLength resource). + + + + + Identifies the dependency property. + + The identifier for the dependency property. + + + + Gets or sets the contents of the main panel of a . + + The contents of the main panel of a . The default is null. + + + + Identifies the dependency property. + + The identifier for the dependency property. + + + + Gets of sets a value that specifies how the pane and content areas of a are shown. + + + A value of the enumeration that specifies how the pane and content areas of a are + shown. The default is . + + + + + Identifies the dependency property. + + The identifier for the dependency property. + + + + Gets or sets a value that specifies whether the pane is expanded to its full width. + + true if the pane is expanded to its full width; otherwise, false. The default is true. + + + + Identifies the dependency property. + + The identifier for the dependency property. + + + + Gets or sets the width of the pane when it's fully expanded. + + + The width of the pane when it's fully expanded. The default is 320 device-independent + pixel (DIP). + + + + + Identifies the dependency property. + + The identifier for the dependency property. + + + + Gets or sets the contents of the pane of a . + + The contents of the pane of a . The default is null. + + + + Identifies the dependency property. + + The identifier for the dependency property. + + + + Gets or sets the Brush to apply to the background of the area of the control. + + The Brush to apply to the background of the area of the control. + + + + Identifies the dependency property. + + The identifier for the dependency property. + + + + Gets or sets the Brush to apply to the foreground of the area of the control. + + The Brush to apply to the background of the area of the control. + + + + Identifies the PanePlacement dependency property. + + The identifier for the PanePlacement dependency property. + + + + Gets or sets a value that specifies whether the pane is shown on the right or left side of the + . + + + A value of the enumeration that specifies whether the pane is shown on the right or left side of the + . The default is . + + + + + Identifies the dependency property. + + The identifier for the dependency property. + + + + Gets an object that provides calculated values that can be referenced as TemplateBinding sources when defining + templates for a control. + + An object that provides calculated values for templates. + + + + Initializes a new instance of the class. + + + + + Occurs when the pane is closed. + + + + + Occurs when the pane is closing. + + + + + Constants that specify how the pane is shown in a . + + + + + The pane covers the content when it's open and does not take up space in the control layout. + + + + + The pane is shown side-by-side with the content and takes up space in the control layout. + + + + + The amount of the pane defined by the property is shown side-by-side + with the content and takes up space in the control layout. + The remaining part of the pane covers the content when it's open and does not take up space in the control layout. + + + + + The amount of the pane defined by the property is shown side-by-side + with the content and takes up space in the control layout. + The remaining part of the pane pushes the content to the side when it's open and takes up space in the control + layout. + + + + + Provides event data for the event. + + + + + Gets or sets a value that indicates whether the pane closing action should be canceled. + + true to cancel the pane closing action; otherwise, false. + + + + Constants that specify whether the pane is set to the left or to the right of the content in a + . + + + + + The pane is shown to the left of the content. + + + + + The pane is shown to the right of the content. + + + + + Provides calculated values that can be referenced as TemplatedParent sources when defining templates for a + . + Not intended for general use. + + + + + Gets the value as a GridLength. + + + + + Gets the negative of the value. + + + + + Gets the negative of the value calculated by subtracting the value from + the value. + + + + + Gets the value as a GridLength. + + + + + Gets the value. + + + + + Gets a value calculated by subtracting the value from the + value. + + + + + An Enum representing different themes for window commands. + + + + + HorizontalTitleAlignment Dependency Property. + Default Value: HorizontalAlignment.Left + + + + + Gets/Sets the horizontal alignment of the title. + + + + + VerticalTitleAlignment Dependency Property. + Default Value: VerticalAlignment.Bottom + + + + + Gets/Sets the vertical alignment of the title. + + + + + Represents a control that allows the user to select a date and a time. + + + + + Occurs when the property is changed. + + + + + Gets or sets the date to display + + + The date to display. The default is . + + + + + Gets or sets the last date to be displayed. + + The last date to display. + + + + Gets or sets the first date to be displayed. + + The first date to display. + + + + Gets or sets the day that is considered the beginning of the week. + + + A that represents the beginning of the week. The default is the + that is determined by the current culture. + + + + + Gets or sets the format that is used to display the selected date. + + + + + Gets or sets a value that indicates whether the current date will be highlighted. + + true if the current date is highlighted; otherwise, false. The default is true. + + + + Gets or sets a value that indicates the dimension by which calendar and clock are stacked. + + + The of the calendar and clock. The default is + . + + + + + Gets or sets the currently selected date. + + + The date currently selected. The default is null. + + + + + Defines the visibility for time-parts that are visible for the . + + + + + Represents a control that allows the user to select a time. + + + + + Represents a base-class for time picking. + + + + + This readonly dependency property is to control whether to show the date-picker (in case of ) or hide it (in case of . + + + + + Represents the time 00:00:00; 12:00:00 AM respectively + + + + + Represents the time 23:59:59.9999999; 11:59:59.9999999 PM respectively + + + + + This list contains values from 0 to 55 with an interval of 5. It can be used to bind to and . + + + <MahApps:TimePicker SourceSeconds="{x:Static MahApps:TimePickerBase.IntervalOf5}" /> + <MahApps:DateTimePicker SourceSeconds="{x:Static MahApps:TimePickerBase.IntervalOf5}" /> + + + Returns a list containing {0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55}. + + + + + This list contains values from 0 to 50 with an interval of 10. It can be used to bind to and . + + + <MahApps:TimePicker SourceSeconds="{x:Static MahApps:TimePickerBase.IntervalOf10}" /> + <MahApps:DateTimePicker SourceSeconds="{x:Static MahApps:TimePickerBase.IntervalOf10}" /> + + + Returns a list containing {0, 10, 20, 30, 40, 50}. + + + + + This list contains values from 0 to 45 with an interval of 15. It can be used to bind to and . + + + <MahApps:TimePicker SourceSeconds="{x:Static MahApps:TimePickerBase.IntervalOf15}" /> + <MahApps:DateTimePicker SourceSeconds="{x:Static MahApps:TimePickerBase.IntervalOf15}" /> + + + Returns a list containing {0, 15, 30, 45}. + + + + + Occurs when the property is changed. + + + + + Gets or sets a value indicating the culture to be used in string formatting operations. + + + + + Gets or sets a value indicating the visibility of the clock hands in the user interface (UI). + + + The visibility definition of the clock hands. The default is . + + + + + Gets or sets a value indicating whether the date can be selected or not. This property is read-only. + + + + + Gets or sets a value indicating whether the clock of this control is visible in the user interface (UI). This is a + dependency property. + + + If this value is set to false then is set to + + + + true if the clock is visible; otherwise, false. The default value is true. + + + + + Gets or sets a value indicating whether the drop-down for a box is currently + open. + + true if the drop-down is open; otherwise, false. The default is false. + + + + Gets or sets a value indicating whether the contents of the are not editable. + + + true if the is read-only; otherwise, false. The default is false. + + + + + Gets or sets a value indicating the visibility of the selectable date-time-parts in the user interface (UI). + + + visibility definition of the selectable date-time-parts. The default is . + + + + + Gets or sets the currently selected time. + + + The time currently selected. The default is null. + + + + + Gets or sets the format that is used to display the selected time. + + + + + Gets or sets a collection used to generate the content for selecting the hours. + + + A collection that is used to generate the content for selecting the hours. The default is a list of interger from 0 + to 23 if is false or a list of interger from + 1 to 12 otherwise.. + + + + + Gets or sets a collection used to generate the content for selecting the minutes. + + + A collection that is used to generate the content for selecting the minutes. The default is a list of int from + 0 to 59. + + + + + Gets or sets a collection used to generate the content for selecting the seconds. + + + A collection that is used to generate the content for selecting the minutes. The default is a list of int from + 0 to 59. + + + + + Gets a value indicating whether the that is specified by the + + set by the ( if null) has not a value. + + + + + When overridden in a derived class, is invoked whenever application code or internal processes call + . + + + + + Gets the offset from the selected to use it in as hour + parameter. + + The current hour. + + An integer representing the offset to add to the hour that is selected in the hour-picker for setting the correct + . The offset is determined as follows: + + + ConditionOffset + + + is false0 + + + Selected hour is between 1 AM and 11 AM0 + + + Selected hour is 12 AM-12h + + + Selected hour is between 12 PM and 11 PM+12h + + + + + + + A control that allows the user to toggle between two states: One represents true; The other represents false. + + + + + Identifies the  dependency property. + + + + + Gets/sets the font family of the header. + + + + + Gets/sets the text to display when the control is in it's On state. + + + + + Gets/sets the text to display when the control is in it's Off state. + + + + + Gets/sets the brush used for the switch's foreground. + + + + + Gets/sets the brush used for the on-switch's foreground. + + + + + Gets/sets the brush used for the off-switch's foreground. + + + + + Gets/sets the brush used for the thumb indicator. + + + + + Gets/sets the brush used for the thumb indicator. + + + + + Gets/sets the width of the thumb indicator. + + + + + Gets/sets the control's content flow direction. + + + + + Gets or sets the padding of the inner content. + + + + + Gets/sets the control's toggle switch button style. + + + + + Gets/sets whether the control is Checked (On) or not (Off). + + + + + Gets/sets the command which will be executed if the IsChecked property was changed. + + + + + Gets/sets the command which will be executed if the checked event of the control is fired. + + + + + Gets/sets the command which will be executed if the checked event of the control is fired. + + + + + Gets/sets the command parameter which will be passed by the CheckChangedCommand. + + + + + Gets/sets the command parameter which will be passed by the CheckedCommand. + + + + + Gets/sets the command parameter which will be passed by the UnCheckedCommand. + + + + + An event that is raised when the value of IsChecked changes. + + + + + A Button that allows the user to toggle between two states. + + + + + Gets/sets the brush used for the control's foreground. + + + + + Gets/sets the brush used for the on-switch's foreground. + + + + + Gets/sets the brush used for the off-switch's foreground. + + + + + Gets/sets the brush used for the thumb indicator. + + + + + Gets/sets the brush used for the thumb indicator. + + + + + Gets/sets the width of the thumb indicator. + + + + + enumeration for the different transition types + + + + + Use the VisualState DefaultTransition + + + + + Use the VisualState Normal + + + + + Use the VisualState UpTransition + + + + + Use the VisualState DownTransition + + + + + Use the VisualState RightTransition + + + + + Use the VisualState RightReplaceTransition + + + + + Use the VisualState LeftTransition + + + + + Use the VisualState LeftReplaceTransition + + + + + Use a custom VisualState, the name must be set using CustomVisualStatesName property + + + + + A ContentControl that animates content as it loads and unloads. + + + + + Gets or sets the name of the custom transition visual state. + + + + + Gets/sets if the content is transitioning. + + + + + Reload the current transition if the content is the same. + + + + + Helper methods for UI-related tasks. + This class was obtained from Philip Sumi (a fellow WPF Disciples blog) + http://www.hardcodet.net/uploads/2009/06/UIHelper.cs + + + + + Finds a parent of a given item on the visual tree. + + The type of the queried item. + A direct or indirect child of the + queried item. + The first parent item that matches the submitted + type parameter. If not matching item can be found, a null + reference is being returned. + + + + Finds all Ancestors of a given item on the visual tree. + + A node in a visual tree + All ancestors in visual tree of element + + + + Finds a Child of a given item in the visual tree. + + A direct parent of the queried item. + The type of the queried item. + x:Name or Name of child. + The first parent item that matches the submitted type parameter. + If not matching item can be found, + a null parent is being returned. + + + + This method is an alternative to WPF's + method, which also + supports content elements. Keep in mind that for content element, + this method falls back to the logical tree of the element! + + The item to be processed. + The submitted item's parent, if available. Otherwise + null. + + + + Analyzes both visual and logical tree in order to find all elements of a given + type that are descendants of the item. + + The type of the queried items. + The root element that marks the source of the search. If the + source is already of the requested type, it will not be included in the result. + Sometimes it's better to search in the VisualTree (e.g. in tests) + All descendants of that match the requested type. + + + + This method is an alternative to WPF's + method, which also + supports content elements. Keep in mind that for content elements, + this method falls back to the logical tree of the element. + + The item to be processed. + Sometimes it's better to search in the VisualTree (e.g. in tests) + The submitted item's child elements, if available. + + + + Tries to locate a given item within the visual tree, + starting with the dependency object at a given position. + + The type of the element to be found + on the visual tree of the element at the given location. + The main element which is used to perform + hit testing. + The position to be evaluated on the origin. + + + + Gets the relative mouse position to the given handle in client coordinates. + + The handle for this method. + + + + Try to get the relative mouse position to the given handle in client coordinates. + + The handle for this method. + The relative mouse position to the given handle. + + + + Gets or sets the value indicating current light style for the minimize button. + + + + + Gets or sets the value indicating current light style for the maximize button. + + + + + Gets or sets the value indicating current light style for the close button. + + + + + Gets or sets the value indicating current dark style for the minimize button. + + + + + Gets or sets the value indicating current dark style for the maximize button. + + + + + Gets or sets the value indicating current dark style for the close button. + + + + + Gets or sets the value indicating current theme. + + + + + Gets or sets the minimize button tooltip. + + + + + Gets or sets the maximize button tooltip. + + + + + Gets or sets the close button tooltip. + + + + + Gets or sets the restore button tooltip. + + + + + Gets or sets the value indicating current theme. + + + + + Gets or sets the value indicating light theme template. + + + + + Gets or sets the value indicating light theme template. + + + + + Gets or sets the value indicating whether to show the separators. + + + + + Gets or sets the value indicating whether to show the last separator. + + + + + Gets or sets the value indicating separator height. + + + + + Gets or sets the value indicating whether to show the separator. + + + + + Doesn't overlay flyouts nor a hidden TitleBar. + + + + + Overlays opened controls. + + + + + Overlays a hidden TitleBar. + + + + + Refreshes the application settings property values from persistent storage. + + + + + Upgrades the application settings on loading. + + + + + Updates application settings to reflect a more recent installation of the application. + + + + + Stores the current values of the settings properties. + + + + + this settings class is the default way to save the placement of the window + + + + + Upgrades the application settings on loading. + + + + + Determining Ideal Text Color Based on Specified Background Color + http://www.codeproject.com/KB/GDI-plus/IdealTextColor.aspx + + The bg. + + + + + Converts a double representing either hour/minute/second to the corresponding angle. + + + + + Converts the value from true to false and false to true. + + + + + The math operations which can be used at the + + + + + MathConverter provides a value converter which can be used for math operations. + It can be used for normal binding or multi binding as well. + If it is used for normal binding the given parameter will be used as operands with the selected operation. + If it is used for multi binding then the first and second binding will be used as operands with the selected operation. + This class cannot be inherited. + + + + + MathAddConverter provides a multi value converter as a MarkupExtension which can be used for math operations. + This class cannot be inherited. + + + + + MathSubtractConverter provides a multi value converter as a MarkupExtension which can be used for math operations. + This class cannot be inherited. + + + + + MathMultiplyConverter provides a multi value converter as a MarkupExtension which can be used for math operations. + This class cannot be inherited. + + + + + MathDivideConverter provides a multi value converter as a MarkupExtension which can be used for math operations. + This class cannot be inherited. + + + + + Converts a String into a Visibility enumeration (and back) + The FalseEquivalent can be declared with the "FalseEquivalent" property + + + + + Initialize the properties with standard values + + + + + FalseEquivalent (default : Visibility.Collapsed => see Constructor) + + + + + Define whether the opposite boolean value is crucial (default : false) + + + + + Converts a Thickness to a new Thickness. It's possible to ignore a side With the IgnoreThicknessSide property. + + + + + Use all sides. + + + + + Ignore the left side. + + + + + Ignore the top side. + + + + + Ignore the right side. + + + + + Ignore the bottom side. + + + + Converts a value. + A converted value. If the method returns null, the valid null value is used. + The value produced by the binding source. + The type of the binding target property. + The converter parameter to use. + The culture to use in the converter. + + + Converts a value. + A converted value. If the method returns null, the valid null value is used. + The value that is produced by the binding target. + The type to convert to. + The converter parameter to use. + The culture to use in the converter. + + + + An object that represents the foreground color for a . + + + + + The ResourceDictionary that represents this Accent. + + + + + Gets/sets the name of the Accent. + + + + + Initializes a new instance of the Accent class. + + + + + Initializes a new instance of the Accent class. + + The name of the new Accent. + The URI of the accent ResourceDictionary. + + + + Initializes a new instance of the Accent class. + + The name of the new Accent. + The ResourceDictionary of the accent. + + + + Represents the background theme of the application. + + + + + The ResourceDictionary that represents this application theme. + + + + + Gets the name of the application theme. + + + + + Initializes a new instance of the AppTheme class. + + The name of the new AppTheme. + The URI of the AppTheme ResourceDictionary. + + + + Initializes a new instance of the AppTheme class. + + The name of the new AppTheme. + The ResourceDictionary of the accent. + + + + A class that allows for the detection and alteration of a theme and accent. + + + + + Gets a list of all of default accents. + + + + + Gets a list of all default themes. + + + + + Adds an accent with the given name and uniform resource identfier. + + The name of the new Accent. + The URI of the accent ResourceDictionary. + true if the accent does not exists and can be added. + + + + Adds an accent with the given name and resource dictionary. + + The name of the new Accent. + The ResourceDictionary of the accent. + true if the accent does not exists and can be added. + + + + Adds an app theme with the given name. + + The name of the new AppTheme. + The URI of the AppTheme ResourceDictionary. + true if the app theme does not exists and can be added. + + + + Adds an app theme with the given name. + + The name of the new AppTheme. + The ResourceDictionary of the accent. + true if the app theme does not exists and can be added. + + + + Gets app theme with the given resource dictionary. + + from which the theme should be retrieved. + AppTheme + + + + Gets app theme with the given name and theme type (light or dark). + + AppTheme + + + + Gets the inverse of the given . + This method relies on the "Dark" or "Light" affix to be present. + + The app theme. + The inverse or null if it couldn't be found. + + Returns BaseLight, if BaseDark is given or vice versa. + Custom Themes must end with "Dark" or "Light" for this to work, for example "CustomDark" and "CustomLight". + + + + + Gets the with the given name. + + The or null, if the app theme wasn't found + + + + Gets the with the given resource dictionary. + + from which the accent should be retrieved. + The or null, if the accent wasn't found. + + + + Determines whether the specified resource dictionary represents an . + + This might include runtime accents which do not have a resource uri. + + The resources. + true if the resource dictionary is an ; otherwise, false. + resources + + + + Gets a resource from the detected AppStyle. + + The window to check. If this is null, the Application's sources will be checked. + The key to check against. + The resource object or null, if the resource wasn't found. + + + + Change the theme for the whole application. + + + + + + + Change theme for the given window. + + + + + + + Change accent and theme for the whole application. + + The instance of Application to change. + The accent to apply. + The theme to apply. + + + + Change accent and theme for the given window. + + The Window to change. + The accent to apply. + The theme to apply. + + + + Changes the accent and theme of a ResourceDictionary directly. + + The ResourceDictionary to modify. + The accent to apply to the ResourceDictionary. + The theme to apply to the ResourceDictionary. + + + + Copies all resource keys from one resource to another. + + The source resource dictionary. + The destination resource dictionary. + + fromRD + or + toRD + + + + + Scans the window resources and returns it's accent and theme. + + + + + Scans the window resources and returns it's accent and theme. + + The Window to scan. + + + + Scans the application resources and returns it's accent and theme. + + The Application instance to scan. + + + + Scans a resources and returns it's accent and theme. + + The ResourceDictionary to check. + + + + This event fires if accent color and theme was changed + this should be using the weak event pattern, but for now it's enough + + + + + Invalidates global colors and resources. + Sometimes the ContextMenu is not changing the colors, so this will fix it. + + + + + Class which is used as argument for an event to signal theme changes. + + + + + Creates a new instance of this class. + + + + + The new theme. + + + + + The new accent + + + + + GeneratedInternalTypeHelper + + + + + CreateInstance + + + + + GetPropertyValue + + + + + SetPropertyValue + + + + + CreateDelegate + + + + + AddEventHandler + + +
+
diff --git a/packages/MahApps.Metro.1.6.5/lib/net45/MahApps.Metro.dll b/packages/MahApps.Metro.1.6.5/lib/net45/MahApps.Metro.dll new file mode 100644 index 0000000..4ae02af Binary files /dev/null and b/packages/MahApps.Metro.1.6.5/lib/net45/MahApps.Metro.dll differ diff --git a/packages/MahApps.Metro.1.6.5/lib/net45/MahApps.Metro.xml b/packages/MahApps.Metro.1.6.5/lib/net45/MahApps.Metro.xml new file mode 100644 index 0000000..929b7d9 --- /dev/null +++ b/packages/MahApps.Metro.1.6.5/lib/net45/MahApps.Metro.xml @@ -0,0 +1,5549 @@ + + + + MahApps.Metro + + + + + This CommandTriggerAction can be used to bind any event on any FrameworkElement to an . + This trigger can only be attached to a FrameworkElement or a class deriving from FrameworkElement. + + This class is inspired from Laurent Bugnion and his EventToCommand. + http://www.mvvmlight.net + See license.txt in this solution or http://www.galasoft.ch/license_MIT.txt + + + + + Identifies the dependency property + + + + + Gets or sets the command that this trigger is bound to. + + + + + Identifies the dependency property + + + + + Gets or sets an object that will be passed to the attached to this trigger. + + + + + Updates all glow windows (visible, hidden, collapsed) + + + + + Sets the opacity to all glow windows + + + + + Starts the opacity storyboard 0 -> 1 + + + + + Shows all glow windows + + + + + Gets or sets the bindable Password property on the PasswordBox control. This is a dependency property. + + + + + Handles changes to the 'Password' attached property. + + + + + Handle the 'PasswordChanged'-event on the PasswordBox + + + + + Called after the behavior is attached to an AssociatedObject. + + + Override this to hook up functionality to the AssociatedObject. + + + + + Called when the behavior is being detached from its AssociatedObject, but before it has actually occurred. + + + Override this to unhook functionality from the AssociatedObject. + + + + + + Sets the first TabItem with Visibility="" as + the SelectedItem of the TabControl. + + + If there is no visible TabItem, null is set as the SelectedItem + + + + + + + + + + + + Represents a border whose contents are clipped within the bounds + of the border. The border may have rounded corners. + + + + + BorderThickness Dependency Property + + + + + Gets or sets the BorderThickness property. This dependency property + indicates the BorderThickness. + + + + + Checks if the given Thickness is valid or not + + Thickness + + + + + Padding Dependency Property + + + + + Gets or sets the Padding property. This dependency property + indicates the Padding. + + + + + CornerRadius Dependency Property + + + + + Gets or sets the CornerRadius property. This dependency property + indicates the CornerRadius of the border. + + + + + Checks if the given CornerRadius is valid or not + + CornerRadius + + + + + BorderBrush Dependency Property + + + + + Gets or sets the BorderBrush property. This dependency property + indicates the BorderBrush with which the Border is drawn. + + + + + Background Dependency Property + + + + + Gets or sets the Background property. This dependency property + indicates the Background with which the Background is drawn. + + + + + OptimizeClipRendering Dependency Property + + + + + Gets or sets the OptimizeClipRendering property. This dependency property + indicates whether the rendering of the clip should be optimized. When set to true, + In order to optimize the rendering of the clipped Child, + the background is rendered with the same brush as the border. Any other brush set for + the background will be ignored. The Child will be rendered on top of it. + This is done to prevent any gaps between the border the the clipped Child (this is + evidently visible if both the Border and the Child are of same color). + This works best when the Child does not have any level of transparency and is opaque. + + + + + Updates DesiredSize of the ClipBorder. Called by parent UIElement. This is the first pass of layout. + + + Border determines its desired size it needs from the specified border the child: its sizing + properties, margin, and requested size. + + Constraint size is an "upper limit" that the return value should not exceed. + The Decorator's desired size. + + + + ClipBorder computes the position of its single child and applies its child's alignments to the child. + + + The size reserved for this element by the parent + The actual ink area of the element, typically the same as finalSize + + + + Here the ClipBorder's Child, Border and Background are rendered. + + Drawing Context + + + + Generates a StreamGeometry. + + An already opened StreamGeometryContext. + Rectangle for geomentry conversion. + The core points of the border which needs to be used to create + the geometry + Result geometry. + + + + Encapsulates the details of each of the core points of the border which is calculated + based on the given CornerRadius, BorderThickness, Padding and a flag to indicate whether + the inner or outer border is to be calculated. + + CornerRadius + BorderThickness + Padding + Flag to indicate whether outer or inner border needs + to be calculated + + + + A few very useful extension methods + + + + + Returns whether or not two doubles are "close". + + The first double to compare. + The second double to compare. + + bool - the result of the AreClose comparision. + + + + + Returns whether or not the first double is less than the second double. + + The first double to compare. + The second double to compare. + + bool - the result of the LessThan comparision. + + + + + Returns whether or not the first double is greater than the second double. + + The first double to compare. + The second double to compare. + + bool - the result of the GreaterThan comparision. + + + + + Returns whether or not the double is "close" to 1. Same as AreClose(double, 1), + but this is faster. + + The double to compare to 1. + + bool - the result of the AreClose comparision. + + + + + IsZero - Returns whether or not the double is "close" to 0. Same as AreClose(double, 0), + but this is faster. + + The double to compare to 0. + + bool - the result of the AreClose comparision. + + + + + Compares two points for fuzzy equality. This function + helps compensate for the fact that double values can + acquire error when operated upon + + The first point to compare + The second point to compare + Whether or not the two points are equal + + + + Compares two Size instances for fuzzy equality. This function + helps compensate for the fact that double values can + acquire error when operated upon + + The first size to compare + The second size to compare + Whether or not the two Size instances are equal + + + + Compares two Vector instances for fuzzy equality. This function + helps compensate for the fact that double values can + acquire error when operated upon + + The first Vector to compare + The second Vector to compare + Whether or not the two Vector instances are equal + + + + Compares two rectangles for fuzzy equality. This function + helps compensate for the fact that double values can + acquire error when operated upon + + The first rectangle to compare + The second rectangle to compare + Whether or not the two rectangles are equal + + + + Faster check for NaN ( faster than double.IsNaN() ) + IEEE 754 : If the argument is any value in the range 0x7ff0000000000001L through 0x7fffffffffffffffL + or in the range 0xfff0000000000001L through 0xffffffffffffffffL, the result will be NaN. + + Value to check + + + + + Rounds the given value based on the DPI scale + + Value to round + DPI Scale + + + + + Verifies if this Thickness contains only valid values + The set of validity checks is passed as parameters. + + Thickness value + allows negative values + allows Double.NaN + allows Double.PositiveInfinity + allows Double.NegativeInfinity + Whether or not the thickness complies to the range specified + + + + Method to add up the left and right size as width, as well as the top and bottom size as height + + Thickness + Size + + + + Verifies if the Thickness contains only zero values + + Thickness + Size + + + + Verifies if all the values in Thickness are same + + Thickness + true if yes, otherwise false + + + + Verifies if this CornerRadius contains only valid values + The set of validity checks is passed as parameters. + + CornerRadius value + allows negative values + allows Double.NaN + allows Double.PositiveInfinity + allows Double.NegativeInfinity + Whether or not the CornerRadius complies to the range specified + + + + Verifies if the CornerRadius contains only zero values + + CornerRadius + Size + + + + Verifies if the CornerRadius contains same values + + CornerRadius + true if yes, otherwise false + + + + Deflates rectangle by given thickness + + Rectangle + Thickness + Deflated Rectangle + + + + Inflates rectangle by given thickness + + Rectangle + Thickness + Inflated Rectangle + + + + Verifies if the given brush is a SolidColorBrush and + its color does not include transparency. + + Brush + true if yes, otherwise false + + + + Verifies if the given brush is the same as the otherBrush. + + Brush + Brush + true if yes, otherwise false + + + + Defines the method that determines whether the command can execute in its current state. + + + true if this command can be executed; otherwise, false. + + Data used by the command. If the command does not require data to be passed, this object can be set to null. + + + + Defines the method to be called when the command is invoked. + + Data used by the command. If the command does not require data to be passed, this object can be set to null. + + + + The DependencyProperty for the CharacterCasing property. + Controls whether or not content is converted to upper or lower case + Default Value: CharacterCasing.Normal + + + + + Character casing of the Content + + + + + The DependencyProperty for the RecognizesAccessKey property. + Default Value: false + + + + + Determine if the inner ContentPresenter should use AccessText in its style + + + + + This custom popup is used by the validation error template. + It provides some additional nice features: + - repositioning if host-window size or location changed + - repositioning if host-window gets maximized and vice versa + - it's only topmost if the host-window is activated + + + + + Gets/sets if the popup can be closed by left mouse button down. + + + + + Called when a cell has just switched to edit mode. + + A reference to element returned by GenerateEditingElement. + The event args of the input event that caused the cell to go into edit mode. May be null. + The unedited value of the cell. + + + + Synchronizes the column property. Taken from Helper code for DataGrid. + + + + + Taken from Helper code for DataGrid. + + + + + The DependencyProperty for the StringFormat property. + + + + + Gets or sets the formatting for the displaying value. + + + + + + + + The DependencyProperty for the Minimum property. + + + + + The DependencyProperty for the Maximum property. + + + + + The DependencyProperty for the Interval property. + + + + + The DependencyProperty for the HideUpDownButtons property. + + + + + The DependencyProperty for the UpDownButtonsWidth property. + + + + + The DependencyProperty for the FontFamily property. + Default Value: SystemFonts.MessageFontFamily + + + + + The font family of the desired font. + + + + + The DependencyProperty for the FontSize property. + Default Value: SystemFonts.MessageFontSize + + + + + The size of the desired font. + + + + + The DependencyProperty for the FontStyle property. + Default Value: SystemFonts.MessageFontStyle + + + + + The style of the desired font. + + + + + The DependencyProperty for the FontWeight property. + Default Value: SystemFonts.MessageFontWeight + + + + + The weight or thickness of the desired font. + + + + + The DependencyProperty for the Foreground property. + Default Value: SystemColors.ControlTextBrush + + + + + An brush that describes the foreground color. This overrides the cell foreground inherited color. + + + + + Method used as property changed callback for properties which need RefreshCellContent to be called + + + + + Rebuilds the contents of a cell in the column in response to a binding change. + + The cell to update. + The name of the column property that has changed. + + + + The base class for dialogs. + + You probably don't want to use this class, if you want to add arbitrary content to your dialog, + use the class. + + + + + Gets/sets the dialog's title. + + + + + Gets/sets arbitrary content on top of the dialog. + + + + + Gets/sets arbitrary content below the dialog. + + + + + Gets or sets the size of the dialog title font. + + + The size of the dialog title font. + + + + + Gets or sets the size of the dialog message font. + + + The size of the dialog message font. + + + + + Initializes a new MahApps.Metro.Controls.BaseMetroDialog. + + The window that is the parent of the dialog. + The settings for the message dialog. + + + + Initializes a new MahApps.Metro.Controls.BaseMetroDialog. + + + + + With this method it's possible to return your own settings in a custom dialog. + + + + + + + This is called in the loaded event. + + + + + Waits for the dialog to become ready for interaction. + + A task that represents the operation and it's status. + + + + Requests an externally shown Dialog to close. Will throw an exception if the Dialog is inside of a MetroWindow. + + + + + A last chance virtual method for stopping an external dialog from closing. + + + + + + Gets the window that owns the current Dialog IF AND ONLY IF the dialog is shown externally. + + + + + Gets the window that owns the current Dialog IF AND ONLY IF the dialog is shown inside of a window. + + + + + Waits until this dialog gets unloaded. + + + + + + An implementation of BaseMetroDialog allowing arbitrary content. + + + + + Gets the default instance if the dialog coordinator, which can be injected into a view model. + + + + + Creates a LoginDialog inside of the current window. + + The window that is the parent of the dialog. + The title of the LoginDialog. + The message contained within the LoginDialog. + Optional settings that override the global metro dialog settings. + The text that was entered or null (Nothing in Visual Basic) if the user cancelled the operation. + + + + Creates a InputDialog inside of the current window. + + The MetroWindow + The title of the MessageDialog. + The message contained within the MessageDialog. + Optional settings that override the global metro dialog settings. + The text that was entered or null (Nothing in Visual Basic) if the user cancelled the operation. + + + + Creates a MessageDialog inside of the current window. + + The MetroWindow + The title of the MessageDialog. + The message contained within the MessageDialog. + The type of buttons to use. + Optional settings that override the global metro dialog settings. + A task promising the result of which button was pressed. + + + + Creates a ProgressDialog inside of the current window. + + The MetroWindow + The title of the ProgressDialog. + The message within the ProgressDialog. + Determines if the cancel button is visible. + Optional Settings that override the global metro dialog settings. + A task promising the instance of ProgressDialogController for this operation. + + + + Adds a Metro Dialog instance to the specified window and makes it visible asynchronously. + If you want to wait until the user has closed the dialog, use + You have to close the resulting dialog yourself with . + + The owning window of the dialog. + The dialog instance itself. + An optional pre-defined settings instance. + A task representing the operation. + The is already visible in the window. + + + + Adds a Metro Dialog instance of the given type to the specified window and makes it visible asynchronously. + If you want to wait until the user has closed the dialog, use + You have to close the resulting dialog yourself with . + + The owning window of the dialog. + An optional pre-defined settings instance. + A task with the dialog representing the operation. + + + + Hides a visible Metro Dialog instance. + + The window with the dialog that is visible. + The dialog instance to hide. + An optional pre-defined settings instance. + A task representing the operation. + + The is not visible in the window. + This happens if hasn't been called before. + + + + + Gets the current shown dialog in async way. + + The dialog owner. + + + + Creates a LoginDialog outside of the current window. + + The window that is the parent of the dialog. + The title of the LoginDialog. + The message contained within the LoginDialog. + Optional settings that override the global metro dialog settings. + The text that was entered or null (Nothing in Visual Basic) if the user cancelled the operation. + + + + Creates a InputDialog outside of the current window. + + The MetroWindow + The title of the MessageDialog. + The message contained within the MessageDialog. + Optional settings that override the global metro dialog settings. + The text that was entered or null (Nothing in Visual Basic) if the user cancelled the operation. + + + + Creates a MessageDialog ouside of the current window. + + The MetroWindow + The title of the MessageDialog. + The message contained within the MessageDialog. + The type of buttons to use. + Optional settings that override the global metro dialog settings. + A task promising the result of which button was pressed. + + + + Use the dialog coordinator to help you interfact with dialogs from a view model. + + + + + Shows the input dialog. + + Typically this should be the view model, which you register in XAML using . + The title of the MessageDialog. + The message contained within the MessageDialog. + Optional settings that override the global metro dialog settings. + The text that was entered or null (Nothing in Visual Basic) if the user cancelled the operation. + + + + Shows the input dialog. + + Typically this should be the view model, which you register in XAML using . + The title of the MessageDialog. + The message contained within the MessageDialog. + Optional settings that override the global metro dialog settings. + The text that was entered or null (Nothing in Visual Basic) if the user cancelled the operation. + + + + Creates a LoginDialog inside of the current window. + + Typically this should be the view model, which you register in XAML using . + The title of the LoginDialog. + The message contained within the LoginDialog. + Optional settings that override the global metro dialog settings. + The text that was entered or null (Nothing in Visual Basic) if the user cancelled the operation. + + + + Creates a LoginDialog outside of the current window. + + Typically this should be the view model, which you register in XAML using . + The title of the LoginDialog. + The message contained within the LoginDialog. + Optional settings that override the global metro dialog settings. + The text that was entered or null (Nothing in Visual Basic) if the user cancelled the operation. + + + + Creates a MessageDialog inside of the current window. + + Typically this should be the view model, which you register in XAML using . + The title of the MessageDialog. + The message contained within the MessageDialog. + The type of buttons to use. + Optional settings that override the global metro dialog settings. + A task promising the result of which button was pressed. + + + + Creates a MessageDialog outside of the current window. + + Typically this should be the view model, which you register in XAML using . + The title of the MessageDialog. + The message contained within the MessageDialog. + The type of buttons to use. + Optional settings that override the global metro dialog settings. + A task promising the result of which button was pressed. + + + + Creates a ProgressDialog inside of the current window. + + Typically this should be the view model, which you register in XAML using . + The title of the ProgressDialog. + The message within the ProgressDialog. + Determines if the cancel button is visible. + Optional Settings that override the global metro dialog settings. + A task promising the instance of ProgressDialogController for this operation. + + + + Adds a Metro Dialog instance to the specified window and makes it visible asynchronously. + You have to close the resulting dialog yourself with . + + Typically this should be the view model, which you register in XAML using . + The dialog instance itself. + An optional pre-defined settings instance. + A task representing the operation. + The is already visible in the window. + + + + Hides a visible Metro Dialog instance. + + Typically this should be the view model, which you register in XAML using . + The dialog instance to hide. + An optional pre-defined settings instance. + A task representing the operation. + + The is not visible in the window. + This happens if hasn't been called before. + + + + + Gets the current shown dialog. + + Typically this should be the view model, which you register in XAML using . + + + + InputDialog + + + + + InitializeComponent + + + + + LoginDialog + + + + + InitializeComponent + + + + + An internal control that represents a message dialog. Please use MetroWindow.ShowMessage instead! + + + MessageDialog + + + + + InitializeComponent + + + + + An enum representing the result of a Message Dialog. + + + + + An enum representing the different button states for a Message Dialog. + + + + + Just "OK" + + + + + "OK" and "Cancel" + + + + + An enum representing the different choices for a color scheme in a Metro Dialog. + + + + + A class that represents the settings used by Metro Dialogs. + + + + + Gets or sets wheater the owner of the dialog can be closed. + + + + + Gets or sets the text used for the Affirmative button. For example: "OK" or "Yes". + + + + + Enable or disable dialog hiding animation + "True" - play hiding animation. + "False" - skip hiding animation. + + + + + Enable or disable dialog showing animation. + "True" - play showing animation. + "False" - skip showing animation. + + + + + Gets or sets a token to cancel the dialog. + + + + + Gets or sets whether the metro dialog should use the default black/white appearance (theme) or try to use the current accent. + + + + + Gets or sets a custom resource dictionary which can contains custom styles, brushes or something else. + + + + + Gets or sets which button should be focused by default + + + + + Gets or sets the default text (just the inputdialog needed) + + + + + Gets or sets the size of the dialog message font. + + + The size of the dialog message font. + + + + + Gets or sets the dialog result when the user cancelled the dialog with 'ESC' key + + If the value is the default behavior is determined + by the . + + + + +
+ + + + +
+
+ + + Gets or sets the size of the dialog title font. + + + The size of the dialog title font. + + + + + Gets or sets the text used for the first auxiliary button. + + + + + Gets or sets the maximum height. (Default is unlimited height, Double.NaN) + + + + + Gets or sets the text used for the Negative button. For example: "Cancel" or "No". + + + + + Gets or sets the text used for the second auxiliary button. + + + + + If set, stops standard resource dictionaries being applied to the dialog. + + + + + An internal control that represents a message dialog. Please use MetroWindow.ShowMessage instead! + + + ProgressDialog + + + + + InitializeComponent + + + + + A class for manipulating an open ProgressDialog. + + + + + This event is raised when the associated was closed programmatically. + + + + + This event is raised when the associated was cancelled by the user. + + + + + Gets if the Cancel button has been pressed. + + + + + Gets if the wrapped ProgressDialog is open. + + + + + Sets the ProgressBar's IsIndeterminate to true. To set it to false, call SetProgress. + + + + + Sets if the Cancel button is visible. + + + + + + Sets the dialog's progress bar value and sets IsIndeterminate to false. + + The percentage to set as the value. + + + + Gets/Sets the minimum restriction of the progress Value property + + + + + Gets/Sets the maximum restriction of the progress Value property + + + + + Sets the dialog's message content. + + The message to be set. + + + + Sets the dialog's title. + + The title to be set. + + + + Sets the dialog's progress bar brush + + The brush to use for the progress bar's foreground + + + + Begins an operation to close the ProgressDialog. + + A task representing the operation. + + + + The DependencyProperty for the ContentTemplate property. + + + + + The DependencyProperty for the ContentTemplateSelector property. + + + + + The DependencyProperty for the ContentStringFormat property. + + + + + Gets or sets the Content of this control.. + + + + + ContentTemplate is the template used to display the content of the control. + + + + + ContentTemplateSelector allows to provide custom logic for choosing the template used to display the content of the control. + + + This property is ignored if is set. + + + + + ContentStringFormat is the format used to display the content of the control as a string + + + This property is ignored if is set. + + + + + Reflects the parameter to pass to the CommandProperty upon execution. + + + + + Gets or sets the target element on which to fire the command. + + + + + Get or sets the Command property. + + + + + Indicates whether the Menu is visible. + + + + + Gets or sets an extra tag. + + + + + Gets or sets the dimension of children stacking. + + + + + Gets or sets the Content used to generate the icon part. + + + + + Gets or sets the ContentTemplate used to display the content of the icon part. + + + + + Gets/sets the button style. + + + + + Gets/sets the menu style. + + + + + Gets/sets the brush of the button arrow icon. + + + + + Gets/sets the brush of the button arrow icon if the mouse is over the drop down button. + + + + + Gets/sets the brush of the button arrow icon if the arrow button is pressed. + + + + + Gets/sets the visibility of the button arrow icon. + + + + Invoked when the property changes. + Information about the change. + + + + Executes the specified action asynchronously with the DispatcherPriority.Background on the thread that the Dispatcher was created on. + + The dispatcher object where the action runs. + An action that takes no parameters. + The dispatcher priority. + + + + A control that imitate a slideshow with back/forward buttons. + + + + + To counteract the double Loaded event issue. + + + + + Coerce SelectedIndexProperty's value. + + The object that the property exists on. + The new value of the property, prior to any coercion attempt. + The coerced value (with appropriate type). + + + + Computes the transition when changing selected index. + + Previous selected index. + New selected index. + + + + Gets the navigation buttons. + + Previous button. + Next button. + Inactive buttons. + + + + Applies actions to navigation buttons. + + Action applied to the previous button. + Action applied to the next button. + Action applied to the inactive buttons. + Any action is null. + + + + Sets the visibility of navigation buttons. + + Visibility of active buttons. + + + + Changes the current slide to the previous item. + + + + + Changes the current to the next item. + + + + + Brings the control buttons (next/previous) into view. + + + + + Removes the control buttons (next/previous) from view. + + + + + Gets or sets a value indicating whether the border for mouse over state is enabled or not. + + + + + Gets or sets the mouse hover border brush. + + + + + Gets or sets the mouse hover border thickness. + + + + + Gets/sets the text that is displayed in the FlipView's banner. + + + + + Gets/sets whether the FlipView's banner is visible. + + + + + Gets or sets a value indicating whether the navigation is circular, so you get the first after last and the last before first. + + + + + Gets/sets whether the FlipView's NavigationButton is visible. + + + + + A sliding panel control that is hosted in a MetroWindow via a FlyoutsControl. + + + + + + + An event that is raised when IsOpen changes. + + + + + An event that is raised when the closing animation has finished. + + + + + Gets/sets if the title is visible in this flyout. + + + + + Gets/sets if the close button is visible in this flyout. + + + + + Gets/sets if the close button is a cancel button in this flyout. + + + + + Gets/sets a command which will be executed if the close button was clicked. + Note that this won't execute when is set to false. + + + + + Gets/sets the command parameter which will be passed by the CloseCommand. + + + + + Gets/sets a command which will be executed if the close button was clicked. + + + + + Gets/sets whether this flyout is visible. + + + + + Gets/sets whether this flyout uses the open/close animation when changing the property. (default is true) + + + + + Gets/sets whether this flyout animates the opacity of the flyout when opening/closing. + + + + + Gets/sets whether this flyout stays open when the user clicks outside of it. + + + + + Gets/sets the mouse button that closes the flyout on an external mouse click. + + + + + Gets/sets whether this flyout is modal. + + + + + Gets/sets this flyout's position in the FlyoutsControl/MetroWindow. + + + + + Gets or sets the theme of this flyout. + + + + + Gets or sets the focused element. + + + + + Gets or sets a value indicating whether the flyout should auto close after AutoCloseInterval has passed. + + + + + Gets or sets the time in milliseconds when the flyout should auto close. + + + + + Gets or sets a value indicating whether the flyout should try focus an element. + + + + + A FlyoutsControl is for displaying flyouts in a MetroWindow. + + + + + + Gets/sets whether is ignored and all flyouts behave as if it was set to the value of this property. + + + + + Gets/sets whether is ignored and all flyouts behave as if it was set false. + + + + + Adapts the Flyout's theme to the theme of its host window. + + + + + Adapts the Flyout's theme to the theme of its host window, but inverted. + This theme can only be applied if the host window's theme abides the "Dark" and "Light" affix convention. + (see for more infos. + + + + + The dark theme. This is the default theme. + + + + + The flyouts theme will match the host window's accent color. + + + + + GlowWindow + + + + + InitializeComponent + + + + + The HamburgerMenu is based on a SplitView control. By default it contains a HamburgerButton and a ListView to display menu items. + + + The HamburgerMenu is based on a SplitView control. By default it contains a HamburgerButton and a ListView to display menu items. + + + The HamburgerMenu is based on a SplitView control. By default it contains a HamburgerButton and a ListView to display menu items. + + + The HamburgerMenu is based on a SplitView control. By default it contains a HamburgerButton and a ListView to display menu items. + + + The HamburgerMenu is based on a SplitView control. By default it contains a HamburgerButton and a ListView to display menu items. + + + + + Initializes a new instance of the class. + + + + + Override default OnApplyTemplate to capture children controls + + + + + Event raised when an item is clicked + + + + + Event raised when an options' item is clicked + + + + + Event raised when an item is invoked + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Gets or sets a template for the hamburger icon. + + + + + Identifies the dependency property. + + + + + Gets or sets a template for the hamburger icon. + + + + + Gets or sets main button's width. + + + + + Gets or sets main button's height. + + + + + Gets or sets main button's margin. + + + + + Gets or sets main button's visibility. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Gets or sets an object source used to generate the content of the options. + + + + + Gets or sets the Style used for each item in the options. + + + + + Gets or sets the DataTemplate used to display each item in the options. + + + + + Gets or sets the DataTemplateSelector used to display each item in the options. + + + + + Gets the collection used to generate the content of the option list. + + + Exception thrown if OptionsListView is not yet defined. + + + + + Gets or sets the visibility of the options menu. + + + + + Gets or sets the selected options menu item. + + + + + Gets or sets the selected options menu index. + + + + + Gets or sets a command which will be executed if an options item is clicked by the user. + + + + + Gets or sets the command parameter which will be passed by the OptionsItemCommand. + + + + + Executes the options item command which can be set by the user. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Gets or sets the width of the pane when it's fully expanded. + + + + + Gets or sets a value that specifies whether the pane is shown on the right or left side of the control. + + + + + Gets or sets a value that specifies how the pane and content areas are shown. + + + + + Gets or sets the width of the pane in its compact display mode. + + + + + Gets or sets the Brush to apply to the background of the Pane area of the control. + + + + + Gets or sets the Brush to apply to the foreground of the Pane area of the control. + + + + + Gets or sets a value indicating whether the pane is expanded to its full width. + + + + + Gets or sets an object source used to generate the content of the menu. + + + + + Gets or sets the Style used for each item. + + + + + Gets or sets the DataTemplate used to display each item. + + + + + Gets or sets the DataTemplateSelector used to display each item. + + + + + Gets the collection used to generate the content of the items list. + + + Exception thrown if ButtonsListView is not yet defined. + + + + + Gets or sets the selected menu item. + + + + + Gets or sets the selected menu index. + + + + + Gets or sets a command which will be executed if an item is clicked by the user. + + + + + Gets or sets the command parameter which will be passed by the ItemCommand. + + + + + Gets or sets wheather the ScrollBar of the HamburgerMenu is on the left side or on the right side. + + + + + Gets or sets wheather a selection indicator will be shown on the HamburgerMenuItem. + + + + + Gets or sets the default FocusVisualStyle for a HamburgerMenuItem. + This style can be override at the HamburgerMenuItem style by setting the FocusVisualStyle property. + + + + + Executes the item command which can be set by the user. + + + + + EventArgs used for the ItemClick and OptionsItemClick event. + + + + + Gets the clicked item + + + + + EventArgs used for the ItemInvoked event. + + + + + Gets the invoked item + + + + + Gets a value indicating whether the invoked item is an options item + + + + + The HamburgerMenuGlyphItem provides a glyph based implementation for HamburgerMenu entries. + + + + + Identifies the dependency property. + + + + + Gets or sets a value that specifies the glyph to use from Segoe MDL2 Assets font. + + + + + The HamburgerMenuIconItem provides an icon based implementation for HamburgerMenu entries. + + + + + Identifies the dependency property. + + + + + Gets or sets a value that specifies an user specific object which can be used as icon. + + + + + The HamburgerMenuImageItem provides an image based implementation for HamburgerMenu entries. + + + + + Identifies the dependency property. + + + + + Gets or sets a value that specifies a bitmap to display with an Image control. + + + + + The HamburgerMenuItem provides an implementation for HamburgerMenu entries. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Gets or sets a value that specifies label to display. + + + + + Gets or sets a value that specifies the page to navigate to (if you use the HamburgerMenu with a Frame content) + + + + + Gets or sets a value that specifies an user specific value. + + + + + Gets or sets a command which will be executed if an item is clicked by the user. + + + + + Gets or sets the command parameter which will be passed by the Command. + + + + + Gets or sets the element on which to raise the specified command. + + + Element on which to raise a command. + + + + + Gets or sets a value indicating whether this item is enabled in the user interface (UI). This is a dependency property. + + + true if the item is enabled; otherwise, false. The default value is true. + + + + + Gets or sets a value that specifies ToolTip to display. + + + + + Executes the command which can be set by the user. + + + + + The HamburgerMenuItemCollection provides typed collection of HamburgerMenuItem. + + + + + Represents an hour comparison operation that ensures that 12 is smaller than 1. + This ensures that in the control the first hour that is selectable is 12 (AM/PM). + + + This ensures that the first hour that is selectable is 12 (AM/PM).

+ This comparer is used only if in the corresponding the value for is false. +
+
+ + + Overrides the text case behavior for certain buttons. + When set to true, the text case will be preserved and won't be changed to upper or lower case. + + + + + DependencyProperty for property. + + + + + The CornerRadius property allows users to control the roundness of the button corners independently by + setting a radius value for each corner. Radius values that are too large are scaled so that they + smoothly blend from corner to corner. (Can be used e.g. at MetroButton style) + Description taken from original Microsoft description :-D + + + + + A helper class that provides various attached properties for the control. + + + + + Gets the Maximum number of characters the TextBox can accept. + + + + + Sets the Maximum number of characters the TextBox can accept. + + + + + Gets the Character casing of the TextBox. + + + + + Sets the Character casing of the TextBox. + + + + + A helper class that provides various controls. + + + + + Gets the value to handle the visibility of the DisabledVisualElement in the template. + + + + + Sets the value to handle the visibility of the DisabledVisualElement in the template. + + + + + The DependencyProperty for the CharacterCasing property. + Controls whether or not content is converted to upper or lower case + + + + + Gets the character casing of the control + + + + + Sets the character casing of the control + + + + + This property can be used to set the button width (PART_ClearText) of TextBox, PasswordBox, ComboBox, NumericUpDown + + + + + Sets the brush used to draw the focus border. + + + + + Gets the brush used to draw the focus border. + + + + + Sets the brush used to draw the mouse over brush. + + + + + Gets the brush used to draw the mouse over brush. + + + + + DependencyProperty for property. + + + + + The CornerRadius property allows users to control the roundness of the button corners independently by + setting a radius value for each corner. Radius values that are too large are scaled so that they + smoothly blend from corner to corner. (Can be used e.g. at MetroButton style) + Description taken from original Microsoft description :-D + + + + + Gets or sets a value indicating whether the child contents of the control are not editable. + + + + + Gets a value indicating whether the child contents of the control are not editable. + + + + + Sets a value indicating whether the child contents of the control are not editable. + + + + + Save the DataGrid. + + + + + Get the DataGrid. + + + + + Gets the value to define the DataGridCell selection behavior. + + + + + Sets the value to define the DataGridCell selection behavior. + + + + + Gets the value to define the DataGridCell selection behavior. + + + + + Sets the value to define the DataGridCell selection behavior. + + + + + Gets a value which indicates the preview cell editing is enabled or not. + + + + + Sets a value which indicates the preview cell editing is enabled or not. + + + + + Gets the value to define the DataGridRow selection behavior. + + + + + Sets the value to define the DataGridRow selection behavior. + + + + + A helper class that provides various attached properties for the Expander control. + + + + + + Gets the toggle button style used for the ExpandDirection Up. + + + + + Sets the toggle button style used for the ExpandDirection Up. + + + + + Gets the toggle button style used for the ExpandDirection Down. + + + + + Sets the toggle button style used for the ExpandDirection Down. + + + + + Gets the toggle button style used for the ExpandDirection Left. + + + + + Sets the toggle button style used for the ExpandDirection Left. + + + + + Gets the toggle button style used for the ExpandDirection Right. + + + + + Sets the toggle button style used for the ExpandDirection Right. + + + + + Gets or sets the background brush which will be used for the active selected item (if the keyboard focus is within). + + + + + Gets the brush the background brush which will be used for the active selected item (if the keyboard focus is within). + + + + + Sets the brush the background brush which will be used for the active selected item (if the keyboard focus is within). + + + + + Gets or sets the foreground brush which will be used for the active selected item (if the keyboard focus is within). + + + + + Gets the brush the foreground brush which will be used for the active selected item (if the keyboard focus is within). + + + + + Sets the brush the foreground brush which will be used for the active selected item (if the keyboard focus is within). + + + + + Gets or sets the background brush which will be used for a selected item. + + + + + Gets the background brush which will be used for a selected item. + + + + + Sets the background brush which will be used for a selected item. + + + + + Gets or sets the foreground brush which will be used for a selected item. + + + + + Gets the foreground brush which will be used for a selected item. + + + + + Sets the foreground brush which will be used for a selected item. + + + + + Gets or sets the background brush which will be used for an mouse hovered item. + + + + + Gets the background brush which will be used for an mouse hovered item. + + + + + Sets the background brush which will be used for an mouse hovered item. + + + + + Gets or sets the background brush which will be used for an mouse hovered and selected item. + + + + + Gets the background brush which will be used for an mouse hovered and selected item. + + + + + Sets the background brush which will be used for an mouse hovered and selected item. + + + + + Gets or sets the background brush which will be used for selected disabled items. + + + + + Gets the background brush which will be used for selected disabled items. + + + + + Sets the background brush which will be used for selected disabled items. + + + + + Gets or sets the foreground brush which will be used for selected disabled items. + + + + + Gets the foreground brush which will be used for selected disabled items. + + + + + Sets the foreground brush which will be used for selected disabled items. + + + + + Gets or sets the background brush which will be used for disabled items. + + + + + Gets the background brush which will be used for disabled items. + + + + + Sets the background brush which will be used for disabled items. + + + + + Gets or sets the foreground brush which will be used for disabled items. + + + + + Gets the foreground brush which will be used for disabled items. + + + + + Sets the foreground brush which will be used for disabled items. + + + + + Change the value of the slider if the user rotates the mouse wheel by the value defined for + + + + + Change the value of the slider if the user rotates the mouse wheel by the value defined for + + + + + Do not change the value of the slider if the user rotates the mouse wheel. + + + + + Change the value of the slider only if the control is focused. + + + + + Changes the value of the slider if the mouse pointer is over this element. + + + + + Gets the content of the RevealButton. + + + + + Sets the content of the RevealButton. + + + + + Gets the data template used to display the content of the RevealButton. + + + + + Sets the data template used to display the content of the RevealButton. + + + + + This property can be used to set vertical scrollbar left side from the tabpanel (look at MetroAnimatedSingleRowTabControl) + + + + + Identifies the VerticalScrollBarOnLeftSide attached property. + This property can be used to set vertical scrollbar left side from the tabpanel (look at MetroAnimatedSingleRowTabControl) + + + + + Gets whether the vertical ScrollBar is on the left side or not. + + + + + Sets whether the vertical ScrollBar should be on the left side or not. + + + + + Identifies the IsHorizontalScrollWheelEnabled attached property. + + + + + Gets whether the ScrollViewer is scrolling horizontal by using the mouse wheel. + + + + + Sets whether the ScrollViewer should be scroll horizontal by using the mouse wheel. + + + + + Gets or sets the brush of the thumb. + + + + + Gets the brush of the thumb. + + + + + Sets the brush of the thumb. + + + + + Gets or sets the brush of the thumb if the mouse is over the slider. + + + + + Gets the brush of the thumb if the mouse is over the slider. + + + + + Sets the brush of the thumb if the mouse is over the slider. + + + + + Gets or sets the brush of the thumb if the mouse button is pressed. + + + + + Gets the brush of the thumb if the mouse button is pressed. + + + + + Sets the brush of the thumb if the mouse button is pressed. + + + + + Gets or sets the brush of the thumb if the slider is disabled. + + + + + Gets the brush of the thumb if the slider is disabled. + + + + + Sets the brush of the thumb if the slider is disabled. + + + + + Gets or sets the brush of the track. + + + + + Gets the brush of the track. + + + + + Sets the brush of the track. + + + + + Gets or sets the brush of the track if the mouse is over the slider. + + + + + Gets the brush of the track if the mouse is over the slider. + + + + + Sets the brush of the track if the mouse is over the slider. + + + + + Gets or sets the brush of the track if the mouse button is pressed. + + + + + Gets the brush of the track if the mouse button is pressed. + + + + + Sets the brush of the track if the mouse button is pressed. + + + + + Gets or sets the brush of the track if the slider is disabled. + + + + + Gets the brush of the track if the slider is disabled. + + + + + Sets the brush of the track if the slider is disabled. + + + + + Gets or sets the brush of the track value. + + + + + Gets the brush of the track value. + + + + + Sets the brush of the track value. + + + + + Gets or sets the brush of the track value if the mouse is over the slider. + + + + + Gets the brush of the track value if the mouse is over the slider. + + + + + Sets the brush of the track value if the mouse is over the slider. + + + + + Gets or sets the brush of the track value if the mouse button is pressed. + + + + + Gets the brush of the track value if the mouse button is pressed. + + + + + Sets the brush of the track value if the mouse button is pressed. + + + + + Gets or sets the brush of the track value if the slider is disabled. + + + + + Gets the brush of the track value if the slider is disabled. + + + + + Sets the brush of the track value if the slider is disabled. + + + + + Gets/Sets the type how the value will be changed if the user rotates the mouse wheel. + + + + + Gets/Sets the type how the value will be changed if the user rotates the mouse wheel. + + + + + Gets/Sets the value when the slider will be changed. Possible values are if the slider is focused or if the mouse is over the slider. + + + + + Gets/Sets the value when the slider will be changed. Possible values are if the slider is focused or if the mouse is over the slider. + + + + + Specifies the underline position of a TabControl. + + + + Sets the Style and Template property to null. + + Removing a TabItem in code behind can produce such nasty output + System.Windows.Data Warning: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.TabControl', AncestorLevel='1''. BindingExpression:Path=Background; DataItem=null; target element is 'TabItem' (Name=''); target property is 'Background' (type 'Brush') + or + System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.TabControl', AncestorLevel='1''. BindingExpression:Path=(0); DataItem=null; target element is 'TabItem' (Name=''); target property is 'UnderlineBrush' (type 'Brush') + + This is a timing problem in WPF of the binding mechanism itself. + + To avoid this, we can set the Style and Template to null. + + + + Identifies the CloseButtonEnabled attached property. + + + + + Gets whether a close button should be visible or not. + + + + + Sets whether a close button should be visible or not. + + + + + Identifies the CloseTabCommand attached property. + + + + + Gets a command for the TabItem which executes if the TabItem will be closed. + + + + + Sets a command for the TabItem which executes if the TabItem will be closed. + + + + + Identifies the CloseTabCommandParameter attached property. + + + + + Gets a command parameter for the TabItem that will be passed to the CloseTabCommand. + + + + + Sets a command parameter for the TabItem that will be passed to the CloseTabCommand. + + + + + Defines whether the underline below the is shown or not. + + + + + Defines whether the underline below the or is shown or not. + + + + + Defines the underline brush below the or . + + + + + Defines the underline brush below the or of an selected item. + + + + + Defines the underline brush below the or if the mouse is over an item. + + + + + Defines the underline brush below the or if the mouse is over a selected item. + + + + + This property can be used to set the Transition for animated TabControls + + + + + A helper class that provides various attached properties for the TextBox control. + + + Password watermarking code from: http://prabu-guru.blogspot.com/2010/06/how-to-add-watermark-text-to-textbox.html + + + + + The clear text button behavior property. It sets a click event to the button if the value is true. + + + + + This property can be used to set the button width (PART_ClearText) of TextBox, PasswordBox, ComboBox, NumericUpDown + + + + + This property can be used to retrieve the watermark using the of bound property. + + + Setting this property to true will uses reflection. + + + + + Indicates if a TextBox or RichTextBox should use SpellCheck context menu + + + + + Indicates if the watermark is automatically retrieved by using the of the bound property. + + This attached property uses reflection; thus it might reduce the performance of the application. + The auto-watermak does work for the following controls: + In the following case no custom watermark is shown + + There is no binding + Binding path errors + Binding to a element of a collection without using a property of that element Binding Path=Collection[0] use: Binding Path=Collection[0].SubProperty + The bound property does not have a + + + + + Gets a value that indicates the horizontal alignment of the watermark. + + + One of the values that specifies the desired alignment. The default is . + + + + + Sets a value that indicates the horizontal alignment of the watermark. + + + + + Gets the text trimming behavior to employ when watermark overflows the content area. + + + One of the values that specifies the text trimming behavior to employ. The default is . + + + + + Sets the text trimming behavior to employ when watermark overflows the content area. + + + + + Gets how the watermark should wrap text. + + One of the values. The default is . + + + + + Sets how the watermark should wrap text. + + + + + Gets if the attached TextBox has text. + + + + + Gets the clear text button visibility / feature. Can be used to enable text deletion. + + + + + Sets the clear text button visibility / feature. Can be used to enable text deletion. + + + + + Gets the text button visibility. + + + + + Sets the text button visibility. + + + + + Gets the buttons placement variant. + + + + + Sets the buttons placement variant. + + + + + Gets the clear text button behavior. + + + + + Sets the clear text button behavior. + + + + + ButtonContentTemplate is the template used to display the content of the ClearText button. + + + + + This property can be used to handle the style for CheckBox and RadioButton + LeftToRight means content left and button right and RightToLeft vise versa + + + + + This property can be used to handle the style for CheckBox and RadioButton + LeftToRight means content left and button right and RightToLeft vise versa + + + + + A MetroTabControl (Pivot) that wraps TabItem/MetroTabItem headers on a single row. + + + + + Initializes a new instance of the MahApps.Metro.Controls.MetroAnimatedSingleRowTabControl class. + + + + + A MetroTabControl (Pivot) that uses a TransitioningContentControl to animate the contents of a TabItem/MetroTabItem. + + + + + Initializes a new instance of the MahApps.Metro.Controls.MetroAnimatedTabControl class. + + + + + Originally from http://xamlcoder.com/blog/2010/11/04/creating-a-metro-ui-style-control/ + + + + + Creates AutomationPeer () + + + + + The MetroHeaderAutomationPeer class exposes the type to UI Automation. + + + + + A reimplementation of NavigationWindow based on MetroWindow. + + + + MetroNavigationWindow + + + + + Gets an IEnumerable that you use to enumerate the entries in back navigation history for a NavigationWindow. + + + + + + Gets an IEnumerable that you use to enumerate the entries in back navigation history for a NavigationWindow. + + + + + + Gets the NavigationService that is used by this MetroNavigationWindow to provide navigation services to its content. + + + + + + Gets a value that indicates whether there is at least one entry in back navigation history. + + + + + + Gets a value that indicates whether there is at least one entry in forward navigation history. + + + + + + Gets or sets the base uniform resource identifier (URI) of the current context. + + + + + + Gets or sets the uniform resource identifier (URI) of the current content, or the URI of new content that is currently being navigated to. + + + + + + Adds an entry to back navigation history that contains a CustomContentState object. + + A CustomContentState object that represents application-defined state that is associated with a specific piece of content. + + + + + Removes the most recent journal entry from back history. + + The most recent JournalEntry in back navigation history, if there is one. + + + + + Navigates to the most recent item in back navigation history. + + + + + + Navigates to the most recent item in forward navigation history. + + + + + + Navigates asynchronously to content that is contained by an object. + + An Object that contains the content to navigate to. + true if a navigation is not canceled; otherwise, false. + + + + + Navigates asynchronously to content that is specified by a uniform resource identifier (URI). + + A Uri object initialized with the URI for the desired content. + true if a navigation is not canceled; otherwise, false. + + + + + Navigates asynchronously to content that is contained by an object, and passes an object that contains data to be used for processing during navigation. + + An Object that contains the content to navigate to. + A Object that contains data to be used for processing during navigation. + true if a navigation is not canceled; otherwise, false. + + + + + Navigates asynchronously to source content located at a uniform resource identifier (URI), and pass an object that contains data to be used for processing during navigation. + + A Uri object initialized with the URI for the desired content. + A Object that contains data to be used for processing during navigation. + true if a navigation is not canceled; otherwise, false. + + + + + Stops further downloading of content for the current navigation request. + + + + + + Occurs when navigation to a content fragment begins, which occurs immediately, if the desired fragment is in the current content, or after the source XAML content has been loaded, if the desired fragment is in different content. + + + + + + Occurs when a new navigation is requested. + + + + + + Occurs when an error is raised while navigating to the requested content. + + + + + + Occurs periodically during a download to provide navigation progress information. + + + + + + Occurs when the StopLoading method is called, or when a new navigation is requested while a current navigation is in progre + + + + + + Occurs when the content that is being navigated to has been found, and is available from the PageContent property, although it may not have completed loading + + + + + + Occurs when content that was navigated to has been loaded, parsed, and has begun rendering. + + + + + + InitializeComponent + + + + + A metrofied ProgressBar. + + + + + + Gets/sets the diameter of the ellipses used in the indeterminate animation. + + + + + Gets/sets the offset of the ellipses used in the indeterminate animation. + + + + + A standard MetroTabControl (Pivot). + + + + + Initializes a new instance of the MahApps.Metro.Controls.MetroTabControl class. + + + + + A base class for every MetroTabControl (Pivot). + + + + + Get/sets the command that executes when a MetroTabItem's close button is clicked. + + + + + An event that is raised when a TabItem is closed. + + + + + Event args that is created when a TabItem is closed. + + + + + Gets the MetroTabItem that will be closed. + + + + + An extended TabItem with a metro style. + + + + + Gets/sets whether the Close Button is visible. + + + + + Gets/sets the command that is executed when the Close Button is clicked. + + + + + Gets/sets the command parameter which is passed to the close button command. + + + + + Gets/sets the Close Button Margin. + + + + + The MetroThumbContentControl control can be used for titles or something else and enables basic drag movement functionality. + + + + + Adds or remove a DragStartedEvent handler + + + + + Adds or remove a DragDeltaEvent handler + + + + + Adds or remove a DragCompletedEvent handler + + + + + DependencyProperty for the IsDragging property. + + + + + Indicates that the left mouse button is pressed and is over the MetroThumbContentControl. + + + + + The MetroThumbContentControlAutomationPeer class exposes the type to UI Automation. + + + + + An extended, metrofied Window class. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Allows easy handling of window commands brush. Theme is also applied based on this brush. + + + + + Gets/sets whether the window's entrance transition animation is enabled. + + + + + Gets/sets the FlyoutsControl that hosts the window's flyouts. + + + + + Gets/sets the icon content template to show a custom icon. + + + + + Gets/sets the title content template to show a custom title. + + + + + Gets/sets the left window commands that hosts the user commands. + + + + + Gets/sets the right window commands that hosts the user commands. + + + + + Gets/sets the window button commands that hosts the min/max/close commands. + + + + + Gets/sets whether the window will ignore (and overlap) the taskbar when maximized. + + + + + Gets or sets resize border thickness + + + + + Using a DependencyProperty as the backing store for ResizeBorderTickness. This enables animation, styling, binding, etc... + + + + + Gets/sets the brush used for the titlebar's foreground. + + + + + Gets/sets whether the window will save it's position between loads. + + + + + Gets the window placement settings (can be overwritten). + + + + + Get/sets whether the titlebar icon is visible or not. + + + + + Get/sets whether dialogs show over the title bar. + + + + + Gets whether one or more dialogs are shown. + + + + + Gets/sets edge mode of the titlebar icon. + + + + + Gets/sets bitmap scaling mode of the titlebar icon. + + + + + Gets/sets icon scaling mode of the titlebar. + + + + + Gets/sets whether the TitleBar is visible or not. + + + + + Gets/sets whether the WindowStyle is None or not. + + + + + Gets/sets if the minimize button is visible. + + + + + Gets/sets if the Maximize/Restore button is visible. + + + + + Gets/sets if the close button is visible. + + + + + Gets/sets if the min button is enabled. + + + + + Gets/sets if the max/restore button is enabled. + + + + + Gets/sets if the close button is enabled. + + + + + Gets or sets whether if the close button should be enabled or not if a dialog is shown. + + + + + Gets/sets if the the system menu should popup on right click. + + + + + Gets/sets the TitleBar's height. + + + + + Gets/sets if the TitleBar's text is automatically capitalized. + + + + + Character casing of the title + + + + + Gets/sets the title horizontal alignment. + + + + + Gets/sets the brush used for the Window's title bar. + + + + + Gets/sets the brush used for the Window's glow. + + + + + Gets/sets the brush used for the Window's non-active glow. + + + + + Gets/sets the brush used for the Window's non-active border. + + + + + Gets/sets the brush used for the Window's non-active title bar. + + + + + Gets/sets the brush used for the dialog overlay. + + + + + Gets/sets the opacity used for the dialog overlay. + + + + + Gets or sets the overlay fade in storyboard. + + + + + Gets or sets the overlay fade out storyboard. + + + + + Begins to show the MetroWindow's overlay effect. + + A task representing the process. + + + + Begins to hide the MetroWindow's overlay effect. + + A task representing the process. + + + + Stores the given element, or the last focused element via FocusManager, for restoring the focus after closing a dialog. + + The element which will be focused again. + + + + Clears the stored element which would get the focus after closing a dialog. + + + + + Initializes a new instance of the MahApps.Metro.Controls.MetroWindow class. + + + + + Initializes various behaviors for the window. + For example , and . + + + + + Gets the template child with the given name. + + The interface type inheirted from DependencyObject. + The name of the template child. + + + + Gets the template child with the given name. + + The name of the template child. + + + + This class eats little children. + + + + + Sets the IsHitTestVisibleInChromeProperty to a MetroWindow template child + + The MetroWindow. + The name of the template child. + + + + + Sets the WindowChrome ResizeGripDirection to a MetroWindow template child. + + The MetroWindow. + The name of the template child. + The direction. + + + + Adapts the WindowCommands to the theme of the first opened, topmost && (top || right || left) flyout + + The MetroWindow + All the flyouts! Or flyouts that fall into the category described in the summary. + An optional brush to reset the window commands brush to. + + + + Enum NumericInput which indicates what input is allowed for NumericUpdDown. + + + + + Only numbers are allowed + + + + + Numbers with decimal point and allowed scientific input + + + + + All is allowed + + + + + Represents a Windows spin box (also known as an up-down control) that displays numeric values. + + + + + Event fired from this NumericUpDown when its value has reached the maximum value + + + + + Event fired from this NumericUpDown when its value has reached the minimum value + + + + + Gets or sets the amount of time, in milliseconds, the NumericUpDown waits while the up/down button is pressed + before it starts increasing/decreasing the + for the specified . The value must be + non-negative. + + + + + Gets or sets a value indicating whether the user can use the arrow keys and to change values. + + + + + Gets or sets a value indicating whether the user can use the mouse wheel to change values. + + + + + Gets or sets a value indicating whether the control must have the focus in order to change values using the mouse wheel. + + If the value is true then the value changes when the mouse wheel is over the control. If the value is false then the value changes only if the control has the focus. If is set to "false" then this property has no effect. + + + + + + Gets or sets a value indicating whether the user can enter text in the control. + + + + + Gets or sets a value indicating the culture to be used in string formatting operations. + + + + + Gets or sets a value indicating whether the +/- button of the control is visible. + + + If the value is false then the of the control can be changed only if one of the following cases is satisfied: + + + is true. + + + is true. + + + is true. + + + + + + + Gets or sets a value indicating whether the text can be changed by the use of the up or down buttons only. + + + + + Gets or sets a value indicating whether the value to be added to or subtracted from remains + always + or if it will increase faster after pressing the up/down button/arrow some time. + + + + + Gets or sets the formatting for the displaying + + + + + + + + Gets or sets the horizontal alignment of the contents of the text box. + + + + + Indicates if the NumericUpDown should show the decimal separator or not. + + + + + Gets or sets which numeric input for the NumericUpDown is allowed. + + + + + Indicates if the NumericUpDown should round the value to the nearest possible interval when the focus moves to another element. + + + + + Called when this element or any below gets focus. + + + + + When overridden in a derived class, is invoked whenever application code or internal processes call + . + + + + + Raises the routed event. + + + Old value of the property + + + New value of the property + + + + + Based on Greg Schechter's Planerator + http://blogs.msdn.com/b/greg_schechter/archive/2007/10/26/enter-the-planerator-dead-simple-3d-in-wpf-with-a-stupid-name.aspx + + + + + An Enum representing different positions, such as Left or Right. + + + + + Event arguments created for the RangeSlider's SelectionChanged event. + + + + + + The value of the new range's beginning. + + + + + The value of the new range's ending. + + + + + A slider control with the ability to select a range between two values. + + + + + Identifies the  dependency property. + + + + + Identifies the  dependency property. + + + + + Identifies the  dependency property. + + + + + Identifies the  dependency property. + + + + + Identifies the  dependency property. + + + + + Identifies the  dependency property. + + + + + Get/sets value how fast thumbs will move when user press on left/right/central with left mouse button (IsMoveToPoint must be set to FALSE) + + + + + Get/sets precision of the value, which displaying inside AutotToolTip + + + + + Get/sets the converter for the tooltip text + + + + + Get/sets tooltip, which will show while dragging thumbs and display currect value + + + + + Gets or sets the position of tick marks with respect to the of the . + + + A value that defines how to position the tick marks in a with respect to the slider bar. The default is . + + + + + Gets or sets the interval between tick marks. + + + The distance between tick marks. The default is (1.0). + + + + + Gets or sets the positions of the tick marks to display for a . + + A set of tick marks to display for a . The default is . + + + + + Get or sets IsMoveToPoint feature which will enable/disable moving to exact point inside control when user clicked on it + Gets or sets a value that indicates whether the two of a moves immediately to the location of the mouse click that occurs while the mouse pointer pauses on the tracks. + + + + + Gets or sets the orientation of the . + + + + + Get/sets whether possibility to make manipulations inside range with left/right mouse buttons + cotrol button + + + + + Get/sets whether possibility to make manipulations inside range with left/right mouse buttons + cotrol button + + + + + Get/sets whether whole range will be moved when press on right/left/central part of control + + + + + Get/sets the minimal distance between two thumbs. + + + + + Get/sets the beginning of the range selection. + + + + + Get/sets the end of the range selection. + + + + + Get/sets the minimum range that can be selected. + + + + + Gets or sets a value that indicates whether the displays a selection range along the . + + + if a selection range is displayed; otherwise, . The default is . + + + + + Gets or sets the smallest value of a specified selection for a . + + + The largest value of a selected range of values of a . The default is zero (0.0). + + + + + Gets or sets the largest value of a specified selection for a . + + + The largest value of a selected range of values of a . The default is zero (0.0). + + + + + Responds to a change in the value of the property. + + The old value of the property.The new value of the property. + + + + Responds to a change in the value of the property. + + The old value of the property.The new value of the property. + + + + RevealImage + + + + + InitializeComponent + + + + + Reflects the parameter to pass to the CommandProperty upon execution. + + + + + Gets or sets the target element on which to fire the command. + + + + + Get or sets the Command property. + + + + + Indicates whether the Popup is visible. + + + + + Gets or sets an extra tag. + + + + + Gets or sets the dimension of children stacking. + + + + + Gets or sets the Content used to generate the icon part. + + + + + Gets or sets the ContentTemplate used to display the content of the icon part. + + + + + Gets/sets the button style. + + + + + Gets/sets the button arrow style. + + + + + Gets/sets the popup listbox style. + + + + + Gets/sets the brush of the button arrow icon. + + + + + Gets/sets the brush of the button arrow icon if the mouse is over the split button. + + + + + Gets/sets the brush of the button arrow icon if the arrow button is pressed. + + + + Updates the current selection when an item in the has changed + The event data. + + + + A special animation used to animates the length of a . + + + + + + + Represents a container with two views; one view for the main content and another view that is typically used for + navigation commands. + + + + + Identifies the dependency property. + + The identifier for the property. + + + + Gets or sets the width of the pane in its compact display mode. + + + The width of the pane in it's compact display mode. The default is 48 device-independent pixel (DIP) (defined + by the SplitViewCompactPaneThemeLength resource). + + + + + Identifies the dependency property. + + The identifier for the dependency property. + + + + Gets or sets the contents of the main panel of a . + + The contents of the main panel of a . The default is null. + + + + Identifies the dependency property. + + The identifier for the dependency property. + + + + Gets of sets a value that specifies how the pane and content areas of a are shown. + + + A value of the enumeration that specifies how the pane and content areas of a are + shown. The default is . + + + + + Identifies the dependency property. + + The identifier for the dependency property. + + + + Gets or sets a value that specifies whether the pane is expanded to its full width. + + true if the pane is expanded to its full width; otherwise, false. The default is true. + + + + Identifies the dependency property. + + The identifier for the dependency property. + + + + Gets or sets the width of the pane when it's fully expanded. + + + The width of the pane when it's fully expanded. The default is 320 device-independent + pixel (DIP). + + + + + Identifies the dependency property. + + The identifier for the dependency property. + + + + Gets or sets the contents of the pane of a . + + The contents of the pane of a . The default is null. + + + + Identifies the dependency property. + + The identifier for the dependency property. + + + + Gets or sets the Brush to apply to the background of the area of the control. + + The Brush to apply to the background of the area of the control. + + + + Identifies the dependency property. + + The identifier for the dependency property. + + + + Gets or sets the Brush to apply to the foreground of the area of the control. + + The Brush to apply to the background of the area of the control. + + + + Identifies the PanePlacement dependency property. + + The identifier for the PanePlacement dependency property. + + + + Gets or sets a value that specifies whether the pane is shown on the right or left side of the + . + + + A value of the enumeration that specifies whether the pane is shown on the right or left side of the + . The default is . + + + + + Identifies the dependency property. + + The identifier for the dependency property. + + + + Gets an object that provides calculated values that can be referenced as TemplateBinding sources when defining + templates for a control. + + An object that provides calculated values for templates. + + + + Initializes a new instance of the class. + + + + + Occurs when the pane is closed. + + + + + Occurs when the pane is closing. + + + + + Constants that specify how the pane is shown in a . + + + + + The pane covers the content when it's open and does not take up space in the control layout. + + + + + The pane is shown side-by-side with the content and takes up space in the control layout. + + + + + The amount of the pane defined by the property is shown side-by-side + with the content and takes up space in the control layout. + The remaining part of the pane covers the content when it's open and does not take up space in the control layout. + + + + + The amount of the pane defined by the property is shown side-by-side + with the content and takes up space in the control layout. + The remaining part of the pane pushes the content to the side when it's open and takes up space in the control + layout. + + + + + Provides event data for the event. + + + + + Gets or sets a value that indicates whether the pane closing action should be canceled. + + true to cancel the pane closing action; otherwise, false. + + + + Constants that specify whether the pane is set to the left or to the right of the content in a + . + + + + + The pane is shown to the left of the content. + + + + + The pane is shown to the right of the content. + + + + + Provides calculated values that can be referenced as TemplatedParent sources when defining templates for a + . + Not intended for general use. + + + + + Gets the value as a GridLength. + + + + + Gets the negative of the value. + + + + + Gets the negative of the value calculated by subtracting the value from + the value. + + + + + Gets the value as a GridLength. + + + + + Gets the value. + + + + + Gets a value calculated by subtracting the value from the + value. + + + + + An Enum representing different themes for window commands. + + + + + HorizontalTitleAlignment Dependency Property. + Default Value: HorizontalAlignment.Left + + + + + Gets/Sets the horizontal alignment of the title. + + + + + VerticalTitleAlignment Dependency Property. + Default Value: VerticalAlignment.Bottom + + + + + Gets/Sets the vertical alignment of the title. + + + + + Represents a control that allows the user to select a date and a time. + + + + + Occurs when the property is changed. + + + + + Gets or sets the date to display + + + The date to display. The default is . + + + + + Gets or sets the last date to be displayed. + + The last date to display. + + + + Gets or sets the first date to be displayed. + + The first date to display. + + + + Gets or sets the day that is considered the beginning of the week. + + + A that represents the beginning of the week. The default is the + that is determined by the current culture. + + + + + Gets or sets the format that is used to display the selected date. + + + + + Gets or sets a value that indicates whether the current date will be highlighted. + + true if the current date is highlighted; otherwise, false. The default is true. + + + + Gets or sets a value that indicates the dimension by which calendar and clock are stacked. + + + The of the calendar and clock. The default is + . + + + + + Gets or sets the currently selected date. + + + The date currently selected. The default is null. + + + + + Defines the visibility for time-parts that are visible for the . + + + + + Represents a control that allows the user to select a time. + + + + + Represents a base-class for time picking. + + + + + This readonly dependency property is to control whether to show the date-picker (in case of ) or hide it (in case of . + + + + + Represents the time 00:00:00; 12:00:00 AM respectively + + + + + Represents the time 23:59:59.9999999; 11:59:59.9999999 PM respectively + + + + + This list contains values from 0 to 55 with an interval of 5. It can be used to bind to and . + + + <MahApps:TimePicker SourceSeconds="{x:Static MahApps:TimePickerBase.IntervalOf5}" /> + <MahApps:DateTimePicker SourceSeconds="{x:Static MahApps:TimePickerBase.IntervalOf5}" /> + + + Returns a list containing {0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55}. + + + + + This list contains values from 0 to 50 with an interval of 10. It can be used to bind to and . + + + <MahApps:TimePicker SourceSeconds="{x:Static MahApps:TimePickerBase.IntervalOf10}" /> + <MahApps:DateTimePicker SourceSeconds="{x:Static MahApps:TimePickerBase.IntervalOf10}" /> + + + Returns a list containing {0, 10, 20, 30, 40, 50}. + + + + + This list contains values from 0 to 45 with an interval of 15. It can be used to bind to and . + + + <MahApps:TimePicker SourceSeconds="{x:Static MahApps:TimePickerBase.IntervalOf15}" /> + <MahApps:DateTimePicker SourceSeconds="{x:Static MahApps:TimePickerBase.IntervalOf15}" /> + + + Returns a list containing {0, 15, 30, 45}. + + + + + Occurs when the property is changed. + + + + + Gets or sets a value indicating the culture to be used in string formatting operations. + + + + + Gets or sets a value indicating the visibility of the clock hands in the user interface (UI). + + + The visibility definition of the clock hands. The default is . + + + + + Gets or sets a value indicating whether the date can be selected or not. This property is read-only. + + + + + Gets or sets a value indicating whether the clock of this control is visible in the user interface (UI). This is a + dependency property. + + + If this value is set to false then is set to + + + + true if the clock is visible; otherwise, false. The default value is true. + + + + + Gets or sets a value indicating whether the drop-down for a box is currently + open. + + true if the drop-down is open; otherwise, false. The default is false. + + + + Gets or sets a value indicating whether the contents of the are not editable. + + + true if the is read-only; otherwise, false. The default is false. + + + + + Gets or sets a value indicating the visibility of the selectable date-time-parts in the user interface (UI). + + + visibility definition of the selectable date-time-parts. The default is . + + + + + Gets or sets the currently selected time. + + + The time currently selected. The default is null. + + + + + Gets or sets the format that is used to display the selected time. + + + + + Gets or sets a collection used to generate the content for selecting the hours. + + + A collection that is used to generate the content for selecting the hours. The default is a list of interger from 0 + to 23 if is false or a list of interger from + 1 to 12 otherwise.. + + + + + Gets or sets a collection used to generate the content for selecting the minutes. + + + A collection that is used to generate the content for selecting the minutes. The default is a list of int from + 0 to 59. + + + + + Gets or sets a collection used to generate the content for selecting the seconds. + + + A collection that is used to generate the content for selecting the minutes. The default is a list of int from + 0 to 59. + + + + + Gets a value indicating whether the that is specified by the + + set by the ( if null) has not a value. + + + + + When overridden in a derived class, is invoked whenever application code or internal processes call + . + + + + + Gets the offset from the selected to use it in as hour + parameter. + + The current hour. + + An integer representing the offset to add to the hour that is selected in the hour-picker for setting the correct + . The offset is determined as follows: + + + ConditionOffset + + + is false0 + + + Selected hour is between 1 AM and 11 AM0 + + + Selected hour is 12 AM-12h + + + Selected hour is between 12 PM and 11 PM+12h + + + + + + + A control that allows the user to toggle between two states: One represents true; The other represents false. + + + + + Identifies the  dependency property. + + + + + Gets/sets the font family of the header. + + + + + Gets/sets the text to display when the control is in it's On state. + + + + + Gets/sets the text to display when the control is in it's Off state. + + + + + Gets/sets the brush used for the switch's foreground. + + + + + Gets/sets the brush used for the on-switch's foreground. + + + + + Gets/sets the brush used for the off-switch's foreground. + + + + + Gets/sets the brush used for the thumb indicator. + + + + + Gets/sets the brush used for the thumb indicator. + + + + + Gets/sets the width of the thumb indicator. + + + + + Gets/sets the control's content flow direction. + + + + + Gets or sets the padding of the inner content. + + + + + Gets/sets the control's toggle switch button style. + + + + + Gets/sets whether the control is Checked (On) or not (Off). + + + + + Gets/sets the command which will be executed if the IsChecked property was changed. + + + + + Gets/sets the command which will be executed if the checked event of the control is fired. + + + + + Gets/sets the command which will be executed if the checked event of the control is fired. + + + + + Gets/sets the command parameter which will be passed by the CheckChangedCommand. + + + + + Gets/sets the command parameter which will be passed by the CheckedCommand. + + + + + Gets/sets the command parameter which will be passed by the UnCheckedCommand. + + + + + An event that is raised when the value of IsChecked changes. + + + + + A Button that allows the user to toggle between two states. + + + + + Gets/sets the brush used for the control's foreground. + + + + + Gets/sets the brush used for the on-switch's foreground. + + + + + Gets/sets the brush used for the off-switch's foreground. + + + + + Gets/sets the brush used for the thumb indicator. + + + + + Gets/sets the brush used for the thumb indicator. + + + + + Gets/sets the width of the thumb indicator. + + + + + enumeration for the different transition types + + + + + Use the VisualState DefaultTransition + + + + + Use the VisualState Normal + + + + + Use the VisualState UpTransition + + + + + Use the VisualState DownTransition + + + + + Use the VisualState RightTransition + + + + + Use the VisualState RightReplaceTransition + + + + + Use the VisualState LeftTransition + + + + + Use the VisualState LeftReplaceTransition + + + + + Use a custom VisualState, the name must be set using CustomVisualStatesName property + + + + + A ContentControl that animates content as it loads and unloads. + + + + + Gets or sets the name of the custom transition visual state. + + + + + Gets/sets if the content is transitioning. + + + + + Reload the current transition if the content is the same. + + + + + Helper methods for UI-related tasks. + This class was obtained from Philip Sumi (a fellow WPF Disciples blog) + http://www.hardcodet.net/uploads/2009/06/UIHelper.cs + + + + + Finds a parent of a given item on the visual tree. + + The type of the queried item. + A direct or indirect child of the + queried item. + The first parent item that matches the submitted + type parameter. If not matching item can be found, a null + reference is being returned. + + + + Finds all Ancestors of a given item on the visual tree. + + A node in a visual tree + All ancestors in visual tree of element + + + + Finds a Child of a given item in the visual tree. + + A direct parent of the queried item. + The type of the queried item. + x:Name or Name of child. + The first parent item that matches the submitted type parameter. + If not matching item can be found, + a null parent is being returned. + + + + This method is an alternative to WPF's + method, which also + supports content elements. Keep in mind that for content element, + this method falls back to the logical tree of the element! + + The item to be processed. + The submitted item's parent, if available. Otherwise + null. + + + + Analyzes both visual and logical tree in order to find all elements of a given + type that are descendants of the item. + + The type of the queried items. + The root element that marks the source of the search. If the + source is already of the requested type, it will not be included in the result. + Sometimes it's better to search in the VisualTree (e.g. in tests) + All descendants of that match the requested type. + + + + This method is an alternative to WPF's + method, which also + supports content elements. Keep in mind that for content elements, + this method falls back to the logical tree of the element. + + The item to be processed. + Sometimes it's better to search in the VisualTree (e.g. in tests) + The submitted item's child elements, if available. + + + + Tries to locate a given item within the visual tree, + starting with the dependency object at a given position. + + The type of the element to be found + on the visual tree of the element at the given location. + The main element which is used to perform + hit testing. + The position to be evaluated on the origin. + + + + Gets the relative mouse position to the given handle in client coordinates. + + The handle for this method. + + + + Try to get the relative mouse position to the given handle in client coordinates. + + The handle for this method. + The relative mouse position to the given handle. + + + + Gets or sets the value indicating current light style for the minimize button. + + + + + Gets or sets the value indicating current light style for the maximize button. + + + + + Gets or sets the value indicating current light style for the close button. + + + + + Gets or sets the value indicating current dark style for the minimize button. + + + + + Gets or sets the value indicating current dark style for the maximize button. + + + + + Gets or sets the value indicating current dark style for the close button. + + + + + Gets or sets the value indicating current theme. + + + + + Gets or sets the minimize button tooltip. + + + + + Gets or sets the maximize button tooltip. + + + + + Gets or sets the close button tooltip. + + + + + Gets or sets the restore button tooltip. + + + + + Gets or sets the value indicating current theme. + + + + + Gets or sets the value indicating light theme template. + + + + + Gets or sets the value indicating light theme template. + + + + + Gets or sets the value indicating whether to show the separators. + + + + + Gets or sets the value indicating whether to show the last separator. + + + + + Gets or sets the value indicating separator height. + + + + + Gets or sets the value indicating whether to show the separator. + + + + + Doesn't overlay flyouts nor a hidden TitleBar. + + + + + Overlays opened controls. + + + + + Overlays a hidden TitleBar. + + + + + Refreshes the application settings property values from persistent storage. + + + + + Upgrades the application settings on loading. + + + + + Updates application settings to reflect a more recent installation of the application. + + + + + Stores the current values of the settings properties. + + + + + this settings class is the default way to save the placement of the window + + + + + Upgrades the application settings on loading. + + + + + Determining Ideal Text Color Based on Specified Background Color + http://www.codeproject.com/KB/GDI-plus/IdealTextColor.aspx + + The bg. + + + + + Converts a double representing either hour/minute/second to the corresponding angle. + + + + + Converts the value from true to false and false to true. + + + + + The math operations which can be used at the + + + + + MathConverter provides a value converter which can be used for math operations. + It can be used for normal binding or multi binding as well. + If it is used for normal binding the given parameter will be used as operands with the selected operation. + If it is used for multi binding then the first and second binding will be used as operands with the selected operation. + This class cannot be inherited. + + + + + MathAddConverter provides a multi value converter as a MarkupExtension which can be used for math operations. + This class cannot be inherited. + + + + + MathSubtractConverter provides a multi value converter as a MarkupExtension which can be used for math operations. + This class cannot be inherited. + + + + + MathMultiplyConverter provides a multi value converter as a MarkupExtension which can be used for math operations. + This class cannot be inherited. + + + + + MathDivideConverter provides a multi value converter as a MarkupExtension which can be used for math operations. + This class cannot be inherited. + + + + + Converts a String into a Visibility enumeration (and back) + The FalseEquivalent can be declared with the "FalseEquivalent" property + + + + + Initialize the properties with standard values + + + + + FalseEquivalent (default : Visibility.Collapsed => see Constructor) + + + + + Define whether the opposite boolean value is crucial (default : false) + + + + + Converts a Thickness to a new Thickness. It's possible to ignore a side With the IgnoreThicknessSide property. + + + + + Use all sides. + + + + + Ignore the left side. + + + + + Ignore the top side. + + + + + Ignore the right side. + + + + + Ignore the bottom side. + + + + Converts a value. + A converted value. If the method returns null, the valid null value is used. + The value produced by the binding source. + The type of the binding target property. + The converter parameter to use. + The culture to use in the converter. + + + Converts a value. + A converted value. If the method returns null, the valid null value is used. + The value that is produced by the binding target. + The type to convert to. + The converter parameter to use. + The culture to use in the converter. + + + + An object that represents the foreground color for a . + + + + + The ResourceDictionary that represents this Accent. + + + + + Gets/sets the name of the Accent. + + + + + Initializes a new instance of the Accent class. + + + + + Initializes a new instance of the Accent class. + + The name of the new Accent. + The URI of the accent ResourceDictionary. + + + + Initializes a new instance of the Accent class. + + The name of the new Accent. + The ResourceDictionary of the accent. + + + + Represents the background theme of the application. + + + + + The ResourceDictionary that represents this application theme. + + + + + Gets the name of the application theme. + + + + + Initializes a new instance of the AppTheme class. + + The name of the new AppTheme. + The URI of the AppTheme ResourceDictionary. + + + + Initializes a new instance of the AppTheme class. + + The name of the new AppTheme. + The ResourceDictionary of the accent. + + + + A class that allows for the detection and alteration of a theme and accent. + + + + + Gets a list of all of default accents. + + + + + Gets a list of all default themes. + + + + + Adds an accent with the given name and uniform resource identfier. + + The name of the new Accent. + The URI of the accent ResourceDictionary. + true if the accent does not exists and can be added. + + + + Adds an accent with the given name and resource dictionary. + + The name of the new Accent. + The ResourceDictionary of the accent. + true if the accent does not exists and can be added. + + + + Adds an app theme with the given name. + + The name of the new AppTheme. + The URI of the AppTheme ResourceDictionary. + true if the app theme does not exists and can be added. + + + + Adds an app theme with the given name. + + The name of the new AppTheme. + The ResourceDictionary of the accent. + true if the app theme does not exists and can be added. + + + + Gets app theme with the given resource dictionary. + + from which the theme should be retrieved. + AppTheme + + + + Gets app theme with the given name and theme type (light or dark). + + AppTheme + + + + Gets the inverse of the given . + This method relies on the "Dark" or "Light" affix to be present. + + The app theme. + The inverse or null if it couldn't be found. + + Returns BaseLight, if BaseDark is given or vice versa. + Custom Themes must end with "Dark" or "Light" for this to work, for example "CustomDark" and "CustomLight". + + + + + Gets the with the given name. + + The or null, if the app theme wasn't found + + + + Gets the with the given resource dictionary. + + from which the accent should be retrieved. + The or null, if the accent wasn't found. + + + + Determines whether the specified resource dictionary represents an . + + This might include runtime accents which do not have a resource uri. + + The resources. + true if the resource dictionary is an ; otherwise, false. + resources + + + + Gets a resource from the detected AppStyle. + + The window to check. If this is null, the Application's sources will be checked. + The key to check against. + The resource object or null, if the resource wasn't found. + + + + Change the theme for the whole application. + + + + + + + Change theme for the given window. + + + + + + + Change accent and theme for the whole application. + + The instance of Application to change. + The accent to apply. + The theme to apply. + + + + Change accent and theme for the given window. + + The Window to change. + The accent to apply. + The theme to apply. + + + + Changes the accent and theme of a ResourceDictionary directly. + + The ResourceDictionary to modify. + The accent to apply to the ResourceDictionary. + The theme to apply to the ResourceDictionary. + + + + Copies all resource keys from one resource to another. + + The source resource dictionary. + The destination resource dictionary. + + fromRD + or + toRD + + + + + Scans the window resources and returns it's accent and theme. + + + + + Scans the window resources and returns it's accent and theme. + + The Window to scan. + + + + Scans the application resources and returns it's accent and theme. + + The Application instance to scan. + + + + Scans a resources and returns it's accent and theme. + + The ResourceDictionary to check. + + + + This event fires if accent color and theme was changed + this should be using the weak event pattern, but for now it's enough + + + + + Invalidates global colors and resources. + Sometimes the ContextMenu is not changing the colors, so this will fix it. + + + + + Class which is used as argument for an event to signal theme changes. + + + + + Creates a new instance of this class. + + + + + The new theme. + + + + + The new accent + + + + + GeneratedInternalTypeHelper + + + + + CreateInstance + + + + + GetPropertyValue + + + + + SetPropertyValue + + + + + CreateDelegate + + + + + AddEventHandler + + +
+
diff --git a/packages/MahApps.Metro.1.6.5/lib/net46/MahApps.Metro.dll b/packages/MahApps.Metro.1.6.5/lib/net46/MahApps.Metro.dll new file mode 100644 index 0000000..b23b9d4 Binary files /dev/null and b/packages/MahApps.Metro.1.6.5/lib/net46/MahApps.Metro.dll differ diff --git a/packages/MahApps.Metro.1.6.5/lib/net46/MahApps.Metro.xml b/packages/MahApps.Metro.1.6.5/lib/net46/MahApps.Metro.xml new file mode 100644 index 0000000..929b7d9 --- /dev/null +++ b/packages/MahApps.Metro.1.6.5/lib/net46/MahApps.Metro.xml @@ -0,0 +1,5549 @@ + + + + MahApps.Metro + + + + + This CommandTriggerAction can be used to bind any event on any FrameworkElement to an . + This trigger can only be attached to a FrameworkElement or a class deriving from FrameworkElement. + + This class is inspired from Laurent Bugnion and his EventToCommand. + http://www.mvvmlight.net + See license.txt in this solution or http://www.galasoft.ch/license_MIT.txt + + + + + Identifies the dependency property + + + + + Gets or sets the command that this trigger is bound to. + + + + + Identifies the dependency property + + + + + Gets or sets an object that will be passed to the attached to this trigger. + + + + + Updates all glow windows (visible, hidden, collapsed) + + + + + Sets the opacity to all glow windows + + + + + Starts the opacity storyboard 0 -> 1 + + + + + Shows all glow windows + + + + + Gets or sets the bindable Password property on the PasswordBox control. This is a dependency property. + + + + + Handles changes to the 'Password' attached property. + + + + + Handle the 'PasswordChanged'-event on the PasswordBox + + + + + Called after the behavior is attached to an AssociatedObject. + + + Override this to hook up functionality to the AssociatedObject. + + + + + Called when the behavior is being detached from its AssociatedObject, but before it has actually occurred. + + + Override this to unhook functionality from the AssociatedObject. + + + + + + Sets the first TabItem with Visibility="" as + the SelectedItem of the TabControl. + + + If there is no visible TabItem, null is set as the SelectedItem + + + + + + + + + + + + Represents a border whose contents are clipped within the bounds + of the border. The border may have rounded corners. + + + + + BorderThickness Dependency Property + + + + + Gets or sets the BorderThickness property. This dependency property + indicates the BorderThickness. + + + + + Checks if the given Thickness is valid or not + + Thickness + + + + + Padding Dependency Property + + + + + Gets or sets the Padding property. This dependency property + indicates the Padding. + + + + + CornerRadius Dependency Property + + + + + Gets or sets the CornerRadius property. This dependency property + indicates the CornerRadius of the border. + + + + + Checks if the given CornerRadius is valid or not + + CornerRadius + + + + + BorderBrush Dependency Property + + + + + Gets or sets the BorderBrush property. This dependency property + indicates the BorderBrush with which the Border is drawn. + + + + + Background Dependency Property + + + + + Gets or sets the Background property. This dependency property + indicates the Background with which the Background is drawn. + + + + + OptimizeClipRendering Dependency Property + + + + + Gets or sets the OptimizeClipRendering property. This dependency property + indicates whether the rendering of the clip should be optimized. When set to true, + In order to optimize the rendering of the clipped Child, + the background is rendered with the same brush as the border. Any other brush set for + the background will be ignored. The Child will be rendered on top of it. + This is done to prevent any gaps between the border the the clipped Child (this is + evidently visible if both the Border and the Child are of same color). + This works best when the Child does not have any level of transparency and is opaque. + + + + + Updates DesiredSize of the ClipBorder. Called by parent UIElement. This is the first pass of layout. + + + Border determines its desired size it needs from the specified border the child: its sizing + properties, margin, and requested size. + + Constraint size is an "upper limit" that the return value should not exceed. + The Decorator's desired size. + + + + ClipBorder computes the position of its single child and applies its child's alignments to the child. + + + The size reserved for this element by the parent + The actual ink area of the element, typically the same as finalSize + + + + Here the ClipBorder's Child, Border and Background are rendered. + + Drawing Context + + + + Generates a StreamGeometry. + + An already opened StreamGeometryContext. + Rectangle for geomentry conversion. + The core points of the border which needs to be used to create + the geometry + Result geometry. + + + + Encapsulates the details of each of the core points of the border which is calculated + based on the given CornerRadius, BorderThickness, Padding and a flag to indicate whether + the inner or outer border is to be calculated. + + CornerRadius + BorderThickness + Padding + Flag to indicate whether outer or inner border needs + to be calculated + + + + A few very useful extension methods + + + + + Returns whether or not two doubles are "close". + + The first double to compare. + The second double to compare. + + bool - the result of the AreClose comparision. + + + + + Returns whether or not the first double is less than the second double. + + The first double to compare. + The second double to compare. + + bool - the result of the LessThan comparision. + + + + + Returns whether or not the first double is greater than the second double. + + The first double to compare. + The second double to compare. + + bool - the result of the GreaterThan comparision. + + + + + Returns whether or not the double is "close" to 1. Same as AreClose(double, 1), + but this is faster. + + The double to compare to 1. + + bool - the result of the AreClose comparision. + + + + + IsZero - Returns whether or not the double is "close" to 0. Same as AreClose(double, 0), + but this is faster. + + The double to compare to 0. + + bool - the result of the AreClose comparision. + + + + + Compares two points for fuzzy equality. This function + helps compensate for the fact that double values can + acquire error when operated upon + + The first point to compare + The second point to compare + Whether or not the two points are equal + + + + Compares two Size instances for fuzzy equality. This function + helps compensate for the fact that double values can + acquire error when operated upon + + The first size to compare + The second size to compare + Whether or not the two Size instances are equal + + + + Compares two Vector instances for fuzzy equality. This function + helps compensate for the fact that double values can + acquire error when operated upon + + The first Vector to compare + The second Vector to compare + Whether or not the two Vector instances are equal + + + + Compares two rectangles for fuzzy equality. This function + helps compensate for the fact that double values can + acquire error when operated upon + + The first rectangle to compare + The second rectangle to compare + Whether or not the two rectangles are equal + + + + Faster check for NaN ( faster than double.IsNaN() ) + IEEE 754 : If the argument is any value in the range 0x7ff0000000000001L through 0x7fffffffffffffffL + or in the range 0xfff0000000000001L through 0xffffffffffffffffL, the result will be NaN. + + Value to check + + + + + Rounds the given value based on the DPI scale + + Value to round + DPI Scale + + + + + Verifies if this Thickness contains only valid values + The set of validity checks is passed as parameters. + + Thickness value + allows negative values + allows Double.NaN + allows Double.PositiveInfinity + allows Double.NegativeInfinity + Whether or not the thickness complies to the range specified + + + + Method to add up the left and right size as width, as well as the top and bottom size as height + + Thickness + Size + + + + Verifies if the Thickness contains only zero values + + Thickness + Size + + + + Verifies if all the values in Thickness are same + + Thickness + true if yes, otherwise false + + + + Verifies if this CornerRadius contains only valid values + The set of validity checks is passed as parameters. + + CornerRadius value + allows negative values + allows Double.NaN + allows Double.PositiveInfinity + allows Double.NegativeInfinity + Whether or not the CornerRadius complies to the range specified + + + + Verifies if the CornerRadius contains only zero values + + CornerRadius + Size + + + + Verifies if the CornerRadius contains same values + + CornerRadius + true if yes, otherwise false + + + + Deflates rectangle by given thickness + + Rectangle + Thickness + Deflated Rectangle + + + + Inflates rectangle by given thickness + + Rectangle + Thickness + Inflated Rectangle + + + + Verifies if the given brush is a SolidColorBrush and + its color does not include transparency. + + Brush + true if yes, otherwise false + + + + Verifies if the given brush is the same as the otherBrush. + + Brush + Brush + true if yes, otherwise false + + + + Defines the method that determines whether the command can execute in its current state. + + + true if this command can be executed; otherwise, false. + + Data used by the command. If the command does not require data to be passed, this object can be set to null. + + + + Defines the method to be called when the command is invoked. + + Data used by the command. If the command does not require data to be passed, this object can be set to null. + + + + The DependencyProperty for the CharacterCasing property. + Controls whether or not content is converted to upper or lower case + Default Value: CharacterCasing.Normal + + + + + Character casing of the Content + + + + + The DependencyProperty for the RecognizesAccessKey property. + Default Value: false + + + + + Determine if the inner ContentPresenter should use AccessText in its style + + + + + This custom popup is used by the validation error template. + It provides some additional nice features: + - repositioning if host-window size or location changed + - repositioning if host-window gets maximized and vice versa + - it's only topmost if the host-window is activated + + + + + Gets/sets if the popup can be closed by left mouse button down. + + + + + Called when a cell has just switched to edit mode. + + A reference to element returned by GenerateEditingElement. + The event args of the input event that caused the cell to go into edit mode. May be null. + The unedited value of the cell. + + + + Synchronizes the column property. Taken from Helper code for DataGrid. + + + + + Taken from Helper code for DataGrid. + + + + + The DependencyProperty for the StringFormat property. + + + + + Gets or sets the formatting for the displaying value. + + + + + + + + The DependencyProperty for the Minimum property. + + + + + The DependencyProperty for the Maximum property. + + + + + The DependencyProperty for the Interval property. + + + + + The DependencyProperty for the HideUpDownButtons property. + + + + + The DependencyProperty for the UpDownButtonsWidth property. + + + + + The DependencyProperty for the FontFamily property. + Default Value: SystemFonts.MessageFontFamily + + + + + The font family of the desired font. + + + + + The DependencyProperty for the FontSize property. + Default Value: SystemFonts.MessageFontSize + + + + + The size of the desired font. + + + + + The DependencyProperty for the FontStyle property. + Default Value: SystemFonts.MessageFontStyle + + + + + The style of the desired font. + + + + + The DependencyProperty for the FontWeight property. + Default Value: SystemFonts.MessageFontWeight + + + + + The weight or thickness of the desired font. + + + + + The DependencyProperty for the Foreground property. + Default Value: SystemColors.ControlTextBrush + + + + + An brush that describes the foreground color. This overrides the cell foreground inherited color. + + + + + Method used as property changed callback for properties which need RefreshCellContent to be called + + + + + Rebuilds the contents of a cell in the column in response to a binding change. + + The cell to update. + The name of the column property that has changed. + + + + The base class for dialogs. + + You probably don't want to use this class, if you want to add arbitrary content to your dialog, + use the class. + + + + + Gets/sets the dialog's title. + + + + + Gets/sets arbitrary content on top of the dialog. + + + + + Gets/sets arbitrary content below the dialog. + + + + + Gets or sets the size of the dialog title font. + + + The size of the dialog title font. + + + + + Gets or sets the size of the dialog message font. + + + The size of the dialog message font. + + + + + Initializes a new MahApps.Metro.Controls.BaseMetroDialog. + + The window that is the parent of the dialog. + The settings for the message dialog. + + + + Initializes a new MahApps.Metro.Controls.BaseMetroDialog. + + + + + With this method it's possible to return your own settings in a custom dialog. + + + + + + + This is called in the loaded event. + + + + + Waits for the dialog to become ready for interaction. + + A task that represents the operation and it's status. + + + + Requests an externally shown Dialog to close. Will throw an exception if the Dialog is inside of a MetroWindow. + + + + + A last chance virtual method for stopping an external dialog from closing. + + + + + + Gets the window that owns the current Dialog IF AND ONLY IF the dialog is shown externally. + + + + + Gets the window that owns the current Dialog IF AND ONLY IF the dialog is shown inside of a window. + + + + + Waits until this dialog gets unloaded. + + + + + + An implementation of BaseMetroDialog allowing arbitrary content. + + + + + Gets the default instance if the dialog coordinator, which can be injected into a view model. + + + + + Creates a LoginDialog inside of the current window. + + The window that is the parent of the dialog. + The title of the LoginDialog. + The message contained within the LoginDialog. + Optional settings that override the global metro dialog settings. + The text that was entered or null (Nothing in Visual Basic) if the user cancelled the operation. + + + + Creates a InputDialog inside of the current window. + + The MetroWindow + The title of the MessageDialog. + The message contained within the MessageDialog. + Optional settings that override the global metro dialog settings. + The text that was entered or null (Nothing in Visual Basic) if the user cancelled the operation. + + + + Creates a MessageDialog inside of the current window. + + The MetroWindow + The title of the MessageDialog. + The message contained within the MessageDialog. + The type of buttons to use. + Optional settings that override the global metro dialog settings. + A task promising the result of which button was pressed. + + + + Creates a ProgressDialog inside of the current window. + + The MetroWindow + The title of the ProgressDialog. + The message within the ProgressDialog. + Determines if the cancel button is visible. + Optional Settings that override the global metro dialog settings. + A task promising the instance of ProgressDialogController for this operation. + + + + Adds a Metro Dialog instance to the specified window and makes it visible asynchronously. + If you want to wait until the user has closed the dialog, use + You have to close the resulting dialog yourself with . + + The owning window of the dialog. + The dialog instance itself. + An optional pre-defined settings instance. + A task representing the operation. + The is already visible in the window. + + + + Adds a Metro Dialog instance of the given type to the specified window and makes it visible asynchronously. + If you want to wait until the user has closed the dialog, use + You have to close the resulting dialog yourself with . + + The owning window of the dialog. + An optional pre-defined settings instance. + A task with the dialog representing the operation. + + + + Hides a visible Metro Dialog instance. + + The window with the dialog that is visible. + The dialog instance to hide. + An optional pre-defined settings instance. + A task representing the operation. + + The is not visible in the window. + This happens if hasn't been called before. + + + + + Gets the current shown dialog in async way. + + The dialog owner. + + + + Creates a LoginDialog outside of the current window. + + The window that is the parent of the dialog. + The title of the LoginDialog. + The message contained within the LoginDialog. + Optional settings that override the global metro dialog settings. + The text that was entered or null (Nothing in Visual Basic) if the user cancelled the operation. + + + + Creates a InputDialog outside of the current window. + + The MetroWindow + The title of the MessageDialog. + The message contained within the MessageDialog. + Optional settings that override the global metro dialog settings. + The text that was entered or null (Nothing in Visual Basic) if the user cancelled the operation. + + + + Creates a MessageDialog ouside of the current window. + + The MetroWindow + The title of the MessageDialog. + The message contained within the MessageDialog. + The type of buttons to use. + Optional settings that override the global metro dialog settings. + A task promising the result of which button was pressed. + + + + Use the dialog coordinator to help you interfact with dialogs from a view model. + + + + + Shows the input dialog. + + Typically this should be the view model, which you register in XAML using . + The title of the MessageDialog. + The message contained within the MessageDialog. + Optional settings that override the global metro dialog settings. + The text that was entered or null (Nothing in Visual Basic) if the user cancelled the operation. + + + + Shows the input dialog. + + Typically this should be the view model, which you register in XAML using . + The title of the MessageDialog. + The message contained within the MessageDialog. + Optional settings that override the global metro dialog settings. + The text that was entered or null (Nothing in Visual Basic) if the user cancelled the operation. + + + + Creates a LoginDialog inside of the current window. + + Typically this should be the view model, which you register in XAML using . + The title of the LoginDialog. + The message contained within the LoginDialog. + Optional settings that override the global metro dialog settings. + The text that was entered or null (Nothing in Visual Basic) if the user cancelled the operation. + + + + Creates a LoginDialog outside of the current window. + + Typically this should be the view model, which you register in XAML using . + The title of the LoginDialog. + The message contained within the LoginDialog. + Optional settings that override the global metro dialog settings. + The text that was entered or null (Nothing in Visual Basic) if the user cancelled the operation. + + + + Creates a MessageDialog inside of the current window. + + Typically this should be the view model, which you register in XAML using . + The title of the MessageDialog. + The message contained within the MessageDialog. + The type of buttons to use. + Optional settings that override the global metro dialog settings. + A task promising the result of which button was pressed. + + + + Creates a MessageDialog outside of the current window. + + Typically this should be the view model, which you register in XAML using . + The title of the MessageDialog. + The message contained within the MessageDialog. + The type of buttons to use. + Optional settings that override the global metro dialog settings. + A task promising the result of which button was pressed. + + + + Creates a ProgressDialog inside of the current window. + + Typically this should be the view model, which you register in XAML using . + The title of the ProgressDialog. + The message within the ProgressDialog. + Determines if the cancel button is visible. + Optional Settings that override the global metro dialog settings. + A task promising the instance of ProgressDialogController for this operation. + + + + Adds a Metro Dialog instance to the specified window and makes it visible asynchronously. + You have to close the resulting dialog yourself with . + + Typically this should be the view model, which you register in XAML using . + The dialog instance itself. + An optional pre-defined settings instance. + A task representing the operation. + The is already visible in the window. + + + + Hides a visible Metro Dialog instance. + + Typically this should be the view model, which you register in XAML using . + The dialog instance to hide. + An optional pre-defined settings instance. + A task representing the operation. + + The is not visible in the window. + This happens if hasn't been called before. + + + + + Gets the current shown dialog. + + Typically this should be the view model, which you register in XAML using . + + + + InputDialog + + + + + InitializeComponent + + + + + LoginDialog + + + + + InitializeComponent + + + + + An internal control that represents a message dialog. Please use MetroWindow.ShowMessage instead! + + + MessageDialog + + + + + InitializeComponent + + + + + An enum representing the result of a Message Dialog. + + + + + An enum representing the different button states for a Message Dialog. + + + + + Just "OK" + + + + + "OK" and "Cancel" + + + + + An enum representing the different choices for a color scheme in a Metro Dialog. + + + + + A class that represents the settings used by Metro Dialogs. + + + + + Gets or sets wheater the owner of the dialog can be closed. + + + + + Gets or sets the text used for the Affirmative button. For example: "OK" or "Yes". + + + + + Enable or disable dialog hiding animation + "True" - play hiding animation. + "False" - skip hiding animation. + + + + + Enable or disable dialog showing animation. + "True" - play showing animation. + "False" - skip showing animation. + + + + + Gets or sets a token to cancel the dialog. + + + + + Gets or sets whether the metro dialog should use the default black/white appearance (theme) or try to use the current accent. + + + + + Gets or sets a custom resource dictionary which can contains custom styles, brushes or something else. + + + + + Gets or sets which button should be focused by default + + + + + Gets or sets the default text (just the inputdialog needed) + + + + + Gets or sets the size of the dialog message font. + + + The size of the dialog message font. + + + + + Gets or sets the dialog result when the user cancelled the dialog with 'ESC' key + + If the value is the default behavior is determined + by the . + + + + +
+ + + + +
+
+ + + Gets or sets the size of the dialog title font. + + + The size of the dialog title font. + + + + + Gets or sets the text used for the first auxiliary button. + + + + + Gets or sets the maximum height. (Default is unlimited height, Double.NaN) + + + + + Gets or sets the text used for the Negative button. For example: "Cancel" or "No". + + + + + Gets or sets the text used for the second auxiliary button. + + + + + If set, stops standard resource dictionaries being applied to the dialog. + + + + + An internal control that represents a message dialog. Please use MetroWindow.ShowMessage instead! + + + ProgressDialog + + + + + InitializeComponent + + + + + A class for manipulating an open ProgressDialog. + + + + + This event is raised when the associated was closed programmatically. + + + + + This event is raised when the associated was cancelled by the user. + + + + + Gets if the Cancel button has been pressed. + + + + + Gets if the wrapped ProgressDialog is open. + + + + + Sets the ProgressBar's IsIndeterminate to true. To set it to false, call SetProgress. + + + + + Sets if the Cancel button is visible. + + + + + + Sets the dialog's progress bar value and sets IsIndeterminate to false. + + The percentage to set as the value. + + + + Gets/Sets the minimum restriction of the progress Value property + + + + + Gets/Sets the maximum restriction of the progress Value property + + + + + Sets the dialog's message content. + + The message to be set. + + + + Sets the dialog's title. + + The title to be set. + + + + Sets the dialog's progress bar brush + + The brush to use for the progress bar's foreground + + + + Begins an operation to close the ProgressDialog. + + A task representing the operation. + + + + The DependencyProperty for the ContentTemplate property. + + + + + The DependencyProperty for the ContentTemplateSelector property. + + + + + The DependencyProperty for the ContentStringFormat property. + + + + + Gets or sets the Content of this control.. + + + + + ContentTemplate is the template used to display the content of the control. + + + + + ContentTemplateSelector allows to provide custom logic for choosing the template used to display the content of the control. + + + This property is ignored if is set. + + + + + ContentStringFormat is the format used to display the content of the control as a string + + + This property is ignored if is set. + + + + + Reflects the parameter to pass to the CommandProperty upon execution. + + + + + Gets or sets the target element on which to fire the command. + + + + + Get or sets the Command property. + + + + + Indicates whether the Menu is visible. + + + + + Gets or sets an extra tag. + + + + + Gets or sets the dimension of children stacking. + + + + + Gets or sets the Content used to generate the icon part. + + + + + Gets or sets the ContentTemplate used to display the content of the icon part. + + + + + Gets/sets the button style. + + + + + Gets/sets the menu style. + + + + + Gets/sets the brush of the button arrow icon. + + + + + Gets/sets the brush of the button arrow icon if the mouse is over the drop down button. + + + + + Gets/sets the brush of the button arrow icon if the arrow button is pressed. + + + + + Gets/sets the visibility of the button arrow icon. + + + + Invoked when the property changes. + Information about the change. + + + + Executes the specified action asynchronously with the DispatcherPriority.Background on the thread that the Dispatcher was created on. + + The dispatcher object where the action runs. + An action that takes no parameters. + The dispatcher priority. + + + + A control that imitate a slideshow with back/forward buttons. + + + + + To counteract the double Loaded event issue. + + + + + Coerce SelectedIndexProperty's value. + + The object that the property exists on. + The new value of the property, prior to any coercion attempt. + The coerced value (with appropriate type). + + + + Computes the transition when changing selected index. + + Previous selected index. + New selected index. + + + + Gets the navigation buttons. + + Previous button. + Next button. + Inactive buttons. + + + + Applies actions to navigation buttons. + + Action applied to the previous button. + Action applied to the next button. + Action applied to the inactive buttons. + Any action is null. + + + + Sets the visibility of navigation buttons. + + Visibility of active buttons. + + + + Changes the current slide to the previous item. + + + + + Changes the current to the next item. + + + + + Brings the control buttons (next/previous) into view. + + + + + Removes the control buttons (next/previous) from view. + + + + + Gets or sets a value indicating whether the border for mouse over state is enabled or not. + + + + + Gets or sets the mouse hover border brush. + + + + + Gets or sets the mouse hover border thickness. + + + + + Gets/sets the text that is displayed in the FlipView's banner. + + + + + Gets/sets whether the FlipView's banner is visible. + + + + + Gets or sets a value indicating whether the navigation is circular, so you get the first after last and the last before first. + + + + + Gets/sets whether the FlipView's NavigationButton is visible. + + + + + A sliding panel control that is hosted in a MetroWindow via a FlyoutsControl. + + + + + + + An event that is raised when IsOpen changes. + + + + + An event that is raised when the closing animation has finished. + + + + + Gets/sets if the title is visible in this flyout. + + + + + Gets/sets if the close button is visible in this flyout. + + + + + Gets/sets if the close button is a cancel button in this flyout. + + + + + Gets/sets a command which will be executed if the close button was clicked. + Note that this won't execute when is set to false. + + + + + Gets/sets the command parameter which will be passed by the CloseCommand. + + + + + Gets/sets a command which will be executed if the close button was clicked. + + + + + Gets/sets whether this flyout is visible. + + + + + Gets/sets whether this flyout uses the open/close animation when changing the property. (default is true) + + + + + Gets/sets whether this flyout animates the opacity of the flyout when opening/closing. + + + + + Gets/sets whether this flyout stays open when the user clicks outside of it. + + + + + Gets/sets the mouse button that closes the flyout on an external mouse click. + + + + + Gets/sets whether this flyout is modal. + + + + + Gets/sets this flyout's position in the FlyoutsControl/MetroWindow. + + + + + Gets or sets the theme of this flyout. + + + + + Gets or sets the focused element. + + + + + Gets or sets a value indicating whether the flyout should auto close after AutoCloseInterval has passed. + + + + + Gets or sets the time in milliseconds when the flyout should auto close. + + + + + Gets or sets a value indicating whether the flyout should try focus an element. + + + + + A FlyoutsControl is for displaying flyouts in a MetroWindow. + + + + + + Gets/sets whether is ignored and all flyouts behave as if it was set to the value of this property. + + + + + Gets/sets whether is ignored and all flyouts behave as if it was set false. + + + + + Adapts the Flyout's theme to the theme of its host window. + + + + + Adapts the Flyout's theme to the theme of its host window, but inverted. + This theme can only be applied if the host window's theme abides the "Dark" and "Light" affix convention. + (see for more infos. + + + + + The dark theme. This is the default theme. + + + + + The flyouts theme will match the host window's accent color. + + + + + GlowWindow + + + + + InitializeComponent + + + + + The HamburgerMenu is based on a SplitView control. By default it contains a HamburgerButton and a ListView to display menu items. + + + The HamburgerMenu is based on a SplitView control. By default it contains a HamburgerButton and a ListView to display menu items. + + + The HamburgerMenu is based on a SplitView control. By default it contains a HamburgerButton and a ListView to display menu items. + + + The HamburgerMenu is based on a SplitView control. By default it contains a HamburgerButton and a ListView to display menu items. + + + The HamburgerMenu is based on a SplitView control. By default it contains a HamburgerButton and a ListView to display menu items. + + + + + Initializes a new instance of the class. + + + + + Override default OnApplyTemplate to capture children controls + + + + + Event raised when an item is clicked + + + + + Event raised when an options' item is clicked + + + + + Event raised when an item is invoked + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Gets or sets a template for the hamburger icon. + + + + + Identifies the dependency property. + + + + + Gets or sets a template for the hamburger icon. + + + + + Gets or sets main button's width. + + + + + Gets or sets main button's height. + + + + + Gets or sets main button's margin. + + + + + Gets or sets main button's visibility. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Gets or sets an object source used to generate the content of the options. + + + + + Gets or sets the Style used for each item in the options. + + + + + Gets or sets the DataTemplate used to display each item in the options. + + + + + Gets or sets the DataTemplateSelector used to display each item in the options. + + + + + Gets the collection used to generate the content of the option list. + + + Exception thrown if OptionsListView is not yet defined. + + + + + Gets or sets the visibility of the options menu. + + + + + Gets or sets the selected options menu item. + + + + + Gets or sets the selected options menu index. + + + + + Gets or sets a command which will be executed if an options item is clicked by the user. + + + + + Gets or sets the command parameter which will be passed by the OptionsItemCommand. + + + + + Executes the options item command which can be set by the user. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Gets or sets the width of the pane when it's fully expanded. + + + + + Gets or sets a value that specifies whether the pane is shown on the right or left side of the control. + + + + + Gets or sets a value that specifies how the pane and content areas are shown. + + + + + Gets or sets the width of the pane in its compact display mode. + + + + + Gets or sets the Brush to apply to the background of the Pane area of the control. + + + + + Gets or sets the Brush to apply to the foreground of the Pane area of the control. + + + + + Gets or sets a value indicating whether the pane is expanded to its full width. + + + + + Gets or sets an object source used to generate the content of the menu. + + + + + Gets or sets the Style used for each item. + + + + + Gets or sets the DataTemplate used to display each item. + + + + + Gets or sets the DataTemplateSelector used to display each item. + + + + + Gets the collection used to generate the content of the items list. + + + Exception thrown if ButtonsListView is not yet defined. + + + + + Gets or sets the selected menu item. + + + + + Gets or sets the selected menu index. + + + + + Gets or sets a command which will be executed if an item is clicked by the user. + + + + + Gets or sets the command parameter which will be passed by the ItemCommand. + + + + + Gets or sets wheather the ScrollBar of the HamburgerMenu is on the left side or on the right side. + + + + + Gets or sets wheather a selection indicator will be shown on the HamburgerMenuItem. + + + + + Gets or sets the default FocusVisualStyle for a HamburgerMenuItem. + This style can be override at the HamburgerMenuItem style by setting the FocusVisualStyle property. + + + + + Executes the item command which can be set by the user. + + + + + EventArgs used for the ItemClick and OptionsItemClick event. + + + + + Gets the clicked item + + + + + EventArgs used for the ItemInvoked event. + + + + + Gets the invoked item + + + + + Gets a value indicating whether the invoked item is an options item + + + + + The HamburgerMenuGlyphItem provides a glyph based implementation for HamburgerMenu entries. + + + + + Identifies the dependency property. + + + + + Gets or sets a value that specifies the glyph to use from Segoe MDL2 Assets font. + + + + + The HamburgerMenuIconItem provides an icon based implementation for HamburgerMenu entries. + + + + + Identifies the dependency property. + + + + + Gets or sets a value that specifies an user specific object which can be used as icon. + + + + + The HamburgerMenuImageItem provides an image based implementation for HamburgerMenu entries. + + + + + Identifies the dependency property. + + + + + Gets or sets a value that specifies a bitmap to display with an Image control. + + + + + The HamburgerMenuItem provides an implementation for HamburgerMenu entries. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Gets or sets a value that specifies label to display. + + + + + Gets or sets a value that specifies the page to navigate to (if you use the HamburgerMenu with a Frame content) + + + + + Gets or sets a value that specifies an user specific value. + + + + + Gets or sets a command which will be executed if an item is clicked by the user. + + + + + Gets or sets the command parameter which will be passed by the Command. + + + + + Gets or sets the element on which to raise the specified command. + + + Element on which to raise a command. + + + + + Gets or sets a value indicating whether this item is enabled in the user interface (UI). This is a dependency property. + + + true if the item is enabled; otherwise, false. The default value is true. + + + + + Gets or sets a value that specifies ToolTip to display. + + + + + Executes the command which can be set by the user. + + + + + The HamburgerMenuItemCollection provides typed collection of HamburgerMenuItem. + + + + + Represents an hour comparison operation that ensures that 12 is smaller than 1. + This ensures that in the control the first hour that is selectable is 12 (AM/PM). + + + This ensures that the first hour that is selectable is 12 (AM/PM).

+ This comparer is used only if in the corresponding the value for is false. +
+
+ + + Overrides the text case behavior for certain buttons. + When set to true, the text case will be preserved and won't be changed to upper or lower case. + + + + + DependencyProperty for property. + + + + + The CornerRadius property allows users to control the roundness of the button corners independently by + setting a radius value for each corner. Radius values that are too large are scaled so that they + smoothly blend from corner to corner. (Can be used e.g. at MetroButton style) + Description taken from original Microsoft description :-D + + + + + A helper class that provides various attached properties for the control. + + + + + Gets the Maximum number of characters the TextBox can accept. + + + + + Sets the Maximum number of characters the TextBox can accept. + + + + + Gets the Character casing of the TextBox. + + + + + Sets the Character casing of the TextBox. + + + + + A helper class that provides various controls. + + + + + Gets the value to handle the visibility of the DisabledVisualElement in the template. + + + + + Sets the value to handle the visibility of the DisabledVisualElement in the template. + + + + + The DependencyProperty for the CharacterCasing property. + Controls whether or not content is converted to upper or lower case + + + + + Gets the character casing of the control + + + + + Sets the character casing of the control + + + + + This property can be used to set the button width (PART_ClearText) of TextBox, PasswordBox, ComboBox, NumericUpDown + + + + + Sets the brush used to draw the focus border. + + + + + Gets the brush used to draw the focus border. + + + + + Sets the brush used to draw the mouse over brush. + + + + + Gets the brush used to draw the mouse over brush. + + + + + DependencyProperty for property. + + + + + The CornerRadius property allows users to control the roundness of the button corners independently by + setting a radius value for each corner. Radius values that are too large are scaled so that they + smoothly blend from corner to corner. (Can be used e.g. at MetroButton style) + Description taken from original Microsoft description :-D + + + + + Gets or sets a value indicating whether the child contents of the control are not editable. + + + + + Gets a value indicating whether the child contents of the control are not editable. + + + + + Sets a value indicating whether the child contents of the control are not editable. + + + + + Save the DataGrid. + + + + + Get the DataGrid. + + + + + Gets the value to define the DataGridCell selection behavior. + + + + + Sets the value to define the DataGridCell selection behavior. + + + + + Gets the value to define the DataGridCell selection behavior. + + + + + Sets the value to define the DataGridCell selection behavior. + + + + + Gets a value which indicates the preview cell editing is enabled or not. + + + + + Sets a value which indicates the preview cell editing is enabled or not. + + + + + Gets the value to define the DataGridRow selection behavior. + + + + + Sets the value to define the DataGridRow selection behavior. + + + + + A helper class that provides various attached properties for the Expander control. + + + + + + Gets the toggle button style used for the ExpandDirection Up. + + + + + Sets the toggle button style used for the ExpandDirection Up. + + + + + Gets the toggle button style used for the ExpandDirection Down. + + + + + Sets the toggle button style used for the ExpandDirection Down. + + + + + Gets the toggle button style used for the ExpandDirection Left. + + + + + Sets the toggle button style used for the ExpandDirection Left. + + + + + Gets the toggle button style used for the ExpandDirection Right. + + + + + Sets the toggle button style used for the ExpandDirection Right. + + + + + Gets or sets the background brush which will be used for the active selected item (if the keyboard focus is within). + + + + + Gets the brush the background brush which will be used for the active selected item (if the keyboard focus is within). + + + + + Sets the brush the background brush which will be used for the active selected item (if the keyboard focus is within). + + + + + Gets or sets the foreground brush which will be used for the active selected item (if the keyboard focus is within). + + + + + Gets the brush the foreground brush which will be used for the active selected item (if the keyboard focus is within). + + + + + Sets the brush the foreground brush which will be used for the active selected item (if the keyboard focus is within). + + + + + Gets or sets the background brush which will be used for a selected item. + + + + + Gets the background brush which will be used for a selected item. + + + + + Sets the background brush which will be used for a selected item. + + + + + Gets or sets the foreground brush which will be used for a selected item. + + + + + Gets the foreground brush which will be used for a selected item. + + + + + Sets the foreground brush which will be used for a selected item. + + + + + Gets or sets the background brush which will be used for an mouse hovered item. + + + + + Gets the background brush which will be used for an mouse hovered item. + + + + + Sets the background brush which will be used for an mouse hovered item. + + + + + Gets or sets the background brush which will be used for an mouse hovered and selected item. + + + + + Gets the background brush which will be used for an mouse hovered and selected item. + + + + + Sets the background brush which will be used for an mouse hovered and selected item. + + + + + Gets or sets the background brush which will be used for selected disabled items. + + + + + Gets the background brush which will be used for selected disabled items. + + + + + Sets the background brush which will be used for selected disabled items. + + + + + Gets or sets the foreground brush which will be used for selected disabled items. + + + + + Gets the foreground brush which will be used for selected disabled items. + + + + + Sets the foreground brush which will be used for selected disabled items. + + + + + Gets or sets the background brush which will be used for disabled items. + + + + + Gets the background brush which will be used for disabled items. + + + + + Sets the background brush which will be used for disabled items. + + + + + Gets or sets the foreground brush which will be used for disabled items. + + + + + Gets the foreground brush which will be used for disabled items. + + + + + Sets the foreground brush which will be used for disabled items. + + + + + Change the value of the slider if the user rotates the mouse wheel by the value defined for + + + + + Change the value of the slider if the user rotates the mouse wheel by the value defined for + + + + + Do not change the value of the slider if the user rotates the mouse wheel. + + + + + Change the value of the slider only if the control is focused. + + + + + Changes the value of the slider if the mouse pointer is over this element. + + + + + Gets the content of the RevealButton. + + + + + Sets the content of the RevealButton. + + + + + Gets the data template used to display the content of the RevealButton. + + + + + Sets the data template used to display the content of the RevealButton. + + + + + This property can be used to set vertical scrollbar left side from the tabpanel (look at MetroAnimatedSingleRowTabControl) + + + + + Identifies the VerticalScrollBarOnLeftSide attached property. + This property can be used to set vertical scrollbar left side from the tabpanel (look at MetroAnimatedSingleRowTabControl) + + + + + Gets whether the vertical ScrollBar is on the left side or not. + + + + + Sets whether the vertical ScrollBar should be on the left side or not. + + + + + Identifies the IsHorizontalScrollWheelEnabled attached property. + + + + + Gets whether the ScrollViewer is scrolling horizontal by using the mouse wheel. + + + + + Sets whether the ScrollViewer should be scroll horizontal by using the mouse wheel. + + + + + Gets or sets the brush of the thumb. + + + + + Gets the brush of the thumb. + + + + + Sets the brush of the thumb. + + + + + Gets or sets the brush of the thumb if the mouse is over the slider. + + + + + Gets the brush of the thumb if the mouse is over the slider. + + + + + Sets the brush of the thumb if the mouse is over the slider. + + + + + Gets or sets the brush of the thumb if the mouse button is pressed. + + + + + Gets the brush of the thumb if the mouse button is pressed. + + + + + Sets the brush of the thumb if the mouse button is pressed. + + + + + Gets or sets the brush of the thumb if the slider is disabled. + + + + + Gets the brush of the thumb if the slider is disabled. + + + + + Sets the brush of the thumb if the slider is disabled. + + + + + Gets or sets the brush of the track. + + + + + Gets the brush of the track. + + + + + Sets the brush of the track. + + + + + Gets or sets the brush of the track if the mouse is over the slider. + + + + + Gets the brush of the track if the mouse is over the slider. + + + + + Sets the brush of the track if the mouse is over the slider. + + + + + Gets or sets the brush of the track if the mouse button is pressed. + + + + + Gets the brush of the track if the mouse button is pressed. + + + + + Sets the brush of the track if the mouse button is pressed. + + + + + Gets or sets the brush of the track if the slider is disabled. + + + + + Gets the brush of the track if the slider is disabled. + + + + + Sets the brush of the track if the slider is disabled. + + + + + Gets or sets the brush of the track value. + + + + + Gets the brush of the track value. + + + + + Sets the brush of the track value. + + + + + Gets or sets the brush of the track value if the mouse is over the slider. + + + + + Gets the brush of the track value if the mouse is over the slider. + + + + + Sets the brush of the track value if the mouse is over the slider. + + + + + Gets or sets the brush of the track value if the mouse button is pressed. + + + + + Gets the brush of the track value if the mouse button is pressed. + + + + + Sets the brush of the track value if the mouse button is pressed. + + + + + Gets or sets the brush of the track value if the slider is disabled. + + + + + Gets the brush of the track value if the slider is disabled. + + + + + Sets the brush of the track value if the slider is disabled. + + + + + Gets/Sets the type how the value will be changed if the user rotates the mouse wheel. + + + + + Gets/Sets the type how the value will be changed if the user rotates the mouse wheel. + + + + + Gets/Sets the value when the slider will be changed. Possible values are if the slider is focused or if the mouse is over the slider. + + + + + Gets/Sets the value when the slider will be changed. Possible values are if the slider is focused or if the mouse is over the slider. + + + + + Specifies the underline position of a TabControl. + + + + Sets the Style and Template property to null. + + Removing a TabItem in code behind can produce such nasty output + System.Windows.Data Warning: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.TabControl', AncestorLevel='1''. BindingExpression:Path=Background; DataItem=null; target element is 'TabItem' (Name=''); target property is 'Background' (type 'Brush') + or + System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.TabControl', AncestorLevel='1''. BindingExpression:Path=(0); DataItem=null; target element is 'TabItem' (Name=''); target property is 'UnderlineBrush' (type 'Brush') + + This is a timing problem in WPF of the binding mechanism itself. + + To avoid this, we can set the Style and Template to null. + + + + Identifies the CloseButtonEnabled attached property. + + + + + Gets whether a close button should be visible or not. + + + + + Sets whether a close button should be visible or not. + + + + + Identifies the CloseTabCommand attached property. + + + + + Gets a command for the TabItem which executes if the TabItem will be closed. + + + + + Sets a command for the TabItem which executes if the TabItem will be closed. + + + + + Identifies the CloseTabCommandParameter attached property. + + + + + Gets a command parameter for the TabItem that will be passed to the CloseTabCommand. + + + + + Sets a command parameter for the TabItem that will be passed to the CloseTabCommand. + + + + + Defines whether the underline below the is shown or not. + + + + + Defines whether the underline below the or is shown or not. + + + + + Defines the underline brush below the or . + + + + + Defines the underline brush below the or of an selected item. + + + + + Defines the underline brush below the or if the mouse is over an item. + + + + + Defines the underline brush below the or if the mouse is over a selected item. + + + + + This property can be used to set the Transition for animated TabControls + + + + + A helper class that provides various attached properties for the TextBox control. + + + Password watermarking code from: http://prabu-guru.blogspot.com/2010/06/how-to-add-watermark-text-to-textbox.html + + + + + The clear text button behavior property. It sets a click event to the button if the value is true. + + + + + This property can be used to set the button width (PART_ClearText) of TextBox, PasswordBox, ComboBox, NumericUpDown + + + + + This property can be used to retrieve the watermark using the of bound property. + + + Setting this property to true will uses reflection. + + + + + Indicates if a TextBox or RichTextBox should use SpellCheck context menu + + + + + Indicates if the watermark is automatically retrieved by using the of the bound property. + + This attached property uses reflection; thus it might reduce the performance of the application. + The auto-watermak does work for the following controls: + In the following case no custom watermark is shown + + There is no binding + Binding path errors + Binding to a element of a collection without using a property of that element Binding Path=Collection[0] use: Binding Path=Collection[0].SubProperty + The bound property does not have a + + + + + Gets a value that indicates the horizontal alignment of the watermark. + + + One of the values that specifies the desired alignment. The default is . + + + + + Sets a value that indicates the horizontal alignment of the watermark. + + + + + Gets the text trimming behavior to employ when watermark overflows the content area. + + + One of the values that specifies the text trimming behavior to employ. The default is . + + + + + Sets the text trimming behavior to employ when watermark overflows the content area. + + + + + Gets how the watermark should wrap text. + + One of the values. The default is . + + + + + Sets how the watermark should wrap text. + + + + + Gets if the attached TextBox has text. + + + + + Gets the clear text button visibility / feature. Can be used to enable text deletion. + + + + + Sets the clear text button visibility / feature. Can be used to enable text deletion. + + + + + Gets the text button visibility. + + + + + Sets the text button visibility. + + + + + Gets the buttons placement variant. + + + + + Sets the buttons placement variant. + + + + + Gets the clear text button behavior. + + + + + Sets the clear text button behavior. + + + + + ButtonContentTemplate is the template used to display the content of the ClearText button. + + + + + This property can be used to handle the style for CheckBox and RadioButton + LeftToRight means content left and button right and RightToLeft vise versa + + + + + This property can be used to handle the style for CheckBox and RadioButton + LeftToRight means content left and button right and RightToLeft vise versa + + + + + A MetroTabControl (Pivot) that wraps TabItem/MetroTabItem headers on a single row. + + + + + Initializes a new instance of the MahApps.Metro.Controls.MetroAnimatedSingleRowTabControl class. + + + + + A MetroTabControl (Pivot) that uses a TransitioningContentControl to animate the contents of a TabItem/MetroTabItem. + + + + + Initializes a new instance of the MahApps.Metro.Controls.MetroAnimatedTabControl class. + + + + + Originally from http://xamlcoder.com/blog/2010/11/04/creating-a-metro-ui-style-control/ + + + + + Creates AutomationPeer () + + + + + The MetroHeaderAutomationPeer class exposes the type to UI Automation. + + + + + A reimplementation of NavigationWindow based on MetroWindow. + + + + MetroNavigationWindow + + + + + Gets an IEnumerable that you use to enumerate the entries in back navigation history for a NavigationWindow. + + + + + + Gets an IEnumerable that you use to enumerate the entries in back navigation history for a NavigationWindow. + + + + + + Gets the NavigationService that is used by this MetroNavigationWindow to provide navigation services to its content. + + + + + + Gets a value that indicates whether there is at least one entry in back navigation history. + + + + + + Gets a value that indicates whether there is at least one entry in forward navigation history. + + + + + + Gets or sets the base uniform resource identifier (URI) of the current context. + + + + + + Gets or sets the uniform resource identifier (URI) of the current content, or the URI of new content that is currently being navigated to. + + + + + + Adds an entry to back navigation history that contains a CustomContentState object. + + A CustomContentState object that represents application-defined state that is associated with a specific piece of content. + + + + + Removes the most recent journal entry from back history. + + The most recent JournalEntry in back navigation history, if there is one. + + + + + Navigates to the most recent item in back navigation history. + + + + + + Navigates to the most recent item in forward navigation history. + + + + + + Navigates asynchronously to content that is contained by an object. + + An Object that contains the content to navigate to. + true if a navigation is not canceled; otherwise, false. + + + + + Navigates asynchronously to content that is specified by a uniform resource identifier (URI). + + A Uri object initialized with the URI for the desired content. + true if a navigation is not canceled; otherwise, false. + + + + + Navigates asynchronously to content that is contained by an object, and passes an object that contains data to be used for processing during navigation. + + An Object that contains the content to navigate to. + A Object that contains data to be used for processing during navigation. + true if a navigation is not canceled; otherwise, false. + + + + + Navigates asynchronously to source content located at a uniform resource identifier (URI), and pass an object that contains data to be used for processing during navigation. + + A Uri object initialized with the URI for the desired content. + A Object that contains data to be used for processing during navigation. + true if a navigation is not canceled; otherwise, false. + + + + + Stops further downloading of content for the current navigation request. + + + + + + Occurs when navigation to a content fragment begins, which occurs immediately, if the desired fragment is in the current content, or after the source XAML content has been loaded, if the desired fragment is in different content. + + + + + + Occurs when a new navigation is requested. + + + + + + Occurs when an error is raised while navigating to the requested content. + + + + + + Occurs periodically during a download to provide navigation progress information. + + + + + + Occurs when the StopLoading method is called, or when a new navigation is requested while a current navigation is in progre + + + + + + Occurs when the content that is being navigated to has been found, and is available from the PageContent property, although it may not have completed loading + + + + + + Occurs when content that was navigated to has been loaded, parsed, and has begun rendering. + + + + + + InitializeComponent + + + + + A metrofied ProgressBar. + + + + + + Gets/sets the diameter of the ellipses used in the indeterminate animation. + + + + + Gets/sets the offset of the ellipses used in the indeterminate animation. + + + + + A standard MetroTabControl (Pivot). + + + + + Initializes a new instance of the MahApps.Metro.Controls.MetroTabControl class. + + + + + A base class for every MetroTabControl (Pivot). + + + + + Get/sets the command that executes when a MetroTabItem's close button is clicked. + + + + + An event that is raised when a TabItem is closed. + + + + + Event args that is created when a TabItem is closed. + + + + + Gets the MetroTabItem that will be closed. + + + + + An extended TabItem with a metro style. + + + + + Gets/sets whether the Close Button is visible. + + + + + Gets/sets the command that is executed when the Close Button is clicked. + + + + + Gets/sets the command parameter which is passed to the close button command. + + + + + Gets/sets the Close Button Margin. + + + + + The MetroThumbContentControl control can be used for titles or something else and enables basic drag movement functionality. + + + + + Adds or remove a DragStartedEvent handler + + + + + Adds or remove a DragDeltaEvent handler + + + + + Adds or remove a DragCompletedEvent handler + + + + + DependencyProperty for the IsDragging property. + + + + + Indicates that the left mouse button is pressed and is over the MetroThumbContentControl. + + + + + The MetroThumbContentControlAutomationPeer class exposes the type to UI Automation. + + + + + An extended, metrofied Window class. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Allows easy handling of window commands brush. Theme is also applied based on this brush. + + + + + Gets/sets whether the window's entrance transition animation is enabled. + + + + + Gets/sets the FlyoutsControl that hosts the window's flyouts. + + + + + Gets/sets the icon content template to show a custom icon. + + + + + Gets/sets the title content template to show a custom title. + + + + + Gets/sets the left window commands that hosts the user commands. + + + + + Gets/sets the right window commands that hosts the user commands. + + + + + Gets/sets the window button commands that hosts the min/max/close commands. + + + + + Gets/sets whether the window will ignore (and overlap) the taskbar when maximized. + + + + + Gets or sets resize border thickness + + + + + Using a DependencyProperty as the backing store for ResizeBorderTickness. This enables animation, styling, binding, etc... + + + + + Gets/sets the brush used for the titlebar's foreground. + + + + + Gets/sets whether the window will save it's position between loads. + + + + + Gets the window placement settings (can be overwritten). + + + + + Get/sets whether the titlebar icon is visible or not. + + + + + Get/sets whether dialogs show over the title bar. + + + + + Gets whether one or more dialogs are shown. + + + + + Gets/sets edge mode of the titlebar icon. + + + + + Gets/sets bitmap scaling mode of the titlebar icon. + + + + + Gets/sets icon scaling mode of the titlebar. + + + + + Gets/sets whether the TitleBar is visible or not. + + + + + Gets/sets whether the WindowStyle is None or not. + + + + + Gets/sets if the minimize button is visible. + + + + + Gets/sets if the Maximize/Restore button is visible. + + + + + Gets/sets if the close button is visible. + + + + + Gets/sets if the min button is enabled. + + + + + Gets/sets if the max/restore button is enabled. + + + + + Gets/sets if the close button is enabled. + + + + + Gets or sets whether if the close button should be enabled or not if a dialog is shown. + + + + + Gets/sets if the the system menu should popup on right click. + + + + + Gets/sets the TitleBar's height. + + + + + Gets/sets if the TitleBar's text is automatically capitalized. + + + + + Character casing of the title + + + + + Gets/sets the title horizontal alignment. + + + + + Gets/sets the brush used for the Window's title bar. + + + + + Gets/sets the brush used for the Window's glow. + + + + + Gets/sets the brush used for the Window's non-active glow. + + + + + Gets/sets the brush used for the Window's non-active border. + + + + + Gets/sets the brush used for the Window's non-active title bar. + + + + + Gets/sets the brush used for the dialog overlay. + + + + + Gets/sets the opacity used for the dialog overlay. + + + + + Gets or sets the overlay fade in storyboard. + + + + + Gets or sets the overlay fade out storyboard. + + + + + Begins to show the MetroWindow's overlay effect. + + A task representing the process. + + + + Begins to hide the MetroWindow's overlay effect. + + A task representing the process. + + + + Stores the given element, or the last focused element via FocusManager, for restoring the focus after closing a dialog. + + The element which will be focused again. + + + + Clears the stored element which would get the focus after closing a dialog. + + + + + Initializes a new instance of the MahApps.Metro.Controls.MetroWindow class. + + + + + Initializes various behaviors for the window. + For example , and . + + + + + Gets the template child with the given name. + + The interface type inheirted from DependencyObject. + The name of the template child. + + + + Gets the template child with the given name. + + The name of the template child. + + + + This class eats little children. + + + + + Sets the IsHitTestVisibleInChromeProperty to a MetroWindow template child + + The MetroWindow. + The name of the template child. + + + + + Sets the WindowChrome ResizeGripDirection to a MetroWindow template child. + + The MetroWindow. + The name of the template child. + The direction. + + + + Adapts the WindowCommands to the theme of the first opened, topmost && (top || right || left) flyout + + The MetroWindow + All the flyouts! Or flyouts that fall into the category described in the summary. + An optional brush to reset the window commands brush to. + + + + Enum NumericInput which indicates what input is allowed for NumericUpdDown. + + + + + Only numbers are allowed + + + + + Numbers with decimal point and allowed scientific input + + + + + All is allowed + + + + + Represents a Windows spin box (also known as an up-down control) that displays numeric values. + + + + + Event fired from this NumericUpDown when its value has reached the maximum value + + + + + Event fired from this NumericUpDown when its value has reached the minimum value + + + + + Gets or sets the amount of time, in milliseconds, the NumericUpDown waits while the up/down button is pressed + before it starts increasing/decreasing the + for the specified . The value must be + non-negative. + + + + + Gets or sets a value indicating whether the user can use the arrow keys and to change values. + + + + + Gets or sets a value indicating whether the user can use the mouse wheel to change values. + + + + + Gets or sets a value indicating whether the control must have the focus in order to change values using the mouse wheel. + + If the value is true then the value changes when the mouse wheel is over the control. If the value is false then the value changes only if the control has the focus. If is set to "false" then this property has no effect. + + + + + + Gets or sets a value indicating whether the user can enter text in the control. + + + + + Gets or sets a value indicating the culture to be used in string formatting operations. + + + + + Gets or sets a value indicating whether the +/- button of the control is visible. + + + If the value is false then the of the control can be changed only if one of the following cases is satisfied: + + + is true. + + + is true. + + + is true. + + + + + + + Gets or sets a value indicating whether the text can be changed by the use of the up or down buttons only. + + + + + Gets or sets a value indicating whether the value to be added to or subtracted from remains + always + or if it will increase faster after pressing the up/down button/arrow some time. + + + + + Gets or sets the formatting for the displaying + + + + + + + + Gets or sets the horizontal alignment of the contents of the text box. + + + + + Indicates if the NumericUpDown should show the decimal separator or not. + + + + + Gets or sets which numeric input for the NumericUpDown is allowed. + + + + + Indicates if the NumericUpDown should round the value to the nearest possible interval when the focus moves to another element. + + + + + Called when this element or any below gets focus. + + + + + When overridden in a derived class, is invoked whenever application code or internal processes call + . + + + + + Raises the routed event. + + + Old value of the property + + + New value of the property + + + + + Based on Greg Schechter's Planerator + http://blogs.msdn.com/b/greg_schechter/archive/2007/10/26/enter-the-planerator-dead-simple-3d-in-wpf-with-a-stupid-name.aspx + + + + + An Enum representing different positions, such as Left or Right. + + + + + Event arguments created for the RangeSlider's SelectionChanged event. + + + + + + The value of the new range's beginning. + + + + + The value of the new range's ending. + + + + + A slider control with the ability to select a range between two values. + + + + + Identifies the  dependency property. + + + + + Identifies the  dependency property. + + + + + Identifies the  dependency property. + + + + + Identifies the  dependency property. + + + + + Identifies the  dependency property. + + + + + Identifies the  dependency property. + + + + + Get/sets value how fast thumbs will move when user press on left/right/central with left mouse button (IsMoveToPoint must be set to FALSE) + + + + + Get/sets precision of the value, which displaying inside AutotToolTip + + + + + Get/sets the converter for the tooltip text + + + + + Get/sets tooltip, which will show while dragging thumbs and display currect value + + + + + Gets or sets the position of tick marks with respect to the of the . + + + A value that defines how to position the tick marks in a with respect to the slider bar. The default is . + + + + + Gets or sets the interval between tick marks. + + + The distance between tick marks. The default is (1.0). + + + + + Gets or sets the positions of the tick marks to display for a . + + A set of tick marks to display for a . The default is . + + + + + Get or sets IsMoveToPoint feature which will enable/disable moving to exact point inside control when user clicked on it + Gets or sets a value that indicates whether the two of a moves immediately to the location of the mouse click that occurs while the mouse pointer pauses on the tracks. + + + + + Gets or sets the orientation of the . + + + + + Get/sets whether possibility to make manipulations inside range with left/right mouse buttons + cotrol button + + + + + Get/sets whether possibility to make manipulations inside range with left/right mouse buttons + cotrol button + + + + + Get/sets whether whole range will be moved when press on right/left/central part of control + + + + + Get/sets the minimal distance between two thumbs. + + + + + Get/sets the beginning of the range selection. + + + + + Get/sets the end of the range selection. + + + + + Get/sets the minimum range that can be selected. + + + + + Gets or sets a value that indicates whether the displays a selection range along the . + + + if a selection range is displayed; otherwise, . The default is . + + + + + Gets or sets the smallest value of a specified selection for a . + + + The largest value of a selected range of values of a . The default is zero (0.0). + + + + + Gets or sets the largest value of a specified selection for a . + + + The largest value of a selected range of values of a . The default is zero (0.0). + + + + + Responds to a change in the value of the property. + + The old value of the property.The new value of the property. + + + + Responds to a change in the value of the property. + + The old value of the property.The new value of the property. + + + + RevealImage + + + + + InitializeComponent + + + + + Reflects the parameter to pass to the CommandProperty upon execution. + + + + + Gets or sets the target element on which to fire the command. + + + + + Get or sets the Command property. + + + + + Indicates whether the Popup is visible. + + + + + Gets or sets an extra tag. + + + + + Gets or sets the dimension of children stacking. + + + + + Gets or sets the Content used to generate the icon part. + + + + + Gets or sets the ContentTemplate used to display the content of the icon part. + + + + + Gets/sets the button style. + + + + + Gets/sets the button arrow style. + + + + + Gets/sets the popup listbox style. + + + + + Gets/sets the brush of the button arrow icon. + + + + + Gets/sets the brush of the button arrow icon if the mouse is over the split button. + + + + + Gets/sets the brush of the button arrow icon if the arrow button is pressed. + + + + Updates the current selection when an item in the has changed + The event data. + + + + A special animation used to animates the length of a . + + + + + + + Represents a container with two views; one view for the main content and another view that is typically used for + navigation commands. + + + + + Identifies the dependency property. + + The identifier for the property. + + + + Gets or sets the width of the pane in its compact display mode. + + + The width of the pane in it's compact display mode. The default is 48 device-independent pixel (DIP) (defined + by the SplitViewCompactPaneThemeLength resource). + + + + + Identifies the dependency property. + + The identifier for the dependency property. + + + + Gets or sets the contents of the main panel of a . + + The contents of the main panel of a . The default is null. + + + + Identifies the dependency property. + + The identifier for the dependency property. + + + + Gets of sets a value that specifies how the pane and content areas of a are shown. + + + A value of the enumeration that specifies how the pane and content areas of a are + shown. The default is . + + + + + Identifies the dependency property. + + The identifier for the dependency property. + + + + Gets or sets a value that specifies whether the pane is expanded to its full width. + + true if the pane is expanded to its full width; otherwise, false. The default is true. + + + + Identifies the dependency property. + + The identifier for the dependency property. + + + + Gets or sets the width of the pane when it's fully expanded. + + + The width of the pane when it's fully expanded. The default is 320 device-independent + pixel (DIP). + + + + + Identifies the dependency property. + + The identifier for the dependency property. + + + + Gets or sets the contents of the pane of a . + + The contents of the pane of a . The default is null. + + + + Identifies the dependency property. + + The identifier for the dependency property. + + + + Gets or sets the Brush to apply to the background of the area of the control. + + The Brush to apply to the background of the area of the control. + + + + Identifies the dependency property. + + The identifier for the dependency property. + + + + Gets or sets the Brush to apply to the foreground of the area of the control. + + The Brush to apply to the background of the area of the control. + + + + Identifies the PanePlacement dependency property. + + The identifier for the PanePlacement dependency property. + + + + Gets or sets a value that specifies whether the pane is shown on the right or left side of the + . + + + A value of the enumeration that specifies whether the pane is shown on the right or left side of the + . The default is . + + + + + Identifies the dependency property. + + The identifier for the dependency property. + + + + Gets an object that provides calculated values that can be referenced as TemplateBinding sources when defining + templates for a control. + + An object that provides calculated values for templates. + + + + Initializes a new instance of the class. + + + + + Occurs when the pane is closed. + + + + + Occurs when the pane is closing. + + + + + Constants that specify how the pane is shown in a . + + + + + The pane covers the content when it's open and does not take up space in the control layout. + + + + + The pane is shown side-by-side with the content and takes up space in the control layout. + + + + + The amount of the pane defined by the property is shown side-by-side + with the content and takes up space in the control layout. + The remaining part of the pane covers the content when it's open and does not take up space in the control layout. + + + + + The amount of the pane defined by the property is shown side-by-side + with the content and takes up space in the control layout. + The remaining part of the pane pushes the content to the side when it's open and takes up space in the control + layout. + + + + + Provides event data for the event. + + + + + Gets or sets a value that indicates whether the pane closing action should be canceled. + + true to cancel the pane closing action; otherwise, false. + + + + Constants that specify whether the pane is set to the left or to the right of the content in a + . + + + + + The pane is shown to the left of the content. + + + + + The pane is shown to the right of the content. + + + + + Provides calculated values that can be referenced as TemplatedParent sources when defining templates for a + . + Not intended for general use. + + + + + Gets the value as a GridLength. + + + + + Gets the negative of the value. + + + + + Gets the negative of the value calculated by subtracting the value from + the value. + + + + + Gets the value as a GridLength. + + + + + Gets the value. + + + + + Gets a value calculated by subtracting the value from the + value. + + + + + An Enum representing different themes for window commands. + + + + + HorizontalTitleAlignment Dependency Property. + Default Value: HorizontalAlignment.Left + + + + + Gets/Sets the horizontal alignment of the title. + + + + + VerticalTitleAlignment Dependency Property. + Default Value: VerticalAlignment.Bottom + + + + + Gets/Sets the vertical alignment of the title. + + + + + Represents a control that allows the user to select a date and a time. + + + + + Occurs when the property is changed. + + + + + Gets or sets the date to display + + + The date to display. The default is . + + + + + Gets or sets the last date to be displayed. + + The last date to display. + + + + Gets or sets the first date to be displayed. + + The first date to display. + + + + Gets or sets the day that is considered the beginning of the week. + + + A that represents the beginning of the week. The default is the + that is determined by the current culture. + + + + + Gets or sets the format that is used to display the selected date. + + + + + Gets or sets a value that indicates whether the current date will be highlighted. + + true if the current date is highlighted; otherwise, false. The default is true. + + + + Gets or sets a value that indicates the dimension by which calendar and clock are stacked. + + + The of the calendar and clock. The default is + . + + + + + Gets or sets the currently selected date. + + + The date currently selected. The default is null. + + + + + Defines the visibility for time-parts that are visible for the . + + + + + Represents a control that allows the user to select a time. + + + + + Represents a base-class for time picking. + + + + + This readonly dependency property is to control whether to show the date-picker (in case of ) or hide it (in case of . + + + + + Represents the time 00:00:00; 12:00:00 AM respectively + + + + + Represents the time 23:59:59.9999999; 11:59:59.9999999 PM respectively + + + + + This list contains values from 0 to 55 with an interval of 5. It can be used to bind to and . + + + <MahApps:TimePicker SourceSeconds="{x:Static MahApps:TimePickerBase.IntervalOf5}" /> + <MahApps:DateTimePicker SourceSeconds="{x:Static MahApps:TimePickerBase.IntervalOf5}" /> + + + Returns a list containing {0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55}. + + + + + This list contains values from 0 to 50 with an interval of 10. It can be used to bind to and . + + + <MahApps:TimePicker SourceSeconds="{x:Static MahApps:TimePickerBase.IntervalOf10}" /> + <MahApps:DateTimePicker SourceSeconds="{x:Static MahApps:TimePickerBase.IntervalOf10}" /> + + + Returns a list containing {0, 10, 20, 30, 40, 50}. + + + + + This list contains values from 0 to 45 with an interval of 15. It can be used to bind to and . + + + <MahApps:TimePicker SourceSeconds="{x:Static MahApps:TimePickerBase.IntervalOf15}" /> + <MahApps:DateTimePicker SourceSeconds="{x:Static MahApps:TimePickerBase.IntervalOf15}" /> + + + Returns a list containing {0, 15, 30, 45}. + + + + + Occurs when the property is changed. + + + + + Gets or sets a value indicating the culture to be used in string formatting operations. + + + + + Gets or sets a value indicating the visibility of the clock hands in the user interface (UI). + + + The visibility definition of the clock hands. The default is . + + + + + Gets or sets a value indicating whether the date can be selected or not. This property is read-only. + + + + + Gets or sets a value indicating whether the clock of this control is visible in the user interface (UI). This is a + dependency property. + + + If this value is set to false then is set to + + + + true if the clock is visible; otherwise, false. The default value is true. + + + + + Gets or sets a value indicating whether the drop-down for a box is currently + open. + + true if the drop-down is open; otherwise, false. The default is false. + + + + Gets or sets a value indicating whether the contents of the are not editable. + + + true if the is read-only; otherwise, false. The default is false. + + + + + Gets or sets a value indicating the visibility of the selectable date-time-parts in the user interface (UI). + + + visibility definition of the selectable date-time-parts. The default is . + + + + + Gets or sets the currently selected time. + + + The time currently selected. The default is null. + + + + + Gets or sets the format that is used to display the selected time. + + + + + Gets or sets a collection used to generate the content for selecting the hours. + + + A collection that is used to generate the content for selecting the hours. The default is a list of interger from 0 + to 23 if is false or a list of interger from + 1 to 12 otherwise.. + + + + + Gets or sets a collection used to generate the content for selecting the minutes. + + + A collection that is used to generate the content for selecting the minutes. The default is a list of int from + 0 to 59. + + + + + Gets or sets a collection used to generate the content for selecting the seconds. + + + A collection that is used to generate the content for selecting the minutes. The default is a list of int from + 0 to 59. + + + + + Gets a value indicating whether the that is specified by the + + set by the ( if null) has not a value. + + + + + When overridden in a derived class, is invoked whenever application code or internal processes call + . + + + + + Gets the offset from the selected to use it in as hour + parameter. + + The current hour. + + An integer representing the offset to add to the hour that is selected in the hour-picker for setting the correct + . The offset is determined as follows: + + + ConditionOffset + + + is false0 + + + Selected hour is between 1 AM and 11 AM0 + + + Selected hour is 12 AM-12h + + + Selected hour is between 12 PM and 11 PM+12h + + + + + + + A control that allows the user to toggle between two states: One represents true; The other represents false. + + + + + Identifies the  dependency property. + + + + + Gets/sets the font family of the header. + + + + + Gets/sets the text to display when the control is in it's On state. + + + + + Gets/sets the text to display when the control is in it's Off state. + + + + + Gets/sets the brush used for the switch's foreground. + + + + + Gets/sets the brush used for the on-switch's foreground. + + + + + Gets/sets the brush used for the off-switch's foreground. + + + + + Gets/sets the brush used for the thumb indicator. + + + + + Gets/sets the brush used for the thumb indicator. + + + + + Gets/sets the width of the thumb indicator. + + + + + Gets/sets the control's content flow direction. + + + + + Gets or sets the padding of the inner content. + + + + + Gets/sets the control's toggle switch button style. + + + + + Gets/sets whether the control is Checked (On) or not (Off). + + + + + Gets/sets the command which will be executed if the IsChecked property was changed. + + + + + Gets/sets the command which will be executed if the checked event of the control is fired. + + + + + Gets/sets the command which will be executed if the checked event of the control is fired. + + + + + Gets/sets the command parameter which will be passed by the CheckChangedCommand. + + + + + Gets/sets the command parameter which will be passed by the CheckedCommand. + + + + + Gets/sets the command parameter which will be passed by the UnCheckedCommand. + + + + + An event that is raised when the value of IsChecked changes. + + + + + A Button that allows the user to toggle between two states. + + + + + Gets/sets the brush used for the control's foreground. + + + + + Gets/sets the brush used for the on-switch's foreground. + + + + + Gets/sets the brush used for the off-switch's foreground. + + + + + Gets/sets the brush used for the thumb indicator. + + + + + Gets/sets the brush used for the thumb indicator. + + + + + Gets/sets the width of the thumb indicator. + + + + + enumeration for the different transition types + + + + + Use the VisualState DefaultTransition + + + + + Use the VisualState Normal + + + + + Use the VisualState UpTransition + + + + + Use the VisualState DownTransition + + + + + Use the VisualState RightTransition + + + + + Use the VisualState RightReplaceTransition + + + + + Use the VisualState LeftTransition + + + + + Use the VisualState LeftReplaceTransition + + + + + Use a custom VisualState, the name must be set using CustomVisualStatesName property + + + + + A ContentControl that animates content as it loads and unloads. + + + + + Gets or sets the name of the custom transition visual state. + + + + + Gets/sets if the content is transitioning. + + + + + Reload the current transition if the content is the same. + + + + + Helper methods for UI-related tasks. + This class was obtained from Philip Sumi (a fellow WPF Disciples blog) + http://www.hardcodet.net/uploads/2009/06/UIHelper.cs + + + + + Finds a parent of a given item on the visual tree. + + The type of the queried item. + A direct or indirect child of the + queried item. + The first parent item that matches the submitted + type parameter. If not matching item can be found, a null + reference is being returned. + + + + Finds all Ancestors of a given item on the visual tree. + + A node in a visual tree + All ancestors in visual tree of element + + + + Finds a Child of a given item in the visual tree. + + A direct parent of the queried item. + The type of the queried item. + x:Name or Name of child. + The first parent item that matches the submitted type parameter. + If not matching item can be found, + a null parent is being returned. + + + + This method is an alternative to WPF's + method, which also + supports content elements. Keep in mind that for content element, + this method falls back to the logical tree of the element! + + The item to be processed. + The submitted item's parent, if available. Otherwise + null. + + + + Analyzes both visual and logical tree in order to find all elements of a given + type that are descendants of the item. + + The type of the queried items. + The root element that marks the source of the search. If the + source is already of the requested type, it will not be included in the result. + Sometimes it's better to search in the VisualTree (e.g. in tests) + All descendants of that match the requested type. + + + + This method is an alternative to WPF's + method, which also + supports content elements. Keep in mind that for content elements, + this method falls back to the logical tree of the element. + + The item to be processed. + Sometimes it's better to search in the VisualTree (e.g. in tests) + The submitted item's child elements, if available. + + + + Tries to locate a given item within the visual tree, + starting with the dependency object at a given position. + + The type of the element to be found + on the visual tree of the element at the given location. + The main element which is used to perform + hit testing. + The position to be evaluated on the origin. + + + + Gets the relative mouse position to the given handle in client coordinates. + + The handle for this method. + + + + Try to get the relative mouse position to the given handle in client coordinates. + + The handle for this method. + The relative mouse position to the given handle. + + + + Gets or sets the value indicating current light style for the minimize button. + + + + + Gets or sets the value indicating current light style for the maximize button. + + + + + Gets or sets the value indicating current light style for the close button. + + + + + Gets or sets the value indicating current dark style for the minimize button. + + + + + Gets or sets the value indicating current dark style for the maximize button. + + + + + Gets or sets the value indicating current dark style for the close button. + + + + + Gets or sets the value indicating current theme. + + + + + Gets or sets the minimize button tooltip. + + + + + Gets or sets the maximize button tooltip. + + + + + Gets or sets the close button tooltip. + + + + + Gets or sets the restore button tooltip. + + + + + Gets or sets the value indicating current theme. + + + + + Gets or sets the value indicating light theme template. + + + + + Gets or sets the value indicating light theme template. + + + + + Gets or sets the value indicating whether to show the separators. + + + + + Gets or sets the value indicating whether to show the last separator. + + + + + Gets or sets the value indicating separator height. + + + + + Gets or sets the value indicating whether to show the separator. + + + + + Doesn't overlay flyouts nor a hidden TitleBar. + + + + + Overlays opened controls. + + + + + Overlays a hidden TitleBar. + + + + + Refreshes the application settings property values from persistent storage. + + + + + Upgrades the application settings on loading. + + + + + Updates application settings to reflect a more recent installation of the application. + + + + + Stores the current values of the settings properties. + + + + + this settings class is the default way to save the placement of the window + + + + + Upgrades the application settings on loading. + + + + + Determining Ideal Text Color Based on Specified Background Color + http://www.codeproject.com/KB/GDI-plus/IdealTextColor.aspx + + The bg. + + + + + Converts a double representing either hour/minute/second to the corresponding angle. + + + + + Converts the value from true to false and false to true. + + + + + The math operations which can be used at the + + + + + MathConverter provides a value converter which can be used for math operations. + It can be used for normal binding or multi binding as well. + If it is used for normal binding the given parameter will be used as operands with the selected operation. + If it is used for multi binding then the first and second binding will be used as operands with the selected operation. + This class cannot be inherited. + + + + + MathAddConverter provides a multi value converter as a MarkupExtension which can be used for math operations. + This class cannot be inherited. + + + + + MathSubtractConverter provides a multi value converter as a MarkupExtension which can be used for math operations. + This class cannot be inherited. + + + + + MathMultiplyConverter provides a multi value converter as a MarkupExtension which can be used for math operations. + This class cannot be inherited. + + + + + MathDivideConverter provides a multi value converter as a MarkupExtension which can be used for math operations. + This class cannot be inherited. + + + + + Converts a String into a Visibility enumeration (and back) + The FalseEquivalent can be declared with the "FalseEquivalent" property + + + + + Initialize the properties with standard values + + + + + FalseEquivalent (default : Visibility.Collapsed => see Constructor) + + + + + Define whether the opposite boolean value is crucial (default : false) + + + + + Converts a Thickness to a new Thickness. It's possible to ignore a side With the IgnoreThicknessSide property. + + + + + Use all sides. + + + + + Ignore the left side. + + + + + Ignore the top side. + + + + + Ignore the right side. + + + + + Ignore the bottom side. + + + + Converts a value. + A converted value. If the method returns null, the valid null value is used. + The value produced by the binding source. + The type of the binding target property. + The converter parameter to use. + The culture to use in the converter. + + + Converts a value. + A converted value. If the method returns null, the valid null value is used. + The value that is produced by the binding target. + The type to convert to. + The converter parameter to use. + The culture to use in the converter. + + + + An object that represents the foreground color for a . + + + + + The ResourceDictionary that represents this Accent. + + + + + Gets/sets the name of the Accent. + + + + + Initializes a new instance of the Accent class. + + + + + Initializes a new instance of the Accent class. + + The name of the new Accent. + The URI of the accent ResourceDictionary. + + + + Initializes a new instance of the Accent class. + + The name of the new Accent. + The ResourceDictionary of the accent. + + + + Represents the background theme of the application. + + + + + The ResourceDictionary that represents this application theme. + + + + + Gets the name of the application theme. + + + + + Initializes a new instance of the AppTheme class. + + The name of the new AppTheme. + The URI of the AppTheme ResourceDictionary. + + + + Initializes a new instance of the AppTheme class. + + The name of the new AppTheme. + The ResourceDictionary of the accent. + + + + A class that allows for the detection and alteration of a theme and accent. + + + + + Gets a list of all of default accents. + + + + + Gets a list of all default themes. + + + + + Adds an accent with the given name and uniform resource identfier. + + The name of the new Accent. + The URI of the accent ResourceDictionary. + true if the accent does not exists and can be added. + + + + Adds an accent with the given name and resource dictionary. + + The name of the new Accent. + The ResourceDictionary of the accent. + true if the accent does not exists and can be added. + + + + Adds an app theme with the given name. + + The name of the new AppTheme. + The URI of the AppTheme ResourceDictionary. + true if the app theme does not exists and can be added. + + + + Adds an app theme with the given name. + + The name of the new AppTheme. + The ResourceDictionary of the accent. + true if the app theme does not exists and can be added. + + + + Gets app theme with the given resource dictionary. + + from which the theme should be retrieved. + AppTheme + + + + Gets app theme with the given name and theme type (light or dark). + + AppTheme + + + + Gets the inverse of the given . + This method relies on the "Dark" or "Light" affix to be present. + + The app theme. + The inverse or null if it couldn't be found. + + Returns BaseLight, if BaseDark is given or vice versa. + Custom Themes must end with "Dark" or "Light" for this to work, for example "CustomDark" and "CustomLight". + + + + + Gets the with the given name. + + The or null, if the app theme wasn't found + + + + Gets the with the given resource dictionary. + + from which the accent should be retrieved. + The or null, if the accent wasn't found. + + + + Determines whether the specified resource dictionary represents an . + + This might include runtime accents which do not have a resource uri. + + The resources. + true if the resource dictionary is an ; otherwise, false. + resources + + + + Gets a resource from the detected AppStyle. + + The window to check. If this is null, the Application's sources will be checked. + The key to check against. + The resource object or null, if the resource wasn't found. + + + + Change the theme for the whole application. + + + + + + + Change theme for the given window. + + + + + + + Change accent and theme for the whole application. + + The instance of Application to change. + The accent to apply. + The theme to apply. + + + + Change accent and theme for the given window. + + The Window to change. + The accent to apply. + The theme to apply. + + + + Changes the accent and theme of a ResourceDictionary directly. + + The ResourceDictionary to modify. + The accent to apply to the ResourceDictionary. + The theme to apply to the ResourceDictionary. + + + + Copies all resource keys from one resource to another. + + The source resource dictionary. + The destination resource dictionary. + + fromRD + or + toRD + + + + + Scans the window resources and returns it's accent and theme. + + + + + Scans the window resources and returns it's accent and theme. + + The Window to scan. + + + + Scans the application resources and returns it's accent and theme. + + The Application instance to scan. + + + + Scans a resources and returns it's accent and theme. + + The ResourceDictionary to check. + + + + This event fires if accent color and theme was changed + this should be using the weak event pattern, but for now it's enough + + + + + Invalidates global colors and resources. + Sometimes the ContextMenu is not changing the colors, so this will fix it. + + + + + Class which is used as argument for an event to signal theme changes. + + + + + Creates a new instance of this class. + + + + + The new theme. + + + + + The new accent + + + + + GeneratedInternalTypeHelper + + + + + CreateInstance + + + + + GetPropertyValue + + + + + SetPropertyValue + + + + + CreateDelegate + + + + + AddEventHandler + + +
+
diff --git a/packages/MahApps.Metro.1.6.5/lib/net47/MahApps.Metro.dll b/packages/MahApps.Metro.1.6.5/lib/net47/MahApps.Metro.dll new file mode 100644 index 0000000..76b445c Binary files /dev/null and b/packages/MahApps.Metro.1.6.5/lib/net47/MahApps.Metro.dll differ diff --git a/packages/MahApps.Metro.1.6.5/lib/net47/MahApps.Metro.xml b/packages/MahApps.Metro.1.6.5/lib/net47/MahApps.Metro.xml new file mode 100644 index 0000000..929b7d9 --- /dev/null +++ b/packages/MahApps.Metro.1.6.5/lib/net47/MahApps.Metro.xml @@ -0,0 +1,5549 @@ + + + + MahApps.Metro + + + + + This CommandTriggerAction can be used to bind any event on any FrameworkElement to an . + This trigger can only be attached to a FrameworkElement or a class deriving from FrameworkElement. + + This class is inspired from Laurent Bugnion and his EventToCommand. + http://www.mvvmlight.net + See license.txt in this solution or http://www.galasoft.ch/license_MIT.txt + + + + + Identifies the dependency property + + + + + Gets or sets the command that this trigger is bound to. + + + + + Identifies the dependency property + + + + + Gets or sets an object that will be passed to the attached to this trigger. + + + + + Updates all glow windows (visible, hidden, collapsed) + + + + + Sets the opacity to all glow windows + + + + + Starts the opacity storyboard 0 -> 1 + + + + + Shows all glow windows + + + + + Gets or sets the bindable Password property on the PasswordBox control. This is a dependency property. + + + + + Handles changes to the 'Password' attached property. + + + + + Handle the 'PasswordChanged'-event on the PasswordBox + + + + + Called after the behavior is attached to an AssociatedObject. + + + Override this to hook up functionality to the AssociatedObject. + + + + + Called when the behavior is being detached from its AssociatedObject, but before it has actually occurred. + + + Override this to unhook functionality from the AssociatedObject. + + + + + + Sets the first TabItem with Visibility="" as + the SelectedItem of the TabControl. + + + If there is no visible TabItem, null is set as the SelectedItem + + + + + + + + + + + + Represents a border whose contents are clipped within the bounds + of the border. The border may have rounded corners. + + + + + BorderThickness Dependency Property + + + + + Gets or sets the BorderThickness property. This dependency property + indicates the BorderThickness. + + + + + Checks if the given Thickness is valid or not + + Thickness + + + + + Padding Dependency Property + + + + + Gets or sets the Padding property. This dependency property + indicates the Padding. + + + + + CornerRadius Dependency Property + + + + + Gets or sets the CornerRadius property. This dependency property + indicates the CornerRadius of the border. + + + + + Checks if the given CornerRadius is valid or not + + CornerRadius + + + + + BorderBrush Dependency Property + + + + + Gets or sets the BorderBrush property. This dependency property + indicates the BorderBrush with which the Border is drawn. + + + + + Background Dependency Property + + + + + Gets or sets the Background property. This dependency property + indicates the Background with which the Background is drawn. + + + + + OptimizeClipRendering Dependency Property + + + + + Gets or sets the OptimizeClipRendering property. This dependency property + indicates whether the rendering of the clip should be optimized. When set to true, + In order to optimize the rendering of the clipped Child, + the background is rendered with the same brush as the border. Any other brush set for + the background will be ignored. The Child will be rendered on top of it. + This is done to prevent any gaps between the border the the clipped Child (this is + evidently visible if both the Border and the Child are of same color). + This works best when the Child does not have any level of transparency and is opaque. + + + + + Updates DesiredSize of the ClipBorder. Called by parent UIElement. This is the first pass of layout. + + + Border determines its desired size it needs from the specified border the child: its sizing + properties, margin, and requested size. + + Constraint size is an "upper limit" that the return value should not exceed. + The Decorator's desired size. + + + + ClipBorder computes the position of its single child and applies its child's alignments to the child. + + + The size reserved for this element by the parent + The actual ink area of the element, typically the same as finalSize + + + + Here the ClipBorder's Child, Border and Background are rendered. + + Drawing Context + + + + Generates a StreamGeometry. + + An already opened StreamGeometryContext. + Rectangle for geomentry conversion. + The core points of the border which needs to be used to create + the geometry + Result geometry. + + + + Encapsulates the details of each of the core points of the border which is calculated + based on the given CornerRadius, BorderThickness, Padding and a flag to indicate whether + the inner or outer border is to be calculated. + + CornerRadius + BorderThickness + Padding + Flag to indicate whether outer or inner border needs + to be calculated + + + + A few very useful extension methods + + + + + Returns whether or not two doubles are "close". + + The first double to compare. + The second double to compare. + + bool - the result of the AreClose comparision. + + + + + Returns whether or not the first double is less than the second double. + + The first double to compare. + The second double to compare. + + bool - the result of the LessThan comparision. + + + + + Returns whether or not the first double is greater than the second double. + + The first double to compare. + The second double to compare. + + bool - the result of the GreaterThan comparision. + + + + + Returns whether or not the double is "close" to 1. Same as AreClose(double, 1), + but this is faster. + + The double to compare to 1. + + bool - the result of the AreClose comparision. + + + + + IsZero - Returns whether or not the double is "close" to 0. Same as AreClose(double, 0), + but this is faster. + + The double to compare to 0. + + bool - the result of the AreClose comparision. + + + + + Compares two points for fuzzy equality. This function + helps compensate for the fact that double values can + acquire error when operated upon + + The first point to compare + The second point to compare + Whether or not the two points are equal + + + + Compares two Size instances for fuzzy equality. This function + helps compensate for the fact that double values can + acquire error when operated upon + + The first size to compare + The second size to compare + Whether or not the two Size instances are equal + + + + Compares two Vector instances for fuzzy equality. This function + helps compensate for the fact that double values can + acquire error when operated upon + + The first Vector to compare + The second Vector to compare + Whether or not the two Vector instances are equal + + + + Compares two rectangles for fuzzy equality. This function + helps compensate for the fact that double values can + acquire error when operated upon + + The first rectangle to compare + The second rectangle to compare + Whether or not the two rectangles are equal + + + + Faster check for NaN ( faster than double.IsNaN() ) + IEEE 754 : If the argument is any value in the range 0x7ff0000000000001L through 0x7fffffffffffffffL + or in the range 0xfff0000000000001L through 0xffffffffffffffffL, the result will be NaN. + + Value to check + + + + + Rounds the given value based on the DPI scale + + Value to round + DPI Scale + + + + + Verifies if this Thickness contains only valid values + The set of validity checks is passed as parameters. + + Thickness value + allows negative values + allows Double.NaN + allows Double.PositiveInfinity + allows Double.NegativeInfinity + Whether or not the thickness complies to the range specified + + + + Method to add up the left and right size as width, as well as the top and bottom size as height + + Thickness + Size + + + + Verifies if the Thickness contains only zero values + + Thickness + Size + + + + Verifies if all the values in Thickness are same + + Thickness + true if yes, otherwise false + + + + Verifies if this CornerRadius contains only valid values + The set of validity checks is passed as parameters. + + CornerRadius value + allows negative values + allows Double.NaN + allows Double.PositiveInfinity + allows Double.NegativeInfinity + Whether or not the CornerRadius complies to the range specified + + + + Verifies if the CornerRadius contains only zero values + + CornerRadius + Size + + + + Verifies if the CornerRadius contains same values + + CornerRadius + true if yes, otherwise false + + + + Deflates rectangle by given thickness + + Rectangle + Thickness + Deflated Rectangle + + + + Inflates rectangle by given thickness + + Rectangle + Thickness + Inflated Rectangle + + + + Verifies if the given brush is a SolidColorBrush and + its color does not include transparency. + + Brush + true if yes, otherwise false + + + + Verifies if the given brush is the same as the otherBrush. + + Brush + Brush + true if yes, otherwise false + + + + Defines the method that determines whether the command can execute in its current state. + + + true if this command can be executed; otherwise, false. + + Data used by the command. If the command does not require data to be passed, this object can be set to null. + + + + Defines the method to be called when the command is invoked. + + Data used by the command. If the command does not require data to be passed, this object can be set to null. + + + + The DependencyProperty for the CharacterCasing property. + Controls whether or not content is converted to upper or lower case + Default Value: CharacterCasing.Normal + + + + + Character casing of the Content + + + + + The DependencyProperty for the RecognizesAccessKey property. + Default Value: false + + + + + Determine if the inner ContentPresenter should use AccessText in its style + + + + + This custom popup is used by the validation error template. + It provides some additional nice features: + - repositioning if host-window size or location changed + - repositioning if host-window gets maximized and vice versa + - it's only topmost if the host-window is activated + + + + + Gets/sets if the popup can be closed by left mouse button down. + + + + + Called when a cell has just switched to edit mode. + + A reference to element returned by GenerateEditingElement. + The event args of the input event that caused the cell to go into edit mode. May be null. + The unedited value of the cell. + + + + Synchronizes the column property. Taken from Helper code for DataGrid. + + + + + Taken from Helper code for DataGrid. + + + + + The DependencyProperty for the StringFormat property. + + + + + Gets or sets the formatting for the displaying value. + + + + + + + + The DependencyProperty for the Minimum property. + + + + + The DependencyProperty for the Maximum property. + + + + + The DependencyProperty for the Interval property. + + + + + The DependencyProperty for the HideUpDownButtons property. + + + + + The DependencyProperty for the UpDownButtonsWidth property. + + + + + The DependencyProperty for the FontFamily property. + Default Value: SystemFonts.MessageFontFamily + + + + + The font family of the desired font. + + + + + The DependencyProperty for the FontSize property. + Default Value: SystemFonts.MessageFontSize + + + + + The size of the desired font. + + + + + The DependencyProperty for the FontStyle property. + Default Value: SystemFonts.MessageFontStyle + + + + + The style of the desired font. + + + + + The DependencyProperty for the FontWeight property. + Default Value: SystemFonts.MessageFontWeight + + + + + The weight or thickness of the desired font. + + + + + The DependencyProperty for the Foreground property. + Default Value: SystemColors.ControlTextBrush + + + + + An brush that describes the foreground color. This overrides the cell foreground inherited color. + + + + + Method used as property changed callback for properties which need RefreshCellContent to be called + + + + + Rebuilds the contents of a cell in the column in response to a binding change. + + The cell to update. + The name of the column property that has changed. + + + + The base class for dialogs. + + You probably don't want to use this class, if you want to add arbitrary content to your dialog, + use the class. + + + + + Gets/sets the dialog's title. + + + + + Gets/sets arbitrary content on top of the dialog. + + + + + Gets/sets arbitrary content below the dialog. + + + + + Gets or sets the size of the dialog title font. + + + The size of the dialog title font. + + + + + Gets or sets the size of the dialog message font. + + + The size of the dialog message font. + + + + + Initializes a new MahApps.Metro.Controls.BaseMetroDialog. + + The window that is the parent of the dialog. + The settings for the message dialog. + + + + Initializes a new MahApps.Metro.Controls.BaseMetroDialog. + + + + + With this method it's possible to return your own settings in a custom dialog. + + + + + + + This is called in the loaded event. + + + + + Waits for the dialog to become ready for interaction. + + A task that represents the operation and it's status. + + + + Requests an externally shown Dialog to close. Will throw an exception if the Dialog is inside of a MetroWindow. + + + + + A last chance virtual method for stopping an external dialog from closing. + + + + + + Gets the window that owns the current Dialog IF AND ONLY IF the dialog is shown externally. + + + + + Gets the window that owns the current Dialog IF AND ONLY IF the dialog is shown inside of a window. + + + + + Waits until this dialog gets unloaded. + + + + + + An implementation of BaseMetroDialog allowing arbitrary content. + + + + + Gets the default instance if the dialog coordinator, which can be injected into a view model. + + + + + Creates a LoginDialog inside of the current window. + + The window that is the parent of the dialog. + The title of the LoginDialog. + The message contained within the LoginDialog. + Optional settings that override the global metro dialog settings. + The text that was entered or null (Nothing in Visual Basic) if the user cancelled the operation. + + + + Creates a InputDialog inside of the current window. + + The MetroWindow + The title of the MessageDialog. + The message contained within the MessageDialog. + Optional settings that override the global metro dialog settings. + The text that was entered or null (Nothing in Visual Basic) if the user cancelled the operation. + + + + Creates a MessageDialog inside of the current window. + + The MetroWindow + The title of the MessageDialog. + The message contained within the MessageDialog. + The type of buttons to use. + Optional settings that override the global metro dialog settings. + A task promising the result of which button was pressed. + + + + Creates a ProgressDialog inside of the current window. + + The MetroWindow + The title of the ProgressDialog. + The message within the ProgressDialog. + Determines if the cancel button is visible. + Optional Settings that override the global metro dialog settings. + A task promising the instance of ProgressDialogController for this operation. + + + + Adds a Metro Dialog instance to the specified window and makes it visible asynchronously. + If you want to wait until the user has closed the dialog, use + You have to close the resulting dialog yourself with . + + The owning window of the dialog. + The dialog instance itself. + An optional pre-defined settings instance. + A task representing the operation. + The is already visible in the window. + + + + Adds a Metro Dialog instance of the given type to the specified window and makes it visible asynchronously. + If you want to wait until the user has closed the dialog, use + You have to close the resulting dialog yourself with . + + The owning window of the dialog. + An optional pre-defined settings instance. + A task with the dialog representing the operation. + + + + Hides a visible Metro Dialog instance. + + The window with the dialog that is visible. + The dialog instance to hide. + An optional pre-defined settings instance. + A task representing the operation. + + The is not visible in the window. + This happens if hasn't been called before. + + + + + Gets the current shown dialog in async way. + + The dialog owner. + + + + Creates a LoginDialog outside of the current window. + + The window that is the parent of the dialog. + The title of the LoginDialog. + The message contained within the LoginDialog. + Optional settings that override the global metro dialog settings. + The text that was entered or null (Nothing in Visual Basic) if the user cancelled the operation. + + + + Creates a InputDialog outside of the current window. + + The MetroWindow + The title of the MessageDialog. + The message contained within the MessageDialog. + Optional settings that override the global metro dialog settings. + The text that was entered or null (Nothing in Visual Basic) if the user cancelled the operation. + + + + Creates a MessageDialog ouside of the current window. + + The MetroWindow + The title of the MessageDialog. + The message contained within the MessageDialog. + The type of buttons to use. + Optional settings that override the global metro dialog settings. + A task promising the result of which button was pressed. + + + + Use the dialog coordinator to help you interfact with dialogs from a view model. + + + + + Shows the input dialog. + + Typically this should be the view model, which you register in XAML using . + The title of the MessageDialog. + The message contained within the MessageDialog. + Optional settings that override the global metro dialog settings. + The text that was entered or null (Nothing in Visual Basic) if the user cancelled the operation. + + + + Shows the input dialog. + + Typically this should be the view model, which you register in XAML using . + The title of the MessageDialog. + The message contained within the MessageDialog. + Optional settings that override the global metro dialog settings. + The text that was entered or null (Nothing in Visual Basic) if the user cancelled the operation. + + + + Creates a LoginDialog inside of the current window. + + Typically this should be the view model, which you register in XAML using . + The title of the LoginDialog. + The message contained within the LoginDialog. + Optional settings that override the global metro dialog settings. + The text that was entered or null (Nothing in Visual Basic) if the user cancelled the operation. + + + + Creates a LoginDialog outside of the current window. + + Typically this should be the view model, which you register in XAML using . + The title of the LoginDialog. + The message contained within the LoginDialog. + Optional settings that override the global metro dialog settings. + The text that was entered or null (Nothing in Visual Basic) if the user cancelled the operation. + + + + Creates a MessageDialog inside of the current window. + + Typically this should be the view model, which you register in XAML using . + The title of the MessageDialog. + The message contained within the MessageDialog. + The type of buttons to use. + Optional settings that override the global metro dialog settings. + A task promising the result of which button was pressed. + + + + Creates a MessageDialog outside of the current window. + + Typically this should be the view model, which you register in XAML using . + The title of the MessageDialog. + The message contained within the MessageDialog. + The type of buttons to use. + Optional settings that override the global metro dialog settings. + A task promising the result of which button was pressed. + + + + Creates a ProgressDialog inside of the current window. + + Typically this should be the view model, which you register in XAML using . + The title of the ProgressDialog. + The message within the ProgressDialog. + Determines if the cancel button is visible. + Optional Settings that override the global metro dialog settings. + A task promising the instance of ProgressDialogController for this operation. + + + + Adds a Metro Dialog instance to the specified window and makes it visible asynchronously. + You have to close the resulting dialog yourself with . + + Typically this should be the view model, which you register in XAML using . + The dialog instance itself. + An optional pre-defined settings instance. + A task representing the operation. + The is already visible in the window. + + + + Hides a visible Metro Dialog instance. + + Typically this should be the view model, which you register in XAML using . + The dialog instance to hide. + An optional pre-defined settings instance. + A task representing the operation. + + The is not visible in the window. + This happens if hasn't been called before. + + + + + Gets the current shown dialog. + + Typically this should be the view model, which you register in XAML using . + + + + InputDialog + + + + + InitializeComponent + + + + + LoginDialog + + + + + InitializeComponent + + + + + An internal control that represents a message dialog. Please use MetroWindow.ShowMessage instead! + + + MessageDialog + + + + + InitializeComponent + + + + + An enum representing the result of a Message Dialog. + + + + + An enum representing the different button states for a Message Dialog. + + + + + Just "OK" + + + + + "OK" and "Cancel" + + + + + An enum representing the different choices for a color scheme in a Metro Dialog. + + + + + A class that represents the settings used by Metro Dialogs. + + + + + Gets or sets wheater the owner of the dialog can be closed. + + + + + Gets or sets the text used for the Affirmative button. For example: "OK" or "Yes". + + + + + Enable or disable dialog hiding animation + "True" - play hiding animation. + "False" - skip hiding animation. + + + + + Enable or disable dialog showing animation. + "True" - play showing animation. + "False" - skip showing animation. + + + + + Gets or sets a token to cancel the dialog. + + + + + Gets or sets whether the metro dialog should use the default black/white appearance (theme) or try to use the current accent. + + + + + Gets or sets a custom resource dictionary which can contains custom styles, brushes or something else. + + + + + Gets or sets which button should be focused by default + + + + + Gets or sets the default text (just the inputdialog needed) + + + + + Gets or sets the size of the dialog message font. + + + The size of the dialog message font. + + + + + Gets or sets the dialog result when the user cancelled the dialog with 'ESC' key + + If the value is the default behavior is determined + by the . + + + + +
+ + + + +
+
+ + + Gets or sets the size of the dialog title font. + + + The size of the dialog title font. + + + + + Gets or sets the text used for the first auxiliary button. + + + + + Gets or sets the maximum height. (Default is unlimited height, Double.NaN) + + + + + Gets or sets the text used for the Negative button. For example: "Cancel" or "No". + + + + + Gets or sets the text used for the second auxiliary button. + + + + + If set, stops standard resource dictionaries being applied to the dialog. + + + + + An internal control that represents a message dialog. Please use MetroWindow.ShowMessage instead! + + + ProgressDialog + + + + + InitializeComponent + + + + + A class for manipulating an open ProgressDialog. + + + + + This event is raised when the associated was closed programmatically. + + + + + This event is raised when the associated was cancelled by the user. + + + + + Gets if the Cancel button has been pressed. + + + + + Gets if the wrapped ProgressDialog is open. + + + + + Sets the ProgressBar's IsIndeterminate to true. To set it to false, call SetProgress. + + + + + Sets if the Cancel button is visible. + + + + + + Sets the dialog's progress bar value and sets IsIndeterminate to false. + + The percentage to set as the value. + + + + Gets/Sets the minimum restriction of the progress Value property + + + + + Gets/Sets the maximum restriction of the progress Value property + + + + + Sets the dialog's message content. + + The message to be set. + + + + Sets the dialog's title. + + The title to be set. + + + + Sets the dialog's progress bar brush + + The brush to use for the progress bar's foreground + + + + Begins an operation to close the ProgressDialog. + + A task representing the operation. + + + + The DependencyProperty for the ContentTemplate property. + + + + + The DependencyProperty for the ContentTemplateSelector property. + + + + + The DependencyProperty for the ContentStringFormat property. + + + + + Gets or sets the Content of this control.. + + + + + ContentTemplate is the template used to display the content of the control. + + + + + ContentTemplateSelector allows to provide custom logic for choosing the template used to display the content of the control. + + + This property is ignored if is set. + + + + + ContentStringFormat is the format used to display the content of the control as a string + + + This property is ignored if is set. + + + + + Reflects the parameter to pass to the CommandProperty upon execution. + + + + + Gets or sets the target element on which to fire the command. + + + + + Get or sets the Command property. + + + + + Indicates whether the Menu is visible. + + + + + Gets or sets an extra tag. + + + + + Gets or sets the dimension of children stacking. + + + + + Gets or sets the Content used to generate the icon part. + + + + + Gets or sets the ContentTemplate used to display the content of the icon part. + + + + + Gets/sets the button style. + + + + + Gets/sets the menu style. + + + + + Gets/sets the brush of the button arrow icon. + + + + + Gets/sets the brush of the button arrow icon if the mouse is over the drop down button. + + + + + Gets/sets the brush of the button arrow icon if the arrow button is pressed. + + + + + Gets/sets the visibility of the button arrow icon. + + + + Invoked when the property changes. + Information about the change. + + + + Executes the specified action asynchronously with the DispatcherPriority.Background on the thread that the Dispatcher was created on. + + The dispatcher object where the action runs. + An action that takes no parameters. + The dispatcher priority. + + + + A control that imitate a slideshow with back/forward buttons. + + + + + To counteract the double Loaded event issue. + + + + + Coerce SelectedIndexProperty's value. + + The object that the property exists on. + The new value of the property, prior to any coercion attempt. + The coerced value (with appropriate type). + + + + Computes the transition when changing selected index. + + Previous selected index. + New selected index. + + + + Gets the navigation buttons. + + Previous button. + Next button. + Inactive buttons. + + + + Applies actions to navigation buttons. + + Action applied to the previous button. + Action applied to the next button. + Action applied to the inactive buttons. + Any action is null. + + + + Sets the visibility of navigation buttons. + + Visibility of active buttons. + + + + Changes the current slide to the previous item. + + + + + Changes the current to the next item. + + + + + Brings the control buttons (next/previous) into view. + + + + + Removes the control buttons (next/previous) from view. + + + + + Gets or sets a value indicating whether the border for mouse over state is enabled or not. + + + + + Gets or sets the mouse hover border brush. + + + + + Gets or sets the mouse hover border thickness. + + + + + Gets/sets the text that is displayed in the FlipView's banner. + + + + + Gets/sets whether the FlipView's banner is visible. + + + + + Gets or sets a value indicating whether the navigation is circular, so you get the first after last and the last before first. + + + + + Gets/sets whether the FlipView's NavigationButton is visible. + + + + + A sliding panel control that is hosted in a MetroWindow via a FlyoutsControl. + + + + + + + An event that is raised when IsOpen changes. + + + + + An event that is raised when the closing animation has finished. + + + + + Gets/sets if the title is visible in this flyout. + + + + + Gets/sets if the close button is visible in this flyout. + + + + + Gets/sets if the close button is a cancel button in this flyout. + + + + + Gets/sets a command which will be executed if the close button was clicked. + Note that this won't execute when is set to false. + + + + + Gets/sets the command parameter which will be passed by the CloseCommand. + + + + + Gets/sets a command which will be executed if the close button was clicked. + + + + + Gets/sets whether this flyout is visible. + + + + + Gets/sets whether this flyout uses the open/close animation when changing the property. (default is true) + + + + + Gets/sets whether this flyout animates the opacity of the flyout when opening/closing. + + + + + Gets/sets whether this flyout stays open when the user clicks outside of it. + + + + + Gets/sets the mouse button that closes the flyout on an external mouse click. + + + + + Gets/sets whether this flyout is modal. + + + + + Gets/sets this flyout's position in the FlyoutsControl/MetroWindow. + + + + + Gets or sets the theme of this flyout. + + + + + Gets or sets the focused element. + + + + + Gets or sets a value indicating whether the flyout should auto close after AutoCloseInterval has passed. + + + + + Gets or sets the time in milliseconds when the flyout should auto close. + + + + + Gets or sets a value indicating whether the flyout should try focus an element. + + + + + A FlyoutsControl is for displaying flyouts in a MetroWindow. + + + + + + Gets/sets whether is ignored and all flyouts behave as if it was set to the value of this property. + + + + + Gets/sets whether is ignored and all flyouts behave as if it was set false. + + + + + Adapts the Flyout's theme to the theme of its host window. + + + + + Adapts the Flyout's theme to the theme of its host window, but inverted. + This theme can only be applied if the host window's theme abides the "Dark" and "Light" affix convention. + (see for more infos. + + + + + The dark theme. This is the default theme. + + + + + The flyouts theme will match the host window's accent color. + + + + + GlowWindow + + + + + InitializeComponent + + + + + The HamburgerMenu is based on a SplitView control. By default it contains a HamburgerButton and a ListView to display menu items. + + + The HamburgerMenu is based on a SplitView control. By default it contains a HamburgerButton and a ListView to display menu items. + + + The HamburgerMenu is based on a SplitView control. By default it contains a HamburgerButton and a ListView to display menu items. + + + The HamburgerMenu is based on a SplitView control. By default it contains a HamburgerButton and a ListView to display menu items. + + + The HamburgerMenu is based on a SplitView control. By default it contains a HamburgerButton and a ListView to display menu items. + + + + + Initializes a new instance of the class. + + + + + Override default OnApplyTemplate to capture children controls + + + + + Event raised when an item is clicked + + + + + Event raised when an options' item is clicked + + + + + Event raised when an item is invoked + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Gets or sets a template for the hamburger icon. + + + + + Identifies the dependency property. + + + + + Gets or sets a template for the hamburger icon. + + + + + Gets or sets main button's width. + + + + + Gets or sets main button's height. + + + + + Gets or sets main button's margin. + + + + + Gets or sets main button's visibility. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Gets or sets an object source used to generate the content of the options. + + + + + Gets or sets the Style used for each item in the options. + + + + + Gets or sets the DataTemplate used to display each item in the options. + + + + + Gets or sets the DataTemplateSelector used to display each item in the options. + + + + + Gets the collection used to generate the content of the option list. + + + Exception thrown if OptionsListView is not yet defined. + + + + + Gets or sets the visibility of the options menu. + + + + + Gets or sets the selected options menu item. + + + + + Gets or sets the selected options menu index. + + + + + Gets or sets a command which will be executed if an options item is clicked by the user. + + + + + Gets or sets the command parameter which will be passed by the OptionsItemCommand. + + + + + Executes the options item command which can be set by the user. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Gets or sets the width of the pane when it's fully expanded. + + + + + Gets or sets a value that specifies whether the pane is shown on the right or left side of the control. + + + + + Gets or sets a value that specifies how the pane and content areas are shown. + + + + + Gets or sets the width of the pane in its compact display mode. + + + + + Gets or sets the Brush to apply to the background of the Pane area of the control. + + + + + Gets or sets the Brush to apply to the foreground of the Pane area of the control. + + + + + Gets or sets a value indicating whether the pane is expanded to its full width. + + + + + Gets or sets an object source used to generate the content of the menu. + + + + + Gets or sets the Style used for each item. + + + + + Gets or sets the DataTemplate used to display each item. + + + + + Gets or sets the DataTemplateSelector used to display each item. + + + + + Gets the collection used to generate the content of the items list. + + + Exception thrown if ButtonsListView is not yet defined. + + + + + Gets or sets the selected menu item. + + + + + Gets or sets the selected menu index. + + + + + Gets or sets a command which will be executed if an item is clicked by the user. + + + + + Gets or sets the command parameter which will be passed by the ItemCommand. + + + + + Gets or sets wheather the ScrollBar of the HamburgerMenu is on the left side or on the right side. + + + + + Gets or sets wheather a selection indicator will be shown on the HamburgerMenuItem. + + + + + Gets or sets the default FocusVisualStyle for a HamburgerMenuItem. + This style can be override at the HamburgerMenuItem style by setting the FocusVisualStyle property. + + + + + Executes the item command which can be set by the user. + + + + + EventArgs used for the ItemClick and OptionsItemClick event. + + + + + Gets the clicked item + + + + + EventArgs used for the ItemInvoked event. + + + + + Gets the invoked item + + + + + Gets a value indicating whether the invoked item is an options item + + + + + The HamburgerMenuGlyphItem provides a glyph based implementation for HamburgerMenu entries. + + + + + Identifies the dependency property. + + + + + Gets or sets a value that specifies the glyph to use from Segoe MDL2 Assets font. + + + + + The HamburgerMenuIconItem provides an icon based implementation for HamburgerMenu entries. + + + + + Identifies the dependency property. + + + + + Gets or sets a value that specifies an user specific object which can be used as icon. + + + + + The HamburgerMenuImageItem provides an image based implementation for HamburgerMenu entries. + + + + + Identifies the dependency property. + + + + + Gets or sets a value that specifies a bitmap to display with an Image control. + + + + + The HamburgerMenuItem provides an implementation for HamburgerMenu entries. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Gets or sets a value that specifies label to display. + + + + + Gets or sets a value that specifies the page to navigate to (if you use the HamburgerMenu with a Frame content) + + + + + Gets or sets a value that specifies an user specific value. + + + + + Gets or sets a command which will be executed if an item is clicked by the user. + + + + + Gets or sets the command parameter which will be passed by the Command. + + + + + Gets or sets the element on which to raise the specified command. + + + Element on which to raise a command. + + + + + Gets or sets a value indicating whether this item is enabled in the user interface (UI). This is a dependency property. + + + true if the item is enabled; otherwise, false. The default value is true. + + + + + Gets or sets a value that specifies ToolTip to display. + + + + + Executes the command which can be set by the user. + + + + + The HamburgerMenuItemCollection provides typed collection of HamburgerMenuItem. + + + + + Represents an hour comparison operation that ensures that 12 is smaller than 1. + This ensures that in the control the first hour that is selectable is 12 (AM/PM). + + + This ensures that the first hour that is selectable is 12 (AM/PM).

+ This comparer is used only if in the corresponding the value for is false. +
+
+ + + Overrides the text case behavior for certain buttons. + When set to true, the text case will be preserved and won't be changed to upper or lower case. + + + + + DependencyProperty for property. + + + + + The CornerRadius property allows users to control the roundness of the button corners independently by + setting a radius value for each corner. Radius values that are too large are scaled so that they + smoothly blend from corner to corner. (Can be used e.g. at MetroButton style) + Description taken from original Microsoft description :-D + + + + + A helper class that provides various attached properties for the control. + + + + + Gets the Maximum number of characters the TextBox can accept. + + + + + Sets the Maximum number of characters the TextBox can accept. + + + + + Gets the Character casing of the TextBox. + + + + + Sets the Character casing of the TextBox. + + + + + A helper class that provides various controls. + + + + + Gets the value to handle the visibility of the DisabledVisualElement in the template. + + + + + Sets the value to handle the visibility of the DisabledVisualElement in the template. + + + + + The DependencyProperty for the CharacterCasing property. + Controls whether or not content is converted to upper or lower case + + + + + Gets the character casing of the control + + + + + Sets the character casing of the control + + + + + This property can be used to set the button width (PART_ClearText) of TextBox, PasswordBox, ComboBox, NumericUpDown + + + + + Sets the brush used to draw the focus border. + + + + + Gets the brush used to draw the focus border. + + + + + Sets the brush used to draw the mouse over brush. + + + + + Gets the brush used to draw the mouse over brush. + + + + + DependencyProperty for property. + + + + + The CornerRadius property allows users to control the roundness of the button corners independently by + setting a radius value for each corner. Radius values that are too large are scaled so that they + smoothly blend from corner to corner. (Can be used e.g. at MetroButton style) + Description taken from original Microsoft description :-D + + + + + Gets or sets a value indicating whether the child contents of the control are not editable. + + + + + Gets a value indicating whether the child contents of the control are not editable. + + + + + Sets a value indicating whether the child contents of the control are not editable. + + + + + Save the DataGrid. + + + + + Get the DataGrid. + + + + + Gets the value to define the DataGridCell selection behavior. + + + + + Sets the value to define the DataGridCell selection behavior. + + + + + Gets the value to define the DataGridCell selection behavior. + + + + + Sets the value to define the DataGridCell selection behavior. + + + + + Gets a value which indicates the preview cell editing is enabled or not. + + + + + Sets a value which indicates the preview cell editing is enabled or not. + + + + + Gets the value to define the DataGridRow selection behavior. + + + + + Sets the value to define the DataGridRow selection behavior. + + + + + A helper class that provides various attached properties for the Expander control. + + + + + + Gets the toggle button style used for the ExpandDirection Up. + + + + + Sets the toggle button style used for the ExpandDirection Up. + + + + + Gets the toggle button style used for the ExpandDirection Down. + + + + + Sets the toggle button style used for the ExpandDirection Down. + + + + + Gets the toggle button style used for the ExpandDirection Left. + + + + + Sets the toggle button style used for the ExpandDirection Left. + + + + + Gets the toggle button style used for the ExpandDirection Right. + + + + + Sets the toggle button style used for the ExpandDirection Right. + + + + + Gets or sets the background brush which will be used for the active selected item (if the keyboard focus is within). + + + + + Gets the brush the background brush which will be used for the active selected item (if the keyboard focus is within). + + + + + Sets the brush the background brush which will be used for the active selected item (if the keyboard focus is within). + + + + + Gets or sets the foreground brush which will be used for the active selected item (if the keyboard focus is within). + + + + + Gets the brush the foreground brush which will be used for the active selected item (if the keyboard focus is within). + + + + + Sets the brush the foreground brush which will be used for the active selected item (if the keyboard focus is within). + + + + + Gets or sets the background brush which will be used for a selected item. + + + + + Gets the background brush which will be used for a selected item. + + + + + Sets the background brush which will be used for a selected item. + + + + + Gets or sets the foreground brush which will be used for a selected item. + + + + + Gets the foreground brush which will be used for a selected item. + + + + + Sets the foreground brush which will be used for a selected item. + + + + + Gets or sets the background brush which will be used for an mouse hovered item. + + + + + Gets the background brush which will be used for an mouse hovered item. + + + + + Sets the background brush which will be used for an mouse hovered item. + + + + + Gets or sets the background brush which will be used for an mouse hovered and selected item. + + + + + Gets the background brush which will be used for an mouse hovered and selected item. + + + + + Sets the background brush which will be used for an mouse hovered and selected item. + + + + + Gets or sets the background brush which will be used for selected disabled items. + + + + + Gets the background brush which will be used for selected disabled items. + + + + + Sets the background brush which will be used for selected disabled items. + + + + + Gets or sets the foreground brush which will be used for selected disabled items. + + + + + Gets the foreground brush which will be used for selected disabled items. + + + + + Sets the foreground brush which will be used for selected disabled items. + + + + + Gets or sets the background brush which will be used for disabled items. + + + + + Gets the background brush which will be used for disabled items. + + + + + Sets the background brush which will be used for disabled items. + + + + + Gets or sets the foreground brush which will be used for disabled items. + + + + + Gets the foreground brush which will be used for disabled items. + + + + + Sets the foreground brush which will be used for disabled items. + + + + + Change the value of the slider if the user rotates the mouse wheel by the value defined for + + + + + Change the value of the slider if the user rotates the mouse wheel by the value defined for + + + + + Do not change the value of the slider if the user rotates the mouse wheel. + + + + + Change the value of the slider only if the control is focused. + + + + + Changes the value of the slider if the mouse pointer is over this element. + + + + + Gets the content of the RevealButton. + + + + + Sets the content of the RevealButton. + + + + + Gets the data template used to display the content of the RevealButton. + + + + + Sets the data template used to display the content of the RevealButton. + + + + + This property can be used to set vertical scrollbar left side from the tabpanel (look at MetroAnimatedSingleRowTabControl) + + + + + Identifies the VerticalScrollBarOnLeftSide attached property. + This property can be used to set vertical scrollbar left side from the tabpanel (look at MetroAnimatedSingleRowTabControl) + + + + + Gets whether the vertical ScrollBar is on the left side or not. + + + + + Sets whether the vertical ScrollBar should be on the left side or not. + + + + + Identifies the IsHorizontalScrollWheelEnabled attached property. + + + + + Gets whether the ScrollViewer is scrolling horizontal by using the mouse wheel. + + + + + Sets whether the ScrollViewer should be scroll horizontal by using the mouse wheel. + + + + + Gets or sets the brush of the thumb. + + + + + Gets the brush of the thumb. + + + + + Sets the brush of the thumb. + + + + + Gets or sets the brush of the thumb if the mouse is over the slider. + + + + + Gets the brush of the thumb if the mouse is over the slider. + + + + + Sets the brush of the thumb if the mouse is over the slider. + + + + + Gets or sets the brush of the thumb if the mouse button is pressed. + + + + + Gets the brush of the thumb if the mouse button is pressed. + + + + + Sets the brush of the thumb if the mouse button is pressed. + + + + + Gets or sets the brush of the thumb if the slider is disabled. + + + + + Gets the brush of the thumb if the slider is disabled. + + + + + Sets the brush of the thumb if the slider is disabled. + + + + + Gets or sets the brush of the track. + + + + + Gets the brush of the track. + + + + + Sets the brush of the track. + + + + + Gets or sets the brush of the track if the mouse is over the slider. + + + + + Gets the brush of the track if the mouse is over the slider. + + + + + Sets the brush of the track if the mouse is over the slider. + + + + + Gets or sets the brush of the track if the mouse button is pressed. + + + + + Gets the brush of the track if the mouse button is pressed. + + + + + Sets the brush of the track if the mouse button is pressed. + + + + + Gets or sets the brush of the track if the slider is disabled. + + + + + Gets the brush of the track if the slider is disabled. + + + + + Sets the brush of the track if the slider is disabled. + + + + + Gets or sets the brush of the track value. + + + + + Gets the brush of the track value. + + + + + Sets the brush of the track value. + + + + + Gets or sets the brush of the track value if the mouse is over the slider. + + + + + Gets the brush of the track value if the mouse is over the slider. + + + + + Sets the brush of the track value if the mouse is over the slider. + + + + + Gets or sets the brush of the track value if the mouse button is pressed. + + + + + Gets the brush of the track value if the mouse button is pressed. + + + + + Sets the brush of the track value if the mouse button is pressed. + + + + + Gets or sets the brush of the track value if the slider is disabled. + + + + + Gets the brush of the track value if the slider is disabled. + + + + + Sets the brush of the track value if the slider is disabled. + + + + + Gets/Sets the type how the value will be changed if the user rotates the mouse wheel. + + + + + Gets/Sets the type how the value will be changed if the user rotates the mouse wheel. + + + + + Gets/Sets the value when the slider will be changed. Possible values are if the slider is focused or if the mouse is over the slider. + + + + + Gets/Sets the value when the slider will be changed. Possible values are if the slider is focused or if the mouse is over the slider. + + + + + Specifies the underline position of a TabControl. + + + + Sets the Style and Template property to null. + + Removing a TabItem in code behind can produce such nasty output + System.Windows.Data Warning: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.TabControl', AncestorLevel='1''. BindingExpression:Path=Background; DataItem=null; target element is 'TabItem' (Name=''); target property is 'Background' (type 'Brush') + or + System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.TabControl', AncestorLevel='1''. BindingExpression:Path=(0); DataItem=null; target element is 'TabItem' (Name=''); target property is 'UnderlineBrush' (type 'Brush') + + This is a timing problem in WPF of the binding mechanism itself. + + To avoid this, we can set the Style and Template to null. + + + + Identifies the CloseButtonEnabled attached property. + + + + + Gets whether a close button should be visible or not. + + + + + Sets whether a close button should be visible or not. + + + + + Identifies the CloseTabCommand attached property. + + + + + Gets a command for the TabItem which executes if the TabItem will be closed. + + + + + Sets a command for the TabItem which executes if the TabItem will be closed. + + + + + Identifies the CloseTabCommandParameter attached property. + + + + + Gets a command parameter for the TabItem that will be passed to the CloseTabCommand. + + + + + Sets a command parameter for the TabItem that will be passed to the CloseTabCommand. + + + + + Defines whether the underline below the is shown or not. + + + + + Defines whether the underline below the or is shown or not. + + + + + Defines the underline brush below the or . + + + + + Defines the underline brush below the or of an selected item. + + + + + Defines the underline brush below the or if the mouse is over an item. + + + + + Defines the underline brush below the or if the mouse is over a selected item. + + + + + This property can be used to set the Transition for animated TabControls + + + + + A helper class that provides various attached properties for the TextBox control. + + + Password watermarking code from: http://prabu-guru.blogspot.com/2010/06/how-to-add-watermark-text-to-textbox.html + + + + + The clear text button behavior property. It sets a click event to the button if the value is true. + + + + + This property can be used to set the button width (PART_ClearText) of TextBox, PasswordBox, ComboBox, NumericUpDown + + + + + This property can be used to retrieve the watermark using the of bound property. + + + Setting this property to true will uses reflection. + + + + + Indicates if a TextBox or RichTextBox should use SpellCheck context menu + + + + + Indicates if the watermark is automatically retrieved by using the of the bound property. + + This attached property uses reflection; thus it might reduce the performance of the application. + The auto-watermak does work for the following controls: + In the following case no custom watermark is shown + + There is no binding + Binding path errors + Binding to a element of a collection without using a property of that element Binding Path=Collection[0] use: Binding Path=Collection[0].SubProperty + The bound property does not have a + + + + + Gets a value that indicates the horizontal alignment of the watermark. + + + One of the values that specifies the desired alignment. The default is . + + + + + Sets a value that indicates the horizontal alignment of the watermark. + + + + + Gets the text trimming behavior to employ when watermark overflows the content area. + + + One of the values that specifies the text trimming behavior to employ. The default is . + + + + + Sets the text trimming behavior to employ when watermark overflows the content area. + + + + + Gets how the watermark should wrap text. + + One of the values. The default is . + + + + + Sets how the watermark should wrap text. + + + + + Gets if the attached TextBox has text. + + + + + Gets the clear text button visibility / feature. Can be used to enable text deletion. + + + + + Sets the clear text button visibility / feature. Can be used to enable text deletion. + + + + + Gets the text button visibility. + + + + + Sets the text button visibility. + + + + + Gets the buttons placement variant. + + + + + Sets the buttons placement variant. + + + + + Gets the clear text button behavior. + + + + + Sets the clear text button behavior. + + + + + ButtonContentTemplate is the template used to display the content of the ClearText button. + + + + + This property can be used to handle the style for CheckBox and RadioButton + LeftToRight means content left and button right and RightToLeft vise versa + + + + + This property can be used to handle the style for CheckBox and RadioButton + LeftToRight means content left and button right and RightToLeft vise versa + + + + + A MetroTabControl (Pivot) that wraps TabItem/MetroTabItem headers on a single row. + + + + + Initializes a new instance of the MahApps.Metro.Controls.MetroAnimatedSingleRowTabControl class. + + + + + A MetroTabControl (Pivot) that uses a TransitioningContentControl to animate the contents of a TabItem/MetroTabItem. + + + + + Initializes a new instance of the MahApps.Metro.Controls.MetroAnimatedTabControl class. + + + + + Originally from http://xamlcoder.com/blog/2010/11/04/creating-a-metro-ui-style-control/ + + + + + Creates AutomationPeer () + + + + + The MetroHeaderAutomationPeer class exposes the type to UI Automation. + + + + + A reimplementation of NavigationWindow based on MetroWindow. + + + + MetroNavigationWindow + + + + + Gets an IEnumerable that you use to enumerate the entries in back navigation history for a NavigationWindow. + + + + + + Gets an IEnumerable that you use to enumerate the entries in back navigation history for a NavigationWindow. + + + + + + Gets the NavigationService that is used by this MetroNavigationWindow to provide navigation services to its content. + + + + + + Gets a value that indicates whether there is at least one entry in back navigation history. + + + + + + Gets a value that indicates whether there is at least one entry in forward navigation history. + + + + + + Gets or sets the base uniform resource identifier (URI) of the current context. + + + + + + Gets or sets the uniform resource identifier (URI) of the current content, or the URI of new content that is currently being navigated to. + + + + + + Adds an entry to back navigation history that contains a CustomContentState object. + + A CustomContentState object that represents application-defined state that is associated with a specific piece of content. + + + + + Removes the most recent journal entry from back history. + + The most recent JournalEntry in back navigation history, if there is one. + + + + + Navigates to the most recent item in back navigation history. + + + + + + Navigates to the most recent item in forward navigation history. + + + + + + Navigates asynchronously to content that is contained by an object. + + An Object that contains the content to navigate to. + true if a navigation is not canceled; otherwise, false. + + + + + Navigates asynchronously to content that is specified by a uniform resource identifier (URI). + + A Uri object initialized with the URI for the desired content. + true if a navigation is not canceled; otherwise, false. + + + + + Navigates asynchronously to content that is contained by an object, and passes an object that contains data to be used for processing during navigation. + + An Object that contains the content to navigate to. + A Object that contains data to be used for processing during navigation. + true if a navigation is not canceled; otherwise, false. + + + + + Navigates asynchronously to source content located at a uniform resource identifier (URI), and pass an object that contains data to be used for processing during navigation. + + A Uri object initialized with the URI for the desired content. + A Object that contains data to be used for processing during navigation. + true if a navigation is not canceled; otherwise, false. + + + + + Stops further downloading of content for the current navigation request. + + + + + + Occurs when navigation to a content fragment begins, which occurs immediately, if the desired fragment is in the current content, or after the source XAML content has been loaded, if the desired fragment is in different content. + + + + + + Occurs when a new navigation is requested. + + + + + + Occurs when an error is raised while navigating to the requested content. + + + + + + Occurs periodically during a download to provide navigation progress information. + + + + + + Occurs when the StopLoading method is called, or when a new navigation is requested while a current navigation is in progre + + + + + + Occurs when the content that is being navigated to has been found, and is available from the PageContent property, although it may not have completed loading + + + + + + Occurs when content that was navigated to has been loaded, parsed, and has begun rendering. + + + + + + InitializeComponent + + + + + A metrofied ProgressBar. + + + + + + Gets/sets the diameter of the ellipses used in the indeterminate animation. + + + + + Gets/sets the offset of the ellipses used in the indeterminate animation. + + + + + A standard MetroTabControl (Pivot). + + + + + Initializes a new instance of the MahApps.Metro.Controls.MetroTabControl class. + + + + + A base class for every MetroTabControl (Pivot). + + + + + Get/sets the command that executes when a MetroTabItem's close button is clicked. + + + + + An event that is raised when a TabItem is closed. + + + + + Event args that is created when a TabItem is closed. + + + + + Gets the MetroTabItem that will be closed. + + + + + An extended TabItem with a metro style. + + + + + Gets/sets whether the Close Button is visible. + + + + + Gets/sets the command that is executed when the Close Button is clicked. + + + + + Gets/sets the command parameter which is passed to the close button command. + + + + + Gets/sets the Close Button Margin. + + + + + The MetroThumbContentControl control can be used for titles or something else and enables basic drag movement functionality. + + + + + Adds or remove a DragStartedEvent handler + + + + + Adds or remove a DragDeltaEvent handler + + + + + Adds or remove a DragCompletedEvent handler + + + + + DependencyProperty for the IsDragging property. + + + + + Indicates that the left mouse button is pressed and is over the MetroThumbContentControl. + + + + + The MetroThumbContentControlAutomationPeer class exposes the type to UI Automation. + + + + + An extended, metrofied Window class. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Identifies the dependency property. + + + + + Allows easy handling of window commands brush. Theme is also applied based on this brush. + + + + + Gets/sets whether the window's entrance transition animation is enabled. + + + + + Gets/sets the FlyoutsControl that hosts the window's flyouts. + + + + + Gets/sets the icon content template to show a custom icon. + + + + + Gets/sets the title content template to show a custom title. + + + + + Gets/sets the left window commands that hosts the user commands. + + + + + Gets/sets the right window commands that hosts the user commands. + + + + + Gets/sets the window button commands that hosts the min/max/close commands. + + + + + Gets/sets whether the window will ignore (and overlap) the taskbar when maximized. + + + + + Gets or sets resize border thickness + + + + + Using a DependencyProperty as the backing store for ResizeBorderTickness. This enables animation, styling, binding, etc... + + + + + Gets/sets the brush used for the titlebar's foreground. + + + + + Gets/sets whether the window will save it's position between loads. + + + + + Gets the window placement settings (can be overwritten). + + + + + Get/sets whether the titlebar icon is visible or not. + + + + + Get/sets whether dialogs show over the title bar. + + + + + Gets whether one or more dialogs are shown. + + + + + Gets/sets edge mode of the titlebar icon. + + + + + Gets/sets bitmap scaling mode of the titlebar icon. + + + + + Gets/sets icon scaling mode of the titlebar. + + + + + Gets/sets whether the TitleBar is visible or not. + + + + + Gets/sets whether the WindowStyle is None or not. + + + + + Gets/sets if the minimize button is visible. + + + + + Gets/sets if the Maximize/Restore button is visible. + + + + + Gets/sets if the close button is visible. + + + + + Gets/sets if the min button is enabled. + + + + + Gets/sets if the max/restore button is enabled. + + + + + Gets/sets if the close button is enabled. + + + + + Gets or sets whether if the close button should be enabled or not if a dialog is shown. + + + + + Gets/sets if the the system menu should popup on right click. + + + + + Gets/sets the TitleBar's height. + + + + + Gets/sets if the TitleBar's text is automatically capitalized. + + + + + Character casing of the title + + + + + Gets/sets the title horizontal alignment. + + + + + Gets/sets the brush used for the Window's title bar. + + + + + Gets/sets the brush used for the Window's glow. + + + + + Gets/sets the brush used for the Window's non-active glow. + + + + + Gets/sets the brush used for the Window's non-active border. + + + + + Gets/sets the brush used for the Window's non-active title bar. + + + + + Gets/sets the brush used for the dialog overlay. + + + + + Gets/sets the opacity used for the dialog overlay. + + + + + Gets or sets the overlay fade in storyboard. + + + + + Gets or sets the overlay fade out storyboard. + + + + + Begins to show the MetroWindow's overlay effect. + + A task representing the process. + + + + Begins to hide the MetroWindow's overlay effect. + + A task representing the process. + + + + Stores the given element, or the last focused element via FocusManager, for restoring the focus after closing a dialog. + + The element which will be focused again. + + + + Clears the stored element which would get the focus after closing a dialog. + + + + + Initializes a new instance of the MahApps.Metro.Controls.MetroWindow class. + + + + + Initializes various behaviors for the window. + For example , and . + + + + + Gets the template child with the given name. + + The interface type inheirted from DependencyObject. + The name of the template child. + + + + Gets the template child with the given name. + + The name of the template child. + + + + This class eats little children. + + + + + Sets the IsHitTestVisibleInChromeProperty to a MetroWindow template child + + The MetroWindow. + The name of the template child. + + + + + Sets the WindowChrome ResizeGripDirection to a MetroWindow template child. + + The MetroWindow. + The name of the template child. + The direction. + + + + Adapts the WindowCommands to the theme of the first opened, topmost && (top || right || left) flyout + + The MetroWindow + All the flyouts! Or flyouts that fall into the category described in the summary. + An optional brush to reset the window commands brush to. + + + + Enum NumericInput which indicates what input is allowed for NumericUpdDown. + + + + + Only numbers are allowed + + + + + Numbers with decimal point and allowed scientific input + + + + + All is allowed + + + + + Represents a Windows spin box (also known as an up-down control) that displays numeric values. + + + + + Event fired from this NumericUpDown when its value has reached the maximum value + + + + + Event fired from this NumericUpDown when its value has reached the minimum value + + + + + Gets or sets the amount of time, in milliseconds, the NumericUpDown waits while the up/down button is pressed + before it starts increasing/decreasing the + for the specified . The value must be + non-negative. + + + + + Gets or sets a value indicating whether the user can use the arrow keys and to change values. + + + + + Gets or sets a value indicating whether the user can use the mouse wheel to change values. + + + + + Gets or sets a value indicating whether the control must have the focus in order to change values using the mouse wheel. + + If the value is true then the value changes when the mouse wheel is over the control. If the value is false then the value changes only if the control has the focus. If is set to "false" then this property has no effect. + + + + + + Gets or sets a value indicating whether the user can enter text in the control. + + + + + Gets or sets a value indicating the culture to be used in string formatting operations. + + + + + Gets or sets a value indicating whether the +/- button of the control is visible. + + + If the value is false then the of the control can be changed only if one of the following cases is satisfied: + + + is true. + + + is true. + + + is true. + + + + + + + Gets or sets a value indicating whether the text can be changed by the use of the up or down buttons only. + + + + + Gets or sets a value indicating whether the value to be added to or subtracted from remains + always + or if it will increase faster after pressing the up/down button/arrow some time. + + + + + Gets or sets the formatting for the displaying + + + + + + + + Gets or sets the horizontal alignment of the contents of the text box. + + + + + Indicates if the NumericUpDown should show the decimal separator or not. + + + + + Gets or sets which numeric input for the NumericUpDown is allowed. + + + + + Indicates if the NumericUpDown should round the value to the nearest possible interval when the focus moves to another element. + + + + + Called when this element or any below gets focus. + + + + + When overridden in a derived class, is invoked whenever application code or internal processes call + . + + + + + Raises the routed event. + + + Old value of the property + + + New value of the property + + + + + Based on Greg Schechter's Planerator + http://blogs.msdn.com/b/greg_schechter/archive/2007/10/26/enter-the-planerator-dead-simple-3d-in-wpf-with-a-stupid-name.aspx + + + + + An Enum representing different positions, such as Left or Right. + + + + + Event arguments created for the RangeSlider's SelectionChanged event. + + + + + + The value of the new range's beginning. + + + + + The value of the new range's ending. + + + + + A slider control with the ability to select a range between two values. + + + + + Identifies the  dependency property. + + + + + Identifies the  dependency property. + + + + + Identifies the  dependency property. + + + + + Identifies the  dependency property. + + + + + Identifies the  dependency property. + + + + + Identifies the  dependency property. + + + + + Get/sets value how fast thumbs will move when user press on left/right/central with left mouse button (IsMoveToPoint must be set to FALSE) + + + + + Get/sets precision of the value, which displaying inside AutotToolTip + + + + + Get/sets the converter for the tooltip text + + + + + Get/sets tooltip, which will show while dragging thumbs and display currect value + + + + + Gets or sets the position of tick marks with respect to the of the . + + + A value that defines how to position the tick marks in a with respect to the slider bar. The default is . + + + + + Gets or sets the interval between tick marks. + + + The distance between tick marks. The default is (1.0). + + + + + Gets or sets the positions of the tick marks to display for a . + + A set of tick marks to display for a . The default is . + + + + + Get or sets IsMoveToPoint feature which will enable/disable moving to exact point inside control when user clicked on it + Gets or sets a value that indicates whether the two of a moves immediately to the location of the mouse click that occurs while the mouse pointer pauses on the tracks. + + + + + Gets or sets the orientation of the . + + + + + Get/sets whether possibility to make manipulations inside range with left/right mouse buttons + cotrol button + + + + + Get/sets whether possibility to make manipulations inside range with left/right mouse buttons + cotrol button + + + + + Get/sets whether whole range will be moved when press on right/left/central part of control + + + + + Get/sets the minimal distance between two thumbs. + + + + + Get/sets the beginning of the range selection. + + + + + Get/sets the end of the range selection. + + + + + Get/sets the minimum range that can be selected. + + + + + Gets or sets a value that indicates whether the displays a selection range along the . + + + if a selection range is displayed; otherwise, . The default is . + + + + + Gets or sets the smallest value of a specified selection for a . + + + The largest value of a selected range of values of a . The default is zero (0.0). + + + + + Gets or sets the largest value of a specified selection for a . + + + The largest value of a selected range of values of a . The default is zero (0.0). + + + + + Responds to a change in the value of the property. + + The old value of the property.The new value of the property. + + + + Responds to a change in the value of the property. + + The old value of the property.The new value of the property. + + + + RevealImage + + + + + InitializeComponent + + + + + Reflects the parameter to pass to the CommandProperty upon execution. + + + + + Gets or sets the target element on which to fire the command. + + + + + Get or sets the Command property. + + + + + Indicates whether the Popup is visible. + + + + + Gets or sets an extra tag. + + + + + Gets or sets the dimension of children stacking. + + + + + Gets or sets the Content used to generate the icon part. + + + + + Gets or sets the ContentTemplate used to display the content of the icon part. + + + + + Gets/sets the button style. + + + + + Gets/sets the button arrow style. + + + + + Gets/sets the popup listbox style. + + + + + Gets/sets the brush of the button arrow icon. + + + + + Gets/sets the brush of the button arrow icon if the mouse is over the split button. + + + + + Gets/sets the brush of the button arrow icon if the arrow button is pressed. + + + + Updates the current selection when an item in the has changed + The event data. + + + + A special animation used to animates the length of a . + + + + + + + Represents a container with two views; one view for the main content and another view that is typically used for + navigation commands. + + + + + Identifies the dependency property. + + The identifier for the property. + + + + Gets or sets the width of the pane in its compact display mode. + + + The width of the pane in it's compact display mode. The default is 48 device-independent pixel (DIP) (defined + by the SplitViewCompactPaneThemeLength resource). + + + + + Identifies the dependency property. + + The identifier for the dependency property. + + + + Gets or sets the contents of the main panel of a . + + The contents of the main panel of a . The default is null. + + + + Identifies the dependency property. + + The identifier for the dependency property. + + + + Gets of sets a value that specifies how the pane and content areas of a are shown. + + + A value of the enumeration that specifies how the pane and content areas of a are + shown. The default is . + + + + + Identifies the dependency property. + + The identifier for the dependency property. + + + + Gets or sets a value that specifies whether the pane is expanded to its full width. + + true if the pane is expanded to its full width; otherwise, false. The default is true. + + + + Identifies the dependency property. + + The identifier for the dependency property. + + + + Gets or sets the width of the pane when it's fully expanded. + + + The width of the pane when it's fully expanded. The default is 320 device-independent + pixel (DIP). + + + + + Identifies the dependency property. + + The identifier for the dependency property. + + + + Gets or sets the contents of the pane of a . + + The contents of the pane of a . The default is null. + + + + Identifies the dependency property. + + The identifier for the dependency property. + + + + Gets or sets the Brush to apply to the background of the area of the control. + + The Brush to apply to the background of the area of the control. + + + + Identifies the dependency property. + + The identifier for the dependency property. + + + + Gets or sets the Brush to apply to the foreground of the area of the control. + + The Brush to apply to the background of the area of the control. + + + + Identifies the PanePlacement dependency property. + + The identifier for the PanePlacement dependency property. + + + + Gets or sets a value that specifies whether the pane is shown on the right or left side of the + . + + + A value of the enumeration that specifies whether the pane is shown on the right or left side of the + . The default is . + + + + + Identifies the dependency property. + + The identifier for the dependency property. + + + + Gets an object that provides calculated values that can be referenced as TemplateBinding sources when defining + templates for a control. + + An object that provides calculated values for templates. + + + + Initializes a new instance of the class. + + + + + Occurs when the pane is closed. + + + + + Occurs when the pane is closing. + + + + + Constants that specify how the pane is shown in a . + + + + + The pane covers the content when it's open and does not take up space in the control layout. + + + + + The pane is shown side-by-side with the content and takes up space in the control layout. + + + + + The amount of the pane defined by the property is shown side-by-side + with the content and takes up space in the control layout. + The remaining part of the pane covers the content when it's open and does not take up space in the control layout. + + + + + The amount of the pane defined by the property is shown side-by-side + with the content and takes up space in the control layout. + The remaining part of the pane pushes the content to the side when it's open and takes up space in the control + layout. + + + + + Provides event data for the event. + + + + + Gets or sets a value that indicates whether the pane closing action should be canceled. + + true to cancel the pane closing action; otherwise, false. + + + + Constants that specify whether the pane is set to the left or to the right of the content in a + . + + + + + The pane is shown to the left of the content. + + + + + The pane is shown to the right of the content. + + + + + Provides calculated values that can be referenced as TemplatedParent sources when defining templates for a + . + Not intended for general use. + + + + + Gets the value as a GridLength. + + + + + Gets the negative of the value. + + + + + Gets the negative of the value calculated by subtracting the value from + the value. + + + + + Gets the value as a GridLength. + + + + + Gets the value. + + + + + Gets a value calculated by subtracting the value from the + value. + + + + + An Enum representing different themes for window commands. + + + + + HorizontalTitleAlignment Dependency Property. + Default Value: HorizontalAlignment.Left + + + + + Gets/Sets the horizontal alignment of the title. + + + + + VerticalTitleAlignment Dependency Property. + Default Value: VerticalAlignment.Bottom + + + + + Gets/Sets the vertical alignment of the title. + + + + + Represents a control that allows the user to select a date and a time. + + + + + Occurs when the property is changed. + + + + + Gets or sets the date to display + + + The date to display. The default is . + + + + + Gets or sets the last date to be displayed. + + The last date to display. + + + + Gets or sets the first date to be displayed. + + The first date to display. + + + + Gets or sets the day that is considered the beginning of the week. + + + A that represents the beginning of the week. The default is the + that is determined by the current culture. + + + + + Gets or sets the format that is used to display the selected date. + + + + + Gets or sets a value that indicates whether the current date will be highlighted. + + true if the current date is highlighted; otherwise, false. The default is true. + + + + Gets or sets a value that indicates the dimension by which calendar and clock are stacked. + + + The of the calendar and clock. The default is + . + + + + + Gets or sets the currently selected date. + + + The date currently selected. The default is null. + + + + + Defines the visibility for time-parts that are visible for the . + + + + + Represents a control that allows the user to select a time. + + + + + Represents a base-class for time picking. + + + + + This readonly dependency property is to control whether to show the date-picker (in case of ) or hide it (in case of . + + + + + Represents the time 00:00:00; 12:00:00 AM respectively + + + + + Represents the time 23:59:59.9999999; 11:59:59.9999999 PM respectively + + + + + This list contains values from 0 to 55 with an interval of 5. It can be used to bind to and . + + + <MahApps:TimePicker SourceSeconds="{x:Static MahApps:TimePickerBase.IntervalOf5}" /> + <MahApps:DateTimePicker SourceSeconds="{x:Static MahApps:TimePickerBase.IntervalOf5}" /> + + + Returns a list containing {0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55}. + + + + + This list contains values from 0 to 50 with an interval of 10. It can be used to bind to and . + + + <MahApps:TimePicker SourceSeconds="{x:Static MahApps:TimePickerBase.IntervalOf10}" /> + <MahApps:DateTimePicker SourceSeconds="{x:Static MahApps:TimePickerBase.IntervalOf10}" /> + + + Returns a list containing {0, 10, 20, 30, 40, 50}. + + + + + This list contains values from 0 to 45 with an interval of 15. It can be used to bind to and . + + + <MahApps:TimePicker SourceSeconds="{x:Static MahApps:TimePickerBase.IntervalOf15}" /> + <MahApps:DateTimePicker SourceSeconds="{x:Static MahApps:TimePickerBase.IntervalOf15}" /> + + + Returns a list containing {0, 15, 30, 45}. + + + + + Occurs when the property is changed. + + + + + Gets or sets a value indicating the culture to be used in string formatting operations. + + + + + Gets or sets a value indicating the visibility of the clock hands in the user interface (UI). + + + The visibility definition of the clock hands. The default is . + + + + + Gets or sets a value indicating whether the date can be selected or not. This property is read-only. + + + + + Gets or sets a value indicating whether the clock of this control is visible in the user interface (UI). This is a + dependency property. + + + If this value is set to false then is set to + + + + true if the clock is visible; otherwise, false. The default value is true. + + + + + Gets or sets a value indicating whether the drop-down for a box is currently + open. + + true if the drop-down is open; otherwise, false. The default is false. + + + + Gets or sets a value indicating whether the contents of the are not editable. + + + true if the is read-only; otherwise, false. The default is false. + + + + + Gets or sets a value indicating the visibility of the selectable date-time-parts in the user interface (UI). + + + visibility definition of the selectable date-time-parts. The default is . + + + + + Gets or sets the currently selected time. + + + The time currently selected. The default is null. + + + + + Gets or sets the format that is used to display the selected time. + + + + + Gets or sets a collection used to generate the content for selecting the hours. + + + A collection that is used to generate the content for selecting the hours. The default is a list of interger from 0 + to 23 if is false or a list of interger from + 1 to 12 otherwise.. + + + + + Gets or sets a collection used to generate the content for selecting the minutes. + + + A collection that is used to generate the content for selecting the minutes. The default is a list of int from + 0 to 59. + + + + + Gets or sets a collection used to generate the content for selecting the seconds. + + + A collection that is used to generate the content for selecting the minutes. The default is a list of int from + 0 to 59. + + + + + Gets a value indicating whether the that is specified by the + + set by the ( if null) has not a value. + + + + + When overridden in a derived class, is invoked whenever application code or internal processes call + . + + + + + Gets the offset from the selected to use it in as hour + parameter. + + The current hour. + + An integer representing the offset to add to the hour that is selected in the hour-picker for setting the correct + . The offset is determined as follows: + + + ConditionOffset + + + is false0 + + + Selected hour is between 1 AM and 11 AM0 + + + Selected hour is 12 AM-12h + + + Selected hour is between 12 PM and 11 PM+12h + + + + + + + A control that allows the user to toggle between two states: One represents true; The other represents false. + + + + + Identifies the  dependency property. + + + + + Gets/sets the font family of the header. + + + + + Gets/sets the text to display when the control is in it's On state. + + + + + Gets/sets the text to display when the control is in it's Off state. + + + + + Gets/sets the brush used for the switch's foreground. + + + + + Gets/sets the brush used for the on-switch's foreground. + + + + + Gets/sets the brush used for the off-switch's foreground. + + + + + Gets/sets the brush used for the thumb indicator. + + + + + Gets/sets the brush used for the thumb indicator. + + + + + Gets/sets the width of the thumb indicator. + + + + + Gets/sets the control's content flow direction. + + + + + Gets or sets the padding of the inner content. + + + + + Gets/sets the control's toggle switch button style. + + + + + Gets/sets whether the control is Checked (On) or not (Off). + + + + + Gets/sets the command which will be executed if the IsChecked property was changed. + + + + + Gets/sets the command which will be executed if the checked event of the control is fired. + + + + + Gets/sets the command which will be executed if the checked event of the control is fired. + + + + + Gets/sets the command parameter which will be passed by the CheckChangedCommand. + + + + + Gets/sets the command parameter which will be passed by the CheckedCommand. + + + + + Gets/sets the command parameter which will be passed by the UnCheckedCommand. + + + + + An event that is raised when the value of IsChecked changes. + + + + + A Button that allows the user to toggle between two states. + + + + + Gets/sets the brush used for the control's foreground. + + + + + Gets/sets the brush used for the on-switch's foreground. + + + + + Gets/sets the brush used for the off-switch's foreground. + + + + + Gets/sets the brush used for the thumb indicator. + + + + + Gets/sets the brush used for the thumb indicator. + + + + + Gets/sets the width of the thumb indicator. + + + + + enumeration for the different transition types + + + + + Use the VisualState DefaultTransition + + + + + Use the VisualState Normal + + + + + Use the VisualState UpTransition + + + + + Use the VisualState DownTransition + + + + + Use the VisualState RightTransition + + + + + Use the VisualState RightReplaceTransition + + + + + Use the VisualState LeftTransition + + + + + Use the VisualState LeftReplaceTransition + + + + + Use a custom VisualState, the name must be set using CustomVisualStatesName property + + + + + A ContentControl that animates content as it loads and unloads. + + + + + Gets or sets the name of the custom transition visual state. + + + + + Gets/sets if the content is transitioning. + + + + + Reload the current transition if the content is the same. + + + + + Helper methods for UI-related tasks. + This class was obtained from Philip Sumi (a fellow WPF Disciples blog) + http://www.hardcodet.net/uploads/2009/06/UIHelper.cs + + + + + Finds a parent of a given item on the visual tree. + + The type of the queried item. + A direct or indirect child of the + queried item. + The first parent item that matches the submitted + type parameter. If not matching item can be found, a null + reference is being returned. + + + + Finds all Ancestors of a given item on the visual tree. + + A node in a visual tree + All ancestors in visual tree of element + + + + Finds a Child of a given item in the visual tree. + + A direct parent of the queried item. + The type of the queried item. + x:Name or Name of child. + The first parent item that matches the submitted type parameter. + If not matching item can be found, + a null parent is being returned. + + + + This method is an alternative to WPF's + method, which also + supports content elements. Keep in mind that for content element, + this method falls back to the logical tree of the element! + + The item to be processed. + The submitted item's parent, if available. Otherwise + null. + + + + Analyzes both visual and logical tree in order to find all elements of a given + type that are descendants of the item. + + The type of the queried items. + The root element that marks the source of the search. If the + source is already of the requested type, it will not be included in the result. + Sometimes it's better to search in the VisualTree (e.g. in tests) + All descendants of that match the requested type. + + + + This method is an alternative to WPF's + method, which also + supports content elements. Keep in mind that for content elements, + this method falls back to the logical tree of the element. + + The item to be processed. + Sometimes it's better to search in the VisualTree (e.g. in tests) + The submitted item's child elements, if available. + + + + Tries to locate a given item within the visual tree, + starting with the dependency object at a given position. + + The type of the element to be found + on the visual tree of the element at the given location. + The main element which is used to perform + hit testing. + The position to be evaluated on the origin. + + + + Gets the relative mouse position to the given handle in client coordinates. + + The handle for this method. + + + + Try to get the relative mouse position to the given handle in client coordinates. + + The handle for this method. + The relative mouse position to the given handle. + + + + Gets or sets the value indicating current light style for the minimize button. + + + + + Gets or sets the value indicating current light style for the maximize button. + + + + + Gets or sets the value indicating current light style for the close button. + + + + + Gets or sets the value indicating current dark style for the minimize button. + + + + + Gets or sets the value indicating current dark style for the maximize button. + + + + + Gets or sets the value indicating current dark style for the close button. + + + + + Gets or sets the value indicating current theme. + + + + + Gets or sets the minimize button tooltip. + + + + + Gets or sets the maximize button tooltip. + + + + + Gets or sets the close button tooltip. + + + + + Gets or sets the restore button tooltip. + + + + + Gets or sets the value indicating current theme. + + + + + Gets or sets the value indicating light theme template. + + + + + Gets or sets the value indicating light theme template. + + + + + Gets or sets the value indicating whether to show the separators. + + + + + Gets or sets the value indicating whether to show the last separator. + + + + + Gets or sets the value indicating separator height. + + + + + Gets or sets the value indicating whether to show the separator. + + + + + Doesn't overlay flyouts nor a hidden TitleBar. + + + + + Overlays opened controls. + + + + + Overlays a hidden TitleBar. + + + + + Refreshes the application settings property values from persistent storage. + + + + + Upgrades the application settings on loading. + + + + + Updates application settings to reflect a more recent installation of the application. + + + + + Stores the current values of the settings properties. + + + + + this settings class is the default way to save the placement of the window + + + + + Upgrades the application settings on loading. + + + + + Determining Ideal Text Color Based on Specified Background Color + http://www.codeproject.com/KB/GDI-plus/IdealTextColor.aspx + + The bg. + + + + + Converts a double representing either hour/minute/second to the corresponding angle. + + + + + Converts the value from true to false and false to true. + + + + + The math operations which can be used at the + + + + + MathConverter provides a value converter which can be used for math operations. + It can be used for normal binding or multi binding as well. + If it is used for normal binding the given parameter will be used as operands with the selected operation. + If it is used for multi binding then the first and second binding will be used as operands with the selected operation. + This class cannot be inherited. + + + + + MathAddConverter provides a multi value converter as a MarkupExtension which can be used for math operations. + This class cannot be inherited. + + + + + MathSubtractConverter provides a multi value converter as a MarkupExtension which can be used for math operations. + This class cannot be inherited. + + + + + MathMultiplyConverter provides a multi value converter as a MarkupExtension which can be used for math operations. + This class cannot be inherited. + + + + + MathDivideConverter provides a multi value converter as a MarkupExtension which can be used for math operations. + This class cannot be inherited. + + + + + Converts a String into a Visibility enumeration (and back) + The FalseEquivalent can be declared with the "FalseEquivalent" property + + + + + Initialize the properties with standard values + + + + + FalseEquivalent (default : Visibility.Collapsed => see Constructor) + + + + + Define whether the opposite boolean value is crucial (default : false) + + + + + Converts a Thickness to a new Thickness. It's possible to ignore a side With the IgnoreThicknessSide property. + + + + + Use all sides. + + + + + Ignore the left side. + + + + + Ignore the top side. + + + + + Ignore the right side. + + + + + Ignore the bottom side. + + + + Converts a value. + A converted value. If the method returns null, the valid null value is used. + The value produced by the binding source. + The type of the binding target property. + The converter parameter to use. + The culture to use in the converter. + + + Converts a value. + A converted value. If the method returns null, the valid null value is used. + The value that is produced by the binding target. + The type to convert to. + The converter parameter to use. + The culture to use in the converter. + + + + An object that represents the foreground color for a . + + + + + The ResourceDictionary that represents this Accent. + + + + + Gets/sets the name of the Accent. + + + + + Initializes a new instance of the Accent class. + + + + + Initializes a new instance of the Accent class. + + The name of the new Accent. + The URI of the accent ResourceDictionary. + + + + Initializes a new instance of the Accent class. + + The name of the new Accent. + The ResourceDictionary of the accent. + + + + Represents the background theme of the application. + + + + + The ResourceDictionary that represents this application theme. + + + + + Gets the name of the application theme. + + + + + Initializes a new instance of the AppTheme class. + + The name of the new AppTheme. + The URI of the AppTheme ResourceDictionary. + + + + Initializes a new instance of the AppTheme class. + + The name of the new AppTheme. + The ResourceDictionary of the accent. + + + + A class that allows for the detection and alteration of a theme and accent. + + + + + Gets a list of all of default accents. + + + + + Gets a list of all default themes. + + + + + Adds an accent with the given name and uniform resource identfier. + + The name of the new Accent. + The URI of the accent ResourceDictionary. + true if the accent does not exists and can be added. + + + + Adds an accent with the given name and resource dictionary. + + The name of the new Accent. + The ResourceDictionary of the accent. + true if the accent does not exists and can be added. + + + + Adds an app theme with the given name. + + The name of the new AppTheme. + The URI of the AppTheme ResourceDictionary. + true if the app theme does not exists and can be added. + + + + Adds an app theme with the given name. + + The name of the new AppTheme. + The ResourceDictionary of the accent. + true if the app theme does not exists and can be added. + + + + Gets app theme with the given resource dictionary. + + from which the theme should be retrieved. + AppTheme + + + + Gets app theme with the given name and theme type (light or dark). + + AppTheme + + + + Gets the inverse of the given . + This method relies on the "Dark" or "Light" affix to be present. + + The app theme. + The inverse or null if it couldn't be found. + + Returns BaseLight, if BaseDark is given or vice versa. + Custom Themes must end with "Dark" or "Light" for this to work, for example "CustomDark" and "CustomLight". + + + + + Gets the with the given name. + + The or null, if the app theme wasn't found + + + + Gets the with the given resource dictionary. + + from which the accent should be retrieved. + The or null, if the accent wasn't found. + + + + Determines whether the specified resource dictionary represents an . + + This might include runtime accents which do not have a resource uri. + + The resources. + true if the resource dictionary is an ; otherwise, false. + resources + + + + Gets a resource from the detected AppStyle. + + The window to check. If this is null, the Application's sources will be checked. + The key to check against. + The resource object or null, if the resource wasn't found. + + + + Change the theme for the whole application. + + + + + + + Change theme for the given window. + + + + + + + Change accent and theme for the whole application. + + The instance of Application to change. + The accent to apply. + The theme to apply. + + + + Change accent and theme for the given window. + + The Window to change. + The accent to apply. + The theme to apply. + + + + Changes the accent and theme of a ResourceDictionary directly. + + The ResourceDictionary to modify. + The accent to apply to the ResourceDictionary. + The theme to apply to the ResourceDictionary. + + + + Copies all resource keys from one resource to another. + + The source resource dictionary. + The destination resource dictionary. + + fromRD + or + toRD + + + + + Scans the window resources and returns it's accent and theme. + + + + + Scans the window resources and returns it's accent and theme. + + The Window to scan. + + + + Scans the application resources and returns it's accent and theme. + + The Application instance to scan. + + + + Scans a resources and returns it's accent and theme. + + The ResourceDictionary to check. + + + + This event fires if accent color and theme was changed + this should be using the weak event pattern, but for now it's enough + + + + + Invalidates global colors and resources. + Sometimes the ContextMenu is not changing the colors, so this will fix it. + + + + + Class which is used as argument for an event to signal theme changes. + + + + + Creates a new instance of this class. + + + + + The new theme. + + + + + The new accent + + + + + GeneratedInternalTypeHelper + + + + + CreateInstance + + + + + GetPropertyValue + + + + + SetPropertyValue + + + + + CreateDelegate + + + + + AddEventHandler + + +
+
diff --git a/packages/Prism.Core.6.3.0/Prism.Core.6.3.0.nupkg b/packages/Prism.Core.6.3.0/Prism.Core.6.3.0.nupkg new file mode 100644 index 0000000..82f9439 Binary files /dev/null and b/packages/Prism.Core.6.3.0/Prism.Core.6.3.0.nupkg differ diff --git a/packages/Prism.Core.6.3.0/lib/MonoAndroid10/Prism.dll b/packages/Prism.Core.6.3.0/lib/MonoAndroid10/Prism.dll new file mode 100644 index 0000000..1bb0ff8 Binary files /dev/null and b/packages/Prism.Core.6.3.0/lib/MonoAndroid10/Prism.dll differ diff --git a/packages/Prism.Core.6.3.0/lib/MonoAndroid10/Prism.xml b/packages/Prism.Core.6.3.0/lib/MonoAndroid10/Prism.xml new file mode 100644 index 0000000..13d72ea --- /dev/null +++ b/packages/Prism.Core.6.3.0/lib/MonoAndroid10/Prism.xml @@ -0,0 +1,1275 @@ + + + + Prism + + + + + The CompositeCommand composes one or more ICommands. + + + + + Initializes a new instance of . + + + + + Initializes a new instance of . + + Indicates when the command activity is going to be monitored. + + + + Adds a command to the collection and signs up for the event of it. + + + If this command is set to monitor command activity, and + implements the interface, this method will subscribe to its + event. + + The command to register. + + + + Removes a command from the collection and removes itself from the event of it. + + The command to unregister. + + + + Forwards to the registered commands and returns + if all of the commands return . + + Data used by the command. + If the command does not require data to be passed, this object can be set to . + + if all of the commands return ; otherwise, . + + + + Occurs when any of the registered commands raise . + + + + + Forwards to the registered commands. + + Data used by the command. + If the command does not require data to be passed, this object can be set to . + + + + + Evaluates if a command should execute. + + The command to evaluate. + A value indicating whether the command should be used + when evaluating and . + + If this command is set to monitor command activity, and + implements the interface, + this method will return if the command's + property is ; otherwise it always returns . + + + + Gets the list of all the registered commands. + + A list of registered commands. + This returns a copy of the commands subscribed to the CompositeCommand. + + + + Raises on the UI thread so every + command invoker can requery to check if the + can execute. + + + + + Handler for IsActiveChanged events of registered commands. + + The sender. + EventArgs to pass to the event. + + + + An whose delegates do not take any parameters for and . + + + + + + + Creates a new instance of with the to invoke on execution. + + The to invoke when is called. + + + + Creates a new instance of with the to invoke on execution + and a to query for determining if the command can execute. + + The to invoke when is called. + The to invoke when is called + + + + Executes the command. + + + + + Determines if the command can be executed. + + Returns if the command can execute,otherwise returns . + + + + Observes a property that implements INotifyPropertyChanged, and automatically calls DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The object type containing the property specified in the expression. + The property expression. Example: ObservesProperty(() => PropertyName). + The current instance of DelegateCommand + + + + Observes a property that is used to determine if this command can execute, and if it implements INotifyPropertyChanged it will automatically call DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The property expression. Example: ObservesCanExecute(() => PropertyName). + The current instance of DelegateCommand + + + + An whose delegates can be attached for and . + + + + + Creates a new instance of a , specifying both the execute action and the can execute function. + + The to execute when is invoked. + The to invoked when is invoked. + + + + Occurs when changes occur that affect whether or not the command should execute. + + + + + Raises so every + command invoker can requery . + + + + + Raises so every command invoker + can requery to check if the command can execute. + Note that this will trigger the execution of once for each invoker. + + + + + Observes a property that implements INotifyPropertyChanged, and automatically calls DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The object type containing the property specified in the expression. + The property expression. Example: ObservesProperty(() => PropertyName). + + + + Gets or sets a value indicating whether the object is active. + + if the object is active; otherwise . + + + + Fired if the property changes. + + + + + This raises the event. + + + + + An whose delegates can be attached for and . + + Parameter type. + + The constructor deliberately prevents the use of value types. + Because ICommand takes an object, having a value type for T would cause unexpected behavior when CanExecute(null) is called during XAML initialization for command bindings. + Using default(T) was considered and rejected as a solution because the implementor would not be able to distinguish between a valid and defaulted values. + + Instead, callers should support a value type by using a nullable value type and checking the HasValue property before using the Value property. + + + public MyClass() + { + this.submitCommand = new DelegateCommand<int?>(this.Submit, this.CanSubmit); + } + + private bool CanSubmit(int? customerId) + { + return (customerId.HasValue && customers.Contains(customerId.Value)); + } + + + + + + + Initializes a new instance of . + + Delegate to execute when Execute is called on the command. This can be null to just hook up a CanExecute delegate. + will always return true. + + + + Initializes a new instance of . + + Delegate to execute when Execute is called on the command. This can be null to just hook up a CanExecute delegate. + Delegate to execute when CanExecute is called on the command. This can be null. + When both and ar . + + + + Executes the command and invokes the provided during construction. + + Data used by the command. + + + + Determines if the command can execute by invoked the provided during construction. + + Data used by the command to determine if it can execute. + + if this command can be executed; otherwise, . + + + + + Observes a property that implements INotifyPropertyChanged, and automatically calls DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The type of the return value of the method that this delegate encapulates + The property expression. Example: ObservesProperty(() => PropertyName). + The current instance of DelegateCommand + + + + Observes a property that is used to determine if this command can execute, and if it implements INotifyPropertyChanged it will automatically call DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The property expression. Example: ObservesCanExecute(() => PropertyName). + The current instance of DelegateCommand + + + + Extends to invoke the delegate in a background thread. + + + + + Creates a new instance of . + + A reference to a delegate of type . + When or are . + When the target of is not of type . + + + + Invokes the specified in an asynchronous thread by using a . + + The action to execute. + + + + Extends to invoke the delegate in a background thread. + + The type to use for the generic and types. + + + + Creates a new instance of . + + A reference to a delegate of type . + A reference to a delegate of type . + When or are . + When the target of is not of type , + or the target of is not of type . + + + + Invokes the specified in an asynchronous thread by using a . + + The action to execute. + The payload to pass while invoking it. + + + + Generic arguments class to pass to event handlers that need to receive data. + + The type of data to pass. + + + + Initializes the DataEventArgs class. + + Information related to the event. + + + + Gets the information related to the event. + + Information related to the event. + + + + Represents a reference to a that may contain a + to the target. This class is used + internally by the Prism Library. + + + + + Initializes a new instance of . + + The original to create a reference for. + If the class will create a weak reference to the delegate, allowing it to be garbage collected. Otherwise it will keep a strong reference to the target. + If the passed is not assignable to . + + + + Gets the (the target) referenced by the current object. + + if the object referenced by the current object has been garbage collected; otherwise, a reference to the referenced by the current object. + + + + Extends to invoke the delegate + in a specific . + + + + + Creates a new instance of . + + A reference to a delegate of type . + The synchronization context to use for UI thread dispatching. + When or are . + When the target of is not of type . + + + + Invokes the specified asynchronously in the specified . + + The action to execute. + + + + Extends to invoke the delegate + in a specific . + + The type to use for the generic and types. + + + + Creates a new instance of . + + A reference to a delegate of type . + A reference to a delegate of type . + The synchronization context to use for UI thread dispatching. + When or are . + When the target of is not of type , + or the target of is not of type . + + + + Invokes the specified asynchronously in the specified . + + The action to execute. + The payload to pass while invoking it. + + + + Implements . + + + + + Gets the single instance of the event managed by this EventAggregator. Multiple calls to this method with the same returns the same event instance. + + The type of event to get. This must inherit from . + A singleton instance of an event object of type . + + + + Defines a base class to publish and subscribe to events. + + + + + Allows the SynchronizationContext to be set by the EventAggregator for UI Thread Dispatching + + + + + Gets the list of current subscriptions. + + The current subscribers. + + + + Adds the specified to the subscribers' collection. + + The subscriber. + The that uniquely identifies every subscriber. + + Adds the subscription to the internal list and assigns it a new . + + + + + Calls all the execution strategies exposed by the list of . + + The arguments that will be passed to the listeners. + Before executing the strategies, this class will prune all the subscribers from the + list that return a when calling the + method. + + + + Removes the subscriber matching the . + + The returned by while subscribing to the event. + + + + Returns if there is a subscriber matching . + + The returned by while subscribing to the event. + if there is a that matches; otherwise . + + + + Provides a way to retrieve a to execute an action depending + on the value of a second filter predicate that returns true if the action should execute. + + + + + Creates a new instance of . + + A reference to a delegate of type . + When or are . + When the target of is not of type . + + + + Gets the target that is referenced by the . + + An or if the referenced target is not alive. + + + + Gets or sets a that identifies this . + + A token that identifies this . + + + + Gets the execution strategy to publish this event. + + An with the execution strategy, or if the is no longer valid. + + If is no longer valid because it was + garbage collected, this method will return . + Otherwise it will return a delegate that evaluates the and if it + returns will then call . The returned + delegate holds a hard reference to the target + delegates. As long as the returned delegate is not garbage collected, + the references delegates won't get collected either. + + + + + Invokes the specified synchronously when not overridden. + + The action to execute. + An is thrown if is null. + + + + Provides a way to retrieve a to execute an action depending + on the value of a second filter predicate that returns true if the action should execute. + + The type to use for the generic and types. + + + + Creates a new instance of . + + A reference to a delegate of type . + A reference to a delegate of type . + When or are . + When the target of is not of type , + or the target of is not of type . + + + + Gets the target that is referenced by the . + + An or if the referenced target is not alive. + + + + Gets the target that is referenced by the . + + An or if the referenced target is not alive. + + + + Gets or sets a that identifies this . + + A token that identifies this . + + + + Gets the execution strategy to publish this event. + + An with the execution strategy, or if the is no longer valid. + + If or are no longer valid because they were + garbage collected, this method will return . + Otherwise it will return a delegate that evaluates the and if it + returns will then call . The returned + delegate holds hard references to the and target + delegates. As long as the returned delegate is not garbage collected, + the and references delegates won't get collected either. + + + + + Invokes the specified synchronously when not overridden. + + The action to execute. + The payload to pass while invoking it. + An is thrown if is null. + + + + Represents a reference to a . + + + + + Gets the referenced object. + + A instance if the target is valid; otherwise . + + + + Defines an interface to get instances of an event type. + + + + + Gets an instance of an event type. + + The type of event to get. + An instance of an event object of type . + + + + Defines a contract for an event subscription to be used by . + + + + + Gets or sets a that identifies this . + + A token that identifies this . + + + + Gets the execution strategy to publish this event. + + An with the execution strategy, or if the is no longer valid. + + + + Defines a class that manages publication and subscription to events. + + + + + Subscribes a delegate to an event that will be published on the . + will maintain a to the target of the supplied delegate. + + The delegate that gets executed when the event is published. + A that uniquely identifies the added subscription. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + PubSubEvent will maintain a to the Target of the supplied delegate. + + The delegate that gets executed when the event is raised. + Specifies on which thread to receive the delegate callback. + A that uniquely identifies the added subscription. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event that will be published on the . + + The delegate that gets executed when the event is published. + When , the keeps a reference to the subscriber so it does not get garbage collected. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + + The delegate that gets executed when the event is published. + Specifies on which thread to receive the delegate callback. + When , the keeps a reference to the subscriber so it does not get garbage collected. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Publishes the . + + + + + Removes the first subscriber matching from the subscribers' list. + + The used when subscribing to the event. + + + + Returns if there is a subscriber matching . + + The used when subscribing to the event. + if there is an that matches; otherwise . + + + + Defines a class that manages publication and subscription to events. + + The type of message that will be passed to the subscribers. + + + + Subscribes a delegate to an event that will be published on the . + will maintain a to the target of the supplied delegate. + + The delegate that gets executed when the event is published. + A that uniquely identifies the added subscription. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + PubSubEvent will maintain a to the Target of the supplied delegate. + + The delegate that gets executed when the event is raised. + Specifies on which thread to receive the delegate callback. + A that uniquely identifies the added subscription. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event that will be published on the . + + The delegate that gets executed when the event is published. + When , the keeps a reference to the subscriber so it does not get garbage collected. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + + The delegate that gets executed when the event is published. + Specifies on which thread to receive the delegate callback. + When , the keeps a reference to the subscriber so it does not get garbage collected. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + + The delegate that gets executed when the event is published. + Specifies on which thread to receive the delegate callback. + When , the keeps a reference to the subscriber so it does not get garbage collected. + Filter to evaluate if the subscriber should receive the event. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Publishes the . + + Message to pass to the subscribers. + + + + Removes the first subscriber matching from the subscribers' list. + + The used when subscribing to the event. + + + + Returns if there is a subscriber matching . + + The used when subscribing to the event. + if there is an that matches; otherwise . + + + + Subscription token returned from on subscribe. + + + + + Initializes a new instance of . + + + + + Indicates whether the current object is equal to another object of the same type. + + + if the current object is equal to the parameter; otherwise, . + + An object to compare with this object. + + + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current ; otherwise, false. + + The to compare with the current . + The parameter is null.2 + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + 2 + + + + Disposes the SubscriptionToken, removing the subscription from the corresponding . + + + + + Specifies on which thread a subscriber will be called. + + + + + The call is done on the same thread on which the was published. + + + + + The call is done on the UI thread. + + + + + The call is done asynchronously on a background thread. + + + + + Interface that defines if the object instance is active + and notifies when the activity changes. + + + + + Gets or sets a value indicating whether the object is active. + + if the object is active; otherwise . + + + + Notifies that the value for property has changed. + + + + + Defines values for the categories used by . + + + + + Debug category. + + + + + Exception category. + + + + + Informational category. + + + + + Warning category. + + + + + Implementation of that logs into a message into the Debug.Listeners collection. + + + + + Write a new log entry with the specified category and priority. + + Message body to log. + Category of the entry. + The priority of the entry. + + + + Implementation of that does nothing. This + implementation is useful when the application does not need logging + but there are infrastructure pieces that assume there is a logger. + + + + + This method does nothing. + + Message body to log. + Category of the entry. + The priority of the entry. + + + + Defines a simple logger façade to be used by the Prism Library. + + + + + Write a new log entry with the specified category and priority. + + Message body to log. + Category of the entry. + The priority of the entry. + + + + Defines values for the priorities used by . + + + + + No priority specified. + + + + + High priority entry. + + + + + Medium priority entry. + + + + + Low priority entry. + + + + + Implementation of to simplify models. + + + + + Occurs when a property value changes. + + + + + Checks if a property already matches a desired value. Sets the property and + notifies listeners only when necessary. + + Type of the property. + Reference to a property with both getter and setter. + Desired value for the property. + Name of the property used to notify listeners. This + value is optional and can be provided automatically when invoked from compilers that + support CallerMemberName. + True if the value was changed, false if the existing value matched the + desired value. + + + + Checks if a property already matches a desired value. Sets the property and + notifies listeners only when necessary. + + Type of the property. + Reference to a property with both getter and setter. + Desired value for the property. + Name of the property used to notify listeners. This + value is optional and can be provided automatically when invoked from compilers that + support CallerMemberName. + Action that is called after the property value has been changed. + True if the value was changed, false if the existing value matched the + desired value. + + + + Raises this object's PropertyChanged event. + + Name of the property used to notify listeners. This + value is optional and can be provided automatically when invoked from compilers + that support . + + + + Notifies listeners that a property value has changed. + + Name of the property used to notify listeners. This + value is optional and can be provided automatically when invoked from compilers + that support . + + + + Raises this object's PropertyChanged event. + + The PropertyChangedEventArgs + + + + Raises this object's PropertyChanged event. + + The type of the property that has a new value + A Lambda expression representing the property that has a new value. + + + + Manages validation errors for an object, notifying when the error state changes. + + The type of the error object. + + + + Initializes a new instance of the class. + + The action that invoked if when errors are added for an object./> + event. + + + + Gets a value indicating whether the object has validation errors. + + + + + Gets the validation errors for a specified property. + + The name of the property. + The validation errors of type for the property. + + + + Clears the errors for the property indicated by the property expression. + + The property type. + The expression indicating a property. + + container.ClearErrors(()=>SomeProperty); + + + + + Clears the errors for a property. + + The name of th property for which to clear errors. + + container.ClearErrors("SomeProperty"); + + + + + Sets the validation errors for the specified property. + + The property type for which to set errors. + The indicating the property. + The list of errors to set for the property. + + + + Sets the validation errors for the specified property. + + + If a change is detected then the errors changed event is raised. + + The name of the property. + The new validation errors. + + + + Provides support for extracting property information based on a property expression. + + + + + Extracts the property name from a property expression. + + The object type containing the property specified in the expression. + The property expression (e.g. p => p.PropertyName) + The name of the property. + Thrown if the is null. + Thrown when the expression is:
+ Not a
+ The does not represent a property.
+ Or, the property is static. +
+
+ + + Extracts the property name from a LambdaExpression. + + The LambdaExpression + The name of the property. + Thrown if the is null. + Thrown when the expression is:
+ The does not represent a property.
+ Or, the property is static. +
+
+ + + The ViewModelLocationProvider class locates the view model for the view that has the AutoWireViewModelChanged attached property set to true. + The view model will be located and injected into the view's DataContext. To locate the view, two strategies are used: First the ViewModelLocationProvider + will look to see if there is a view model factory registered for that view, if not it will try to infer the view model using a convention based approach. + This class also provide methods for registering the view model factories, + and also to override the default view model factory and the default view type to view model type resolver. + + + + + A dictionary that contains all the registered factories for the views. + + + + + A dictionary that contains all the registered ViewModel types for the views. + + + + + The default view model factory which provides the ViewModel type as a parameter. + + + + + ViewModelfactory that provides the View instance and ViewModel type as parameters. + + + + + Default view type to view model type resolver, assumes the view model is in same assembly as the view type, but in the "ViewModels" namespace. + + + + + Sets the default view model factory. + + The view model factory which provides the ViewModel type as a parameter. + + + + Sets the default view model factory. + + The view model factory that provides the View instance and ViewModel type as parameters. + + + + Sets the default view type to view model type resolver. + + The view type to view model type resolver. + + + + Automatically looks up the viewmodel that corresponds to the current view, using two strategies: + It first looks to see if there is a mapping registered for that view, if not it will fallback to the convention based approach. + + The dependency object, typically a view. + The call back to use to create the binding between the View and ViewModel + + + + Gets the view model for the specified view. + + The view that the view model wants. + The ViewModel that corresponds to the view passed as a parameter. + + + + Gets the ViewModel type for the specified view. + + The View that the ViewModel wants. + The ViewModel type that corresponds to the View. + + + + Registers the ViewModel factory for the specified view type. + + The View + The ViewModel factory. + + + + Registers the ViewModel factory for the specified view type name. + + The name of the view type. + The ViewModel factory. + + + + Registers a ViewModel type for the specified view type. + + The View + The ViewModel + + + + Registers a ViewModel type for the specified view. + + The View type name + The ViewModel type + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Cannot register a CompositeCommand in itself.. + + + + + Looks up a localized string similar to Cannot register the same command twice in the same CompositeCommand.. + + + + + Looks up a localized string similar to {1}: {2}. Priority: {3}. Timestamp:{0:u}.. + + + + + Looks up a localized string similar to Neither the executeMethod nor the canExecuteMethod delegates can be null.. + + + + + Looks up a localized string similar to T for DelegateCommand<T> is not an object nor Nullable.. + + + + + Looks up a localized string similar to To use the UIThread option for subscribing, the EventAggregator must be constructed on the UI thread.. + + + + + Looks up a localized string similar to Invalid Delegate Reference Type Exception. + + + + + Looks up a localized string similar to The entity does not contain a property with that name. + + + + + Looks up a localized string similar to The member access expression does not access a property.. + + + + + Looks up a localized string similar to The expression is not a member access expression.. + + + + + Looks up a localized string similar to The referenced property is a static property.. + + +
+
diff --git a/packages/Prism.Core.6.3.0/lib/MonoTouch10/Prism.dll b/packages/Prism.Core.6.3.0/lib/MonoTouch10/Prism.dll new file mode 100644 index 0000000..1bb0ff8 Binary files /dev/null and b/packages/Prism.Core.6.3.0/lib/MonoTouch10/Prism.dll differ diff --git a/packages/Prism.Core.6.3.0/lib/MonoTouch10/Prism.xml b/packages/Prism.Core.6.3.0/lib/MonoTouch10/Prism.xml new file mode 100644 index 0000000..13d72ea --- /dev/null +++ b/packages/Prism.Core.6.3.0/lib/MonoTouch10/Prism.xml @@ -0,0 +1,1275 @@ + + + + Prism + + + + + The CompositeCommand composes one or more ICommands. + + + + + Initializes a new instance of . + + + + + Initializes a new instance of . + + Indicates when the command activity is going to be monitored. + + + + Adds a command to the collection and signs up for the event of it. + + + If this command is set to monitor command activity, and + implements the interface, this method will subscribe to its + event. + + The command to register. + + + + Removes a command from the collection and removes itself from the event of it. + + The command to unregister. + + + + Forwards to the registered commands and returns + if all of the commands return . + + Data used by the command. + If the command does not require data to be passed, this object can be set to . + + if all of the commands return ; otherwise, . + + + + Occurs when any of the registered commands raise . + + + + + Forwards to the registered commands. + + Data used by the command. + If the command does not require data to be passed, this object can be set to . + + + + + Evaluates if a command should execute. + + The command to evaluate. + A value indicating whether the command should be used + when evaluating and . + + If this command is set to monitor command activity, and + implements the interface, + this method will return if the command's + property is ; otherwise it always returns . + + + + Gets the list of all the registered commands. + + A list of registered commands. + This returns a copy of the commands subscribed to the CompositeCommand. + + + + Raises on the UI thread so every + command invoker can requery to check if the + can execute. + + + + + Handler for IsActiveChanged events of registered commands. + + The sender. + EventArgs to pass to the event. + + + + An whose delegates do not take any parameters for and . + + + + + + + Creates a new instance of with the to invoke on execution. + + The to invoke when is called. + + + + Creates a new instance of with the to invoke on execution + and a to query for determining if the command can execute. + + The to invoke when is called. + The to invoke when is called + + + + Executes the command. + + + + + Determines if the command can be executed. + + Returns if the command can execute,otherwise returns . + + + + Observes a property that implements INotifyPropertyChanged, and automatically calls DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The object type containing the property specified in the expression. + The property expression. Example: ObservesProperty(() => PropertyName). + The current instance of DelegateCommand + + + + Observes a property that is used to determine if this command can execute, and if it implements INotifyPropertyChanged it will automatically call DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The property expression. Example: ObservesCanExecute(() => PropertyName). + The current instance of DelegateCommand + + + + An whose delegates can be attached for and . + + + + + Creates a new instance of a , specifying both the execute action and the can execute function. + + The to execute when is invoked. + The to invoked when is invoked. + + + + Occurs when changes occur that affect whether or not the command should execute. + + + + + Raises so every + command invoker can requery . + + + + + Raises so every command invoker + can requery to check if the command can execute. + Note that this will trigger the execution of once for each invoker. + + + + + Observes a property that implements INotifyPropertyChanged, and automatically calls DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The object type containing the property specified in the expression. + The property expression. Example: ObservesProperty(() => PropertyName). + + + + Gets or sets a value indicating whether the object is active. + + if the object is active; otherwise . + + + + Fired if the property changes. + + + + + This raises the event. + + + + + An whose delegates can be attached for and . + + Parameter type. + + The constructor deliberately prevents the use of value types. + Because ICommand takes an object, having a value type for T would cause unexpected behavior when CanExecute(null) is called during XAML initialization for command bindings. + Using default(T) was considered and rejected as a solution because the implementor would not be able to distinguish between a valid and defaulted values. + + Instead, callers should support a value type by using a nullable value type and checking the HasValue property before using the Value property. + + + public MyClass() + { + this.submitCommand = new DelegateCommand<int?>(this.Submit, this.CanSubmit); + } + + private bool CanSubmit(int? customerId) + { + return (customerId.HasValue && customers.Contains(customerId.Value)); + } + + + + + + + Initializes a new instance of . + + Delegate to execute when Execute is called on the command. This can be null to just hook up a CanExecute delegate. + will always return true. + + + + Initializes a new instance of . + + Delegate to execute when Execute is called on the command. This can be null to just hook up a CanExecute delegate. + Delegate to execute when CanExecute is called on the command. This can be null. + When both and ar . + + + + Executes the command and invokes the provided during construction. + + Data used by the command. + + + + Determines if the command can execute by invoked the provided during construction. + + Data used by the command to determine if it can execute. + + if this command can be executed; otherwise, . + + + + + Observes a property that implements INotifyPropertyChanged, and automatically calls DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The type of the return value of the method that this delegate encapulates + The property expression. Example: ObservesProperty(() => PropertyName). + The current instance of DelegateCommand + + + + Observes a property that is used to determine if this command can execute, and if it implements INotifyPropertyChanged it will automatically call DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The property expression. Example: ObservesCanExecute(() => PropertyName). + The current instance of DelegateCommand + + + + Extends to invoke the delegate in a background thread. + + + + + Creates a new instance of . + + A reference to a delegate of type . + When or are . + When the target of is not of type . + + + + Invokes the specified in an asynchronous thread by using a . + + The action to execute. + + + + Extends to invoke the delegate in a background thread. + + The type to use for the generic and types. + + + + Creates a new instance of . + + A reference to a delegate of type . + A reference to a delegate of type . + When or are . + When the target of is not of type , + or the target of is not of type . + + + + Invokes the specified in an asynchronous thread by using a . + + The action to execute. + The payload to pass while invoking it. + + + + Generic arguments class to pass to event handlers that need to receive data. + + The type of data to pass. + + + + Initializes the DataEventArgs class. + + Information related to the event. + + + + Gets the information related to the event. + + Information related to the event. + + + + Represents a reference to a that may contain a + to the target. This class is used + internally by the Prism Library. + + + + + Initializes a new instance of . + + The original to create a reference for. + If the class will create a weak reference to the delegate, allowing it to be garbage collected. Otherwise it will keep a strong reference to the target. + If the passed is not assignable to . + + + + Gets the (the target) referenced by the current object. + + if the object referenced by the current object has been garbage collected; otherwise, a reference to the referenced by the current object. + + + + Extends to invoke the delegate + in a specific . + + + + + Creates a new instance of . + + A reference to a delegate of type . + The synchronization context to use for UI thread dispatching. + When or are . + When the target of is not of type . + + + + Invokes the specified asynchronously in the specified . + + The action to execute. + + + + Extends to invoke the delegate + in a specific . + + The type to use for the generic and types. + + + + Creates a new instance of . + + A reference to a delegate of type . + A reference to a delegate of type . + The synchronization context to use for UI thread dispatching. + When or are . + When the target of is not of type , + or the target of is not of type . + + + + Invokes the specified asynchronously in the specified . + + The action to execute. + The payload to pass while invoking it. + + + + Implements . + + + + + Gets the single instance of the event managed by this EventAggregator. Multiple calls to this method with the same returns the same event instance. + + The type of event to get. This must inherit from . + A singleton instance of an event object of type . + + + + Defines a base class to publish and subscribe to events. + + + + + Allows the SynchronizationContext to be set by the EventAggregator for UI Thread Dispatching + + + + + Gets the list of current subscriptions. + + The current subscribers. + + + + Adds the specified to the subscribers' collection. + + The subscriber. + The that uniquely identifies every subscriber. + + Adds the subscription to the internal list and assigns it a new . + + + + + Calls all the execution strategies exposed by the list of . + + The arguments that will be passed to the listeners. + Before executing the strategies, this class will prune all the subscribers from the + list that return a when calling the + method. + + + + Removes the subscriber matching the . + + The returned by while subscribing to the event. + + + + Returns if there is a subscriber matching . + + The returned by while subscribing to the event. + if there is a that matches; otherwise . + + + + Provides a way to retrieve a to execute an action depending + on the value of a second filter predicate that returns true if the action should execute. + + + + + Creates a new instance of . + + A reference to a delegate of type . + When or are . + When the target of is not of type . + + + + Gets the target that is referenced by the . + + An or if the referenced target is not alive. + + + + Gets or sets a that identifies this . + + A token that identifies this . + + + + Gets the execution strategy to publish this event. + + An with the execution strategy, or if the is no longer valid. + + If is no longer valid because it was + garbage collected, this method will return . + Otherwise it will return a delegate that evaluates the and if it + returns will then call . The returned + delegate holds a hard reference to the target + delegates. As long as the returned delegate is not garbage collected, + the references delegates won't get collected either. + + + + + Invokes the specified synchronously when not overridden. + + The action to execute. + An is thrown if is null. + + + + Provides a way to retrieve a to execute an action depending + on the value of a second filter predicate that returns true if the action should execute. + + The type to use for the generic and types. + + + + Creates a new instance of . + + A reference to a delegate of type . + A reference to a delegate of type . + When or are . + When the target of is not of type , + or the target of is not of type . + + + + Gets the target that is referenced by the . + + An or if the referenced target is not alive. + + + + Gets the target that is referenced by the . + + An or if the referenced target is not alive. + + + + Gets or sets a that identifies this . + + A token that identifies this . + + + + Gets the execution strategy to publish this event. + + An with the execution strategy, or if the is no longer valid. + + If or are no longer valid because they were + garbage collected, this method will return . + Otherwise it will return a delegate that evaluates the and if it + returns will then call . The returned + delegate holds hard references to the and target + delegates. As long as the returned delegate is not garbage collected, + the and references delegates won't get collected either. + + + + + Invokes the specified synchronously when not overridden. + + The action to execute. + The payload to pass while invoking it. + An is thrown if is null. + + + + Represents a reference to a . + + + + + Gets the referenced object. + + A instance if the target is valid; otherwise . + + + + Defines an interface to get instances of an event type. + + + + + Gets an instance of an event type. + + The type of event to get. + An instance of an event object of type . + + + + Defines a contract for an event subscription to be used by . + + + + + Gets or sets a that identifies this . + + A token that identifies this . + + + + Gets the execution strategy to publish this event. + + An with the execution strategy, or if the is no longer valid. + + + + Defines a class that manages publication and subscription to events. + + + + + Subscribes a delegate to an event that will be published on the . + will maintain a to the target of the supplied delegate. + + The delegate that gets executed when the event is published. + A that uniquely identifies the added subscription. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + PubSubEvent will maintain a to the Target of the supplied delegate. + + The delegate that gets executed when the event is raised. + Specifies on which thread to receive the delegate callback. + A that uniquely identifies the added subscription. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event that will be published on the . + + The delegate that gets executed when the event is published. + When , the keeps a reference to the subscriber so it does not get garbage collected. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + + The delegate that gets executed when the event is published. + Specifies on which thread to receive the delegate callback. + When , the keeps a reference to the subscriber so it does not get garbage collected. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Publishes the . + + + + + Removes the first subscriber matching from the subscribers' list. + + The used when subscribing to the event. + + + + Returns if there is a subscriber matching . + + The used when subscribing to the event. + if there is an that matches; otherwise . + + + + Defines a class that manages publication and subscription to events. + + The type of message that will be passed to the subscribers. + + + + Subscribes a delegate to an event that will be published on the . + will maintain a to the target of the supplied delegate. + + The delegate that gets executed when the event is published. + A that uniquely identifies the added subscription. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + PubSubEvent will maintain a to the Target of the supplied delegate. + + The delegate that gets executed when the event is raised. + Specifies on which thread to receive the delegate callback. + A that uniquely identifies the added subscription. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event that will be published on the . + + The delegate that gets executed when the event is published. + When , the keeps a reference to the subscriber so it does not get garbage collected. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + + The delegate that gets executed when the event is published. + Specifies on which thread to receive the delegate callback. + When , the keeps a reference to the subscriber so it does not get garbage collected. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + + The delegate that gets executed when the event is published. + Specifies on which thread to receive the delegate callback. + When , the keeps a reference to the subscriber so it does not get garbage collected. + Filter to evaluate if the subscriber should receive the event. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Publishes the . + + Message to pass to the subscribers. + + + + Removes the first subscriber matching from the subscribers' list. + + The used when subscribing to the event. + + + + Returns if there is a subscriber matching . + + The used when subscribing to the event. + if there is an that matches; otherwise . + + + + Subscription token returned from on subscribe. + + + + + Initializes a new instance of . + + + + + Indicates whether the current object is equal to another object of the same type. + + + if the current object is equal to the parameter; otherwise, . + + An object to compare with this object. + + + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current ; otherwise, false. + + The to compare with the current . + The parameter is null.2 + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + 2 + + + + Disposes the SubscriptionToken, removing the subscription from the corresponding . + + + + + Specifies on which thread a subscriber will be called. + + + + + The call is done on the same thread on which the was published. + + + + + The call is done on the UI thread. + + + + + The call is done asynchronously on a background thread. + + + + + Interface that defines if the object instance is active + and notifies when the activity changes. + + + + + Gets or sets a value indicating whether the object is active. + + if the object is active; otherwise . + + + + Notifies that the value for property has changed. + + + + + Defines values for the categories used by . + + + + + Debug category. + + + + + Exception category. + + + + + Informational category. + + + + + Warning category. + + + + + Implementation of that logs into a message into the Debug.Listeners collection. + + + + + Write a new log entry with the specified category and priority. + + Message body to log. + Category of the entry. + The priority of the entry. + + + + Implementation of that does nothing. This + implementation is useful when the application does not need logging + but there are infrastructure pieces that assume there is a logger. + + + + + This method does nothing. + + Message body to log. + Category of the entry. + The priority of the entry. + + + + Defines a simple logger façade to be used by the Prism Library. + + + + + Write a new log entry with the specified category and priority. + + Message body to log. + Category of the entry. + The priority of the entry. + + + + Defines values for the priorities used by . + + + + + No priority specified. + + + + + High priority entry. + + + + + Medium priority entry. + + + + + Low priority entry. + + + + + Implementation of to simplify models. + + + + + Occurs when a property value changes. + + + + + Checks if a property already matches a desired value. Sets the property and + notifies listeners only when necessary. + + Type of the property. + Reference to a property with both getter and setter. + Desired value for the property. + Name of the property used to notify listeners. This + value is optional and can be provided automatically when invoked from compilers that + support CallerMemberName. + True if the value was changed, false if the existing value matched the + desired value. + + + + Checks if a property already matches a desired value. Sets the property and + notifies listeners only when necessary. + + Type of the property. + Reference to a property with both getter and setter. + Desired value for the property. + Name of the property used to notify listeners. This + value is optional and can be provided automatically when invoked from compilers that + support CallerMemberName. + Action that is called after the property value has been changed. + True if the value was changed, false if the existing value matched the + desired value. + + + + Raises this object's PropertyChanged event. + + Name of the property used to notify listeners. This + value is optional and can be provided automatically when invoked from compilers + that support . + + + + Notifies listeners that a property value has changed. + + Name of the property used to notify listeners. This + value is optional and can be provided automatically when invoked from compilers + that support . + + + + Raises this object's PropertyChanged event. + + The PropertyChangedEventArgs + + + + Raises this object's PropertyChanged event. + + The type of the property that has a new value + A Lambda expression representing the property that has a new value. + + + + Manages validation errors for an object, notifying when the error state changes. + + The type of the error object. + + + + Initializes a new instance of the class. + + The action that invoked if when errors are added for an object./> + event. + + + + Gets a value indicating whether the object has validation errors. + + + + + Gets the validation errors for a specified property. + + The name of the property. + The validation errors of type for the property. + + + + Clears the errors for the property indicated by the property expression. + + The property type. + The expression indicating a property. + + container.ClearErrors(()=>SomeProperty); + + + + + Clears the errors for a property. + + The name of th property for which to clear errors. + + container.ClearErrors("SomeProperty"); + + + + + Sets the validation errors for the specified property. + + The property type for which to set errors. + The indicating the property. + The list of errors to set for the property. + + + + Sets the validation errors for the specified property. + + + If a change is detected then the errors changed event is raised. + + The name of the property. + The new validation errors. + + + + Provides support for extracting property information based on a property expression. + + + + + Extracts the property name from a property expression. + + The object type containing the property specified in the expression. + The property expression (e.g. p => p.PropertyName) + The name of the property. + Thrown if the is null. + Thrown when the expression is:
+ Not a
+ The does not represent a property.
+ Or, the property is static. +
+
+ + + Extracts the property name from a LambdaExpression. + + The LambdaExpression + The name of the property. + Thrown if the is null. + Thrown when the expression is:
+ The does not represent a property.
+ Or, the property is static. +
+
+ + + The ViewModelLocationProvider class locates the view model for the view that has the AutoWireViewModelChanged attached property set to true. + The view model will be located and injected into the view's DataContext. To locate the view, two strategies are used: First the ViewModelLocationProvider + will look to see if there is a view model factory registered for that view, if not it will try to infer the view model using a convention based approach. + This class also provide methods for registering the view model factories, + and also to override the default view model factory and the default view type to view model type resolver. + + + + + A dictionary that contains all the registered factories for the views. + + + + + A dictionary that contains all the registered ViewModel types for the views. + + + + + The default view model factory which provides the ViewModel type as a parameter. + + + + + ViewModelfactory that provides the View instance and ViewModel type as parameters. + + + + + Default view type to view model type resolver, assumes the view model is in same assembly as the view type, but in the "ViewModels" namespace. + + + + + Sets the default view model factory. + + The view model factory which provides the ViewModel type as a parameter. + + + + Sets the default view model factory. + + The view model factory that provides the View instance and ViewModel type as parameters. + + + + Sets the default view type to view model type resolver. + + The view type to view model type resolver. + + + + Automatically looks up the viewmodel that corresponds to the current view, using two strategies: + It first looks to see if there is a mapping registered for that view, if not it will fallback to the convention based approach. + + The dependency object, typically a view. + The call back to use to create the binding between the View and ViewModel + + + + Gets the view model for the specified view. + + The view that the view model wants. + The ViewModel that corresponds to the view passed as a parameter. + + + + Gets the ViewModel type for the specified view. + + The View that the ViewModel wants. + The ViewModel type that corresponds to the View. + + + + Registers the ViewModel factory for the specified view type. + + The View + The ViewModel factory. + + + + Registers the ViewModel factory for the specified view type name. + + The name of the view type. + The ViewModel factory. + + + + Registers a ViewModel type for the specified view type. + + The View + The ViewModel + + + + Registers a ViewModel type for the specified view. + + The View type name + The ViewModel type + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Cannot register a CompositeCommand in itself.. + + + + + Looks up a localized string similar to Cannot register the same command twice in the same CompositeCommand.. + + + + + Looks up a localized string similar to {1}: {2}. Priority: {3}. Timestamp:{0:u}.. + + + + + Looks up a localized string similar to Neither the executeMethod nor the canExecuteMethod delegates can be null.. + + + + + Looks up a localized string similar to T for DelegateCommand<T> is not an object nor Nullable.. + + + + + Looks up a localized string similar to To use the UIThread option for subscribing, the EventAggregator must be constructed on the UI thread.. + + + + + Looks up a localized string similar to Invalid Delegate Reference Type Exception. + + + + + Looks up a localized string similar to The entity does not contain a property with that name. + + + + + Looks up a localized string similar to The member access expression does not access a property.. + + + + + Looks up a localized string similar to The expression is not a member access expression.. + + + + + Looks up a localized string similar to The referenced property is a static property.. + + +
+
diff --git a/packages/Prism.Core.6.3.0/lib/Xamarin.iOS10/Prism.dll b/packages/Prism.Core.6.3.0/lib/Xamarin.iOS10/Prism.dll new file mode 100644 index 0000000..1bb0ff8 Binary files /dev/null and b/packages/Prism.Core.6.3.0/lib/Xamarin.iOS10/Prism.dll differ diff --git a/packages/Prism.Core.6.3.0/lib/Xamarin.iOS10/Prism.xml b/packages/Prism.Core.6.3.0/lib/Xamarin.iOS10/Prism.xml new file mode 100644 index 0000000..13d72ea --- /dev/null +++ b/packages/Prism.Core.6.3.0/lib/Xamarin.iOS10/Prism.xml @@ -0,0 +1,1275 @@ + + + + Prism + + + + + The CompositeCommand composes one or more ICommands. + + + + + Initializes a new instance of . + + + + + Initializes a new instance of . + + Indicates when the command activity is going to be monitored. + + + + Adds a command to the collection and signs up for the event of it. + + + If this command is set to monitor command activity, and + implements the interface, this method will subscribe to its + event. + + The command to register. + + + + Removes a command from the collection and removes itself from the event of it. + + The command to unregister. + + + + Forwards to the registered commands and returns + if all of the commands return . + + Data used by the command. + If the command does not require data to be passed, this object can be set to . + + if all of the commands return ; otherwise, . + + + + Occurs when any of the registered commands raise . + + + + + Forwards to the registered commands. + + Data used by the command. + If the command does not require data to be passed, this object can be set to . + + + + + Evaluates if a command should execute. + + The command to evaluate. + A value indicating whether the command should be used + when evaluating and . + + If this command is set to monitor command activity, and + implements the interface, + this method will return if the command's + property is ; otherwise it always returns . + + + + Gets the list of all the registered commands. + + A list of registered commands. + This returns a copy of the commands subscribed to the CompositeCommand. + + + + Raises on the UI thread so every + command invoker can requery to check if the + can execute. + + + + + Handler for IsActiveChanged events of registered commands. + + The sender. + EventArgs to pass to the event. + + + + An whose delegates do not take any parameters for and . + + + + + + + Creates a new instance of with the to invoke on execution. + + The to invoke when is called. + + + + Creates a new instance of with the to invoke on execution + and a to query for determining if the command can execute. + + The to invoke when is called. + The to invoke when is called + + + + Executes the command. + + + + + Determines if the command can be executed. + + Returns if the command can execute,otherwise returns . + + + + Observes a property that implements INotifyPropertyChanged, and automatically calls DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The object type containing the property specified in the expression. + The property expression. Example: ObservesProperty(() => PropertyName). + The current instance of DelegateCommand + + + + Observes a property that is used to determine if this command can execute, and if it implements INotifyPropertyChanged it will automatically call DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The property expression. Example: ObservesCanExecute(() => PropertyName). + The current instance of DelegateCommand + + + + An whose delegates can be attached for and . + + + + + Creates a new instance of a , specifying both the execute action and the can execute function. + + The to execute when is invoked. + The to invoked when is invoked. + + + + Occurs when changes occur that affect whether or not the command should execute. + + + + + Raises so every + command invoker can requery . + + + + + Raises so every command invoker + can requery to check if the command can execute. + Note that this will trigger the execution of once for each invoker. + + + + + Observes a property that implements INotifyPropertyChanged, and automatically calls DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The object type containing the property specified in the expression. + The property expression. Example: ObservesProperty(() => PropertyName). + + + + Gets or sets a value indicating whether the object is active. + + if the object is active; otherwise . + + + + Fired if the property changes. + + + + + This raises the event. + + + + + An whose delegates can be attached for and . + + Parameter type. + + The constructor deliberately prevents the use of value types. + Because ICommand takes an object, having a value type for T would cause unexpected behavior when CanExecute(null) is called during XAML initialization for command bindings. + Using default(T) was considered and rejected as a solution because the implementor would not be able to distinguish between a valid and defaulted values. + + Instead, callers should support a value type by using a nullable value type and checking the HasValue property before using the Value property. + + + public MyClass() + { + this.submitCommand = new DelegateCommand<int?>(this.Submit, this.CanSubmit); + } + + private bool CanSubmit(int? customerId) + { + return (customerId.HasValue && customers.Contains(customerId.Value)); + } + + + + + + + Initializes a new instance of . + + Delegate to execute when Execute is called on the command. This can be null to just hook up a CanExecute delegate. + will always return true. + + + + Initializes a new instance of . + + Delegate to execute when Execute is called on the command. This can be null to just hook up a CanExecute delegate. + Delegate to execute when CanExecute is called on the command. This can be null. + When both and ar . + + + + Executes the command and invokes the provided during construction. + + Data used by the command. + + + + Determines if the command can execute by invoked the provided during construction. + + Data used by the command to determine if it can execute. + + if this command can be executed; otherwise, . + + + + + Observes a property that implements INotifyPropertyChanged, and automatically calls DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The type of the return value of the method that this delegate encapulates + The property expression. Example: ObservesProperty(() => PropertyName). + The current instance of DelegateCommand + + + + Observes a property that is used to determine if this command can execute, and if it implements INotifyPropertyChanged it will automatically call DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The property expression. Example: ObservesCanExecute(() => PropertyName). + The current instance of DelegateCommand + + + + Extends to invoke the delegate in a background thread. + + + + + Creates a new instance of . + + A reference to a delegate of type . + When or are . + When the target of is not of type . + + + + Invokes the specified in an asynchronous thread by using a . + + The action to execute. + + + + Extends to invoke the delegate in a background thread. + + The type to use for the generic and types. + + + + Creates a new instance of . + + A reference to a delegate of type . + A reference to a delegate of type . + When or are . + When the target of is not of type , + or the target of is not of type . + + + + Invokes the specified in an asynchronous thread by using a . + + The action to execute. + The payload to pass while invoking it. + + + + Generic arguments class to pass to event handlers that need to receive data. + + The type of data to pass. + + + + Initializes the DataEventArgs class. + + Information related to the event. + + + + Gets the information related to the event. + + Information related to the event. + + + + Represents a reference to a that may contain a + to the target. This class is used + internally by the Prism Library. + + + + + Initializes a new instance of . + + The original to create a reference for. + If the class will create a weak reference to the delegate, allowing it to be garbage collected. Otherwise it will keep a strong reference to the target. + If the passed is not assignable to . + + + + Gets the (the target) referenced by the current object. + + if the object referenced by the current object has been garbage collected; otherwise, a reference to the referenced by the current object. + + + + Extends to invoke the delegate + in a specific . + + + + + Creates a new instance of . + + A reference to a delegate of type . + The synchronization context to use for UI thread dispatching. + When or are . + When the target of is not of type . + + + + Invokes the specified asynchronously in the specified . + + The action to execute. + + + + Extends to invoke the delegate + in a specific . + + The type to use for the generic and types. + + + + Creates a new instance of . + + A reference to a delegate of type . + A reference to a delegate of type . + The synchronization context to use for UI thread dispatching. + When or are . + When the target of is not of type , + or the target of is not of type . + + + + Invokes the specified asynchronously in the specified . + + The action to execute. + The payload to pass while invoking it. + + + + Implements . + + + + + Gets the single instance of the event managed by this EventAggregator. Multiple calls to this method with the same returns the same event instance. + + The type of event to get. This must inherit from . + A singleton instance of an event object of type . + + + + Defines a base class to publish and subscribe to events. + + + + + Allows the SynchronizationContext to be set by the EventAggregator for UI Thread Dispatching + + + + + Gets the list of current subscriptions. + + The current subscribers. + + + + Adds the specified to the subscribers' collection. + + The subscriber. + The that uniquely identifies every subscriber. + + Adds the subscription to the internal list and assigns it a new . + + + + + Calls all the execution strategies exposed by the list of . + + The arguments that will be passed to the listeners. + Before executing the strategies, this class will prune all the subscribers from the + list that return a when calling the + method. + + + + Removes the subscriber matching the . + + The returned by while subscribing to the event. + + + + Returns if there is a subscriber matching . + + The returned by while subscribing to the event. + if there is a that matches; otherwise . + + + + Provides a way to retrieve a to execute an action depending + on the value of a second filter predicate that returns true if the action should execute. + + + + + Creates a new instance of . + + A reference to a delegate of type . + When or are . + When the target of is not of type . + + + + Gets the target that is referenced by the . + + An or if the referenced target is not alive. + + + + Gets or sets a that identifies this . + + A token that identifies this . + + + + Gets the execution strategy to publish this event. + + An with the execution strategy, or if the is no longer valid. + + If is no longer valid because it was + garbage collected, this method will return . + Otherwise it will return a delegate that evaluates the and if it + returns will then call . The returned + delegate holds a hard reference to the target + delegates. As long as the returned delegate is not garbage collected, + the references delegates won't get collected either. + + + + + Invokes the specified synchronously when not overridden. + + The action to execute. + An is thrown if is null. + + + + Provides a way to retrieve a to execute an action depending + on the value of a second filter predicate that returns true if the action should execute. + + The type to use for the generic and types. + + + + Creates a new instance of . + + A reference to a delegate of type . + A reference to a delegate of type . + When or are . + When the target of is not of type , + or the target of is not of type . + + + + Gets the target that is referenced by the . + + An or if the referenced target is not alive. + + + + Gets the target that is referenced by the . + + An or if the referenced target is not alive. + + + + Gets or sets a that identifies this . + + A token that identifies this . + + + + Gets the execution strategy to publish this event. + + An with the execution strategy, or if the is no longer valid. + + If or are no longer valid because they were + garbage collected, this method will return . + Otherwise it will return a delegate that evaluates the and if it + returns will then call . The returned + delegate holds hard references to the and target + delegates. As long as the returned delegate is not garbage collected, + the and references delegates won't get collected either. + + + + + Invokes the specified synchronously when not overridden. + + The action to execute. + The payload to pass while invoking it. + An is thrown if is null. + + + + Represents a reference to a . + + + + + Gets the referenced object. + + A instance if the target is valid; otherwise . + + + + Defines an interface to get instances of an event type. + + + + + Gets an instance of an event type. + + The type of event to get. + An instance of an event object of type . + + + + Defines a contract for an event subscription to be used by . + + + + + Gets or sets a that identifies this . + + A token that identifies this . + + + + Gets the execution strategy to publish this event. + + An with the execution strategy, or if the is no longer valid. + + + + Defines a class that manages publication and subscription to events. + + + + + Subscribes a delegate to an event that will be published on the . + will maintain a to the target of the supplied delegate. + + The delegate that gets executed when the event is published. + A that uniquely identifies the added subscription. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + PubSubEvent will maintain a to the Target of the supplied delegate. + + The delegate that gets executed when the event is raised. + Specifies on which thread to receive the delegate callback. + A that uniquely identifies the added subscription. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event that will be published on the . + + The delegate that gets executed when the event is published. + When , the keeps a reference to the subscriber so it does not get garbage collected. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + + The delegate that gets executed when the event is published. + Specifies on which thread to receive the delegate callback. + When , the keeps a reference to the subscriber so it does not get garbage collected. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Publishes the . + + + + + Removes the first subscriber matching from the subscribers' list. + + The used when subscribing to the event. + + + + Returns if there is a subscriber matching . + + The used when subscribing to the event. + if there is an that matches; otherwise . + + + + Defines a class that manages publication and subscription to events. + + The type of message that will be passed to the subscribers. + + + + Subscribes a delegate to an event that will be published on the . + will maintain a to the target of the supplied delegate. + + The delegate that gets executed when the event is published. + A that uniquely identifies the added subscription. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + PubSubEvent will maintain a to the Target of the supplied delegate. + + The delegate that gets executed when the event is raised. + Specifies on which thread to receive the delegate callback. + A that uniquely identifies the added subscription. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event that will be published on the . + + The delegate that gets executed when the event is published. + When , the keeps a reference to the subscriber so it does not get garbage collected. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + + The delegate that gets executed when the event is published. + Specifies on which thread to receive the delegate callback. + When , the keeps a reference to the subscriber so it does not get garbage collected. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + + The delegate that gets executed when the event is published. + Specifies on which thread to receive the delegate callback. + When , the keeps a reference to the subscriber so it does not get garbage collected. + Filter to evaluate if the subscriber should receive the event. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Publishes the . + + Message to pass to the subscribers. + + + + Removes the first subscriber matching from the subscribers' list. + + The used when subscribing to the event. + + + + Returns if there is a subscriber matching . + + The used when subscribing to the event. + if there is an that matches; otherwise . + + + + Subscription token returned from on subscribe. + + + + + Initializes a new instance of . + + + + + Indicates whether the current object is equal to another object of the same type. + + + if the current object is equal to the parameter; otherwise, . + + An object to compare with this object. + + + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current ; otherwise, false. + + The to compare with the current . + The parameter is null.2 + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + 2 + + + + Disposes the SubscriptionToken, removing the subscription from the corresponding . + + + + + Specifies on which thread a subscriber will be called. + + + + + The call is done on the same thread on which the was published. + + + + + The call is done on the UI thread. + + + + + The call is done asynchronously on a background thread. + + + + + Interface that defines if the object instance is active + and notifies when the activity changes. + + + + + Gets or sets a value indicating whether the object is active. + + if the object is active; otherwise . + + + + Notifies that the value for property has changed. + + + + + Defines values for the categories used by . + + + + + Debug category. + + + + + Exception category. + + + + + Informational category. + + + + + Warning category. + + + + + Implementation of that logs into a message into the Debug.Listeners collection. + + + + + Write a new log entry with the specified category and priority. + + Message body to log. + Category of the entry. + The priority of the entry. + + + + Implementation of that does nothing. This + implementation is useful when the application does not need logging + but there are infrastructure pieces that assume there is a logger. + + + + + This method does nothing. + + Message body to log. + Category of the entry. + The priority of the entry. + + + + Defines a simple logger façade to be used by the Prism Library. + + + + + Write a new log entry with the specified category and priority. + + Message body to log. + Category of the entry. + The priority of the entry. + + + + Defines values for the priorities used by . + + + + + No priority specified. + + + + + High priority entry. + + + + + Medium priority entry. + + + + + Low priority entry. + + + + + Implementation of to simplify models. + + + + + Occurs when a property value changes. + + + + + Checks if a property already matches a desired value. Sets the property and + notifies listeners only when necessary. + + Type of the property. + Reference to a property with both getter and setter. + Desired value for the property. + Name of the property used to notify listeners. This + value is optional and can be provided automatically when invoked from compilers that + support CallerMemberName. + True if the value was changed, false if the existing value matched the + desired value. + + + + Checks if a property already matches a desired value. Sets the property and + notifies listeners only when necessary. + + Type of the property. + Reference to a property with both getter and setter. + Desired value for the property. + Name of the property used to notify listeners. This + value is optional and can be provided automatically when invoked from compilers that + support CallerMemberName. + Action that is called after the property value has been changed. + True if the value was changed, false if the existing value matched the + desired value. + + + + Raises this object's PropertyChanged event. + + Name of the property used to notify listeners. This + value is optional and can be provided automatically when invoked from compilers + that support . + + + + Notifies listeners that a property value has changed. + + Name of the property used to notify listeners. This + value is optional and can be provided automatically when invoked from compilers + that support . + + + + Raises this object's PropertyChanged event. + + The PropertyChangedEventArgs + + + + Raises this object's PropertyChanged event. + + The type of the property that has a new value + A Lambda expression representing the property that has a new value. + + + + Manages validation errors for an object, notifying when the error state changes. + + The type of the error object. + + + + Initializes a new instance of the class. + + The action that invoked if when errors are added for an object./> + event. + + + + Gets a value indicating whether the object has validation errors. + + + + + Gets the validation errors for a specified property. + + The name of the property. + The validation errors of type for the property. + + + + Clears the errors for the property indicated by the property expression. + + The property type. + The expression indicating a property. + + container.ClearErrors(()=>SomeProperty); + + + + + Clears the errors for a property. + + The name of th property for which to clear errors. + + container.ClearErrors("SomeProperty"); + + + + + Sets the validation errors for the specified property. + + The property type for which to set errors. + The indicating the property. + The list of errors to set for the property. + + + + Sets the validation errors for the specified property. + + + If a change is detected then the errors changed event is raised. + + The name of the property. + The new validation errors. + + + + Provides support for extracting property information based on a property expression. + + + + + Extracts the property name from a property expression. + + The object type containing the property specified in the expression. + The property expression (e.g. p => p.PropertyName) + The name of the property. + Thrown if the is null. + Thrown when the expression is:
+ Not a
+ The does not represent a property.
+ Or, the property is static. +
+
+ + + Extracts the property name from a LambdaExpression. + + The LambdaExpression + The name of the property. + Thrown if the is null. + Thrown when the expression is:
+ The does not represent a property.
+ Or, the property is static. +
+
+ + + The ViewModelLocationProvider class locates the view model for the view that has the AutoWireViewModelChanged attached property set to true. + The view model will be located and injected into the view's DataContext. To locate the view, two strategies are used: First the ViewModelLocationProvider + will look to see if there is a view model factory registered for that view, if not it will try to infer the view model using a convention based approach. + This class also provide methods for registering the view model factories, + and also to override the default view model factory and the default view type to view model type resolver. + + + + + A dictionary that contains all the registered factories for the views. + + + + + A dictionary that contains all the registered ViewModel types for the views. + + + + + The default view model factory which provides the ViewModel type as a parameter. + + + + + ViewModelfactory that provides the View instance and ViewModel type as parameters. + + + + + Default view type to view model type resolver, assumes the view model is in same assembly as the view type, but in the "ViewModels" namespace. + + + + + Sets the default view model factory. + + The view model factory which provides the ViewModel type as a parameter. + + + + Sets the default view model factory. + + The view model factory that provides the View instance and ViewModel type as parameters. + + + + Sets the default view type to view model type resolver. + + The view type to view model type resolver. + + + + Automatically looks up the viewmodel that corresponds to the current view, using two strategies: + It first looks to see if there is a mapping registered for that view, if not it will fallback to the convention based approach. + + The dependency object, typically a view. + The call back to use to create the binding between the View and ViewModel + + + + Gets the view model for the specified view. + + The view that the view model wants. + The ViewModel that corresponds to the view passed as a parameter. + + + + Gets the ViewModel type for the specified view. + + The View that the ViewModel wants. + The ViewModel type that corresponds to the View. + + + + Registers the ViewModel factory for the specified view type. + + The View + The ViewModel factory. + + + + Registers the ViewModel factory for the specified view type name. + + The name of the view type. + The ViewModel factory. + + + + Registers a ViewModel type for the specified view type. + + The View + The ViewModel + + + + Registers a ViewModel type for the specified view. + + The View type name + The ViewModel type + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Cannot register a CompositeCommand in itself.. + + + + + Looks up a localized string similar to Cannot register the same command twice in the same CompositeCommand.. + + + + + Looks up a localized string similar to {1}: {2}. Priority: {3}. Timestamp:{0:u}.. + + + + + Looks up a localized string similar to Neither the executeMethod nor the canExecuteMethod delegates can be null.. + + + + + Looks up a localized string similar to T for DelegateCommand<T> is not an object nor Nullable.. + + + + + Looks up a localized string similar to To use the UIThread option for subscribing, the EventAggregator must be constructed on the UI thread.. + + + + + Looks up a localized string similar to Invalid Delegate Reference Type Exception. + + + + + Looks up a localized string similar to The entity does not contain a property with that name. + + + + + Looks up a localized string similar to The member access expression does not access a property.. + + + + + Looks up a localized string similar to The expression is not a member access expression.. + + + + + Looks up a localized string similar to The referenced property is a static property.. + + +
+
diff --git a/packages/Prism.Core.6.3.0/lib/net45/Prism.dll b/packages/Prism.Core.6.3.0/lib/net45/Prism.dll new file mode 100644 index 0000000..1bb0ff8 Binary files /dev/null and b/packages/Prism.Core.6.3.0/lib/net45/Prism.dll differ diff --git a/packages/Prism.Core.6.3.0/lib/net45/Prism.xml b/packages/Prism.Core.6.3.0/lib/net45/Prism.xml new file mode 100644 index 0000000..13d72ea --- /dev/null +++ b/packages/Prism.Core.6.3.0/lib/net45/Prism.xml @@ -0,0 +1,1275 @@ + + + + Prism + + + + + The CompositeCommand composes one or more ICommands. + + + + + Initializes a new instance of . + + + + + Initializes a new instance of . + + Indicates when the command activity is going to be monitored. + + + + Adds a command to the collection and signs up for the event of it. + + + If this command is set to monitor command activity, and + implements the interface, this method will subscribe to its + event. + + The command to register. + + + + Removes a command from the collection and removes itself from the event of it. + + The command to unregister. + + + + Forwards to the registered commands and returns + if all of the commands return . + + Data used by the command. + If the command does not require data to be passed, this object can be set to . + + if all of the commands return ; otherwise, . + + + + Occurs when any of the registered commands raise . + + + + + Forwards to the registered commands. + + Data used by the command. + If the command does not require data to be passed, this object can be set to . + + + + + Evaluates if a command should execute. + + The command to evaluate. + A value indicating whether the command should be used + when evaluating and . + + If this command is set to monitor command activity, and + implements the interface, + this method will return if the command's + property is ; otherwise it always returns . + + + + Gets the list of all the registered commands. + + A list of registered commands. + This returns a copy of the commands subscribed to the CompositeCommand. + + + + Raises on the UI thread so every + command invoker can requery to check if the + can execute. + + + + + Handler for IsActiveChanged events of registered commands. + + The sender. + EventArgs to pass to the event. + + + + An whose delegates do not take any parameters for and . + + + + + + + Creates a new instance of with the to invoke on execution. + + The to invoke when is called. + + + + Creates a new instance of with the to invoke on execution + and a to query for determining if the command can execute. + + The to invoke when is called. + The to invoke when is called + + + + Executes the command. + + + + + Determines if the command can be executed. + + Returns if the command can execute,otherwise returns . + + + + Observes a property that implements INotifyPropertyChanged, and automatically calls DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The object type containing the property specified in the expression. + The property expression. Example: ObservesProperty(() => PropertyName). + The current instance of DelegateCommand + + + + Observes a property that is used to determine if this command can execute, and if it implements INotifyPropertyChanged it will automatically call DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The property expression. Example: ObservesCanExecute(() => PropertyName). + The current instance of DelegateCommand + + + + An whose delegates can be attached for and . + + + + + Creates a new instance of a , specifying both the execute action and the can execute function. + + The to execute when is invoked. + The to invoked when is invoked. + + + + Occurs when changes occur that affect whether or not the command should execute. + + + + + Raises so every + command invoker can requery . + + + + + Raises so every command invoker + can requery to check if the command can execute. + Note that this will trigger the execution of once for each invoker. + + + + + Observes a property that implements INotifyPropertyChanged, and automatically calls DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The object type containing the property specified in the expression. + The property expression. Example: ObservesProperty(() => PropertyName). + + + + Gets or sets a value indicating whether the object is active. + + if the object is active; otherwise . + + + + Fired if the property changes. + + + + + This raises the event. + + + + + An whose delegates can be attached for and . + + Parameter type. + + The constructor deliberately prevents the use of value types. + Because ICommand takes an object, having a value type for T would cause unexpected behavior when CanExecute(null) is called during XAML initialization for command bindings. + Using default(T) was considered and rejected as a solution because the implementor would not be able to distinguish between a valid and defaulted values. + + Instead, callers should support a value type by using a nullable value type and checking the HasValue property before using the Value property. + + + public MyClass() + { + this.submitCommand = new DelegateCommand<int?>(this.Submit, this.CanSubmit); + } + + private bool CanSubmit(int? customerId) + { + return (customerId.HasValue && customers.Contains(customerId.Value)); + } + + + + + + + Initializes a new instance of . + + Delegate to execute when Execute is called on the command. This can be null to just hook up a CanExecute delegate. + will always return true. + + + + Initializes a new instance of . + + Delegate to execute when Execute is called on the command. This can be null to just hook up a CanExecute delegate. + Delegate to execute when CanExecute is called on the command. This can be null. + When both and ar . + + + + Executes the command and invokes the provided during construction. + + Data used by the command. + + + + Determines if the command can execute by invoked the provided during construction. + + Data used by the command to determine if it can execute. + + if this command can be executed; otherwise, . + + + + + Observes a property that implements INotifyPropertyChanged, and automatically calls DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The type of the return value of the method that this delegate encapulates + The property expression. Example: ObservesProperty(() => PropertyName). + The current instance of DelegateCommand + + + + Observes a property that is used to determine if this command can execute, and if it implements INotifyPropertyChanged it will automatically call DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The property expression. Example: ObservesCanExecute(() => PropertyName). + The current instance of DelegateCommand + + + + Extends to invoke the delegate in a background thread. + + + + + Creates a new instance of . + + A reference to a delegate of type . + When or are . + When the target of is not of type . + + + + Invokes the specified in an asynchronous thread by using a . + + The action to execute. + + + + Extends to invoke the delegate in a background thread. + + The type to use for the generic and types. + + + + Creates a new instance of . + + A reference to a delegate of type . + A reference to a delegate of type . + When or are . + When the target of is not of type , + or the target of is not of type . + + + + Invokes the specified in an asynchronous thread by using a . + + The action to execute. + The payload to pass while invoking it. + + + + Generic arguments class to pass to event handlers that need to receive data. + + The type of data to pass. + + + + Initializes the DataEventArgs class. + + Information related to the event. + + + + Gets the information related to the event. + + Information related to the event. + + + + Represents a reference to a that may contain a + to the target. This class is used + internally by the Prism Library. + + + + + Initializes a new instance of . + + The original to create a reference for. + If the class will create a weak reference to the delegate, allowing it to be garbage collected. Otherwise it will keep a strong reference to the target. + If the passed is not assignable to . + + + + Gets the (the target) referenced by the current object. + + if the object referenced by the current object has been garbage collected; otherwise, a reference to the referenced by the current object. + + + + Extends to invoke the delegate + in a specific . + + + + + Creates a new instance of . + + A reference to a delegate of type . + The synchronization context to use for UI thread dispatching. + When or are . + When the target of is not of type . + + + + Invokes the specified asynchronously in the specified . + + The action to execute. + + + + Extends to invoke the delegate + in a specific . + + The type to use for the generic and types. + + + + Creates a new instance of . + + A reference to a delegate of type . + A reference to a delegate of type . + The synchronization context to use for UI thread dispatching. + When or are . + When the target of is not of type , + or the target of is not of type . + + + + Invokes the specified asynchronously in the specified . + + The action to execute. + The payload to pass while invoking it. + + + + Implements . + + + + + Gets the single instance of the event managed by this EventAggregator. Multiple calls to this method with the same returns the same event instance. + + The type of event to get. This must inherit from . + A singleton instance of an event object of type . + + + + Defines a base class to publish and subscribe to events. + + + + + Allows the SynchronizationContext to be set by the EventAggregator for UI Thread Dispatching + + + + + Gets the list of current subscriptions. + + The current subscribers. + + + + Adds the specified to the subscribers' collection. + + The subscriber. + The that uniquely identifies every subscriber. + + Adds the subscription to the internal list and assigns it a new . + + + + + Calls all the execution strategies exposed by the list of . + + The arguments that will be passed to the listeners. + Before executing the strategies, this class will prune all the subscribers from the + list that return a when calling the + method. + + + + Removes the subscriber matching the . + + The returned by while subscribing to the event. + + + + Returns if there is a subscriber matching . + + The returned by while subscribing to the event. + if there is a that matches; otherwise . + + + + Provides a way to retrieve a to execute an action depending + on the value of a second filter predicate that returns true if the action should execute. + + + + + Creates a new instance of . + + A reference to a delegate of type . + When or are . + When the target of is not of type . + + + + Gets the target that is referenced by the . + + An or if the referenced target is not alive. + + + + Gets or sets a that identifies this . + + A token that identifies this . + + + + Gets the execution strategy to publish this event. + + An with the execution strategy, or if the is no longer valid. + + If is no longer valid because it was + garbage collected, this method will return . + Otherwise it will return a delegate that evaluates the and if it + returns will then call . The returned + delegate holds a hard reference to the target + delegates. As long as the returned delegate is not garbage collected, + the references delegates won't get collected either. + + + + + Invokes the specified synchronously when not overridden. + + The action to execute. + An is thrown if is null. + + + + Provides a way to retrieve a to execute an action depending + on the value of a second filter predicate that returns true if the action should execute. + + The type to use for the generic and types. + + + + Creates a new instance of . + + A reference to a delegate of type . + A reference to a delegate of type . + When or are . + When the target of is not of type , + or the target of is not of type . + + + + Gets the target that is referenced by the . + + An or if the referenced target is not alive. + + + + Gets the target that is referenced by the . + + An or if the referenced target is not alive. + + + + Gets or sets a that identifies this . + + A token that identifies this . + + + + Gets the execution strategy to publish this event. + + An with the execution strategy, or if the is no longer valid. + + If or are no longer valid because they were + garbage collected, this method will return . + Otherwise it will return a delegate that evaluates the and if it + returns will then call . The returned + delegate holds hard references to the and target + delegates. As long as the returned delegate is not garbage collected, + the and references delegates won't get collected either. + + + + + Invokes the specified synchronously when not overridden. + + The action to execute. + The payload to pass while invoking it. + An is thrown if is null. + + + + Represents a reference to a . + + + + + Gets the referenced object. + + A instance if the target is valid; otherwise . + + + + Defines an interface to get instances of an event type. + + + + + Gets an instance of an event type. + + The type of event to get. + An instance of an event object of type . + + + + Defines a contract for an event subscription to be used by . + + + + + Gets or sets a that identifies this . + + A token that identifies this . + + + + Gets the execution strategy to publish this event. + + An with the execution strategy, or if the is no longer valid. + + + + Defines a class that manages publication and subscription to events. + + + + + Subscribes a delegate to an event that will be published on the . + will maintain a to the target of the supplied delegate. + + The delegate that gets executed when the event is published. + A that uniquely identifies the added subscription. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + PubSubEvent will maintain a to the Target of the supplied delegate. + + The delegate that gets executed when the event is raised. + Specifies on which thread to receive the delegate callback. + A that uniquely identifies the added subscription. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event that will be published on the . + + The delegate that gets executed when the event is published. + When , the keeps a reference to the subscriber so it does not get garbage collected. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + + The delegate that gets executed when the event is published. + Specifies on which thread to receive the delegate callback. + When , the keeps a reference to the subscriber so it does not get garbage collected. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Publishes the . + + + + + Removes the first subscriber matching from the subscribers' list. + + The used when subscribing to the event. + + + + Returns if there is a subscriber matching . + + The used when subscribing to the event. + if there is an that matches; otherwise . + + + + Defines a class that manages publication and subscription to events. + + The type of message that will be passed to the subscribers. + + + + Subscribes a delegate to an event that will be published on the . + will maintain a to the target of the supplied delegate. + + The delegate that gets executed when the event is published. + A that uniquely identifies the added subscription. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + PubSubEvent will maintain a to the Target of the supplied delegate. + + The delegate that gets executed when the event is raised. + Specifies on which thread to receive the delegate callback. + A that uniquely identifies the added subscription. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event that will be published on the . + + The delegate that gets executed when the event is published. + When , the keeps a reference to the subscriber so it does not get garbage collected. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + + The delegate that gets executed when the event is published. + Specifies on which thread to receive the delegate callback. + When , the keeps a reference to the subscriber so it does not get garbage collected. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + + The delegate that gets executed when the event is published. + Specifies on which thread to receive the delegate callback. + When , the keeps a reference to the subscriber so it does not get garbage collected. + Filter to evaluate if the subscriber should receive the event. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Publishes the . + + Message to pass to the subscribers. + + + + Removes the first subscriber matching from the subscribers' list. + + The used when subscribing to the event. + + + + Returns if there is a subscriber matching . + + The used when subscribing to the event. + if there is an that matches; otherwise . + + + + Subscription token returned from on subscribe. + + + + + Initializes a new instance of . + + + + + Indicates whether the current object is equal to another object of the same type. + + + if the current object is equal to the parameter; otherwise, . + + An object to compare with this object. + + + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current ; otherwise, false. + + The to compare with the current . + The parameter is null.2 + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + 2 + + + + Disposes the SubscriptionToken, removing the subscription from the corresponding . + + + + + Specifies on which thread a subscriber will be called. + + + + + The call is done on the same thread on which the was published. + + + + + The call is done on the UI thread. + + + + + The call is done asynchronously on a background thread. + + + + + Interface that defines if the object instance is active + and notifies when the activity changes. + + + + + Gets or sets a value indicating whether the object is active. + + if the object is active; otherwise . + + + + Notifies that the value for property has changed. + + + + + Defines values for the categories used by . + + + + + Debug category. + + + + + Exception category. + + + + + Informational category. + + + + + Warning category. + + + + + Implementation of that logs into a message into the Debug.Listeners collection. + + + + + Write a new log entry with the specified category and priority. + + Message body to log. + Category of the entry. + The priority of the entry. + + + + Implementation of that does nothing. This + implementation is useful when the application does not need logging + but there are infrastructure pieces that assume there is a logger. + + + + + This method does nothing. + + Message body to log. + Category of the entry. + The priority of the entry. + + + + Defines a simple logger façade to be used by the Prism Library. + + + + + Write a new log entry with the specified category and priority. + + Message body to log. + Category of the entry. + The priority of the entry. + + + + Defines values for the priorities used by . + + + + + No priority specified. + + + + + High priority entry. + + + + + Medium priority entry. + + + + + Low priority entry. + + + + + Implementation of to simplify models. + + + + + Occurs when a property value changes. + + + + + Checks if a property already matches a desired value. Sets the property and + notifies listeners only when necessary. + + Type of the property. + Reference to a property with both getter and setter. + Desired value for the property. + Name of the property used to notify listeners. This + value is optional and can be provided automatically when invoked from compilers that + support CallerMemberName. + True if the value was changed, false if the existing value matched the + desired value. + + + + Checks if a property already matches a desired value. Sets the property and + notifies listeners only when necessary. + + Type of the property. + Reference to a property with both getter and setter. + Desired value for the property. + Name of the property used to notify listeners. This + value is optional and can be provided automatically when invoked from compilers that + support CallerMemberName. + Action that is called after the property value has been changed. + True if the value was changed, false if the existing value matched the + desired value. + + + + Raises this object's PropertyChanged event. + + Name of the property used to notify listeners. This + value is optional and can be provided automatically when invoked from compilers + that support . + + + + Notifies listeners that a property value has changed. + + Name of the property used to notify listeners. This + value is optional and can be provided automatically when invoked from compilers + that support . + + + + Raises this object's PropertyChanged event. + + The PropertyChangedEventArgs + + + + Raises this object's PropertyChanged event. + + The type of the property that has a new value + A Lambda expression representing the property that has a new value. + + + + Manages validation errors for an object, notifying when the error state changes. + + The type of the error object. + + + + Initializes a new instance of the class. + + The action that invoked if when errors are added for an object./> + event. + + + + Gets a value indicating whether the object has validation errors. + + + + + Gets the validation errors for a specified property. + + The name of the property. + The validation errors of type for the property. + + + + Clears the errors for the property indicated by the property expression. + + The property type. + The expression indicating a property. + + container.ClearErrors(()=>SomeProperty); + + + + + Clears the errors for a property. + + The name of th property for which to clear errors. + + container.ClearErrors("SomeProperty"); + + + + + Sets the validation errors for the specified property. + + The property type for which to set errors. + The indicating the property. + The list of errors to set for the property. + + + + Sets the validation errors for the specified property. + + + If a change is detected then the errors changed event is raised. + + The name of the property. + The new validation errors. + + + + Provides support for extracting property information based on a property expression. + + + + + Extracts the property name from a property expression. + + The object type containing the property specified in the expression. + The property expression (e.g. p => p.PropertyName) + The name of the property. + Thrown if the is null. + Thrown when the expression is:
+ Not a
+ The does not represent a property.
+ Or, the property is static. +
+
+ + + Extracts the property name from a LambdaExpression. + + The LambdaExpression + The name of the property. + Thrown if the is null. + Thrown when the expression is:
+ The does not represent a property.
+ Or, the property is static. +
+
+ + + The ViewModelLocationProvider class locates the view model for the view that has the AutoWireViewModelChanged attached property set to true. + The view model will be located and injected into the view's DataContext. To locate the view, two strategies are used: First the ViewModelLocationProvider + will look to see if there is a view model factory registered for that view, if not it will try to infer the view model using a convention based approach. + This class also provide methods for registering the view model factories, + and also to override the default view model factory and the default view type to view model type resolver. + + + + + A dictionary that contains all the registered factories for the views. + + + + + A dictionary that contains all the registered ViewModel types for the views. + + + + + The default view model factory which provides the ViewModel type as a parameter. + + + + + ViewModelfactory that provides the View instance and ViewModel type as parameters. + + + + + Default view type to view model type resolver, assumes the view model is in same assembly as the view type, but in the "ViewModels" namespace. + + + + + Sets the default view model factory. + + The view model factory which provides the ViewModel type as a parameter. + + + + Sets the default view model factory. + + The view model factory that provides the View instance and ViewModel type as parameters. + + + + Sets the default view type to view model type resolver. + + The view type to view model type resolver. + + + + Automatically looks up the viewmodel that corresponds to the current view, using two strategies: + It first looks to see if there is a mapping registered for that view, if not it will fallback to the convention based approach. + + The dependency object, typically a view. + The call back to use to create the binding between the View and ViewModel + + + + Gets the view model for the specified view. + + The view that the view model wants. + The ViewModel that corresponds to the view passed as a parameter. + + + + Gets the ViewModel type for the specified view. + + The View that the ViewModel wants. + The ViewModel type that corresponds to the View. + + + + Registers the ViewModel factory for the specified view type. + + The View + The ViewModel factory. + + + + Registers the ViewModel factory for the specified view type name. + + The name of the view type. + The ViewModel factory. + + + + Registers a ViewModel type for the specified view type. + + The View + The ViewModel + + + + Registers a ViewModel type for the specified view. + + The View type name + The ViewModel type + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Cannot register a CompositeCommand in itself.. + + + + + Looks up a localized string similar to Cannot register the same command twice in the same CompositeCommand.. + + + + + Looks up a localized string similar to {1}: {2}. Priority: {3}. Timestamp:{0:u}.. + + + + + Looks up a localized string similar to Neither the executeMethod nor the canExecuteMethod delegates can be null.. + + + + + Looks up a localized string similar to T for DelegateCommand<T> is not an object nor Nullable.. + + + + + Looks up a localized string similar to To use the UIThread option for subscribing, the EventAggregator must be constructed on the UI thread.. + + + + + Looks up a localized string similar to Invalid Delegate Reference Type Exception. + + + + + Looks up a localized string similar to The entity does not contain a property with that name. + + + + + Looks up a localized string similar to The member access expression does not access a property.. + + + + + Looks up a localized string similar to The expression is not a member access expression.. + + + + + Looks up a localized string similar to The referenced property is a static property.. + + +
+
diff --git a/packages/Prism.Core.6.3.0/lib/portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10/Prism.dll b/packages/Prism.Core.6.3.0/lib/portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10/Prism.dll new file mode 100644 index 0000000..1bb0ff8 Binary files /dev/null and b/packages/Prism.Core.6.3.0/lib/portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10/Prism.dll differ diff --git a/packages/Prism.Core.6.3.0/lib/portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10/Prism.xml b/packages/Prism.Core.6.3.0/lib/portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10/Prism.xml new file mode 100644 index 0000000..13d72ea --- /dev/null +++ b/packages/Prism.Core.6.3.0/lib/portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10/Prism.xml @@ -0,0 +1,1275 @@ + + + + Prism + + + + + The CompositeCommand composes one or more ICommands. + + + + + Initializes a new instance of . + + + + + Initializes a new instance of . + + Indicates when the command activity is going to be monitored. + + + + Adds a command to the collection and signs up for the event of it. + + + If this command is set to monitor command activity, and + implements the interface, this method will subscribe to its + event. + + The command to register. + + + + Removes a command from the collection and removes itself from the event of it. + + The command to unregister. + + + + Forwards to the registered commands and returns + if all of the commands return . + + Data used by the command. + If the command does not require data to be passed, this object can be set to . + + if all of the commands return ; otherwise, . + + + + Occurs when any of the registered commands raise . + + + + + Forwards to the registered commands. + + Data used by the command. + If the command does not require data to be passed, this object can be set to . + + + + + Evaluates if a command should execute. + + The command to evaluate. + A value indicating whether the command should be used + when evaluating and . + + If this command is set to monitor command activity, and + implements the interface, + this method will return if the command's + property is ; otherwise it always returns . + + + + Gets the list of all the registered commands. + + A list of registered commands. + This returns a copy of the commands subscribed to the CompositeCommand. + + + + Raises on the UI thread so every + command invoker can requery to check if the + can execute. + + + + + Handler for IsActiveChanged events of registered commands. + + The sender. + EventArgs to pass to the event. + + + + An whose delegates do not take any parameters for and . + + + + + + + Creates a new instance of with the to invoke on execution. + + The to invoke when is called. + + + + Creates a new instance of with the to invoke on execution + and a to query for determining if the command can execute. + + The to invoke when is called. + The to invoke when is called + + + + Executes the command. + + + + + Determines if the command can be executed. + + Returns if the command can execute,otherwise returns . + + + + Observes a property that implements INotifyPropertyChanged, and automatically calls DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The object type containing the property specified in the expression. + The property expression. Example: ObservesProperty(() => PropertyName). + The current instance of DelegateCommand + + + + Observes a property that is used to determine if this command can execute, and if it implements INotifyPropertyChanged it will automatically call DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The property expression. Example: ObservesCanExecute(() => PropertyName). + The current instance of DelegateCommand + + + + An whose delegates can be attached for and . + + + + + Creates a new instance of a , specifying both the execute action and the can execute function. + + The to execute when is invoked. + The to invoked when is invoked. + + + + Occurs when changes occur that affect whether or not the command should execute. + + + + + Raises so every + command invoker can requery . + + + + + Raises so every command invoker + can requery to check if the command can execute. + Note that this will trigger the execution of once for each invoker. + + + + + Observes a property that implements INotifyPropertyChanged, and automatically calls DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The object type containing the property specified in the expression. + The property expression. Example: ObservesProperty(() => PropertyName). + + + + Gets or sets a value indicating whether the object is active. + + if the object is active; otherwise . + + + + Fired if the property changes. + + + + + This raises the event. + + + + + An whose delegates can be attached for and . + + Parameter type. + + The constructor deliberately prevents the use of value types. + Because ICommand takes an object, having a value type for T would cause unexpected behavior when CanExecute(null) is called during XAML initialization for command bindings. + Using default(T) was considered and rejected as a solution because the implementor would not be able to distinguish between a valid and defaulted values. + + Instead, callers should support a value type by using a nullable value type and checking the HasValue property before using the Value property. + + + public MyClass() + { + this.submitCommand = new DelegateCommand<int?>(this.Submit, this.CanSubmit); + } + + private bool CanSubmit(int? customerId) + { + return (customerId.HasValue && customers.Contains(customerId.Value)); + } + + + + + + + Initializes a new instance of . + + Delegate to execute when Execute is called on the command. This can be null to just hook up a CanExecute delegate. + will always return true. + + + + Initializes a new instance of . + + Delegate to execute when Execute is called on the command. This can be null to just hook up a CanExecute delegate. + Delegate to execute when CanExecute is called on the command. This can be null. + When both and ar . + + + + Executes the command and invokes the provided during construction. + + Data used by the command. + + + + Determines if the command can execute by invoked the provided during construction. + + Data used by the command to determine if it can execute. + + if this command can be executed; otherwise, . + + + + + Observes a property that implements INotifyPropertyChanged, and automatically calls DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The type of the return value of the method that this delegate encapulates + The property expression. Example: ObservesProperty(() => PropertyName). + The current instance of DelegateCommand + + + + Observes a property that is used to determine if this command can execute, and if it implements INotifyPropertyChanged it will automatically call DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The property expression. Example: ObservesCanExecute(() => PropertyName). + The current instance of DelegateCommand + + + + Extends to invoke the delegate in a background thread. + + + + + Creates a new instance of . + + A reference to a delegate of type . + When or are . + When the target of is not of type . + + + + Invokes the specified in an asynchronous thread by using a . + + The action to execute. + + + + Extends to invoke the delegate in a background thread. + + The type to use for the generic and types. + + + + Creates a new instance of . + + A reference to a delegate of type . + A reference to a delegate of type . + When or are . + When the target of is not of type , + or the target of is not of type . + + + + Invokes the specified in an asynchronous thread by using a . + + The action to execute. + The payload to pass while invoking it. + + + + Generic arguments class to pass to event handlers that need to receive data. + + The type of data to pass. + + + + Initializes the DataEventArgs class. + + Information related to the event. + + + + Gets the information related to the event. + + Information related to the event. + + + + Represents a reference to a that may contain a + to the target. This class is used + internally by the Prism Library. + + + + + Initializes a new instance of . + + The original to create a reference for. + If the class will create a weak reference to the delegate, allowing it to be garbage collected. Otherwise it will keep a strong reference to the target. + If the passed is not assignable to . + + + + Gets the (the target) referenced by the current object. + + if the object referenced by the current object has been garbage collected; otherwise, a reference to the referenced by the current object. + + + + Extends to invoke the delegate + in a specific . + + + + + Creates a new instance of . + + A reference to a delegate of type . + The synchronization context to use for UI thread dispatching. + When or are . + When the target of is not of type . + + + + Invokes the specified asynchronously in the specified . + + The action to execute. + + + + Extends to invoke the delegate + in a specific . + + The type to use for the generic and types. + + + + Creates a new instance of . + + A reference to a delegate of type . + A reference to a delegate of type . + The synchronization context to use for UI thread dispatching. + When or are . + When the target of is not of type , + or the target of is not of type . + + + + Invokes the specified asynchronously in the specified . + + The action to execute. + The payload to pass while invoking it. + + + + Implements . + + + + + Gets the single instance of the event managed by this EventAggregator. Multiple calls to this method with the same returns the same event instance. + + The type of event to get. This must inherit from . + A singleton instance of an event object of type . + + + + Defines a base class to publish and subscribe to events. + + + + + Allows the SynchronizationContext to be set by the EventAggregator for UI Thread Dispatching + + + + + Gets the list of current subscriptions. + + The current subscribers. + + + + Adds the specified to the subscribers' collection. + + The subscriber. + The that uniquely identifies every subscriber. + + Adds the subscription to the internal list and assigns it a new . + + + + + Calls all the execution strategies exposed by the list of . + + The arguments that will be passed to the listeners. + Before executing the strategies, this class will prune all the subscribers from the + list that return a when calling the + method. + + + + Removes the subscriber matching the . + + The returned by while subscribing to the event. + + + + Returns if there is a subscriber matching . + + The returned by while subscribing to the event. + if there is a that matches; otherwise . + + + + Provides a way to retrieve a to execute an action depending + on the value of a second filter predicate that returns true if the action should execute. + + + + + Creates a new instance of . + + A reference to a delegate of type . + When or are . + When the target of is not of type . + + + + Gets the target that is referenced by the . + + An or if the referenced target is not alive. + + + + Gets or sets a that identifies this . + + A token that identifies this . + + + + Gets the execution strategy to publish this event. + + An with the execution strategy, or if the is no longer valid. + + If is no longer valid because it was + garbage collected, this method will return . + Otherwise it will return a delegate that evaluates the and if it + returns will then call . The returned + delegate holds a hard reference to the target + delegates. As long as the returned delegate is not garbage collected, + the references delegates won't get collected either. + + + + + Invokes the specified synchronously when not overridden. + + The action to execute. + An is thrown if is null. + + + + Provides a way to retrieve a to execute an action depending + on the value of a second filter predicate that returns true if the action should execute. + + The type to use for the generic and types. + + + + Creates a new instance of . + + A reference to a delegate of type . + A reference to a delegate of type . + When or are . + When the target of is not of type , + or the target of is not of type . + + + + Gets the target that is referenced by the . + + An or if the referenced target is not alive. + + + + Gets the target that is referenced by the . + + An or if the referenced target is not alive. + + + + Gets or sets a that identifies this . + + A token that identifies this . + + + + Gets the execution strategy to publish this event. + + An with the execution strategy, or if the is no longer valid. + + If or are no longer valid because they were + garbage collected, this method will return . + Otherwise it will return a delegate that evaluates the and if it + returns will then call . The returned + delegate holds hard references to the and target + delegates. As long as the returned delegate is not garbage collected, + the and references delegates won't get collected either. + + + + + Invokes the specified synchronously when not overridden. + + The action to execute. + The payload to pass while invoking it. + An is thrown if is null. + + + + Represents a reference to a . + + + + + Gets the referenced object. + + A instance if the target is valid; otherwise . + + + + Defines an interface to get instances of an event type. + + + + + Gets an instance of an event type. + + The type of event to get. + An instance of an event object of type . + + + + Defines a contract for an event subscription to be used by . + + + + + Gets or sets a that identifies this . + + A token that identifies this . + + + + Gets the execution strategy to publish this event. + + An with the execution strategy, or if the is no longer valid. + + + + Defines a class that manages publication and subscription to events. + + + + + Subscribes a delegate to an event that will be published on the . + will maintain a to the target of the supplied delegate. + + The delegate that gets executed when the event is published. + A that uniquely identifies the added subscription. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + PubSubEvent will maintain a to the Target of the supplied delegate. + + The delegate that gets executed when the event is raised. + Specifies on which thread to receive the delegate callback. + A that uniquely identifies the added subscription. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event that will be published on the . + + The delegate that gets executed when the event is published. + When , the keeps a reference to the subscriber so it does not get garbage collected. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + + The delegate that gets executed when the event is published. + Specifies on which thread to receive the delegate callback. + When , the keeps a reference to the subscriber so it does not get garbage collected. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Publishes the . + + + + + Removes the first subscriber matching from the subscribers' list. + + The used when subscribing to the event. + + + + Returns if there is a subscriber matching . + + The used when subscribing to the event. + if there is an that matches; otherwise . + + + + Defines a class that manages publication and subscription to events. + + The type of message that will be passed to the subscribers. + + + + Subscribes a delegate to an event that will be published on the . + will maintain a to the target of the supplied delegate. + + The delegate that gets executed when the event is published. + A that uniquely identifies the added subscription. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + PubSubEvent will maintain a to the Target of the supplied delegate. + + The delegate that gets executed when the event is raised. + Specifies on which thread to receive the delegate callback. + A that uniquely identifies the added subscription. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event that will be published on the . + + The delegate that gets executed when the event is published. + When , the keeps a reference to the subscriber so it does not get garbage collected. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + + The delegate that gets executed when the event is published. + Specifies on which thread to receive the delegate callback. + When , the keeps a reference to the subscriber so it does not get garbage collected. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + + The delegate that gets executed when the event is published. + Specifies on which thread to receive the delegate callback. + When , the keeps a reference to the subscriber so it does not get garbage collected. + Filter to evaluate if the subscriber should receive the event. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Publishes the . + + Message to pass to the subscribers. + + + + Removes the first subscriber matching from the subscribers' list. + + The used when subscribing to the event. + + + + Returns if there is a subscriber matching . + + The used when subscribing to the event. + if there is an that matches; otherwise . + + + + Subscription token returned from on subscribe. + + + + + Initializes a new instance of . + + + + + Indicates whether the current object is equal to another object of the same type. + + + if the current object is equal to the parameter; otherwise, . + + An object to compare with this object. + + + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current ; otherwise, false. + + The to compare with the current . + The parameter is null.2 + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + 2 + + + + Disposes the SubscriptionToken, removing the subscription from the corresponding . + + + + + Specifies on which thread a subscriber will be called. + + + + + The call is done on the same thread on which the was published. + + + + + The call is done on the UI thread. + + + + + The call is done asynchronously on a background thread. + + + + + Interface that defines if the object instance is active + and notifies when the activity changes. + + + + + Gets or sets a value indicating whether the object is active. + + if the object is active; otherwise . + + + + Notifies that the value for property has changed. + + + + + Defines values for the categories used by . + + + + + Debug category. + + + + + Exception category. + + + + + Informational category. + + + + + Warning category. + + + + + Implementation of that logs into a message into the Debug.Listeners collection. + + + + + Write a new log entry with the specified category and priority. + + Message body to log. + Category of the entry. + The priority of the entry. + + + + Implementation of that does nothing. This + implementation is useful when the application does not need logging + but there are infrastructure pieces that assume there is a logger. + + + + + This method does nothing. + + Message body to log. + Category of the entry. + The priority of the entry. + + + + Defines a simple logger façade to be used by the Prism Library. + + + + + Write a new log entry with the specified category and priority. + + Message body to log. + Category of the entry. + The priority of the entry. + + + + Defines values for the priorities used by . + + + + + No priority specified. + + + + + High priority entry. + + + + + Medium priority entry. + + + + + Low priority entry. + + + + + Implementation of to simplify models. + + + + + Occurs when a property value changes. + + + + + Checks if a property already matches a desired value. Sets the property and + notifies listeners only when necessary. + + Type of the property. + Reference to a property with both getter and setter. + Desired value for the property. + Name of the property used to notify listeners. This + value is optional and can be provided automatically when invoked from compilers that + support CallerMemberName. + True if the value was changed, false if the existing value matched the + desired value. + + + + Checks if a property already matches a desired value. Sets the property and + notifies listeners only when necessary. + + Type of the property. + Reference to a property with both getter and setter. + Desired value for the property. + Name of the property used to notify listeners. This + value is optional and can be provided automatically when invoked from compilers that + support CallerMemberName. + Action that is called after the property value has been changed. + True if the value was changed, false if the existing value matched the + desired value. + + + + Raises this object's PropertyChanged event. + + Name of the property used to notify listeners. This + value is optional and can be provided automatically when invoked from compilers + that support . + + + + Notifies listeners that a property value has changed. + + Name of the property used to notify listeners. This + value is optional and can be provided automatically when invoked from compilers + that support . + + + + Raises this object's PropertyChanged event. + + The PropertyChangedEventArgs + + + + Raises this object's PropertyChanged event. + + The type of the property that has a new value + A Lambda expression representing the property that has a new value. + + + + Manages validation errors for an object, notifying when the error state changes. + + The type of the error object. + + + + Initializes a new instance of the class. + + The action that invoked if when errors are added for an object./> + event. + + + + Gets a value indicating whether the object has validation errors. + + + + + Gets the validation errors for a specified property. + + The name of the property. + The validation errors of type for the property. + + + + Clears the errors for the property indicated by the property expression. + + The property type. + The expression indicating a property. + + container.ClearErrors(()=>SomeProperty); + + + + + Clears the errors for a property. + + The name of th property for which to clear errors. + + container.ClearErrors("SomeProperty"); + + + + + Sets the validation errors for the specified property. + + The property type for which to set errors. + The indicating the property. + The list of errors to set for the property. + + + + Sets the validation errors for the specified property. + + + If a change is detected then the errors changed event is raised. + + The name of the property. + The new validation errors. + + + + Provides support for extracting property information based on a property expression. + + + + + Extracts the property name from a property expression. + + The object type containing the property specified in the expression. + The property expression (e.g. p => p.PropertyName) + The name of the property. + Thrown if the is null. + Thrown when the expression is:
+ Not a
+ The does not represent a property.
+ Or, the property is static. +
+
+ + + Extracts the property name from a LambdaExpression. + + The LambdaExpression + The name of the property. + Thrown if the is null. + Thrown when the expression is:
+ The does not represent a property.
+ Or, the property is static. +
+
+ + + The ViewModelLocationProvider class locates the view model for the view that has the AutoWireViewModelChanged attached property set to true. + The view model will be located and injected into the view's DataContext. To locate the view, two strategies are used: First the ViewModelLocationProvider + will look to see if there is a view model factory registered for that view, if not it will try to infer the view model using a convention based approach. + This class also provide methods for registering the view model factories, + and also to override the default view model factory and the default view type to view model type resolver. + + + + + A dictionary that contains all the registered factories for the views. + + + + + A dictionary that contains all the registered ViewModel types for the views. + + + + + The default view model factory which provides the ViewModel type as a parameter. + + + + + ViewModelfactory that provides the View instance and ViewModel type as parameters. + + + + + Default view type to view model type resolver, assumes the view model is in same assembly as the view type, but in the "ViewModels" namespace. + + + + + Sets the default view model factory. + + The view model factory which provides the ViewModel type as a parameter. + + + + Sets the default view model factory. + + The view model factory that provides the View instance and ViewModel type as parameters. + + + + Sets the default view type to view model type resolver. + + The view type to view model type resolver. + + + + Automatically looks up the viewmodel that corresponds to the current view, using two strategies: + It first looks to see if there is a mapping registered for that view, if not it will fallback to the convention based approach. + + The dependency object, typically a view. + The call back to use to create the binding between the View and ViewModel + + + + Gets the view model for the specified view. + + The view that the view model wants. + The ViewModel that corresponds to the view passed as a parameter. + + + + Gets the ViewModel type for the specified view. + + The View that the ViewModel wants. + The ViewModel type that corresponds to the View. + + + + Registers the ViewModel factory for the specified view type. + + The View + The ViewModel factory. + + + + Registers the ViewModel factory for the specified view type name. + + The name of the view type. + The ViewModel factory. + + + + Registers a ViewModel type for the specified view type. + + The View + The ViewModel + + + + Registers a ViewModel type for the specified view. + + The View type name + The ViewModel type + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Cannot register a CompositeCommand in itself.. + + + + + Looks up a localized string similar to Cannot register the same command twice in the same CompositeCommand.. + + + + + Looks up a localized string similar to {1}: {2}. Priority: {3}. Timestamp:{0:u}.. + + + + + Looks up a localized string similar to Neither the executeMethod nor the canExecuteMethod delegates can be null.. + + + + + Looks up a localized string similar to T for DelegateCommand<T> is not an object nor Nullable.. + + + + + Looks up a localized string similar to To use the UIThread option for subscribing, the EventAggregator must be constructed on the UI thread.. + + + + + Looks up a localized string similar to Invalid Delegate Reference Type Exception. + + + + + Looks up a localized string similar to The entity does not contain a property with that name. + + + + + Looks up a localized string similar to The member access expression does not access a property.. + + + + + Looks up a localized string similar to The expression is not a member access expression.. + + + + + Looks up a localized string similar to The referenced property is a static property.. + + +
+
diff --git a/packages/Prism.Core.6.3.0/lib/wp8/Prism.dll b/packages/Prism.Core.6.3.0/lib/wp8/Prism.dll new file mode 100644 index 0000000..1bb0ff8 Binary files /dev/null and b/packages/Prism.Core.6.3.0/lib/wp8/Prism.dll differ diff --git a/packages/Prism.Core.6.3.0/lib/wp8/Prism.xml b/packages/Prism.Core.6.3.0/lib/wp8/Prism.xml new file mode 100644 index 0000000..13d72ea --- /dev/null +++ b/packages/Prism.Core.6.3.0/lib/wp8/Prism.xml @@ -0,0 +1,1275 @@ + + + + Prism + + + + + The CompositeCommand composes one or more ICommands. + + + + + Initializes a new instance of . + + + + + Initializes a new instance of . + + Indicates when the command activity is going to be monitored. + + + + Adds a command to the collection and signs up for the event of it. + + + If this command is set to monitor command activity, and + implements the interface, this method will subscribe to its + event. + + The command to register. + + + + Removes a command from the collection and removes itself from the event of it. + + The command to unregister. + + + + Forwards to the registered commands and returns + if all of the commands return . + + Data used by the command. + If the command does not require data to be passed, this object can be set to . + + if all of the commands return ; otherwise, . + + + + Occurs when any of the registered commands raise . + + + + + Forwards to the registered commands. + + Data used by the command. + If the command does not require data to be passed, this object can be set to . + + + + + Evaluates if a command should execute. + + The command to evaluate. + A value indicating whether the command should be used + when evaluating and . + + If this command is set to monitor command activity, and + implements the interface, + this method will return if the command's + property is ; otherwise it always returns . + + + + Gets the list of all the registered commands. + + A list of registered commands. + This returns a copy of the commands subscribed to the CompositeCommand. + + + + Raises on the UI thread so every + command invoker can requery to check if the + can execute. + + + + + Handler for IsActiveChanged events of registered commands. + + The sender. + EventArgs to pass to the event. + + + + An whose delegates do not take any parameters for and . + + + + + + + Creates a new instance of with the to invoke on execution. + + The to invoke when is called. + + + + Creates a new instance of with the to invoke on execution + and a to query for determining if the command can execute. + + The to invoke when is called. + The to invoke when is called + + + + Executes the command. + + + + + Determines if the command can be executed. + + Returns if the command can execute,otherwise returns . + + + + Observes a property that implements INotifyPropertyChanged, and automatically calls DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The object type containing the property specified in the expression. + The property expression. Example: ObservesProperty(() => PropertyName). + The current instance of DelegateCommand + + + + Observes a property that is used to determine if this command can execute, and if it implements INotifyPropertyChanged it will automatically call DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The property expression. Example: ObservesCanExecute(() => PropertyName). + The current instance of DelegateCommand + + + + An whose delegates can be attached for and . + + + + + Creates a new instance of a , specifying both the execute action and the can execute function. + + The to execute when is invoked. + The to invoked when is invoked. + + + + Occurs when changes occur that affect whether or not the command should execute. + + + + + Raises so every + command invoker can requery . + + + + + Raises so every command invoker + can requery to check if the command can execute. + Note that this will trigger the execution of once for each invoker. + + + + + Observes a property that implements INotifyPropertyChanged, and automatically calls DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The object type containing the property specified in the expression. + The property expression. Example: ObservesProperty(() => PropertyName). + + + + Gets or sets a value indicating whether the object is active. + + if the object is active; otherwise . + + + + Fired if the property changes. + + + + + This raises the event. + + + + + An whose delegates can be attached for and . + + Parameter type. + + The constructor deliberately prevents the use of value types. + Because ICommand takes an object, having a value type for T would cause unexpected behavior when CanExecute(null) is called during XAML initialization for command bindings. + Using default(T) was considered and rejected as a solution because the implementor would not be able to distinguish between a valid and defaulted values. + + Instead, callers should support a value type by using a nullable value type and checking the HasValue property before using the Value property. + + + public MyClass() + { + this.submitCommand = new DelegateCommand<int?>(this.Submit, this.CanSubmit); + } + + private bool CanSubmit(int? customerId) + { + return (customerId.HasValue && customers.Contains(customerId.Value)); + } + + + + + + + Initializes a new instance of . + + Delegate to execute when Execute is called on the command. This can be null to just hook up a CanExecute delegate. + will always return true. + + + + Initializes a new instance of . + + Delegate to execute when Execute is called on the command. This can be null to just hook up a CanExecute delegate. + Delegate to execute when CanExecute is called on the command. This can be null. + When both and ar . + + + + Executes the command and invokes the provided during construction. + + Data used by the command. + + + + Determines if the command can execute by invoked the provided during construction. + + Data used by the command to determine if it can execute. + + if this command can be executed; otherwise, . + + + + + Observes a property that implements INotifyPropertyChanged, and automatically calls DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The type of the return value of the method that this delegate encapulates + The property expression. Example: ObservesProperty(() => PropertyName). + The current instance of DelegateCommand + + + + Observes a property that is used to determine if this command can execute, and if it implements INotifyPropertyChanged it will automatically call DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The property expression. Example: ObservesCanExecute(() => PropertyName). + The current instance of DelegateCommand + + + + Extends to invoke the delegate in a background thread. + + + + + Creates a new instance of . + + A reference to a delegate of type . + When or are . + When the target of is not of type . + + + + Invokes the specified in an asynchronous thread by using a . + + The action to execute. + + + + Extends to invoke the delegate in a background thread. + + The type to use for the generic and types. + + + + Creates a new instance of . + + A reference to a delegate of type . + A reference to a delegate of type . + When or are . + When the target of is not of type , + or the target of is not of type . + + + + Invokes the specified in an asynchronous thread by using a . + + The action to execute. + The payload to pass while invoking it. + + + + Generic arguments class to pass to event handlers that need to receive data. + + The type of data to pass. + + + + Initializes the DataEventArgs class. + + Information related to the event. + + + + Gets the information related to the event. + + Information related to the event. + + + + Represents a reference to a that may contain a + to the target. This class is used + internally by the Prism Library. + + + + + Initializes a new instance of . + + The original to create a reference for. + If the class will create a weak reference to the delegate, allowing it to be garbage collected. Otherwise it will keep a strong reference to the target. + If the passed is not assignable to . + + + + Gets the (the target) referenced by the current object. + + if the object referenced by the current object has been garbage collected; otherwise, a reference to the referenced by the current object. + + + + Extends to invoke the delegate + in a specific . + + + + + Creates a new instance of . + + A reference to a delegate of type . + The synchronization context to use for UI thread dispatching. + When or are . + When the target of is not of type . + + + + Invokes the specified asynchronously in the specified . + + The action to execute. + + + + Extends to invoke the delegate + in a specific . + + The type to use for the generic and types. + + + + Creates a new instance of . + + A reference to a delegate of type . + A reference to a delegate of type . + The synchronization context to use for UI thread dispatching. + When or are . + When the target of is not of type , + or the target of is not of type . + + + + Invokes the specified asynchronously in the specified . + + The action to execute. + The payload to pass while invoking it. + + + + Implements . + + + + + Gets the single instance of the event managed by this EventAggregator. Multiple calls to this method with the same returns the same event instance. + + The type of event to get. This must inherit from . + A singleton instance of an event object of type . + + + + Defines a base class to publish and subscribe to events. + + + + + Allows the SynchronizationContext to be set by the EventAggregator for UI Thread Dispatching + + + + + Gets the list of current subscriptions. + + The current subscribers. + + + + Adds the specified to the subscribers' collection. + + The subscriber. + The that uniquely identifies every subscriber. + + Adds the subscription to the internal list and assigns it a new . + + + + + Calls all the execution strategies exposed by the list of . + + The arguments that will be passed to the listeners. + Before executing the strategies, this class will prune all the subscribers from the + list that return a when calling the + method. + + + + Removes the subscriber matching the . + + The returned by while subscribing to the event. + + + + Returns if there is a subscriber matching . + + The returned by while subscribing to the event. + if there is a that matches; otherwise . + + + + Provides a way to retrieve a to execute an action depending + on the value of a second filter predicate that returns true if the action should execute. + + + + + Creates a new instance of . + + A reference to a delegate of type . + When or are . + When the target of is not of type . + + + + Gets the target that is referenced by the . + + An or if the referenced target is not alive. + + + + Gets or sets a that identifies this . + + A token that identifies this . + + + + Gets the execution strategy to publish this event. + + An with the execution strategy, or if the is no longer valid. + + If is no longer valid because it was + garbage collected, this method will return . + Otherwise it will return a delegate that evaluates the and if it + returns will then call . The returned + delegate holds a hard reference to the target + delegates. As long as the returned delegate is not garbage collected, + the references delegates won't get collected either. + + + + + Invokes the specified synchronously when not overridden. + + The action to execute. + An is thrown if is null. + + + + Provides a way to retrieve a to execute an action depending + on the value of a second filter predicate that returns true if the action should execute. + + The type to use for the generic and types. + + + + Creates a new instance of . + + A reference to a delegate of type . + A reference to a delegate of type . + When or are . + When the target of is not of type , + or the target of is not of type . + + + + Gets the target that is referenced by the . + + An or if the referenced target is not alive. + + + + Gets the target that is referenced by the . + + An or if the referenced target is not alive. + + + + Gets or sets a that identifies this . + + A token that identifies this . + + + + Gets the execution strategy to publish this event. + + An with the execution strategy, or if the is no longer valid. + + If or are no longer valid because they were + garbage collected, this method will return . + Otherwise it will return a delegate that evaluates the and if it + returns will then call . The returned + delegate holds hard references to the and target + delegates. As long as the returned delegate is not garbage collected, + the and references delegates won't get collected either. + + + + + Invokes the specified synchronously when not overridden. + + The action to execute. + The payload to pass while invoking it. + An is thrown if is null. + + + + Represents a reference to a . + + + + + Gets the referenced object. + + A instance if the target is valid; otherwise . + + + + Defines an interface to get instances of an event type. + + + + + Gets an instance of an event type. + + The type of event to get. + An instance of an event object of type . + + + + Defines a contract for an event subscription to be used by . + + + + + Gets or sets a that identifies this . + + A token that identifies this . + + + + Gets the execution strategy to publish this event. + + An with the execution strategy, or if the is no longer valid. + + + + Defines a class that manages publication and subscription to events. + + + + + Subscribes a delegate to an event that will be published on the . + will maintain a to the target of the supplied delegate. + + The delegate that gets executed when the event is published. + A that uniquely identifies the added subscription. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + PubSubEvent will maintain a to the Target of the supplied delegate. + + The delegate that gets executed when the event is raised. + Specifies on which thread to receive the delegate callback. + A that uniquely identifies the added subscription. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event that will be published on the . + + The delegate that gets executed when the event is published. + When , the keeps a reference to the subscriber so it does not get garbage collected. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + + The delegate that gets executed when the event is published. + Specifies on which thread to receive the delegate callback. + When , the keeps a reference to the subscriber so it does not get garbage collected. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Publishes the . + + + + + Removes the first subscriber matching from the subscribers' list. + + The used when subscribing to the event. + + + + Returns if there is a subscriber matching . + + The used when subscribing to the event. + if there is an that matches; otherwise . + + + + Defines a class that manages publication and subscription to events. + + The type of message that will be passed to the subscribers. + + + + Subscribes a delegate to an event that will be published on the . + will maintain a to the target of the supplied delegate. + + The delegate that gets executed when the event is published. + A that uniquely identifies the added subscription. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + PubSubEvent will maintain a to the Target of the supplied delegate. + + The delegate that gets executed when the event is raised. + Specifies on which thread to receive the delegate callback. + A that uniquely identifies the added subscription. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event that will be published on the . + + The delegate that gets executed when the event is published. + When , the keeps a reference to the subscriber so it does not get garbage collected. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + + The delegate that gets executed when the event is published. + Specifies on which thread to receive the delegate callback. + When , the keeps a reference to the subscriber so it does not get garbage collected. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + + The delegate that gets executed when the event is published. + Specifies on which thread to receive the delegate callback. + When , the keeps a reference to the subscriber so it does not get garbage collected. + Filter to evaluate if the subscriber should receive the event. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Publishes the . + + Message to pass to the subscribers. + + + + Removes the first subscriber matching from the subscribers' list. + + The used when subscribing to the event. + + + + Returns if there is a subscriber matching . + + The used when subscribing to the event. + if there is an that matches; otherwise . + + + + Subscription token returned from on subscribe. + + + + + Initializes a new instance of . + + + + + Indicates whether the current object is equal to another object of the same type. + + + if the current object is equal to the parameter; otherwise, . + + An object to compare with this object. + + + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current ; otherwise, false. + + The to compare with the current . + The parameter is null.2 + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + 2 + + + + Disposes the SubscriptionToken, removing the subscription from the corresponding . + + + + + Specifies on which thread a subscriber will be called. + + + + + The call is done on the same thread on which the was published. + + + + + The call is done on the UI thread. + + + + + The call is done asynchronously on a background thread. + + + + + Interface that defines if the object instance is active + and notifies when the activity changes. + + + + + Gets or sets a value indicating whether the object is active. + + if the object is active; otherwise . + + + + Notifies that the value for property has changed. + + + + + Defines values for the categories used by . + + + + + Debug category. + + + + + Exception category. + + + + + Informational category. + + + + + Warning category. + + + + + Implementation of that logs into a message into the Debug.Listeners collection. + + + + + Write a new log entry with the specified category and priority. + + Message body to log. + Category of the entry. + The priority of the entry. + + + + Implementation of that does nothing. This + implementation is useful when the application does not need logging + but there are infrastructure pieces that assume there is a logger. + + + + + This method does nothing. + + Message body to log. + Category of the entry. + The priority of the entry. + + + + Defines a simple logger façade to be used by the Prism Library. + + + + + Write a new log entry with the specified category and priority. + + Message body to log. + Category of the entry. + The priority of the entry. + + + + Defines values for the priorities used by . + + + + + No priority specified. + + + + + High priority entry. + + + + + Medium priority entry. + + + + + Low priority entry. + + + + + Implementation of to simplify models. + + + + + Occurs when a property value changes. + + + + + Checks if a property already matches a desired value. Sets the property and + notifies listeners only when necessary. + + Type of the property. + Reference to a property with both getter and setter. + Desired value for the property. + Name of the property used to notify listeners. This + value is optional and can be provided automatically when invoked from compilers that + support CallerMemberName. + True if the value was changed, false if the existing value matched the + desired value. + + + + Checks if a property already matches a desired value. Sets the property and + notifies listeners only when necessary. + + Type of the property. + Reference to a property with both getter and setter. + Desired value for the property. + Name of the property used to notify listeners. This + value is optional and can be provided automatically when invoked from compilers that + support CallerMemberName. + Action that is called after the property value has been changed. + True if the value was changed, false if the existing value matched the + desired value. + + + + Raises this object's PropertyChanged event. + + Name of the property used to notify listeners. This + value is optional and can be provided automatically when invoked from compilers + that support . + + + + Notifies listeners that a property value has changed. + + Name of the property used to notify listeners. This + value is optional and can be provided automatically when invoked from compilers + that support . + + + + Raises this object's PropertyChanged event. + + The PropertyChangedEventArgs + + + + Raises this object's PropertyChanged event. + + The type of the property that has a new value + A Lambda expression representing the property that has a new value. + + + + Manages validation errors for an object, notifying when the error state changes. + + The type of the error object. + + + + Initializes a new instance of the class. + + The action that invoked if when errors are added for an object./> + event. + + + + Gets a value indicating whether the object has validation errors. + + + + + Gets the validation errors for a specified property. + + The name of the property. + The validation errors of type for the property. + + + + Clears the errors for the property indicated by the property expression. + + The property type. + The expression indicating a property. + + container.ClearErrors(()=>SomeProperty); + + + + + Clears the errors for a property. + + The name of th property for which to clear errors. + + container.ClearErrors("SomeProperty"); + + + + + Sets the validation errors for the specified property. + + The property type for which to set errors. + The indicating the property. + The list of errors to set for the property. + + + + Sets the validation errors for the specified property. + + + If a change is detected then the errors changed event is raised. + + The name of the property. + The new validation errors. + + + + Provides support for extracting property information based on a property expression. + + + + + Extracts the property name from a property expression. + + The object type containing the property specified in the expression. + The property expression (e.g. p => p.PropertyName) + The name of the property. + Thrown if the is null. + Thrown when the expression is:
+ Not a
+ The does not represent a property.
+ Or, the property is static. +
+
+ + + Extracts the property name from a LambdaExpression. + + The LambdaExpression + The name of the property. + Thrown if the is null. + Thrown when the expression is:
+ The does not represent a property.
+ Or, the property is static. +
+
+ + + The ViewModelLocationProvider class locates the view model for the view that has the AutoWireViewModelChanged attached property set to true. + The view model will be located and injected into the view's DataContext. To locate the view, two strategies are used: First the ViewModelLocationProvider + will look to see if there is a view model factory registered for that view, if not it will try to infer the view model using a convention based approach. + This class also provide methods for registering the view model factories, + and also to override the default view model factory and the default view type to view model type resolver. + + + + + A dictionary that contains all the registered factories for the views. + + + + + A dictionary that contains all the registered ViewModel types for the views. + + + + + The default view model factory which provides the ViewModel type as a parameter. + + + + + ViewModelfactory that provides the View instance and ViewModel type as parameters. + + + + + Default view type to view model type resolver, assumes the view model is in same assembly as the view type, but in the "ViewModels" namespace. + + + + + Sets the default view model factory. + + The view model factory which provides the ViewModel type as a parameter. + + + + Sets the default view model factory. + + The view model factory that provides the View instance and ViewModel type as parameters. + + + + Sets the default view type to view model type resolver. + + The view type to view model type resolver. + + + + Automatically looks up the viewmodel that corresponds to the current view, using two strategies: + It first looks to see if there is a mapping registered for that view, if not it will fallback to the convention based approach. + + The dependency object, typically a view. + The call back to use to create the binding between the View and ViewModel + + + + Gets the view model for the specified view. + + The view that the view model wants. + The ViewModel that corresponds to the view passed as a parameter. + + + + Gets the ViewModel type for the specified view. + + The View that the ViewModel wants. + The ViewModel type that corresponds to the View. + + + + Registers the ViewModel factory for the specified view type. + + The View + The ViewModel factory. + + + + Registers the ViewModel factory for the specified view type name. + + The name of the view type. + The ViewModel factory. + + + + Registers a ViewModel type for the specified view type. + + The View + The ViewModel + + + + Registers a ViewModel type for the specified view. + + The View type name + The ViewModel type + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Cannot register a CompositeCommand in itself.. + + + + + Looks up a localized string similar to Cannot register the same command twice in the same CompositeCommand.. + + + + + Looks up a localized string similar to {1}: {2}. Priority: {3}. Timestamp:{0:u}.. + + + + + Looks up a localized string similar to Neither the executeMethod nor the canExecuteMethod delegates can be null.. + + + + + Looks up a localized string similar to T for DelegateCommand<T> is not an object nor Nullable.. + + + + + Looks up a localized string similar to To use the UIThread option for subscribing, the EventAggregator must be constructed on the UI thread.. + + + + + Looks up a localized string similar to Invalid Delegate Reference Type Exception. + + + + + Looks up a localized string similar to The entity does not contain a property with that name. + + + + + Looks up a localized string similar to The member access expression does not access a property.. + + + + + Looks up a localized string similar to The expression is not a member access expression.. + + + + + Looks up a localized string similar to The referenced property is a static property.. + + +
+
diff --git a/packages/Prism.Core.6.3.0/lib/wp81/Prism.dll b/packages/Prism.Core.6.3.0/lib/wp81/Prism.dll new file mode 100644 index 0000000..1bb0ff8 Binary files /dev/null and b/packages/Prism.Core.6.3.0/lib/wp81/Prism.dll differ diff --git a/packages/Prism.Core.6.3.0/lib/wp81/Prism.xml b/packages/Prism.Core.6.3.0/lib/wp81/Prism.xml new file mode 100644 index 0000000..13d72ea --- /dev/null +++ b/packages/Prism.Core.6.3.0/lib/wp81/Prism.xml @@ -0,0 +1,1275 @@ + + + + Prism + + + + + The CompositeCommand composes one or more ICommands. + + + + + Initializes a new instance of . + + + + + Initializes a new instance of . + + Indicates when the command activity is going to be monitored. + + + + Adds a command to the collection and signs up for the event of it. + + + If this command is set to monitor command activity, and + implements the interface, this method will subscribe to its + event. + + The command to register. + + + + Removes a command from the collection and removes itself from the event of it. + + The command to unregister. + + + + Forwards to the registered commands and returns + if all of the commands return . + + Data used by the command. + If the command does not require data to be passed, this object can be set to . + + if all of the commands return ; otherwise, . + + + + Occurs when any of the registered commands raise . + + + + + Forwards to the registered commands. + + Data used by the command. + If the command does not require data to be passed, this object can be set to . + + + + + Evaluates if a command should execute. + + The command to evaluate. + A value indicating whether the command should be used + when evaluating and . + + If this command is set to monitor command activity, and + implements the interface, + this method will return if the command's + property is ; otherwise it always returns . + + + + Gets the list of all the registered commands. + + A list of registered commands. + This returns a copy of the commands subscribed to the CompositeCommand. + + + + Raises on the UI thread so every + command invoker can requery to check if the + can execute. + + + + + Handler for IsActiveChanged events of registered commands. + + The sender. + EventArgs to pass to the event. + + + + An whose delegates do not take any parameters for and . + + + + + + + Creates a new instance of with the to invoke on execution. + + The to invoke when is called. + + + + Creates a new instance of with the to invoke on execution + and a to query for determining if the command can execute. + + The to invoke when is called. + The to invoke when is called + + + + Executes the command. + + + + + Determines if the command can be executed. + + Returns if the command can execute,otherwise returns . + + + + Observes a property that implements INotifyPropertyChanged, and automatically calls DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The object type containing the property specified in the expression. + The property expression. Example: ObservesProperty(() => PropertyName). + The current instance of DelegateCommand + + + + Observes a property that is used to determine if this command can execute, and if it implements INotifyPropertyChanged it will automatically call DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The property expression. Example: ObservesCanExecute(() => PropertyName). + The current instance of DelegateCommand + + + + An whose delegates can be attached for and . + + + + + Creates a new instance of a , specifying both the execute action and the can execute function. + + The to execute when is invoked. + The to invoked when is invoked. + + + + Occurs when changes occur that affect whether or not the command should execute. + + + + + Raises so every + command invoker can requery . + + + + + Raises so every command invoker + can requery to check if the command can execute. + Note that this will trigger the execution of once for each invoker. + + + + + Observes a property that implements INotifyPropertyChanged, and automatically calls DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The object type containing the property specified in the expression. + The property expression. Example: ObservesProperty(() => PropertyName). + + + + Gets or sets a value indicating whether the object is active. + + if the object is active; otherwise . + + + + Fired if the property changes. + + + + + This raises the event. + + + + + An whose delegates can be attached for and . + + Parameter type. + + The constructor deliberately prevents the use of value types. + Because ICommand takes an object, having a value type for T would cause unexpected behavior when CanExecute(null) is called during XAML initialization for command bindings. + Using default(T) was considered and rejected as a solution because the implementor would not be able to distinguish between a valid and defaulted values. + + Instead, callers should support a value type by using a nullable value type and checking the HasValue property before using the Value property. + + + public MyClass() + { + this.submitCommand = new DelegateCommand<int?>(this.Submit, this.CanSubmit); + } + + private bool CanSubmit(int? customerId) + { + return (customerId.HasValue && customers.Contains(customerId.Value)); + } + + + + + + + Initializes a new instance of . + + Delegate to execute when Execute is called on the command. This can be null to just hook up a CanExecute delegate. + will always return true. + + + + Initializes a new instance of . + + Delegate to execute when Execute is called on the command. This can be null to just hook up a CanExecute delegate. + Delegate to execute when CanExecute is called on the command. This can be null. + When both and ar . + + + + Executes the command and invokes the provided during construction. + + Data used by the command. + + + + Determines if the command can execute by invoked the provided during construction. + + Data used by the command to determine if it can execute. + + if this command can be executed; otherwise, . + + + + + Observes a property that implements INotifyPropertyChanged, and automatically calls DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The type of the return value of the method that this delegate encapulates + The property expression. Example: ObservesProperty(() => PropertyName). + The current instance of DelegateCommand + + + + Observes a property that is used to determine if this command can execute, and if it implements INotifyPropertyChanged it will automatically call DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The property expression. Example: ObservesCanExecute(() => PropertyName). + The current instance of DelegateCommand + + + + Extends to invoke the delegate in a background thread. + + + + + Creates a new instance of . + + A reference to a delegate of type . + When or are . + When the target of is not of type . + + + + Invokes the specified in an asynchronous thread by using a . + + The action to execute. + + + + Extends to invoke the delegate in a background thread. + + The type to use for the generic and types. + + + + Creates a new instance of . + + A reference to a delegate of type . + A reference to a delegate of type . + When or are . + When the target of is not of type , + or the target of is not of type . + + + + Invokes the specified in an asynchronous thread by using a . + + The action to execute. + The payload to pass while invoking it. + + + + Generic arguments class to pass to event handlers that need to receive data. + + The type of data to pass. + + + + Initializes the DataEventArgs class. + + Information related to the event. + + + + Gets the information related to the event. + + Information related to the event. + + + + Represents a reference to a that may contain a + to the target. This class is used + internally by the Prism Library. + + + + + Initializes a new instance of . + + The original to create a reference for. + If the class will create a weak reference to the delegate, allowing it to be garbage collected. Otherwise it will keep a strong reference to the target. + If the passed is not assignable to . + + + + Gets the (the target) referenced by the current object. + + if the object referenced by the current object has been garbage collected; otherwise, a reference to the referenced by the current object. + + + + Extends to invoke the delegate + in a specific . + + + + + Creates a new instance of . + + A reference to a delegate of type . + The synchronization context to use for UI thread dispatching. + When or are . + When the target of is not of type . + + + + Invokes the specified asynchronously in the specified . + + The action to execute. + + + + Extends to invoke the delegate + in a specific . + + The type to use for the generic and types. + + + + Creates a new instance of . + + A reference to a delegate of type . + A reference to a delegate of type . + The synchronization context to use for UI thread dispatching. + When or are . + When the target of is not of type , + or the target of is not of type . + + + + Invokes the specified asynchronously in the specified . + + The action to execute. + The payload to pass while invoking it. + + + + Implements . + + + + + Gets the single instance of the event managed by this EventAggregator. Multiple calls to this method with the same returns the same event instance. + + The type of event to get. This must inherit from . + A singleton instance of an event object of type . + + + + Defines a base class to publish and subscribe to events. + + + + + Allows the SynchronizationContext to be set by the EventAggregator for UI Thread Dispatching + + + + + Gets the list of current subscriptions. + + The current subscribers. + + + + Adds the specified to the subscribers' collection. + + The subscriber. + The that uniquely identifies every subscriber. + + Adds the subscription to the internal list and assigns it a new . + + + + + Calls all the execution strategies exposed by the list of . + + The arguments that will be passed to the listeners. + Before executing the strategies, this class will prune all the subscribers from the + list that return a when calling the + method. + + + + Removes the subscriber matching the . + + The returned by while subscribing to the event. + + + + Returns if there is a subscriber matching . + + The returned by while subscribing to the event. + if there is a that matches; otherwise . + + + + Provides a way to retrieve a to execute an action depending + on the value of a second filter predicate that returns true if the action should execute. + + + + + Creates a new instance of . + + A reference to a delegate of type . + When or are . + When the target of is not of type . + + + + Gets the target that is referenced by the . + + An or if the referenced target is not alive. + + + + Gets or sets a that identifies this . + + A token that identifies this . + + + + Gets the execution strategy to publish this event. + + An with the execution strategy, or if the is no longer valid. + + If is no longer valid because it was + garbage collected, this method will return . + Otherwise it will return a delegate that evaluates the and if it + returns will then call . The returned + delegate holds a hard reference to the target + delegates. As long as the returned delegate is not garbage collected, + the references delegates won't get collected either. + + + + + Invokes the specified synchronously when not overridden. + + The action to execute. + An is thrown if is null. + + + + Provides a way to retrieve a to execute an action depending + on the value of a second filter predicate that returns true if the action should execute. + + The type to use for the generic and types. + + + + Creates a new instance of . + + A reference to a delegate of type . + A reference to a delegate of type . + When or are . + When the target of is not of type , + or the target of is not of type . + + + + Gets the target that is referenced by the . + + An or if the referenced target is not alive. + + + + Gets the target that is referenced by the . + + An or if the referenced target is not alive. + + + + Gets or sets a that identifies this . + + A token that identifies this . + + + + Gets the execution strategy to publish this event. + + An with the execution strategy, or if the is no longer valid. + + If or are no longer valid because they were + garbage collected, this method will return . + Otherwise it will return a delegate that evaluates the and if it + returns will then call . The returned + delegate holds hard references to the and target + delegates. As long as the returned delegate is not garbage collected, + the and references delegates won't get collected either. + + + + + Invokes the specified synchronously when not overridden. + + The action to execute. + The payload to pass while invoking it. + An is thrown if is null. + + + + Represents a reference to a . + + + + + Gets the referenced object. + + A instance if the target is valid; otherwise . + + + + Defines an interface to get instances of an event type. + + + + + Gets an instance of an event type. + + The type of event to get. + An instance of an event object of type . + + + + Defines a contract for an event subscription to be used by . + + + + + Gets or sets a that identifies this . + + A token that identifies this . + + + + Gets the execution strategy to publish this event. + + An with the execution strategy, or if the is no longer valid. + + + + Defines a class that manages publication and subscription to events. + + + + + Subscribes a delegate to an event that will be published on the . + will maintain a to the target of the supplied delegate. + + The delegate that gets executed when the event is published. + A that uniquely identifies the added subscription. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + PubSubEvent will maintain a to the Target of the supplied delegate. + + The delegate that gets executed when the event is raised. + Specifies on which thread to receive the delegate callback. + A that uniquely identifies the added subscription. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event that will be published on the . + + The delegate that gets executed when the event is published. + When , the keeps a reference to the subscriber so it does not get garbage collected. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + + The delegate that gets executed when the event is published. + Specifies on which thread to receive the delegate callback. + When , the keeps a reference to the subscriber so it does not get garbage collected. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Publishes the . + + + + + Removes the first subscriber matching from the subscribers' list. + + The used when subscribing to the event. + + + + Returns if there is a subscriber matching . + + The used when subscribing to the event. + if there is an that matches; otherwise . + + + + Defines a class that manages publication and subscription to events. + + The type of message that will be passed to the subscribers. + + + + Subscribes a delegate to an event that will be published on the . + will maintain a to the target of the supplied delegate. + + The delegate that gets executed when the event is published. + A that uniquely identifies the added subscription. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + PubSubEvent will maintain a to the Target of the supplied delegate. + + The delegate that gets executed when the event is raised. + Specifies on which thread to receive the delegate callback. + A that uniquely identifies the added subscription. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event that will be published on the . + + The delegate that gets executed when the event is published. + When , the keeps a reference to the subscriber so it does not get garbage collected. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + + The delegate that gets executed when the event is published. + Specifies on which thread to receive the delegate callback. + When , the keeps a reference to the subscriber so it does not get garbage collected. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + + The delegate that gets executed when the event is published. + Specifies on which thread to receive the delegate callback. + When , the keeps a reference to the subscriber so it does not get garbage collected. + Filter to evaluate if the subscriber should receive the event. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Publishes the . + + Message to pass to the subscribers. + + + + Removes the first subscriber matching from the subscribers' list. + + The used when subscribing to the event. + + + + Returns if there is a subscriber matching . + + The used when subscribing to the event. + if there is an that matches; otherwise . + + + + Subscription token returned from on subscribe. + + + + + Initializes a new instance of . + + + + + Indicates whether the current object is equal to another object of the same type. + + + if the current object is equal to the parameter; otherwise, . + + An object to compare with this object. + + + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current ; otherwise, false. + + The to compare with the current . + The parameter is null.2 + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + 2 + + + + Disposes the SubscriptionToken, removing the subscription from the corresponding . + + + + + Specifies on which thread a subscriber will be called. + + + + + The call is done on the same thread on which the was published. + + + + + The call is done on the UI thread. + + + + + The call is done asynchronously on a background thread. + + + + + Interface that defines if the object instance is active + and notifies when the activity changes. + + + + + Gets or sets a value indicating whether the object is active. + + if the object is active; otherwise . + + + + Notifies that the value for property has changed. + + + + + Defines values for the categories used by . + + + + + Debug category. + + + + + Exception category. + + + + + Informational category. + + + + + Warning category. + + + + + Implementation of that logs into a message into the Debug.Listeners collection. + + + + + Write a new log entry with the specified category and priority. + + Message body to log. + Category of the entry. + The priority of the entry. + + + + Implementation of that does nothing. This + implementation is useful when the application does not need logging + but there are infrastructure pieces that assume there is a logger. + + + + + This method does nothing. + + Message body to log. + Category of the entry. + The priority of the entry. + + + + Defines a simple logger façade to be used by the Prism Library. + + + + + Write a new log entry with the specified category and priority. + + Message body to log. + Category of the entry. + The priority of the entry. + + + + Defines values for the priorities used by . + + + + + No priority specified. + + + + + High priority entry. + + + + + Medium priority entry. + + + + + Low priority entry. + + + + + Implementation of to simplify models. + + + + + Occurs when a property value changes. + + + + + Checks if a property already matches a desired value. Sets the property and + notifies listeners only when necessary. + + Type of the property. + Reference to a property with both getter and setter. + Desired value for the property. + Name of the property used to notify listeners. This + value is optional and can be provided automatically when invoked from compilers that + support CallerMemberName. + True if the value was changed, false if the existing value matched the + desired value. + + + + Checks if a property already matches a desired value. Sets the property and + notifies listeners only when necessary. + + Type of the property. + Reference to a property with both getter and setter. + Desired value for the property. + Name of the property used to notify listeners. This + value is optional and can be provided automatically when invoked from compilers that + support CallerMemberName. + Action that is called after the property value has been changed. + True if the value was changed, false if the existing value matched the + desired value. + + + + Raises this object's PropertyChanged event. + + Name of the property used to notify listeners. This + value is optional and can be provided automatically when invoked from compilers + that support . + + + + Notifies listeners that a property value has changed. + + Name of the property used to notify listeners. This + value is optional and can be provided automatically when invoked from compilers + that support . + + + + Raises this object's PropertyChanged event. + + The PropertyChangedEventArgs + + + + Raises this object's PropertyChanged event. + + The type of the property that has a new value + A Lambda expression representing the property that has a new value. + + + + Manages validation errors for an object, notifying when the error state changes. + + The type of the error object. + + + + Initializes a new instance of the class. + + The action that invoked if when errors are added for an object./> + event. + + + + Gets a value indicating whether the object has validation errors. + + + + + Gets the validation errors for a specified property. + + The name of the property. + The validation errors of type for the property. + + + + Clears the errors for the property indicated by the property expression. + + The property type. + The expression indicating a property. + + container.ClearErrors(()=>SomeProperty); + + + + + Clears the errors for a property. + + The name of th property for which to clear errors. + + container.ClearErrors("SomeProperty"); + + + + + Sets the validation errors for the specified property. + + The property type for which to set errors. + The indicating the property. + The list of errors to set for the property. + + + + Sets the validation errors for the specified property. + + + If a change is detected then the errors changed event is raised. + + The name of the property. + The new validation errors. + + + + Provides support for extracting property information based on a property expression. + + + + + Extracts the property name from a property expression. + + The object type containing the property specified in the expression. + The property expression (e.g. p => p.PropertyName) + The name of the property. + Thrown if the is null. + Thrown when the expression is:
+ Not a
+ The does not represent a property.
+ Or, the property is static. +
+
+ + + Extracts the property name from a LambdaExpression. + + The LambdaExpression + The name of the property. + Thrown if the is null. + Thrown when the expression is:
+ The does not represent a property.
+ Or, the property is static. +
+
+ + + The ViewModelLocationProvider class locates the view model for the view that has the AutoWireViewModelChanged attached property set to true. + The view model will be located and injected into the view's DataContext. To locate the view, two strategies are used: First the ViewModelLocationProvider + will look to see if there is a view model factory registered for that view, if not it will try to infer the view model using a convention based approach. + This class also provide methods for registering the view model factories, + and also to override the default view model factory and the default view type to view model type resolver. + + + + + A dictionary that contains all the registered factories for the views. + + + + + A dictionary that contains all the registered ViewModel types for the views. + + + + + The default view model factory which provides the ViewModel type as a parameter. + + + + + ViewModelfactory that provides the View instance and ViewModel type as parameters. + + + + + Default view type to view model type resolver, assumes the view model is in same assembly as the view type, but in the "ViewModels" namespace. + + + + + Sets the default view model factory. + + The view model factory which provides the ViewModel type as a parameter. + + + + Sets the default view model factory. + + The view model factory that provides the View instance and ViewModel type as parameters. + + + + Sets the default view type to view model type resolver. + + The view type to view model type resolver. + + + + Automatically looks up the viewmodel that corresponds to the current view, using two strategies: + It first looks to see if there is a mapping registered for that view, if not it will fallback to the convention based approach. + + The dependency object, typically a view. + The call back to use to create the binding between the View and ViewModel + + + + Gets the view model for the specified view. + + The view that the view model wants. + The ViewModel that corresponds to the view passed as a parameter. + + + + Gets the ViewModel type for the specified view. + + The View that the ViewModel wants. + The ViewModel type that corresponds to the View. + + + + Registers the ViewModel factory for the specified view type. + + The View + The ViewModel factory. + + + + Registers the ViewModel factory for the specified view type name. + + The name of the view type. + The ViewModel factory. + + + + Registers a ViewModel type for the specified view type. + + The View + The ViewModel + + + + Registers a ViewModel type for the specified view. + + The View type name + The ViewModel type + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Cannot register a CompositeCommand in itself.. + + + + + Looks up a localized string similar to Cannot register the same command twice in the same CompositeCommand.. + + + + + Looks up a localized string similar to {1}: {2}. Priority: {3}. Timestamp:{0:u}.. + + + + + Looks up a localized string similar to Neither the executeMethod nor the canExecuteMethod delegates can be null.. + + + + + Looks up a localized string similar to T for DelegateCommand<T> is not an object nor Nullable.. + + + + + Looks up a localized string similar to To use the UIThread option for subscribing, the EventAggregator must be constructed on the UI thread.. + + + + + Looks up a localized string similar to Invalid Delegate Reference Type Exception. + + + + + Looks up a localized string similar to The entity does not contain a property with that name. + + + + + Looks up a localized string similar to The member access expression does not access a property.. + + + + + Looks up a localized string similar to The expression is not a member access expression.. + + + + + Looks up a localized string similar to The referenced property is a static property.. + + +
+
diff --git a/packages/Prism.Core.6.3.0/lib/wpa81/Prism.dll b/packages/Prism.Core.6.3.0/lib/wpa81/Prism.dll new file mode 100644 index 0000000..1bb0ff8 Binary files /dev/null and b/packages/Prism.Core.6.3.0/lib/wpa81/Prism.dll differ diff --git a/packages/Prism.Core.6.3.0/lib/wpa81/Prism.xml b/packages/Prism.Core.6.3.0/lib/wpa81/Prism.xml new file mode 100644 index 0000000..13d72ea --- /dev/null +++ b/packages/Prism.Core.6.3.0/lib/wpa81/Prism.xml @@ -0,0 +1,1275 @@ + + + + Prism + + + + + The CompositeCommand composes one or more ICommands. + + + + + Initializes a new instance of . + + + + + Initializes a new instance of . + + Indicates when the command activity is going to be monitored. + + + + Adds a command to the collection and signs up for the event of it. + + + If this command is set to monitor command activity, and + implements the interface, this method will subscribe to its + event. + + The command to register. + + + + Removes a command from the collection and removes itself from the event of it. + + The command to unregister. + + + + Forwards to the registered commands and returns + if all of the commands return . + + Data used by the command. + If the command does not require data to be passed, this object can be set to . + + if all of the commands return ; otherwise, . + + + + Occurs when any of the registered commands raise . + + + + + Forwards to the registered commands. + + Data used by the command. + If the command does not require data to be passed, this object can be set to . + + + + + Evaluates if a command should execute. + + The command to evaluate. + A value indicating whether the command should be used + when evaluating and . + + If this command is set to monitor command activity, and + implements the interface, + this method will return if the command's + property is ; otherwise it always returns . + + + + Gets the list of all the registered commands. + + A list of registered commands. + This returns a copy of the commands subscribed to the CompositeCommand. + + + + Raises on the UI thread so every + command invoker can requery to check if the + can execute. + + + + + Handler for IsActiveChanged events of registered commands. + + The sender. + EventArgs to pass to the event. + + + + An whose delegates do not take any parameters for and . + + + + + + + Creates a new instance of with the to invoke on execution. + + The to invoke when is called. + + + + Creates a new instance of with the to invoke on execution + and a to query for determining if the command can execute. + + The to invoke when is called. + The to invoke when is called + + + + Executes the command. + + + + + Determines if the command can be executed. + + Returns if the command can execute,otherwise returns . + + + + Observes a property that implements INotifyPropertyChanged, and automatically calls DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The object type containing the property specified in the expression. + The property expression. Example: ObservesProperty(() => PropertyName). + The current instance of DelegateCommand + + + + Observes a property that is used to determine if this command can execute, and if it implements INotifyPropertyChanged it will automatically call DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The property expression. Example: ObservesCanExecute(() => PropertyName). + The current instance of DelegateCommand + + + + An whose delegates can be attached for and . + + + + + Creates a new instance of a , specifying both the execute action and the can execute function. + + The to execute when is invoked. + The to invoked when is invoked. + + + + Occurs when changes occur that affect whether or not the command should execute. + + + + + Raises so every + command invoker can requery . + + + + + Raises so every command invoker + can requery to check if the command can execute. + Note that this will trigger the execution of once for each invoker. + + + + + Observes a property that implements INotifyPropertyChanged, and automatically calls DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The object type containing the property specified in the expression. + The property expression. Example: ObservesProperty(() => PropertyName). + + + + Gets or sets a value indicating whether the object is active. + + if the object is active; otherwise . + + + + Fired if the property changes. + + + + + This raises the event. + + + + + An whose delegates can be attached for and . + + Parameter type. + + The constructor deliberately prevents the use of value types. + Because ICommand takes an object, having a value type for T would cause unexpected behavior when CanExecute(null) is called during XAML initialization for command bindings. + Using default(T) was considered and rejected as a solution because the implementor would not be able to distinguish between a valid and defaulted values. + + Instead, callers should support a value type by using a nullable value type and checking the HasValue property before using the Value property. + + + public MyClass() + { + this.submitCommand = new DelegateCommand<int?>(this.Submit, this.CanSubmit); + } + + private bool CanSubmit(int? customerId) + { + return (customerId.HasValue && customers.Contains(customerId.Value)); + } + + + + + + + Initializes a new instance of . + + Delegate to execute when Execute is called on the command. This can be null to just hook up a CanExecute delegate. + will always return true. + + + + Initializes a new instance of . + + Delegate to execute when Execute is called on the command. This can be null to just hook up a CanExecute delegate. + Delegate to execute when CanExecute is called on the command. This can be null. + When both and ar . + + + + Executes the command and invokes the provided during construction. + + Data used by the command. + + + + Determines if the command can execute by invoked the provided during construction. + + Data used by the command to determine if it can execute. + + if this command can be executed; otherwise, . + + + + + Observes a property that implements INotifyPropertyChanged, and automatically calls DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The type of the return value of the method that this delegate encapulates + The property expression. Example: ObservesProperty(() => PropertyName). + The current instance of DelegateCommand + + + + Observes a property that is used to determine if this command can execute, and if it implements INotifyPropertyChanged it will automatically call DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications. + + The property expression. Example: ObservesCanExecute(() => PropertyName). + The current instance of DelegateCommand + + + + Extends to invoke the delegate in a background thread. + + + + + Creates a new instance of . + + A reference to a delegate of type . + When or are . + When the target of is not of type . + + + + Invokes the specified in an asynchronous thread by using a . + + The action to execute. + + + + Extends to invoke the delegate in a background thread. + + The type to use for the generic and types. + + + + Creates a new instance of . + + A reference to a delegate of type . + A reference to a delegate of type . + When or are . + When the target of is not of type , + or the target of is not of type . + + + + Invokes the specified in an asynchronous thread by using a . + + The action to execute. + The payload to pass while invoking it. + + + + Generic arguments class to pass to event handlers that need to receive data. + + The type of data to pass. + + + + Initializes the DataEventArgs class. + + Information related to the event. + + + + Gets the information related to the event. + + Information related to the event. + + + + Represents a reference to a that may contain a + to the target. This class is used + internally by the Prism Library. + + + + + Initializes a new instance of . + + The original to create a reference for. + If the class will create a weak reference to the delegate, allowing it to be garbage collected. Otherwise it will keep a strong reference to the target. + If the passed is not assignable to . + + + + Gets the (the target) referenced by the current object. + + if the object referenced by the current object has been garbage collected; otherwise, a reference to the referenced by the current object. + + + + Extends to invoke the delegate + in a specific . + + + + + Creates a new instance of . + + A reference to a delegate of type . + The synchronization context to use for UI thread dispatching. + When or are . + When the target of is not of type . + + + + Invokes the specified asynchronously in the specified . + + The action to execute. + + + + Extends to invoke the delegate + in a specific . + + The type to use for the generic and types. + + + + Creates a new instance of . + + A reference to a delegate of type . + A reference to a delegate of type . + The synchronization context to use for UI thread dispatching. + When or are . + When the target of is not of type , + or the target of is not of type . + + + + Invokes the specified asynchronously in the specified . + + The action to execute. + The payload to pass while invoking it. + + + + Implements . + + + + + Gets the single instance of the event managed by this EventAggregator. Multiple calls to this method with the same returns the same event instance. + + The type of event to get. This must inherit from . + A singleton instance of an event object of type . + + + + Defines a base class to publish and subscribe to events. + + + + + Allows the SynchronizationContext to be set by the EventAggregator for UI Thread Dispatching + + + + + Gets the list of current subscriptions. + + The current subscribers. + + + + Adds the specified to the subscribers' collection. + + The subscriber. + The that uniquely identifies every subscriber. + + Adds the subscription to the internal list and assigns it a new . + + + + + Calls all the execution strategies exposed by the list of . + + The arguments that will be passed to the listeners. + Before executing the strategies, this class will prune all the subscribers from the + list that return a when calling the + method. + + + + Removes the subscriber matching the . + + The returned by while subscribing to the event. + + + + Returns if there is a subscriber matching . + + The returned by while subscribing to the event. + if there is a that matches; otherwise . + + + + Provides a way to retrieve a to execute an action depending + on the value of a second filter predicate that returns true if the action should execute. + + + + + Creates a new instance of . + + A reference to a delegate of type . + When or are . + When the target of is not of type . + + + + Gets the target that is referenced by the . + + An or if the referenced target is not alive. + + + + Gets or sets a that identifies this . + + A token that identifies this . + + + + Gets the execution strategy to publish this event. + + An with the execution strategy, or if the is no longer valid. + + If is no longer valid because it was + garbage collected, this method will return . + Otherwise it will return a delegate that evaluates the and if it + returns will then call . The returned + delegate holds a hard reference to the target + delegates. As long as the returned delegate is not garbage collected, + the references delegates won't get collected either. + + + + + Invokes the specified synchronously when not overridden. + + The action to execute. + An is thrown if is null. + + + + Provides a way to retrieve a to execute an action depending + on the value of a second filter predicate that returns true if the action should execute. + + The type to use for the generic and types. + + + + Creates a new instance of . + + A reference to a delegate of type . + A reference to a delegate of type . + When or are . + When the target of is not of type , + or the target of is not of type . + + + + Gets the target that is referenced by the . + + An or if the referenced target is not alive. + + + + Gets the target that is referenced by the . + + An or if the referenced target is not alive. + + + + Gets or sets a that identifies this . + + A token that identifies this . + + + + Gets the execution strategy to publish this event. + + An with the execution strategy, or if the is no longer valid. + + If or are no longer valid because they were + garbage collected, this method will return . + Otherwise it will return a delegate that evaluates the and if it + returns will then call . The returned + delegate holds hard references to the and target + delegates. As long as the returned delegate is not garbage collected, + the and references delegates won't get collected either. + + + + + Invokes the specified synchronously when not overridden. + + The action to execute. + The payload to pass while invoking it. + An is thrown if is null. + + + + Represents a reference to a . + + + + + Gets the referenced object. + + A instance if the target is valid; otherwise . + + + + Defines an interface to get instances of an event type. + + + + + Gets an instance of an event type. + + The type of event to get. + An instance of an event object of type . + + + + Defines a contract for an event subscription to be used by . + + + + + Gets or sets a that identifies this . + + A token that identifies this . + + + + Gets the execution strategy to publish this event. + + An with the execution strategy, or if the is no longer valid. + + + + Defines a class that manages publication and subscription to events. + + + + + Subscribes a delegate to an event that will be published on the . + will maintain a to the target of the supplied delegate. + + The delegate that gets executed when the event is published. + A that uniquely identifies the added subscription. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + PubSubEvent will maintain a to the Target of the supplied delegate. + + The delegate that gets executed when the event is raised. + Specifies on which thread to receive the delegate callback. + A that uniquely identifies the added subscription. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event that will be published on the . + + The delegate that gets executed when the event is published. + When , the keeps a reference to the subscriber so it does not get garbage collected. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + + The delegate that gets executed when the event is published. + Specifies on which thread to receive the delegate callback. + When , the keeps a reference to the subscriber so it does not get garbage collected. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Publishes the . + + + + + Removes the first subscriber matching from the subscribers' list. + + The used when subscribing to the event. + + + + Returns if there is a subscriber matching . + + The used when subscribing to the event. + if there is an that matches; otherwise . + + + + Defines a class that manages publication and subscription to events. + + The type of message that will be passed to the subscribers. + + + + Subscribes a delegate to an event that will be published on the . + will maintain a to the target of the supplied delegate. + + The delegate that gets executed when the event is published. + A that uniquely identifies the added subscription. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + PubSubEvent will maintain a to the Target of the supplied delegate. + + The delegate that gets executed when the event is raised. + Specifies on which thread to receive the delegate callback. + A that uniquely identifies the added subscription. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event that will be published on the . + + The delegate that gets executed when the event is published. + When , the keeps a reference to the subscriber so it does not get garbage collected. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + + The delegate that gets executed when the event is published. + Specifies on which thread to receive the delegate callback. + When , the keeps a reference to the subscriber so it does not get garbage collected. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Subscribes a delegate to an event. + + The delegate that gets executed when the event is published. + Specifies on which thread to receive the delegate callback. + When , the keeps a reference to the subscriber so it does not get garbage collected. + Filter to evaluate if the subscriber should receive the event. + A that uniquely identifies the added subscription. + + If is set to , will maintain a to the Target of the supplied delegate. + If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. + + The PubSubEvent collection is thread-safe. + + + + + Publishes the . + + Message to pass to the subscribers. + + + + Removes the first subscriber matching from the subscribers' list. + + The used when subscribing to the event. + + + + Returns if there is a subscriber matching . + + The used when subscribing to the event. + if there is an that matches; otherwise . + + + + Subscription token returned from on subscribe. + + + + + Initializes a new instance of . + + + + + Indicates whether the current object is equal to another object of the same type. + + + if the current object is equal to the parameter; otherwise, . + + An object to compare with this object. + + + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current ; otherwise, false. + + The to compare with the current . + The parameter is null.2 + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + 2 + + + + Disposes the SubscriptionToken, removing the subscription from the corresponding . + + + + + Specifies on which thread a subscriber will be called. + + + + + The call is done on the same thread on which the was published. + + + + + The call is done on the UI thread. + + + + + The call is done asynchronously on a background thread. + + + + + Interface that defines if the object instance is active + and notifies when the activity changes. + + + + + Gets or sets a value indicating whether the object is active. + + if the object is active; otherwise . + + + + Notifies that the value for property has changed. + + + + + Defines values for the categories used by . + + + + + Debug category. + + + + + Exception category. + + + + + Informational category. + + + + + Warning category. + + + + + Implementation of that logs into a message into the Debug.Listeners collection. + + + + + Write a new log entry with the specified category and priority. + + Message body to log. + Category of the entry. + The priority of the entry. + + + + Implementation of that does nothing. This + implementation is useful when the application does not need logging + but there are infrastructure pieces that assume there is a logger. + + + + + This method does nothing. + + Message body to log. + Category of the entry. + The priority of the entry. + + + + Defines a simple logger façade to be used by the Prism Library. + + + + + Write a new log entry with the specified category and priority. + + Message body to log. + Category of the entry. + The priority of the entry. + + + + Defines values for the priorities used by . + + + + + No priority specified. + + + + + High priority entry. + + + + + Medium priority entry. + + + + + Low priority entry. + + + + + Implementation of to simplify models. + + + + + Occurs when a property value changes. + + + + + Checks if a property already matches a desired value. Sets the property and + notifies listeners only when necessary. + + Type of the property. + Reference to a property with both getter and setter. + Desired value for the property. + Name of the property used to notify listeners. This + value is optional and can be provided automatically when invoked from compilers that + support CallerMemberName. + True if the value was changed, false if the existing value matched the + desired value. + + + + Checks if a property already matches a desired value. Sets the property and + notifies listeners only when necessary. + + Type of the property. + Reference to a property with both getter and setter. + Desired value for the property. + Name of the property used to notify listeners. This + value is optional and can be provided automatically when invoked from compilers that + support CallerMemberName. + Action that is called after the property value has been changed. + True if the value was changed, false if the existing value matched the + desired value. + + + + Raises this object's PropertyChanged event. + + Name of the property used to notify listeners. This + value is optional and can be provided automatically when invoked from compilers + that support . + + + + Notifies listeners that a property value has changed. + + Name of the property used to notify listeners. This + value is optional and can be provided automatically when invoked from compilers + that support . + + + + Raises this object's PropertyChanged event. + + The PropertyChangedEventArgs + + + + Raises this object's PropertyChanged event. + + The type of the property that has a new value + A Lambda expression representing the property that has a new value. + + + + Manages validation errors for an object, notifying when the error state changes. + + The type of the error object. + + + + Initializes a new instance of the class. + + The action that invoked if when errors are added for an object./> + event. + + + + Gets a value indicating whether the object has validation errors. + + + + + Gets the validation errors for a specified property. + + The name of the property. + The validation errors of type for the property. + + + + Clears the errors for the property indicated by the property expression. + + The property type. + The expression indicating a property. + + container.ClearErrors(()=>SomeProperty); + + + + + Clears the errors for a property. + + The name of th property for which to clear errors. + + container.ClearErrors("SomeProperty"); + + + + + Sets the validation errors for the specified property. + + The property type for which to set errors. + The indicating the property. + The list of errors to set for the property. + + + + Sets the validation errors for the specified property. + + + If a change is detected then the errors changed event is raised. + + The name of the property. + The new validation errors. + + + + Provides support for extracting property information based on a property expression. + + + + + Extracts the property name from a property expression. + + The object type containing the property specified in the expression. + The property expression (e.g. p => p.PropertyName) + The name of the property. + Thrown if the is null. + Thrown when the expression is:
+ Not a
+ The does not represent a property.
+ Or, the property is static. +
+
+ + + Extracts the property name from a LambdaExpression. + + The LambdaExpression + The name of the property. + Thrown if the is null. + Thrown when the expression is:
+ The does not represent a property.
+ Or, the property is static. +
+
+ + + The ViewModelLocationProvider class locates the view model for the view that has the AutoWireViewModelChanged attached property set to true. + The view model will be located and injected into the view's DataContext. To locate the view, two strategies are used: First the ViewModelLocationProvider + will look to see if there is a view model factory registered for that view, if not it will try to infer the view model using a convention based approach. + This class also provide methods for registering the view model factories, + and also to override the default view model factory and the default view type to view model type resolver. + + + + + A dictionary that contains all the registered factories for the views. + + + + + A dictionary that contains all the registered ViewModel types for the views. + + + + + The default view model factory which provides the ViewModel type as a parameter. + + + + + ViewModelfactory that provides the View instance and ViewModel type as parameters. + + + + + Default view type to view model type resolver, assumes the view model is in same assembly as the view type, but in the "ViewModels" namespace. + + + + + Sets the default view model factory. + + The view model factory which provides the ViewModel type as a parameter. + + + + Sets the default view model factory. + + The view model factory that provides the View instance and ViewModel type as parameters. + + + + Sets the default view type to view model type resolver. + + The view type to view model type resolver. + + + + Automatically looks up the viewmodel that corresponds to the current view, using two strategies: + It first looks to see if there is a mapping registered for that view, if not it will fallback to the convention based approach. + + The dependency object, typically a view. + The call back to use to create the binding between the View and ViewModel + + + + Gets the view model for the specified view. + + The view that the view model wants. + The ViewModel that corresponds to the view passed as a parameter. + + + + Gets the ViewModel type for the specified view. + + The View that the ViewModel wants. + The ViewModel type that corresponds to the View. + + + + Registers the ViewModel factory for the specified view type. + + The View + The ViewModel factory. + + + + Registers the ViewModel factory for the specified view type name. + + The name of the view type. + The ViewModel factory. + + + + Registers a ViewModel type for the specified view type. + + The View + The ViewModel + + + + Registers a ViewModel type for the specified view. + + The View type name + The ViewModel type + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Cannot register a CompositeCommand in itself.. + + + + + Looks up a localized string similar to Cannot register the same command twice in the same CompositeCommand.. + + + + + Looks up a localized string similar to {1}: {2}. Priority: {3}. Timestamp:{0:u}.. + + + + + Looks up a localized string similar to Neither the executeMethod nor the canExecuteMethod delegates can be null.. + + + + + Looks up a localized string similar to T for DelegateCommand<T> is not an object nor Nullable.. + + + + + Looks up a localized string similar to To use the UIThread option for subscribing, the EventAggregator must be constructed on the UI thread.. + + + + + Looks up a localized string similar to Invalid Delegate Reference Type Exception. + + + + + Looks up a localized string similar to The entity does not contain a property with that name. + + + + + Looks up a localized string similar to The member access expression does not access a property.. + + + + + Looks up a localized string similar to The expression is not a member access expression.. + + + + + Looks up a localized string similar to The referenced property is a static property.. + + +
+
diff --git a/packages/Prism.Unity.6.3.0/Prism.Unity.6.3.0.nupkg b/packages/Prism.Unity.6.3.0/Prism.Unity.6.3.0.nupkg new file mode 100644 index 0000000..c964ff2 Binary files /dev/null and b/packages/Prism.Unity.6.3.0/Prism.Unity.6.3.0.nupkg differ diff --git a/packages/Prism.Unity.6.3.0/lib/net45/Prism.Unity.Wpf.dll b/packages/Prism.Unity.6.3.0/lib/net45/Prism.Unity.Wpf.dll new file mode 100644 index 0000000..e6f8bcd Binary files /dev/null and b/packages/Prism.Unity.6.3.0/lib/net45/Prism.Unity.Wpf.dll differ diff --git a/packages/Prism.Unity.6.3.0/lib/net45/Prism.Unity.Wpf.xml b/packages/Prism.Unity.6.3.0/lib/net45/Prism.Unity.Wpf.xml new file mode 100644 index 0000000..e10adb2 --- /dev/null +++ b/packages/Prism.Unity.6.3.0/lib/net45/Prism.Unity.Wpf.xml @@ -0,0 +1,302 @@ + + + + Prism.Unity.Wpf + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Adding UnityBootstrapperExtension to container.. + + + + + Looks up a localized string similar to Bootstrapper sequence completed.. + + + + + Looks up a localized string similar to Configuring default region behaviors.. + + + + + Looks up a localized string similar to Configuring module catalog.. + + + + + Looks up a localized string similar to Configuring region adapters.. + + + + + Looks up a localized string similar to Configuring ServiceLocator singleton.. + + + + + Looks up a localized string similar to Configuring the Unity container.. + + + + + Looks up a localized string similar to Configuring the ViewModelLocator to use Unity.. + + + + + Looks up a localized string similar to Creating module catalog.. + + + + + Looks up a localized string similar to Creating the shell.. + + + + + Looks up a localized string similar to Creating Unity container.. + + + + + Looks up a localized string similar to Initializing modules.. + + + + + Looks up a localized string similar to Initializing the shell.. + + + + + Looks up a localized string similar to Logger was created successfully.. + + + + + Looks up a localized string similar to The method 'GetModuleEnumerator' of the bootstrapper must be overwritten in order to use the default module initialization logic.. + + + + + Looks up a localized string similar to The ILoggerFacade is required and cannot be null.. + + + + + Looks up a localized string similar to The IModuleCatalog is required and cannot be null in order to initialize the modules.. + + + + + Looks up a localized string similar to The IUnityContainer is required and cannot be null.. + + + + + Looks up a localized string similar to Registering Framework Exception Types.. + + + + + Looks up a localized string similar to Setting the RegionManager.. + + + + + Looks up a localized string similar to Type '{0}' was already registered by the application. Skipping.... + + + + + Looks up a localized string similar to Updating Regions.. + + + + + Specialization of the default RegionNavigationContentLoader that queries the corresponding + to obtain the name of the view's type registered for the contract name. + + + + + Initializes a new instance of the class. + + used to create the instance of the view from its . + where the views are registered. + + + + Returns the set of candidates that may satisfiy this navigation request. + + The region containing items that may satisfy the navigation request. + The candidate navigation target. + An enumerable of candidate objects from the + + + + Base class that provides a basic bootstrapping sequence that + registers most of the Prism Library assets + in a . + + + This class must be overridden to provide application specific configuration. + + + + + Gets the default for the application. + + The default instance. + + + + Run the bootstrapper process. + + If , registers default Prism Library services in the container. This is the default behavior. + + + + Configures the LocatorProvider for the . + + + + + Registers in the the of the Exceptions + that are not considered root exceptions by the . + + + + + Configures the . May be overwritten in a derived class to add specific + type mappings required by the application. + + + + + Initializes the modules. May be overwritten in a derived class to use a custom Modules Catalog + + + + + Creates the that will be used as the default container. + + A new instance of . + + + + Registers a type in the container only if that type was not already registered. + + The interface type to register. + The type implementing the interface. + Registers the type as a singleton. + + + + Implements a that checks if a specific type was registered with the container. + + + + + Evaluates if a specified type was registered in the container. + + The container to check if the type was registered in. + The type to check if it was registered. + if the was registered with the container. + + In order to use this extension, you must first call + and specify as the extension type. + + + + + Initializes the container with this extension's functionality. + + + + + Registers an object for navigation. + + The Type of the object to register + used to register type for Navigation. + The unique name to register with the object. + + + + Extensions methods to extend and facilitate the usage of . + + + + + Returns whether a specified type has a type mapping registered in the container. + + The to check for the type mapping. + The type to check if there is a type mapping for. + if there is a type mapping registered for . + In order to use this extension method, you first need to add the + extension to the . + + + + + Utility method to try to resolve a service from the container avoiding an exception if the container cannot build the type. + + The cointainer that will be used to resolve the type. + The type to resolve. + The instance of built up by the container. + + + + Utility method to try to resolve a service from the container avoiding an exception if the container cannot build the type. + + The cointainer that will be used to resolve the type. + The type to resolve. + The instance of built up by the container. + + + + Defines a adapter for the interface to be used by the Prism Library. + + + + + Initializes a new instance of . + + The that will be used + by the and methods. + + + + Resolves the instance of the requested service. + + Type of instance requested. + Name of registered service you want. May be null. + The requested service instance. + + + + Resolves all the instances of the requested service. + + Type of service requested. + Sequence of service instance objects. + + + diff --git a/packages/Prism.Unity.6.3.0/lib/uap10.0/Prism.Unity.Windows.dll b/packages/Prism.Unity.6.3.0/lib/uap10.0/Prism.Unity.Windows.dll new file mode 100644 index 0000000..8f65917 Binary files /dev/null and b/packages/Prism.Unity.6.3.0/lib/uap10.0/Prism.Unity.Windows.dll differ diff --git a/packages/Prism.Unity.6.3.0/lib/uap10.0/Prism.Unity.Windows.pri b/packages/Prism.Unity.6.3.0/lib/uap10.0/Prism.Unity.Windows.pri new file mode 100644 index 0000000..6146a58 Binary files /dev/null and b/packages/Prism.Unity.6.3.0/lib/uap10.0/Prism.Unity.Windows.pri differ diff --git a/packages/Prism.Unity.6.3.0/lib/uap10.0/Prism.Unity.Windows.xml b/packages/Prism.Unity.6.3.0/lib/uap10.0/Prism.Unity.Windows.xml new file mode 100644 index 0000000..135cbdf --- /dev/null +++ b/packages/Prism.Unity.6.3.0/lib/uap10.0/Prism.Unity.Windows.xml @@ -0,0 +1,170 @@ + + + + Prism.Unity.Windows + + + + + Provides the base class for the Universal Windows Platform application object which + includes the automatic creation and wiring of the Unity container and + the bootstrapping process for Prism services in the container. + + + + + Allow strongly typed access to the Application as a global + + + + + Get the IoC Unity Container + + + + + Implements the Resolves method to be handled by the Unity Container. + Use the container to resolve types (e.g. ViewModels and Flyouts) + so their dependencies get injected + + The type. + A concrete instance of the specified type. + + + + Creates the that will be used as the default container. + + A new instance of . + + + + Creates and configures the container and service locator + + + + + Configures the LocatorProvider for the . + + + + + Creates the nav service through the base class and registers it with the container + + The frame where nav happens + The session state service + NavigationService + + + + Creates the SessionStateService as a singleton through the container + + The SessionStateService + + + + Creates the DeviceGestureService as a singleton through the container + + DeviceGestureService instance + + + + Creates the IEventAggregator as a singleton through the container + + IEventAggregator instance + + + + Registers a type in the container only if that type was not already registered. + + The interface type to register. + The type implementing the interface. + Registers the type as a singleton. + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Implements a that checks if a specific type was registered with the container. + + + + + Evaluates if a specified type was registered in the container. + + The container to check if the type was registered in. + The type to check if it was registered. + if the was registered with the container. + + In order to use this extension, you must first call + and specify as the extension type. + + + + + Initializes the container with this extension's functionality. + + + + + Extensions methods to extend and facilitate the usage of . + + + + + Returns whether a specified type has a type mapping registered in the container. + + The to check for the type mapping. + The type to check if there is a type mapping for. + if there is a type mapping registered for . + In order to use this extension method, you first need to add the + extension to the . + + + + + Utility method to try to resolve a service from the container avoiding an exception if the container cannot build the type. + + The cointainer that will be used to resolve the type. + The type to resolve. + The instance of built up by the container. + + + + Utility method to try to resolve a service from the container avoiding an exception if the container cannot build the type. + + The cointainer that will be used to resolve the type. + The type to resolve. + The instance of built up by the container. + + + + Defines a adapter for the interface to be used by the Prism Library. + + + + + Initializes a new instance of . + + The that will be used + by the and methods. + + + + Resolves the instance of the requested service. + + Type of instance requested. + Name of registered service you want. May be null. + The requested service instance. + + + + Resolves all the instances of the requested service. + + Type of service requested. + Sequence of service instance objects. + + + diff --git a/packages/Prism.Wpf.6.3.0/Prism.Wpf.6.3.0.nupkg b/packages/Prism.Wpf.6.3.0/Prism.Wpf.6.3.0.nupkg new file mode 100644 index 0000000..e8a1038 Binary files /dev/null and b/packages/Prism.Wpf.6.3.0/Prism.Wpf.6.3.0.nupkg differ diff --git a/packages/Prism.Wpf.6.3.0/lib/net45/Prism.Wpf.dll b/packages/Prism.Wpf.6.3.0/lib/net45/Prism.Wpf.dll new file mode 100644 index 0000000..c6c7f4f Binary files /dev/null and b/packages/Prism.Wpf.6.3.0/lib/net45/Prism.Wpf.dll differ diff --git a/packages/Prism.Wpf.6.3.0/lib/net45/Prism.Wpf.xml b/packages/Prism.Wpf.6.3.0/lib/net45/Prism.Wpf.xml new file mode 100644 index 0000000..33a2b41 --- /dev/null +++ b/packages/Prism.Wpf.6.3.0/lib/net45/Prism.Wpf.xml @@ -0,0 +1,5527 @@ + + + + Prism.Wpf + + + + + Base class that provides a basic bootstrapping sequence and hooks + that specific implementations can override + + + This class must be overridden to provide application specific configuration. + + + + + Gets the for the application. + + A instance. + + + + Gets the default for the application. + + The default instance. + + + + Gets the shell user interface + + The shell user interface. + + + + Create the used by the bootstrapper. + + + The base implementation returns a new TextLogger. + + + + + Runs the bootstrapper process. + + + + + Creates the used by Prism. + + + The base implementation returns a new ModuleCatalog. + + + + + Configures the used by Prism. + + + + + Configures the used by Prism. + + + + + Registers the s of the Exceptions that are not considered + root exceptions by the . + + + + + Initializes the modules. May be overwritten in a derived class to use a custom Modules Catalog + + + + + Configures the default region adapter mappings to use in the application, in order + to adapt UI controls defined in XAML to use a region and register it automatically. + May be overwritten in a derived class to add specific mappings required by the application. + + The instance containing all the mappings. + + + + Configures the . + This will be the list of default behaviors that will be added to a region. + + + + + Creates the shell or main window of the application. + + The shell of the application. + + If the returned instance is a , the + will attach the default of + the application in its attached property + in order to be able to add regions by using the + attached property from XAML. + + + + + Initializes the shell. + + + + + Run the bootstrapper process. + + If , registers default + Prism Library services in the container. This is the default behavior. + + + + Configures the LocatorProvider for the . + + + + + A dictionary of lists. + + The key to use for lists. + The type of the value held by lists. + + + + If a list does not already exist, it will be created automatically. + + The key of the list that will hold the value. + + + + Adds a value to a list with the given key. If a list does not already exist, + it will be created automatically. + + The key of the list that will hold the value. + The value to add to the list under the given key. + + + + Removes all entries in the dictionary. + + + + + Determines whether the dictionary contains the specified value. + + The value to locate. + true if the dictionary contains the value in any list; otherwise, false. + + + + Determines whether the dictionary contains the given key. + + The key to locate. + true if the dictionary contains the given key; otherwise, false. + + + + Retrieves the all the elements from the list which have a key that matches the condition + defined by the specified predicate. + + The filter with the condition to use to filter lists by their key. + The elements that have a key that matches the condition defined by the specified predicate. + + + + Retrieves all the elements that match the condition defined by the specified predicate. + + The filter with the condition to use to filter values. + The elements that match the condition defined by the specified predicate. + + + + Removes a list by key. + + The key of the list to remove. + if the element was removed. + + + + Removes a value from the list with the given key. + + The key of the list where the value exists. + The value to remove. + + + + Removes a value from all lists where it may be found. + + The value to remove. + + + + Gets a shallow copy of all values in all lists. + + List of values. + + + + Gets the list of keys in the dictionary. + + Collection of keys. + + + + Gets or sets the list associated with the given key. The + access always succeeds, eventually returning an empty list. + + The key of the list to access. + The list associated with the key. + + + + Gets the number of lists in the dictionary. + + Value indicating the values count. + + + + See for more information. + + + + + See for more information. + + + + + See for more information. + + + + + See for more information. + + + + + See for more information. + + + + + See for more information. + + + + + See for more information. + + + + + See for more information. + + + + + See for more information. + + + + + See for more information. + + + + + Class that wraps an object, so that other classes can notify for Change events. Typically, this class is set as + a Dependency Property on DependencyObjects, and allows other classes to observe any changes in the Value. + + + This class is required, because in Silverlight, it's not possible to receive Change notifications for Dependency properties that you do not own. + + The type of the property that's wrapped in the Observable object + + + + Identifies the Value property of the ObservableObject + + + + + Event that gets invoked when the Value property changes. + + + + + The value that's wrapped inside the ObservableObject. + + + + + Helper class for parsing instances. + + + + + Gets the query part of . + + The Uri. + + + + Gets the AbsolutePath part of . + + The Uri. + + + + Parses the query of into a dictionary. + + The URI. + + + + Base behavior to handle connecting a to a Command. + + The target object must derive from Control + + CommandBehaviorBase can be used to provide new behaviors for commands. + + + + + Constructor specifying the target object. + + The target object the behavior is attached to. + + + + Corresponding command to be execute and monitored for + + + + + The parameter to supply the command during execution + + + + + Object to which this behavior is attached. + + + + + Updates the target object's IsEnabled property based on the commands ability to execute. + + + + + Executes the command, if it's set, providing the + + + + + Interaction logic for ConfirmationChildWindow.xaml + + + DefaultConfirmationWindow + + + + + Creates a new instance of ConfirmationChildWindow. + + + + + Sets or gets the shown by this window./> + + + + + InitializeComponent + + + + + Interaction logic for NotificationChildWindow.xaml + + + DefaultNotificationWindow + + + + + Creates a new instance of + + + + + Sets or gets the shown by this window./> + + + + + InitializeComponent + + + + + Interaction logic for DefaultWindow.xaml + + + DefaultWindow + + + + + InitializeComponent + + + + + Basic implementation of . + + + + + Gets or sets a value indicating that the confirmation is confirmed. + + + + + Represents an interaction request used for confirmations. + + + + + Gets or sets a value indicating that the confirmation is confirmed. + + + + + Represents a request from user interaction. + + + View models can expose interaction request objects through properties and raise them when user interaction + is required so views associated with the view models can materialize the user interaction using an appropriate + mechanism. + + + + + Fired when the interaction is needed. + + + + + Interface used by the . + If the DataContext object of a view that is shown with this action implements this interface + it will be populated with the data of the interaction request + as well as an to finish the request upon invocation. + + + + + The passed when the interaction request was raised. + + + + + An that can be invoked to finish the interaction. + + + + + Represents an interaction request used for notifications. + + + + + Gets or sets the title to use for the notification. + + + + + Gets or sets the content of the notification. + + + + + Implementation of the interface. + + + + + Fired when interaction is needed. + + + + + Fires the Raised event. + + The context for the interaction request. + + + + Fires the Raised event. + + The context for the interaction request. + The callback to execute when the interaction is completed. + + + + Event args for the event. + + + + + Constructs a new instance of + + + + + + + Gets the context for a requested interaction. + + + + + Gets the callback to execute when an interaction is completed. + + + + + Custom event trigger for using with objects. + + + The standard class can be used instead, as long as the 'Raised' event + name is specified. + + + + + Specifies the name of the Event this EventTriggerBase is listening for. + + This implementation always returns the Raised event name for ease of connection with . + + + + Basic implementation of . + + + + + Gets or sets the title to use for the notification. + + + + + Gets or sets the content of the notification. + + + + + Trigger action that executes a command when invoked. + It also maintains the Enabled state of the target control based on the CanExecute method of the command. + + + + + Dependency property identifying if the associated element should automaticlaly be enabled or disabled based on the result of the Command's CanExecute + + + + + Gets or sets whther or not the associated element will automatically be enabled or disabled based on the result of the commands CanExecute + + + + + Dependency property identifying the command to execute when invoked. + + + + + Gets or sets the command to execute when invoked. + + + + + Dependency property identifying the command parameter to supply on command execution. + + + + + Gets or sets the command parameter to supply on command execution. + + + + + Dependency property identifying the TriggerParameterPath to be parsed to identify the child property of the trigger parameter to be used as the command parameter. + + + + + Gets or sets the TriggerParameterPath value. + + + + + Public wrapper of the Invoke method. + + + + + Executes the command + + This parameter is passed to the command; the CommandParameter specified in the CommandParameterProperty is used for command invocation if not null. + + + + Sets the Command and CommandParameter properties to null. + + + + + This method is called after the behavior is attached. + It updates the command behavior's Command and CommandParameter properties if necessary. + + + + + A CommandBehavior that exposes a public ExecuteCommand method. It provides the functionality to invoke commands and update Enabled state of the target control. + It is not possible to make the inherit from , since the + must already inherit from , so we chose to follow the aggregation approach. + + + + + Constructor specifying the target object. + + The target object the behavior is attached to. + + + + Executes the command, if it's set. + + + + + Shows a popup window in response to an being raised. + + + + + The content of the child window to display as part of the popup. + + + + + The type of content of the child window to display as part of the popup. + + + + + Determines if the content should be shown in a modal window or not. + + + + + Determines if the content should be initially shown centered over the view that raised the interaction request or not. + + + + + If set, applies this WindowStartupLocation to the child window. + + + + + If set, applies this Style to the child window. + + + + + Gets or sets the content of the window. + + + + + Gets or sets the type of content of the window. + + + + + Gets or sets if the window will be modal or not. + + + + + Gets or sets if the window will be initially shown centered over the view that raised the interaction request or not. + + + + + Gets or sets the startup location of the Window. + + + + + Gets or sets the Style of the Window. + + + + + Displays the child window and collects results for . + + The parameter to the action. If the action does not require a parameter, the parameter may be set to a null reference. + + + + Returns the window to display as part of the trigger action. + + The notification to be set as a DataContext in the window. + + + + + Checks if the WindowContent or its DataContext implements . + If so, it sets the corresponding values. + + The notification to be set as a DataContext in the HostWindow. + The HostWindow + + + + Creates a Window that is used when providing custom Window Content + + The Window + + + + When no WindowContent is sent this method is used to create a default basic window to show + the corresponding or . + + The INotification or IConfirmation parameter to show. + + + + + Implementation of that logs into a . + + + + + Initializes a new instance of that writes to + the console output. + + + + + Initializes a new instance of . + + The writer to use for writing log entries. + + + + Write a new log entry with the specified category and priority. + + Message body to log. + Category of the entry. + The priority of the entry. + + + + Disposes the associated . + + When , disposes the associated . + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + Calls . + 2 + + + + Implementation of that logs to .NET class. + + + + + Write a new log entry with the specified category and priority. + + Message body to log. + Category of the entry. + The priority of the entry. + + + + Handles AppDomain's AssemblyResolve event to be able to load assemblies dynamically in + the LoadFrom context, but be able to reference the type from assemblies loaded in the Load context. + + + + + Registers the specified assembly and resolves the types in it when the AppDomain requests for it. + + The path to the assemly to load in the LoadFrom context. + This method does not load the assembly immediately, but lazily until someone requests a + declared in the assembly. + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + Calls . + 2 + + + + Disposes the associated . + + When , it is being called from the Dispose method. + + + + A catalog built from a configuration file. + + + + + Builds an instance of ConfigurationModuleCatalog with a as the default store. + + + + + Gets or sets the store where the configuration is kept. + + + + + Loads the catalog from the configuration. + + + + + Defines a store for the module metadata. + + + + + Gets the module configuration data. + + A instance. + + + + Represents the exception that is thrown when there is a circular dependency + between modules during the module loading process. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with the specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class + with the specified error message and inner exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception. + + + + Initializes the exception with a particular module, error message and inner exception that happened. + + The name of the module. + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or a reference if no inner exception is specified. + + + + Initializes a new instance of the class + with the serialization data. + + Holds the serialized object data about the exception being thrown. + Contains contextual information about the source or destination. + + + + Represets a catalog created from a directory on disk. + + + The directory catalog will scan the contents of a directory, locating classes that implement + and add them to the catalog based on contents in their associated . + Assemblies are loaded into a new application domain with ReflectionOnlyLoad. The application domain is destroyed + once the assemblies have been discovered. + + The diretory catalog does not continue to monitor the directory after it has created the initialze catalog. + + + + + Directory containing modules to search for. + + + + + Drives the main logic of building the child domain and searching for the assemblies. + + + + + Creates a new child domain and copies the evidence from a parent domain. + + The parent domain. + The new child domain. + + Grabs the evidence and uses it to construct the new + because in a ClickOnce execution environment, creating an + will by default pick up the partial trust environment of + the AppLaunch.exe, which was the root executable. The AppLaunch.exe does a + create domain and applies the evidence from the ClickOnce manifests to + create the domain that the application is actually executing in. This will + need to be Full Trust for Prism applications. + + An is thrown if is null. + + + + Exception thrown when a module is declared twice in the same catalog. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The exception message. + + + + Initializes a new instance of the class. + + The exception message. + The inner exception. + + + + Initializes a new instance of the class with a specified error message. + + The name of the module. + The message that describes the error. + + + + Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception. + + The name of the module. + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class + with the serialization data. + + Holds the serialized object data about the exception being thrown. + Contains contextual information about the source or destination. + + + + Loads modules from an arbitrary location on the filesystem. This typeloader is only called if + classes have a Ref parameter that starts with "file://". + This class is only used on the Desktop version of the Prism Library. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The assembly resolver. + + + + Raised repeatedly to provide progress as modules are loaded in the background. + + + + + Raised when a module is loaded or fails to load. + + + + + Evaluates the property to see if the current typeloader will be able to retrieve the . + Returns true if the property starts with "file://", because this indicates that the file + is a local file. + + Module that should have it's type loaded. + + if the current typeloader is able to retrieve the module, otherwise . + + An is thrown if is null. + + + + Retrieves the . + + Module that should have it's type loaded. + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + Calls . + 2 + + + + Disposes the associated . + + When , it is being called from the Dispose method. + + + + Interface for classes that are responsible for resolving and loading assembly files. + + + + + Load an assembly when it's required by the application. + + + + + + Defines a store for the module metadata. + + + + + Gets the module configuration data. + + A instance. + + + + Defines the contract for the modules deployed in the application. + + + + + Notifies the module that it has be initialized. + + + + + This is the expected catalog definition for the ModuleManager. + The ModuleCatalog holds information about the modules that can be used by the + application. Each module is described in a ModuleInfo class, that records the + name, type and location of the module. + + + + + Gets all the classes that are in the . + + + + + Return the list of s that depends on. + + The to get the + An enumeration of that depends on. + + + + Returns the collection of s that contain both the s in + , but also all the modules they depend on. + + The modules to get the dependencies for. + + A collection of that contains both all s in + and also all the they depend on. + + + + + Initializes the catalog, which may load and validate the modules. + + + + + Adds a to the . + + The to add. + The for easily adding multiple modules. + + + + Marker interface that allows both s and s to be + added to the from code and XAML. + + + + + Declares a service which initializes the modules into the application. + + + + + Initializes the specified module. + + The module to initialize + + + + Defines the interface for the service that will retrieve and initialize the application's modules. + + + + + Initializes the modules marked as on the . + + + + + Loads and initializes the module on the with the name . + + Name of the module requested for initialization. + + + + Raised repeatedly to provide progress as modules are downloaded. + + + + + Raised when a module is loaded or fails to load. + + + + + Defines the interface for moduleTypeLoaders + + + + + Evaluates the property to see if the current typeloader will be able to retrieve the . + + Module that should have it's type loaded. + if the current typeloader is able to retrieve the module, otherwise . + + + + Retrieves the . + + Module that should have it's type loaded. + + + + Raised repeatedly to provide progress as modules are downloaded in the background. + + + + + Raised when a module is loaded or fails to load. + + + This event is raised once per ModuleInfo instance requested in . + + + + + Specifies on which stage the Module group will be initialized. + + + + + The module will be initialized when it is available on application start-up. + + + + + The module will be initialized when requested, and not automatically on application start-up. + + + + + Provides completion information after a module is loaded, or fails to load. + + + + + Initializes a new instance of the class. + + The module info. + Any error that occurred during the call. + + + + Gets the module info. + + The module info. + + + + Gets any error that occurred + + The exception if an error occurred; otherwise null. + + + + Gets or sets a value indicating whether the error has been handled by the event subscriber. + + trueif the error is handled; otherwise, false. + + If there is an error on this event and no event subscriber sets this to true, an exception will be thrown by the event publisher. + + + + + Base class for exceptions that are thrown because of a problem with modules. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The exception message. + + + + Initializes a new instance of the class. + + The exception message. + The inner exception. + + + + Initializes the exception with a particular module and error message. + + The name of the module. + The error message that explains the reason for the exception. + + + + Initializes the exception with a particular module, error message and inner exception that happened. + + The name of the module. + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or a reference if no inner exception is specified. + + + + Gets or sets the name of the module that this exception refers to. + + The name of the module. + + + + Initializes a new instance with serialized data. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + + + + Sets the with information about the exception. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + + + + Indicates that the class should be considered a named module using the + provided module name. + + + + + Gets or sets the name of the module. + + The name of the module. + + + + Gets or sets the value indicating whether the module should be loaded OnDemand. + + When (default value), it indicates the module should be loaded as soon as it's dependencies are satisfied. + Otherwise you should explicitily load this module via the . + + + + The holds information about the modules that can be used by the + application. Each module is described in a class, that records the + name, type and location of the module. + + It also verifies that the is internally valid. That means that + it does not have: + + Circular dependencies + Missing dependencies + + Invalid dependencies, such as a Module that's loaded at startup that depends on a module + that might need to be retrieved. + + + The also serves as a baseclass for more specialized Catalogs . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class while providing an + initial list of s. + + The initial list of modules. + + + + Gets the items in the . This property is mainly used to add s or + s through XAML. + + The items in the catalog. + + + + Gets all the classes that are in the , regardless + if they are within a or not. + + The modules. + + + + Gets the s that have been added to the . + + The groups. + + + + Gets or sets a value that remembers whether the has been validated already. + + + + + Returns the list of s that are not contained within any . + + The groupless modules. + + + + Creates a from XAML. + + that contains the XAML declaration of the catalog. + An instance of built from the XAML. + + + + Creates a from a XAML included as an Application Resource. + + Relative that identifies the XAML included as an Application Resource. + An instance of build from the XAML. + + + + Loads the catalog if necessary. + + + + + Return the list of s that depends on. + + + If the was not yet validated, this method will call . + + The to get the + An enumeration of that depends on. + + + + Returns a list of s that contain both the s in + , but also all the modules they depend on. + + The modules to get the dependencies for. + + A list of that contains both all s in + but also all the they depend on. + + + + + Validates the . + + When validation of the fails. + + + + Adds a to the . + + The to add. + The for easily adding multiple modules. + + + + Adds a groupless to the catalog. + + of the module to be added. + Collection of module names () of the modules on which the module to be added logically depends on. + The same instance with the added module. + + + + Adds a groupless to the catalog. + + of the module to be added. + Stage on which the module to be added will be initialized. + Collection of module names () of the modules on which the module to be added logically depends on. + The same instance with the added module. + + + + Adds a groupless to the catalog. + + Name of the module to be added. + of the module to be added. + Collection of module names () of the modules on which the module to be added logically depends on. + The same instance with the added module. + + + + Adds a groupless to the catalog. + + Name of the module to be added. + of the module to be added. + Stage on which the module to be added will be initialized. + Collection of module names () of the modules on which the module to be added logically depends on. + The same instance with the added module. + + + + Adds a groupless to the catalog. + + Name of the module to be added. + of the module to be added. + Reference to the location of the module to be added assembly. + Stage on which the module to be added will be initialized. + Collection of module names () of the modules on which the module to be added logically depends on. + The same instance with the added module. + + + + Initializes the catalog, which may load and validate the modules. + + When validation of the fails, because this method calls . + + + + Creates and adds a to the catalog. + + Stage on which the module group to be added will be initialized. + Reference to the location of the module group to be added. + Collection of included in the group. + with the added module group. + + + + Checks for cyclic dependencies, by calling the dependencysolver. + + the. + + + + + Ensures that all the dependencies within refer to s + within that list. + + The modules to validate modules for. + + Throws if a in depends on a module that's + not in . + + Throws if is . + + + + Does the actual work of loading the catalog. The base implementation does nothing. + + + + + Sorts a list of s. This method is called by + to return a sorted list. + + The s to sort. + Sorted list of s + + + + Makes sure all modules have an Unique name. + + + Thrown if the names of one or more modules are not unique. + + + + + Ensures that there are no cyclic dependencies. + + + + + Ensures that there are no dependencies between modules on different groups. + + + A groupless module can only depend on other groupless modules. + A module within a group can depend on other modules within the same group and/or on groupless modules. + + + + + Ensures that there are no modules marked to be loaded + depending on modules loaded + + + + + Returns the on which the received module dependens on. + + Module whose dependant modules are requested. + Collection of dependants of . + + + + Ensures that the catalog is validated. + + + + + A configuration element to declare module metadata. + + + + + Initializes a new instance of . + + + + + Initializes a new instance of . + + The assembly file where the module is located. + The type of the module. + The name of the module. + This attribute specifies whether the module is loaded at startup. + + + + Gets or sets the assembly file. + + The assembly file. + + + + Gets or sets the module type. + + The module's type. + + + + Gets or sets the module name. + + The module's name. + + + + Gets or sets a value indicating whether the module should be loaded at startup. + + A value indicating whether the module should be loaded at startup. + + + + Gets or sets the modules this module depends on. + + The names of the modules that this depends on. + + + + A collection of . + + + + + Initializes a new instance of . + + + + + Initializes a new . + + The initial set of . + An is thrown if is . + + + + Gets a value indicating whether an exception should be raised if a duplicate element is found. + This property will always return true. + + A value. + + + + Gets the type of the . + + + The of this collection. + + + + + Gets the name used to identify this collection of elements in the configuration file when overridden in a derived class. + + + The name of the collection; otherwise, an empty string. + + + + + Gets the located at the specified index in the collection. + + The index of the element in the collection. + A . + + + + Adds a to the collection. + + A instance. + + + + Tests if the collection contains the configuration for the specified module name. + + The name of the module to search the configuration for. + if a configuration for the module is present; otherwise . + + + + Searches the collection for all the that match the specified predicate. + + A that implements the match test. + A with the successful matches. + An is thrown if is null. + + + + Creates a new . + + A . + + + + Gets the element key for a specified configuration element when overridden in a derived class. + + The to return the key for. + + An that acts as the key for the specified . + + + + + Specifies that the current module has a dependency on another module. This attribute should be used on classes that implement . + + + + + Initializes a new instance of . + + The name of the module that this module is dependant upon. + + + + Gets the name of the module that this module is dependant upon. + + The name of the module that this module is dependant upon. + + + + A collection of . + + + + + Initializes a new instance of . + + + + + Initializes a new instance of . + + An array of with initial list of dependencies. + + + + Gets the type of the . + + + The of this collection. + + + + + Gets the name used to identify this collection of elements in the configuration file when overridden in a derived class. + + + The name of the collection; otherwise, an empty string. + + + + + Gets the located at the specified index in the collection. + + The index of the element in the collection. + A . + + + + Creates a new . + + A . + + + + Gets the element key for a specified configuration element when overridden in a derived class. + + The to return the key for. + + An that acts as the key for the specified . + + + + + A for module dependencies. + + + + + Initializes a new instance of . + + + + + Initializes a new instance of . + + A module name. + + + + Gets or sets the name of a module antoher module depends on. + + The name of a module antoher module depends on. + + + + Used by to get the load sequence + for the modules to load according to their dependencies. + + + + + Adds a module to the solver. + + The name that uniquely identifies the module. + + + + Adds a module dependency between the modules specified by dependingModule and + dependentModule. + + The name of the module with the dependency. + The name of the module dependingModule + depends on. + + + + Calculates an ordered vector according to the defined dependencies. + Non-dependant modules appears at the beginning of the resulting array. + + The resulting ordered list of modules. + This exception is thrown + when a cycle is found in the defined depedency graph. + + + + Gets the number of modules added to the solver. + + The number of modules. + + + + Provides progress information as a module downloads. + + + + + Initializes a new instance of the class. + + The module info. + The bytes received. + The total bytes to receive. + + + + Getsthe module info. + + The module info. + + + + Gets the bytes received. + + The bytes received. + + + + Gets the total bytes to receive. + + The total bytes to receive. + + + + Defines the metadata that describes a module. + + + + + Initializes a new empty instance of . + + + + + Initializes a new instance of . + + The module's name. + The module 's AssemblyQualifiedName. + The modules this instance depends on. + An is thrown if is . + + + + Initializes a new instance of . + + The module's name. + The module's type. + + + + Gets or sets the name of the module. + + The name of the module. + + + + Gets or sets the module 's AssemblyQualifiedName. + + The type of the module. + + + + Gets or sets the list of modules that this module depends upon. + + The list of modules that this module depends upon. + + + + Specifies on which stage the Module will be initialized. + + + + + Reference to the location of the module assembly. + The following are examples of valid values: + file://c:/MyProject/Modules/MyModule.dll for a loose DLL in WPF. + + + + + + Gets or sets the state of the with regards to the module loading and initialization process. + + + + + Represents a group of instances that are usually deployed together. s + are also used by the to prevent common deployment problems such as having a module that's required + at startup that depends on modules that will only be downloaded on demand. + + The group also forwards and values to the s that it + contains. + + + + + Gets or sets the for the whole group. Any classes that are + added after setting this value will also get this . + + + The initialization mode. + + + + Gets or sets the value for the whole group. Any classes that are + added after setting this value will also get this . + + The ref value will also be used by the to determine which to use. + For example, using an "file://" prefix with a valid URL will cause the FileModuleTypeLoader to be used + (Only available in the desktop version of CAL). + + + The ref value that will be used. + + + + Adds an moduleInfo to the . + + The to the . + + + + Forwards and properties from this + to . + + The module info to forward values to. + An is thrown if is . + + + + Removes all s from the . + + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in at which copying begins. + + is null. + + + is less than 0. + + + is multidimensional. + -or- + is equal to or greater than the length of . + -or- + The number of elements in the source is greater than the available space from to the end of the destination . + + + + + Gets the number of elements contained in the . + + + + The number of elements contained in the . + + + + + Gets a value indicating whether the is read-only. + + + false, because the is not Read-Only. + + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Adds an item to the . + + + The to add to the . + Must be of type + + + The position into which the new element was inserted. + + + + + Determines whether the contains a specific value. + + + The to locate in the . + Must be of type + + + true if the is found in the ; otherwise, false. + + + + + Determines the index of a specific item in the . + + + The to locate in the . + Must be of type + + + The index of if found in the list; otherwise, -1. + + + + + Inserts an item to the at the specified index. + + The zero-based index at which should be inserted. + + The to insert into the . + Must be of type + + + is not a valid index in the . + + + If is null. + + + If is not of type + + + + + Gets a value indicating whether the has a fixed size. + + false, because the does not have a fixed length. + + + + + Removes the first occurrence of a specific object from the . + + + The to remove from the . + Must be of type + + + + + Removes the item at the specified index. + + The zero-based index of the item to remove. + + is not a valid index in the . + + + The is read-only. + + + + + Gets or sets the at the specified index. + + + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in at which copying begins. + + is null. + + + is less than zero. + + + is multidimensional. + -or- + is equal to or greater than the length of . + -or- + The number of elements in the source is greater than the available space from to the end of the destination . + + + The type of the source cannot be cast automatically to the type of the destination . + + + + + Gets a value indicating whether access to the is synchronized (thread safe). + + + true if access to the is synchronized (thread safe); otherwise, false. + + + + + Gets an object that can be used to synchronize access to the . + + + + An object that can be used to synchronize access to the . + + + + + Determines the index of a specific item in the . + + The object to locate in the . + + The index of if found in the list; otherwise, -1. + + + + + Inserts an item to the at the specified index. + + The zero-based index at which should be inserted. + The object to insert into the . + + is not a valid index in the . + + + + + Gets or sets the at the specified index. + + The at the specified index + + + + Defines extension methods for the class. + + + + + Adds a new module that is statically referenced to the specified module info group. + + The group where to add the module info in. + The name for the module. + The type for the module. This type should be a descendant of . + The names for the modules that this module depends on. + Returns the instance of the passed in module info group, to provide a fluid interface. + + + + Adds a new module that is statically referenced to the specified module info group. + + The group where to add the module info in. + The type for the module. This type should be a descendant of . + The names for the modules that this module depends on. + Returns the instance of the passed in module info group, to provide a fluid interface. + The name of the module will be the type name. + + + + Exception thrown by implementations whenever + a module fails to load. + + + + + Initializes a new instance. + + + + + Initializes a new instance of the class. + + The exception message. + + + + Initializes a new instance of the class. + + The exception message. + The inner exception. + + + + Initializes the exception with a particular module and error message. + + The name of the module. + The assembly where the module is located. + The error message that explains the reason for the exception. + + + + Initializes the exception with a particular module, error message and inner exception + that happened. + + The name of the module. + The assembly where the module is located. + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or a reference if no inner exception is specified. + + + + Initializes the exception with a particular module, error message and inner exception that happened. + + The name of the module. + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or a reference if no inner exception is specified. + + + + Initializes a new instance with serialized data. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + + + + Implements the interface. Handles loading of a module based on a type. + + + + + Initializes a new instance of . + + The container that will be used to resolve the modules by specifying its type. + The logger to use. + + + + Initializes the specified module. + + The module to initialize + + + + Handles any exception occurred in the module Initialization process, + logs the error using the and throws a . + This method can be overridden to provide a different behavior. + + The module metadata where the error happenened. + The assembly name. + The exception thrown that is the cause of the current error. + + + + + Uses the container to resolve a new by specifying its . + + The module to create. + A new instance of the module specified by . + + + + Uses the container to resolve a new by specifying its . + + The type name to resolve. This type must implement . + A new instance of . + + + + Component responsible for coordinating the modules' type loading and module initialization process. + + + Component responsible for coordinating the modules' type loading and module initialization process. + + + + + Initializes an instance of the class. + + Service used for initialization of modules. + Catalog that enumerates the modules to be loaded and initialized. + Logger used during the load and initialization of modules. + + + + The module catalog specified in the constructor. + + + + + Raised repeatedly to provide progress as modules are loaded in the background. + + + + + Raised when a module is loaded or fails to load. + + + + + Initializes the modules marked as on the . + + + + + Loads and initializes the module on the with the name . + + Name of the module requested for initialization. + + + + Checks if the module needs to be retrieved before it's initialized. + + Module that is being checked if needs retrieval. + + + + + Loads the modules that are not intialized and have their dependencies loaded. + + + + + Handles any exception occurred in the module typeloading process, + logs the error using the and throws a . + This method can be overridden to provide a different behavior. + + The module metadata where the error happenened. + The exception thrown that is the cause of the current error. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + Calls . + 2 + + + + Disposes the associated s. + + When , it is being called from the Dispose method. + + + + Returns the list of registered instances that will be + used to load the types of modules. + + The module type loaders. + + + + Exception thrown when a requested was not found. + + + Exception thrown when a requested is not found. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with a specified error message. + + + The message that describes the error. + + + + + Initializes a new instance of the class with a specified error message. + + + The message that describes the error. + + The inner exception + + + + Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception. + + The name of the module. + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception. + + The name of the module. + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference if no inner exception is specified. + + + + Initializes a new instance of the class + with the serialization data. + + Holds the serialized object data about the exception being thrown. + Contains contextual information about the source or destination. + + + + A for module configuration. + + + + + Gets or sets the collection of modules configuration. + + A of . + + + + Defines the states a can be in, with regards to the module loading and initialization process. + + + + + Initial state for s. The is defined, + but it has not been loaded, retrieved or initialized yet. + + + + + The assembly that contains the type of the module is currently being loaded by an instance of a + . + + + + + The assembly that holds the Module is present. This means the type of the can be instantiated and initialized. + + + + + The module is currently Initializing, by the + + + + + The module is initialized and ready to be used. + + + + + Exception that's thrown when there is no registered in + that can handle this particular type of module. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with a specified error message. + + + The message that describes the error. + + + + + Initializes a new instance of the class with a specified error message. + + + The message that describes the error. + + The inner exception + + + + Initializes the exception with a particular module, error message and inner exception that happened. + + The name of the module. + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or a reference if no inner exception is specified. + + + + Initializes a new instance with serialized data. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + + + + Exception thrown by implementations whenever + a module fails to retrieve. + + + + + Initializes a new instance. + + + + + Initializes a new instance with a specified error message. + + The message that describes the error. + + + + Initializes a new instance with a specified error message + and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or a reference if no inner exception is specified. + + + + Initializes the exception with a particular module and error message. + + The name of the module. + The error message that explains the reason for the exception. + + + + Initializes the exception with a particular module, error message and inner exception that happened. + + The name of the module. + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or a reference if no inner exception is specified. + + + + Initializes a new instance with serialized data. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + + + + This class defines the attached property and related change handler that calls the ViewModelLocator in Prism.Mvvm. + + + + + The AutoWireViewModel attached property. + + + + + Sets the DataContext of a View + + The View to set the DataContext on + The object to use as the DataContext for the View + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to The object must be of type '{0}' in order to use the current region adapter.. + + + + + Looks up a localized string similar to Cannot change the region name once is set. The current region name is '{0}'.. + + + + + Looks up a localized string similar to Cannot create navigation target '{0}'.. + + + + + Looks up a localized string similar to Type '{0}' does not implement from IRegionBehavior.. + + + + + Looks up a localized string similar to The ConfigurationStore cannot contain a null value. . + + + + + Looks up a localized string similar to ContentControl's Content property is not empty. + This control is being associated with a region, but the control is already bound to something else. + If you did not explicitly set the control's Content property, + this exception may be caused by a change in the value of the inherited RegionManager attached property.. + + + + + Looks up a localized string similar to At least one cyclic dependency has been found in the module catalog. Cycles in the module dependencies must be avoided.. + + + + + Looks up a localized string similar to Deactivation is not possible in this type of region.. + + + + + Looks up a localized string similar to {1}: {2}. Priority: {3}. Timestamp:{0:u}.. + + + + + Looks up a localized string similar to Neither the executeMethod nor the canExecuteMethod delegates can be null.. + + + + + Looks up a localized string similar to T for DelegateCommand<T> is not an object nor Nullable.. + + + + + Looks up a localized string similar to Cannot add dependency for unknown module {0}. + + + + + Looks up a localized string similar to A module declared a dependency on another module which is not declared to be loaded. Missing module(s): {0}. + + + + + Looks up a localized string similar to Directory {0} was not found.. + + + + + Looks up a localized string similar to A duplicated module with name {0} has been found by the loader.. + + + + + Looks up a localized string similar to A duplicated module group with name {0} has been found by the loader.. + + + + + Looks up a localized string similar to Unable to retrieve the module type {0} from the loaded assemblies. You may need to specify a more fully-qualified type name.. + + + + + Looks up a localized string similar to An exception occurred while initializing module '{0}'. + - The exception message was: {2} + - The Assembly that the module was trying to be loaded from was:{1} + Check the InnerException property of the exception for more information. If the exception occurred while creating an object in a DI container, you can exception.GetRootException() to help locate the root cause of the problem. + . + + + + + Looks up a localized string similar to An exception occurred while initializing module '{0}'. + - The exception message was: {1} + Check the InnerException property of the exception for more information. If the exception occurred + while creating an object in a DI container, you can exception.GetRootException() to help locate the + root cause of the problem. . + + + + + Looks up a localized string similar to Failed to load type for module {0}. + Error was: {1}.. + + + + + Looks up a localized string similar to HostControl cannot have null value when behavior attaches. . + + + + + Looks up a localized string similar to The HostControl property cannot be set after Attach method has been called.. + + + + + Looks up a localized string similar to HostControl type must be a TabControl.. + + + + + Looks up a localized string similar to The IModuleEnumerator interface is no longer used and has been replaced by ModuleCatalog.. + + + + + Looks up a localized string similar to The argument must be a valid absolute Uri to an assembly file.. + + + + + Looks up a localized string similar to The Target of the IDelegateReference should be of type {0}.. + + + + + Looks up a localized string similar to ItemsControl's ItemsSource property is not empty. + This control is being associated with a region, but the control is already bound to something else. + If you did not explicitly set the control's ItemSource property, + this exception may be caused by a change in the value of the inherited RegionManager attached property.. + + + + + Looks up a localized string similar to Mapping with the given type is already registered: {0}.. + + + + + Looks up a localized string similar to Module {0} depends on other modules that don't belong to the same group.. + + + + + Looks up a localized string similar to Module {0} was not found in the catalog.. + + + + + Looks up a localized string similar to The ModulePath cannot contain a null value or be empty. + + + + + Looks up a localized string similar to Failed to load type '{0}' from assembly '{1}'.. + + + + + Looks up a localized string similar to Navigation is already in progress on region with name '{0}'.. + + + + + Looks up a localized string similar to Navigation cannot proceed until a region is set for the RegionNavigationService.. + + + + + Looks up a localized string similar to The IRegionAdapter for the type {0} is not registered in the region adapter mappings. You can register an IRegionAdapter for this control by overriding the ConfigureRegionAdapterMappings method in the bootstrapper.. + + + + + Looks up a localized string similar to There is currently no moduleTypeLoader in the ModuleManager that can retrieve the specified module.. + + + + + Looks up a localized string similar to An exception has occurred while trying to add a view to region '{0}'. + - The most likely causing exception was was: '{1}'. + But also check the InnerExceptions for more detail or call .GetRootException(). . + + + + + Looks up a localized string similar to The member access expression does not access a property.. + + + + + Looks up a localized string similar to The expression is not a member access expression.. + + + + + Looks up a localized string similar to The referenced property is a static property.. + + + + + Looks up a localized string similar to The Attach method cannot be called when Region property is null.. + + + + + Looks up a localized string similar to The Region property cannot be set after Attach method has been called.. + + + + + Looks up a localized string similar to An exception occurred while creating a region with name '{0}'. The exception was: {1}. . + + + + + Looks up a localized string similar to The region being added already has a name of '{0}' and cannot be added to the region manager with a different name ('{1}').. + + + + + Looks up a localized string similar to The region name cannot be null or empty.. + + + + + Looks up a localized string similar to Region with the given name is already registered: {0}. + + + + + Looks up a localized string similar to This RegionManager does not contain a Region with the name '{0}'.. + + + + + Looks up a localized string similar to The region manager does not contain the {0} region.. + + + + + Looks up a localized string similar to View already exists in region.. + + + + + Looks up a localized string similar to View with name '{0}' already exists in the region.. + + + + + Looks up a localized string similar to Module {0} is marked for automatic initialization when the application starts, but it depends on modules that are marked as OnDemand initialization. To fix this error, mark the dependency modules for InitializationMode=WhenAvailable, or remove this validation by extending the ModuleCatalog class.. + + + + + Looks up a localized string similar to The provided String argument {0} must not be null or empty.. + + + + + Looks up a localized string similar to The provided String argument {0} must not be null or empty.. + + + + + Looks up a localized string similar to No BehaviorType with key '{0}' was registered.. + + + + + Looks up a localized string similar to An exception occurred while trying to create region objects. + - The most likely causing exception was: '{0}'. + But also check the InnerExceptions for more detail or call .GetRootException(). . + + + + + Looks up a localized string similar to The value must be of type ModuleInfo.. + + + + + Looks up a localized string similar to {0} not found.. + + + + + Looks up a localized string similar to The region does not contain the specified view.. + + + + + Region that keeps all the views in it as active. Deactivation of views is not allowed. + + + + + Gets a readonly view of the collection of all the active views in the region. These are all the added views. + + An of all the active views. + + + + Deactive is not valid in this Region. This method will always throw . + + The view to deactivate. + Every time this method is called. + + + + Populates the target region with the views registered to it in the . + + + + + The key of this behavior. + + + + + Creates a new instance of the AutoPopulateRegionBehavior + associated with the received. + + that the behavior will monitor for views to populate the region. + + + + Attaches the AutoPopulateRegionBehavior to the Region. + + + + + Returns a collection of views that will be added to the + View collection. + + + + + + Adds a view into the views collection of this region. + + + + + + Handler of the event that fires when a new viewtype is registered to the registry. + + Although this is a public method to support Weak Delegates in Silverlight, it should not be called by the user. + + + + + + Defines a behavior that forwards the + to the views in the region. + + + + + The key of this behavior. + + + + + Behavior's attached region. + + + + + Attaches the behavior to the specified region. + + + + + Behavior that removes the RegionManager attached property of all the views in a region once the RegionManager property of a region becomes null. + This is useful when removing views with nested regions, to ensure these nested regions get removed from the RegionManager as well. + + This behavior does not apply by default. + In order to activate it, the ClearChildViews attached property must be set to True in the view containing the affected child regions. + + + + + + The behavior key. + + + + + This attached property can be defined on a view to indicate that regions defined in it must be removed from the region manager when the parent view gets removed from a region. + + + + + Gets the ClearChildViews attached property from a DependencyObject. + + The object from which to get the value. + The value of the ClearChildViews attached property in the target specified. + + + + Sets the ClearChildViews attached property in a DependencyObject. + + The object in which to set the value. + The value of to set in the target object's ClearChildViews attached property. + + + + Subscribes to the 's PropertyChanged method to monitor its RegionManager property. + + + + + Behavior that creates a new , when the control that will host the (see ) + is added to the VisualTree. This behavior will use the class to find the right type of adapter to create + the region. After the region is created, this behavior will detach. + + + Attached property value inheritance is not available in Silverlight, so the current approach walks up the visual tree when requesting a region from a region manager. + The is now responsible for walking up the Tree. + + + + + Initializes a new instance of the class. + + + The region adapter mappings, that are used to find the correct adapter for + a given controltype. The controltype is determined by the value. + + + + + Sets a class that interfaces between the 's static properties/events and this behavior, + so this behavior can be tested in isolation. + + The region manager accessor. + + + + The element that will host the Region. + + The target element. + + + + Start monitoring the and the to detect when the becomes + part of the Visual Tree. When that happens, the Region will be created and the behavior will . + + + + + Stop monitoring the and the , so that this behavior can be garbage collected. + + + + + Called when the is updating it's collection. + + + This method has to be public, because it has to be callable using weak references in silverlight and other partial trust environments. + + The . + The instance containing the event data. + + + + Method that will create the region, by calling the right . + + The target element that will host the . + Name of the region. + The created + + + + Defines a that not allows extensible behaviors on regions which also interact + with the target element that the is attached to. + + + + + Gets or sets the that the is attached to. + + A that the is attached to. + This is usually a that is part of the tree. + + + + Behavior that monitors a object and + changes the value for the property when + an object that implements gets added or removed + from the collection. + + + This class can also sync the active state for any scoped regions directly on the view based on the . + If you use the method with the createRegionManagerScope option, the scoped manager will be attached to the view. + + + + + Name that identifies the behavior in a collection of . + + + + + The region that this behavior is extending + + + + + Attaches the behavior to the specified region + + + + + Detaches the behavior from the . + + + + + Represents errors that occured during region creation. + + + + + + + + Initializes a new instance of the + + + + + Initializes a new instance of the class with a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with a specified error message and a reference + to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference + (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + + + + Subscribes to a static event from the in order to register the target + in a when one is available on the host control by walking up the tree and finding + a control whose property is not . + + + + + The key of this behavior. + + + + + Initializes a new instance of . + + + + + Provides an abstraction on top of the RegionManager static members. + + + + + Gets or sets the that the is attached to. + + A that the is attached to. + This is usually a that is part of the tree. + When this member is set after the method has being called. + + + + When the has a name assigned, the behavior will start monitoring the ancestor controls in the element tree + to look for an where to register the region in. + + + + + This event handler gets called when a RegionManager is requering the instances of a region to be registered if they are not already. + Although this is a public method to support Weak Delegates in Silverlight, it should not be called by the user. + + The sender. + The arguments. + + + + The RegionMemberLifetimeBehavior determines if items should be removed from the + when they are deactivated. + + + The monitors the + collection to discover items that transition into a deactivated state. +

+ The behavior checks the removed items for either the + or the (in that order) to determine if it should be kept + alive on removal. +

+ If the item in the collection is a , it will + also check it's DataContext for or the . +

+ The order of checks are: + + Region Item's IRegionMemberLifetime.KeepAlive value. + Region Item's DataContext's IRegionMemberLifetime.KeepAlive value. + Region Item's RegionMemberLifetimeAttribute.KeepAlive value. + Region Item's DataContext's RegionMemberLifetimeAttribute.KeepAlive value. + + + + +

+ The key for this behavior. + +
+ + + Override this method to perform the logic after the behavior has been attached. + + + + + Defines the attached behavior that keeps the items of the host control in synchronization with the . + + This behavior also makes sure that, if you activate a view in a region, the SelectedItem is set. If you set the SelectedItem or SelectedItems (ListBox) + then this behavior will also call Activate on the selected items. + + When calling Activate on a view, you can only select a single active view at a time. By setting the SelectedItems property of a listbox, you can set + multiple views to active. + + + + + + Name that identifies the SelectorItemsSourceSyncBehavior behavior in a collection of RegionsBehaviors. + + + + + Gets or sets the that the is attached to. + + + A that the is attached to. + + For this behavior, the host control must always be a or an inherited class. + + + + Starts to monitor the to keep it in synch with the items of the . + + + + + Behavior that synchronizes the property of a with + the control that hosts the Region. It does this by setting the + Dependency Property on the host control. + + This behavior allows the usage of two way databinding of the RegionContext from XAML. + + + + + Name that identifies the SyncRegionContextWithHostBehavior behavior in a collection of RegionsBehaviors. + + + + + Gets or sets the that the is attached to. + + + A that the is attached to. + This is usually a that is part of the tree. + + + + + Override this method to perform the logic after the behavior has been attached. + + + + + Adapter that creates a new and monitors its + active view to set it on the adapted . + + + + + Initializes a new instance of . + + The factory used to create the region behaviors to attach to the created regions. + + + + Adapts a to an . + + The new region being used. + The object to adapt. + + + + Creates a new instance of . + + A new instance of . + + + + Notification used by attached behaviors to update the region managers appropriatelly if needed to. + + This event uses weak references to the event handler to prevent this static event of keeping the + target element longer than expected. + + + + Gets the value for the RegionName attached property. + + The object to adapt. This is typically a container (i.e a control). + The name of the region that should be created when + the RegionManager is also set in this element. + + + + Gets the value of the RegionName attached property. + + The target element. + The attached to the element. + + + + Provides a way for objects involved in navigation to determine if a navigation request should continue. + + + + + Determines whether this instance accepts being navigated away from. + + The navigation context. + The callback to indicate when navigation can proceed. + + Implementors of this method do not need to invoke the callback before this method is completed, + but they must ensure the callback is eventually invoked. + + + + + Provides methods to perform navigation. + + + Convenience overloads for the methods in this interface can be found as extension methods on the + class. + + + + + Initiates navigation to the target specified by the . + + The navigation target + The callback executed when the navigation request is completed. + + Convenience overloads for this method can be found as extension methods on the + class. + + + + + Initiates navigation to the target specified by the . + + The navigation target + The callback executed when the navigation request is completed. + The navigation parameters specific to the navigation request. + + Convenience overloads for this method can be found as extension methods on the + class. + + + + + Provides a way for objects involved in navigation to be notified of navigation activities. + + + + + Called when the implementer has been navigated to. + + The navigation context. + + + + Called to determine if this instance can handle the navigation request. + + The navigation context. + + if this instance accepts the navigation request; otherwise, . + + + + + Called when the implementer is being navigated away from. + + The navigation context. + + + + Defines a model that can be used to compose views. + + + + + Gets a readonly view of the collection of views in the region. + + An of all the added views. + + + + Gets a readonly view of the collection of all the active views in the region. + + An of all the active views. + + + + Gets or sets a context for the region. This value can be used by the user to share context with the views. + + The context value to be shared. + + + + Gets the name of the region that uniequely identifies the region within a . + + The name of the region. + + + + Gets or sets the comparison used to sort the views. + + The comparison to use. + + + Adds a new view to the region. + + Adds a new view to the region. + + The view to add. + The that is set on the view if it is a . It will be the current region manager when using this overload. + + + + Adds a new view to the region. + + The view to add. + The name of the view. This can be used to retrieve it later by calling . + The that is set on the view if it is a . It will be the current region manager when using this overload. + + + + Adds a new view to the region. + + The view to add. + The name of the view. This can be used to retrieve it later by calling . + When , the added view will receive a new instance of , otherwise it will use the current region manager for this region. + The that is set on the view if it is a . + + + + Removes the specified view from the region. + + The view to remove. + + + + Removes all views from the region. + + + + + Marks the specified view as active. + + The view to activate. + + + + Marks the specified view as inactive. + + The view to deactivate. + + + + Returns the view instance that was added to the region using a specific name. + + The name used when adding the view to the region. + Returns the named view or if the view with does not exist in the current region. + + + + Gets or sets the that will be passed to the views when adding them to the region, unless the view is added by specifying createRegionManagerScope as . + + The where this is registered. + This is usually used by implementations of and should not be + used by the developer explicitely. + + + + Gets the collection of s that can extend the behavior of regions. + + + + + Gets or sets the navigation service. + + The navigation service. + + + + Defines an interfaces to adapt an object and bind it to a new . + + + + + Adapts an object and binds it to a new . + + The object to adapt. + The name of the region to be created. + The new instance of that the is bound to. + + + + Interface for allowing extensible behavior on regions. + + + + + The region that this behavior is extending. + + + + + Attaches the behavior to the specified region. + + + + + Defines the interface for a collection of classes on a Region. + + + + + Adds a to the collection, using the specified key as an indexer. + + + The key that specifies the type of that's added. + + The to add. + + + + Checks if a with the specified key is already present. + + The key to use to find a particular . + + + + + Gets the with the specified key. + + The registered + + + + Interface for RegionBehaviorFactories. This factory allows the registration of the default set of RegionBehaviors, that will + be added to the s of all s, unless overridden on a 'per-region' basis. + + + + + Adds a particular type of RegionBehavior if it was not already registered. the string is used to check if the behavior is already present + + The behavior key that's used to find if a certain behavior is already added. + Type of the behavior to add. . + + + + Determines whether a behavior with the specified key already exists + + The behavior key. + + if a behavior with the specified key is present; otherwise, . + + + + + Creates an instance of the Behaviortype that's registered using the specified key. + + The key that's used to register a behavior type. + The created behavior. + + + + Defines a collection of uniquely identified by their Name. + + + + + Gets the IRegion with the name received as index. + + Name of the region to be retrieved. + The identified with the requested name. + + + + Adds a to the collection. + + Region to be added to the collection. + + + + Removes a from the collection. + + Name of the region to be removed. + if the region was removed from the collection, otherwise . + + + + Checks if the collection contains a with the name received as parameter. + + The name of the region to look for. + if the region is contained in the collection, otherwise . + + + + Adds a region to the regionmanager with the name received as argument. + + The name to be given to the region. + The region to be added to the regionmanager. + Thrown if is . + Thrown if and 's name do not match and the is not . + + + + Defines an interface to manage a set of regions and to attach regions to objects (typically controls). + + + + + Gets a collection of that identify each region by name. You can use this collection to add or remove regions to the current region manager. + + + + + Creates a new region manager. + + A new region manager that can be used as a different scope from the current region manager. + + + + Add a view to the Views collection of a Region. Note that the region must already exist in this regionmanager. + + The name of the region to add a view to + The view to add to the views collection + The RegionManager, to easily add several views. + + + + Associate a view with a region, by registering a type. When the region get's displayed + this type will be resolved using the ServiceLocator into a concrete instance. The instance + will be added to the Views collection of the region + + The name of the region to associate the view with. + The type of the view to register with the + The regionmanager, for adding several views easily + + + + Associate a view with a region, using a delegate to resolve a concrete instance of the view. + When the region get's displayed, this delegate will be called and the result will be added to the + views collection of the region. + + The name of the region to associate the view with. + The delegate used to resolve a concrete instance of the view. + The regionmanager, for adding several views easily + + + + Navigates the specified region manager. + + The name of the region to call Navigate on. + The URI of the content to display. + The navigation callback. + + + + Navigates the specified region manager. + + The name of the region to call Navigate on. + The URI of the content to display. + + + + Navigates the specified region manager. + + The name of the region to call Navigate on. + The URI of the content to display. + The navigation callback. + + + + Navigates the specified region manager. + + The name of the region to call Navigate on. + The URI of the content to display. + + + + This method allows an IRegionManager to locate a specified region and navigate in it to the specified target Uri, passing a navigation callback and an instance of NavigationParameters, which holds a collection of object parameters. + + The name of the region where the navigation will occur. + A Uri that represents the target where the region will navigate. + The navigation callback that will be executed after the navigation is completed. + An instance of NavigationParameters, which holds a collection of object parameters. + + + + This method allows an IRegionManager to locate a specified region and navigate in it to the specified target string, passing a navigation callback and an instance of NavigationParameters, which holds a collection of object parameters. + + The name of the region where the navigation will occur. + A string that represents the target where the region will navigate. + The navigation callback that will be executed after the navigation is completed. + An instance of NavigationParameters, which holds a collection of object parameters. + + + + This method allows an IRegionManager to locate a specified region and navigate in it to the specified target Uri, passing an instance of NavigationParameters, which holds a collection of object parameters. + + The name of the region where the navigation will occur. + A Uri that represents the target where the region will navigate. + An instance of NavigationParameters, which holds a collection of object parameters. + + + + This method allows an IRegionManager to locate a specified region and navigate in it to the specified target string, passing an instance of NavigationParameters, which holds a collection of object parameters. + + The name of the region where the navigation will occur. + A string that represents the target where the region will navigate. + An instance of NavigationParameters, which holds a collection of object parameters. + + + + Provides an abstraction on top of the RegionManager static members. + + + + + Notification used by attached behaviors to update the region managers appropriatelly if needed to. + + This event uses weak references to the event handler to prevent this static event of keeping the + target element longer than expected. + + + + Gets the value for the RegionName attached property. + + The object to adapt. This is typically a container (i.e a control). + The name of the region that should be created when + the RegionManager is also set in this element. + + + + Gets the value of the RegionName attached property. + + The target element. + The attached to the element. + + + + When implemented, allows an instance placed in a + that uses a to indicate + it should be removed when it transitions from an activated to deactived state. + + + + + Gets a value indicating whether this instance should be kept-alive upon deactivation. + + + + + Identifies the view in a region that is the target of a navigation request. + + + + + Gets the content to which the navigation request represented by applies. + + + If none of the items in the region match the target of the navigation request, a new item + will be created and added to the region. + + The region. + The context representing the navigation request. + The item to be the target of the navigation request. + when a new item cannot be created for the navigation request. + + + + Provides journaling of current, back, and forward navigation within regions. + + + + + Gets a value that indicates whether there is at least one entry in the back navigation history. + + + true if the journal can go back; otherwise, false. + + + + + Gets a value that indicates whether there is at least one entry in the forward navigation history. + + + true if this instance can go forward; otherwise, false. + + + + + Gets the current navigation entry of the content that is currently displayed. + + The current entry. + + + + Gets or sets the target that implements INavigateAsync. + + The INavigate implementation. + + This is set by the owner of this journal. + + + + + Navigates to the most recent entry in the back navigation history, or does nothing if no entry exists in back navigation. + + + + + Navigates to the most recent entry in the forward navigation history, or does nothing if no entry exists in forward navigation. + + + + + Records the navigation to the entry.. + + The entry to record. + + + + Clears the journal of current, back, and forward navigation histories. + + + + + An entry in an IRegionNavigationJournal representing the URI navigated to. + + + + + Gets or sets the URI. + + The URI. + + + + Gets or sets the NavigationParameters instance. + + + + + Provides navigation for regions. + + + + + Gets or sets the region owning this service. + + A Region. + + + + Gets the journal. + + The journal. + + + + Raised when the region is about to be navigated to content. + + + + + Raised when the region is navigated to content. + + + + + Raised when a navigation request fails. + + + + + Defines the interface for the registry of region's content. + + + + + Event triggered when a content is registered to a region name. + + + This event uses weak references to the event handler to prevent this service (typically a singleton) of keeping the + target element longer than expected. + + + + + Returns the contents associated with a region name. + + Region name for which contents are requested. + Collection of contents associated with the . + + + + Registers a content type with a region name. + + Region name to which the will be registered. + Content type to be registered for the . + + + + Registers a delegate that can be used to retrieve the content associated with a region name. + + Region name to which the will be registered. + Delegate used to retrieve the content associated with the . + + + + Defines a class that wraps an item and adds metadata for it. + + + + + The name of the wrapped item. + + + + + Value indicating whether the wrapped item is considered active. + + + + + Initializes a new instance of . + + The item to wrap. + + + + Gets the wrapped item. + + The wrapped item. + + + + Gets or sets a name for the wrapped item. + + The name of the wrapped item. + + + + Gets or sets a value indicating whether the wrapped item is considered active. + + if the item should be considered active; otherwise . + + + + Occurs when metadata on the item changes. + + + + + Explicitly invokes to notify listeners. + + + + + Adapter that creates a new and binds all + the views to the adapted . + + + + + Initializes a new instance of . + + The factory used to create the region behaviors to attach to the created regions. + + + + Adapts an to an . + + The new region being used. + The object to adapt. + + + + Creates a new instance of . + + A new instance of . + + + + Defines a view of a collection. + + + + + Determines whether the collection contains a specific value. + + The object to locate in the collection. + if is found in the collection; otherwise, . + + + + Provides additional methods to the interface. + + + + + Initiates navigation to the target specified by the . + + The navigation object. + The navigation target + + + + Initiates navigation to the target specified by the . + + The navigation object. + The navigation target + The callback executed when the navigation request is completed. + + + + Initiates navigation to the target specified by the . + + The navigation object. + The navigation target + + + + Initiates navigation to the target specified by the . + + The navigation object. + The navigation target + The callback executed when the navigation request is completed. + An instance of NavigationParameters, which holds a collection of object parameters. + + + + Initiates navigation to the target specified by the . + + The navigation object. + A Uri that represents the target where the region will navigate. + An instance of NavigationParameters, which holds a collection of object parameters. + + + + Initiates navigation to the target specified by the . + + The navigation object. + A string that represents the target where the region will navigate. + An instance of NavigationParameters, which holds a collection of object parameters. + + + + Encapsulates information about a navigation request. + + + + + Initializes a new instance of the class for a region name and a + . + + The navigation service. + The Uri. + + + + Initializes a new instance of the class for a region name and a + . + + The navigation service. + The navigation parameters. + The Uri. + + + + Gets the region navigation service. + + The navigation service. + + + + Gets the navigation URI. + + The navigation URI. + + + + Gets the extracted from the URI and the object parameters passed in navigation. + + The URI query. + + + + Represents Navigation parameters. + + + This class can be used to to pass object parameters during Navigation. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with a query string. + + The query string. + + + + Gets the with the specified key. + + The value for the specified key, or if the query does not contain such a key. + + + + Gets the enumerator. + + + + + + Adds the specified key and value. + + The name. + The value. + + + + Converts the list of key value pairs to a query string. + + + + + + Represents the result of navigating to a URI. + + + + + Initializes a new instance of the class. + + The context. + The result. + + + + Initializes a new instance of the class. + + The context. + The error. + + + + Gets the result. + + The result. + + + + Gets an exception that occurred while navigating. + + The exception. + + + + Gets the navigation context. + + The navigation context. + + + + Implementation of that allows multiple active views. + + + + + Initializes a new instance of . + + + + + Occurs when a property value changes. + + + + + Gets the collection of s that can extend the behavior of regions. + + + + + Gets or sets a context for the region. This value can be used by the user to share context with the views. + + The context value to be shared. + + + + Gets the name of the region that uniequely identifies the region within a . + + The name of the region. + + + + Gets a readonly view of the collection of views in the region. + + An of all the added views. + + + + Gets a readonly view of the collection of all the active views in the region. + + An of all the active views. + + + + Gets or sets the comparison used to sort the views. + + The comparison to use. + + + + Gets or sets the that will be passed to the views when adding them to the region, unless the view is added by specifying createRegionManagerScope as . + + The where this is registered. + This is usually used by implementations of and should not be + used by the developer explicitely. + + + + Gets the navigation service. + + The navigation service. + + + + Gets the collection with all the views along with their metadata. + + An of with all the added views. + + + Adds a new view to the region. + + Adds a new view to the region. + + The view to add. + The that is set on the view if it is a . It will be the current region manager when using this overload. + + + + Adds a new view to the region. + + The view to add. + The name of the view. This can be used to retrieve it later by calling . + The that is set on the view if it is a . It will be the current region manager when using this overload. + + + + Adds a new view to the region. + + The view to add. + The name of the view. This can be used to retrieve it later by calling . + When , the added view will receive a new instance of , otherwise it will use the current region manager for this region. + The that is set on the view if it is a . + + + + Removes the specified view from the region. + + The view to remove. + + + + Removes all views from the region. + + + + + Marks the specified view as active. + + The view to activate. + + + + Marks the specified view as inactive. + + The view to deactivate. + + + + Returns the view instance that was added to the region using a specific name. + + The name used when adding the view to the region. + Returns the named view or if the view with does not exist in the current region. + + + + Initiates navigation to the specified target. + + The target. + A callback to execute when the navigation request is completed. + + + + Initiates navigation to the specified target. + + The target. + A callback to execute when the navigation request is completed. + The navigation parameters specific to the navigation request. + + + + The default sort algorithm. + + The first view to compare. + The second view to compare. + + + + + Base class to facilitate the creation of implementations. + + Type of object to adapt. + + + + Initializes a new instance of . + + The factory used to create the region behaviors to attach to the created regions. + + + + Gets or sets the factory used to create the region behaviors to attach to the created regions. + + + + + Adapts an object and binds it to a new . + + The object to adapt. + The name of the region to be created. + The new instance of that the is bound to. + + + + Adapts an object and binds it to a new . + + The object to adapt. + The name of the region to be created. + The new instance of that the is bound to. + This methods performs validation to check that + is of type . + When is . + When is not of type . + + + + This method adds the default behaviors by using the object. + + The region being used. + The object to adapt. + + + + Template method to attach new behaviors. + + The region being used. + The object to adapt. + + + + Template method to adapt the object to an . + + The new region being used. + The object to adapt. + + + + Template method to create a new instance of + that will be used to adapt the object. + + A new instance of . + + + + This class maps with . + + + + + Registers the mapping between a type and an adapter. + + The type of the control. + The adapter to use with the type. + When any of or are . + If a mapping for already exists. + + + + Returns the adapter associated with the type provided. + + The type to obtain the mapped. + The mapped to the . + This class will look for a registered type for and if there is not any, + it will look for a registered type for any of its ancestors in the class hierarchy. + If there is no registered type for or any of its ancestors, + an exception will be thrown. + When there is no registered type for or any of its ancestors. + + + + Provides a base class for region's behaviors. + + + + + Behavior's attached region. + + + + + Returns if the behavior is attached to a region, otherwise. + + + + + Attaches the behavior to the region. + + + + + Override this method to perform the logic after the behavior has been attached. + + + + + A collection of instances, that are stored and retrieved by Key. + + + + + Initializes a new instance of the class and associates it with a region. + + The region to associate the behavior collection with. + + + + Gets the with the specified key. + + The RegionBehavior that's registered with the key. + + + + Adds a to the collection, using the specified key as an indexer. + + The key that specifies the type of that's added. + The to add. + + Thrown is the parameter is Null, + or if the parameter is Null. + + Thrown if a behavior with the specified Key parameter already exists. + + + + Checks if a with the specified key is already present. + + The key to use to find a particular . + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Defines a factory that allows the registration of the default set of , that will + be added to the of all s, unless overridden on a 'per-region' basis. + + + + + Initializes a new instance of . + + used to create the instance of the behavior from its . + + + + Adds a particular type of RegionBehavior if it was not already registered. The string is used to check if the behavior is already present + + The behavior key that's used to find if a certain behavior is already added. + Type of the behavior to add. + + + + Creates an instance of the behavior that is registered using the specified key. + + The key that is used to register a behavior type. + A new instance of the behavior. + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + 1 + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + 2 + + + + Determines whether a behavior with the specified key already exists. + + The behavior key. + + if a behavior with the specified key is present; otherwise, . + + + + + Class that holds methods to Set and Get the RegionContext from a DependencyObject. + + RegionContext allows sharing of contextual information between the view that's hosting a + and any views that are inside the Region. + + + + + Returns an wrapper around the RegionContext value. The RegionContext + will be set on any views (dependency objects) that are inside the collection by + the Behavior. + The RegionContext will also be set to the control that hosts the Region, by the Behavior. + + If the wrapper does not already exist, an empty one will be created. This way, an observer can + notify when the value is set for the first time. + + Any view that hold the RegionContext value. + Wrapper around the Regioncontext value. + + + + This class is responsible for maintaining a collection of regions and attaching regions to controls. + + + This class supplies the attached properties that can be used for simple region creation from XAML. + + + + + Identifies the RegionName attached property. + + + When a control has both the and + attached properties set to + a value different than and there is a + mapping registered for the control, it + will create and adapt a new region for that control, and register it + in the with the specified region name. + + + + + Sets the attached property. + + The object to adapt. This is typically a container (i.e a control). + The name of the region to register. + + + + Gets the value for the attached property. + + The object to adapt. This is typically a container (i.e a control). + The name of the region that should be created when + is also set in this element. + + + + Returns an wrapper that can hold an . Using this wrapper + you can detect when an has been created by the . + + If the wrapper does not yet exist, a new wrapper will be created. When the region + gets created and assigned to the wrapper, you can use the event + to get notified of that change. + + The view that will host the region. + Wrapper that can hold an value and can notify when the value changes. + + + + Identifies the RegionManager attached property. + + + When a control has both the and + attached properties set to + a value different than and there is a + mapping registered for the control, it + will create and adapt a new region for that control, and register it + in the with the specified region name. + + + + + Gets the value of the attached property. + + The target element. + The attached to the element. + + + + Sets the attached property. + + The target element. + The value. + + + + Identifies the RegionContext attached property. + + + + + Gets the value of the attached property. + + The target element. + The region context to pass to the contained views. + + + + Sets the attached property. + + The target element. + The value. + + + + Notification used by attached behaviors to update the region managers appropriatelly if needed to. + + This event uses weak references to the event handler to prevent this static event of keeping the + target element longer than expected. + + + + Notifies attached behaviors to update the region managers appropriatelly if needed to. + + + This method is normally called internally, and there is usually no need to call this from user code. + + + + + Initializes a new instance of . + + + + + Gets a collection of that identify each region by name. You can use this collection to add or remove regions to the current region manager. + + A with all the registered regions. + + + + Creates a new region manager. + + A new region manager that can be used as a different scope from the current region manager. + + + + Add a view to the Views collection of a Region. Note that the region must already exist in this regionmanager. + + The name of the region to add a view to + The view to add to the views collection + The RegionManager, to easily add several views. + + + + Associate a view with a region, by registering a type. When the region get's displayed + this type will be resolved using the ServiceLocator into a concrete instance. The instance + will be added to the Views collection of the region + + The name of the region to associate the view with. + The type of the view to register with the + The regionmanager, for adding several views easily + + + + Associate a view with a region, using a delegate to resolve a concrete instance of the view. + When the region get's displayed, this delegate will be called and the result will be added to the + views collection of the region. + + The name of the region to associate the view with. + The delegate used to resolve a concrete instance of the view. + The regionmanager, for adding several views easily + + + + Navigates the specified region manager. + + The name of the region to call Navigate on. + The URI of the content to display. + The navigation callback. + + + + Navigates the specified region manager. + + The name of the region to call Navigate on. + The URI of the content to display. + + + + Navigates the specified region manager. + + The name of the region to call Navigate on. + The URI of the content to display. + The navigation callback. + + + + Navigates the specified region manager. + + The name of the region to call Navigate on. + The URI of the content to display. + + + + This method allows an IRegionManager to locate a specified region and navigate in it to the specified target Uri, passing a navigation callback and an instance of NavigationParameters, which holds a collection of object parameters. + + The name of the region where the navigation will occur. + A Uri that represents the target where the region will navigate. + The navigation callback that will be executed after the navigation is completed. + An instance of NavigationParameters, which holds a collection of object parameters. + + + + This method allows an IRegionManager to locate a specified region and navigate in it to the specified target string, passing a navigation callback and an instance of NavigationParameters, which holds a collection of object parameters. + + The name of the region where the navigation will occur. + A string that represents the target where the region will navigate. + The navigation callback that will be executed after the navigation is completed. + An instance of NavigationParameters, which holds a collection of object parameters. + + + + This method allows an IRegionManager to locate a specified region and navigate in it to the specified target Uri, passing an instance of NavigationParameters, which holds a collection of object parameters. + + The name of the region where the navigation will occur. + A Uri that represents the target where the region will navigate. + An instance of NavigationParameters, which holds a collection of object parameters. + + + + This method allows an IRegionManager to locate a specified region and navigate in it to the specified target string, passing an instance of NavigationParameters, which holds a collection of object parameters. + + The name of the region where the navigation will occur. + A string that represents the target where the region will navigate. + An instance of NavigationParameters, which holds a collection of object parameters. + + + + Adds a region to the regionmanager with the name received as argument. + + The name to be given to the region. + The region to be added to the regionmanager. + Thrown if is . + Thrown if and 's name do not match and the is not . + + + + When is applied to class provides data + the can use to determine if the instance should + be removed when it is deactivated. + + + + + Instantiates an instance of + + + + + Determines if the region member should be kept-alive + when deactivated. + + + + + Implementation of that relies on a + to create new views when necessary. + + + + + Initializes a new instance of the class with a service locator. + + The service locator. + + + + Gets the view to which the navigation request represented by applies. + + The region. + The context representing the navigation request. + + The view to be the target of the navigation request. + + + If none of the views in the region can be the target of the navigation request, a new view + is created and added to the region. + + when a new view cannot be created for the navigation request. + + + + Provides a new item for the region based on the supplied candidate target contract name. + + The target contract to build. + An instance of an item to put into the . + + + + Returns the candidate TargetContract based on the . + + The navigation contract. + The candidate contract to seek within the and to use, if not found, when resolving from the container. + + + + Returns the set of candidates that may satisfiy this navigation request. + + The region containing items that may satisfy the navigation request. + The candidate navigation target as determined by + An enumerable of candidate objects from the + + + + EventArgs used with the Navigated event. + + + + + Initializes a new instance of the class. + + The navigation context. + + + + Gets the navigation context. + + The navigation context. + + + + Gets the navigation URI + + The URI. + + This is a convenience accessor around NavigationContext.Uri. + + + + + EventArgs used with the NavigationFailed event. + + + + + Initializes a new instance of the class. + + The navigation context. + + + + Initializes a new instance of the class. + + The navigation context. + The error. + + + + Gets the navigation context. + + The navigation context. + + + + Gets the error. + + The , or if the failure was not caused by an exception. + + + + Gets the navigation URI + + The URI. + + This is a convenience accessor around NavigationContext.Uri. + + + + + Provides journaling of current, back, and forward navigation within regions. + + + + + Gets or sets the target that implements INavigate. + + The INavigate implementation. + + This is set by the owner of this journal. + + + + + Gets the current navigation entry of the content that is currently displayed. + + The current entry. + + + + Gets a value that indicates whether there is at least one entry in the back navigation history. + + true if the journal can go back; otherwise, false. + + + + Gets a value that indicates whether there is at least one entry in the forward navigation history. + + + true if this instance can go forward; otherwise, false. + + + + + Navigates to the most recent entry in the back navigation history, or does nothing if no entry exists in back navigation. + + + + + Navigates to the most recent entry in the forward navigation history, or does nothing if no entry exists in forward navigation. + + + + + Records the navigation to the entry.. + + The entry to record. + + + + Clears the journal of current, back, and forward navigation histories. + + + + + An entry in an IRegionNavigationJournal representing the URI navigated to. + + + + + Gets or sets the URI. + + The URI. + + + + Gets or sets the NavigationParameters instance. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Provides navigation for regions. + + + + + Initializes a new instance of the class. + + The service locator. + The navigation target handler. + The journal. + + + + Gets or sets the region. + + The region. + + + + Gets the journal. + + The journal. + + + + Raised when the region is about to be navigated to content. + + + + + Raised when the region is navigated to content. + + + + + Raised when a navigation request fails. + + + + + Initiates navigation to the specified target. + + The target. + A callback to execute when the navigation request is completed. + + + + Initiates navigation to the specified target. + + The target. + A callback to execute when the navigation request is completed. + The navigation parameters specific to the navigation request. + + + + Defines a registry for the content of the regions used on View Discovery composition. + + + + + Creates a new instance of the class. + + used to create the instance of the views from its . + + + + Occurs whenever a new view is registered. + + + + + Returns the contents registered for a region. + + Name of the region which content is being requested. + Collection of contents registered for the region. + + + + Registers a content type with a region name. + + Region name to which the will be registered. + Content type to be registered for the . + + + + Registers a delegate that can be used to retrieve the content associated with a region name. + + Region name to which the will be registered. + Delegate used to retrieve the content associated with the . + + + + Creates an instance of a registered view . + + Type of the registered view. + Instance of the registered view. + + + + Adapter that creates a new and binds all + the views to the adapted . + It also keeps the and the selected items + of the in sync. + + + + + Initializes a new instance of . + + The factory used to create the region behaviors to attach to the created regions. + + + + Adapts an to an . + + The new region being used. + The object to adapt. + + + + Attach new behaviors. + + The region being used. + The object to adapt. + + This class attaches the base behaviors and also listens for changes in the + activity of the region or the control selection and keeps the in sync. + + + + + Creates a new instance of . + + A new instance of . + + + + Region that allows a maximum of one active view at a time. + + + + + Marks the specified view as active. + + The view to activate. + If there is an active view before calling this method, + that view will be deactivated automatically. + + + + Defines that a view is synchronized with its parent view's Active state. + + + + + Represents errors that occured during the regions' update. + + + Represents errors that occured during the regions' update. + + + + + Initializes a new instance of the + + + + + Initializes a new instance of the class with a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with a specified error message and a reference + to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference + (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + + + + Argument class used by the event when a new content is registered. + + + + + Initializes the ViewRegisteredEventArgs class. + + The region name to which the content was registered. + The content which was registered. + + + + Gets the region name to which the content was registered. + + + + + Gets the content which was registered. + + + + + Exception that's thrown when something goes wrong while Registering a View with a region name in the class. + + + Exception that's thrown when something goes wrong while Registering a View with a region name in the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The exception message. + + + + Initializes a new instance of the class. + + The exception message. + The inner exception. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual information about the source or destination. + + + + Implementation of that takes an of + and filters it to display an collection of + elements (the items which the wraps). + + + + + Initializes a new instance of the class. + + The list to wrap and filter. + A predicate to filter the collection. + + + + Occurs when the collection changes. + + + + + Gets or sets the comparison used to sort the views. + + The comparison to use. + + + + Determines whether the collection contains a specific value. + + The object to locate in the collection. + if is found in the collection; otherwise, . + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Used to invoked the event. + + + + + + Removes all monitoring of underlying MetadataItems and re-adds them. + + + + + Adds all underlying MetadataItems to the list from the subjectCollection + + + + + Removes all monitored items from our monitoring list. + + + + + Adds handler to monitor the MetadatItem and adds it to our monitoring list. + + + + + + + Unhooks from the MetadataItem change event and removes from our monitoring list. + + + + + + Invoked when any of the underlying ItemMetadata items we're monitoring changes. + + + + + + + The event handler due to changes in the underlying collection. + + + + + + + Provides a hint from a view to a region on how to sort the view. + + + + + Initializes a new instance of the class. + + The hint to use for sorting. + + + + Gets the hint. + + The hint to use for sorting. + + + + Class that provides extension methods to Collection + + + + + Add a range of items to a collection. + + Type of objects within the collection. + The collection to add items to. + The items to add to the collection. + The collection. + An is thrown if or is . + + + + Class that provides extension methods for the Exception class. These extension methods provide + a mechanism for developers to get more easily to the root cause of an exception, especially in combination with + DI-containers such as Unity. + + + + + Register the type of an Exception that is thrown by the framework. The method uses + this list of Exception types to find out if something has gone wrong. + + The type of exception to register. + + + + Determines whether the exception type is already registered using the + method + + The type of framework exception to find. + + true if the exception type is already registered; otherwise, false. + + + + + Looks at all the inner exceptions of the parameter to find the + most likely root cause of the exception. This works by skipping all registered exception types. + + + This method is not 100% accurate and should only be used to point a developer into the most likely direction. + It should not be used to replace the Inner Exception stack of an exception, because this might hide required exception + information. + + The exception that will provide the list of inner exeptions to examine. + + The exception that most likely caused the exception to occur. If it can't find the root exception, it will return the + value itself. + + + + + Defines extension methods for the class. + + + + + Attempts to resolve specified type from the underlying . + + + This will return null on any . + Locator to use in resolving. + Type to resolve. + T or null + Thrown when is . + + + + Attempts to resolve specified type from the underlying . + + + This will return null on any . + Type to resolve. + Locator to use in resolving. + T or null + +
+
diff --git a/packages/Prism.Wpf.6.3.0/lib/net45/System.Windows.Interactivity.dll b/packages/Prism.Wpf.6.3.0/lib/net45/System.Windows.Interactivity.dll new file mode 100644 index 0000000..931c744 Binary files /dev/null and b/packages/Prism.Wpf.6.3.0/lib/net45/System.Windows.Interactivity.dll differ diff --git a/packages/System.Drawing.Common.4.5.0/.signature.p7s b/packages/System.Drawing.Common.4.5.0/.signature.p7s new file mode 100644 index 0000000..11c340d Binary files /dev/null and b/packages/System.Drawing.Common.4.5.0/.signature.p7s differ diff --git a/packages/System.Drawing.Common.4.5.0/LICENSE.TXT b/packages/System.Drawing.Common.4.5.0/LICENSE.TXT new file mode 100644 index 0000000..984713a --- /dev/null +++ b/packages/System.Drawing.Common.4.5.0/LICENSE.TXT @@ -0,0 +1,23 @@ +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/System.Drawing.Common.4.5.0/System.Drawing.Common.4.5.0.nupkg b/packages/System.Drawing.Common.4.5.0/System.Drawing.Common.4.5.0.nupkg new file mode 100644 index 0000000..d1f9faf Binary files /dev/null and b/packages/System.Drawing.Common.4.5.0/System.Drawing.Common.4.5.0.nupkg differ diff --git a/packages/System.Drawing.Common.4.5.0/THIRD-PARTY-NOTICES.TXT b/packages/System.Drawing.Common.4.5.0/THIRD-PARTY-NOTICES.TXT new file mode 100644 index 0000000..db542ca --- /dev/null +++ b/packages/System.Drawing.Common.4.5.0/THIRD-PARTY-NOTICES.TXT @@ -0,0 +1,309 @@ +.NET Core uses third-party libraries or other resources that may be +distributed under licenses different than the .NET Core software. + +In the event that we accidentally failed to list a required notice, please +bring it to our attention. Post an issue or email us: + + dotnet@microsoft.com + +The attached notices are provided for information only. + +License notice for Slicing-by-8 +------------------------------- + +http://sourceforge.net/projects/slicing-by-8/ + +Copyright (c) 2004-2006 Intel Corporation - All Rights Reserved + + +This software program is licensed subject to the BSD License, available at +http://www.opensource.org/licenses/bsd-license.html. + + +License notice for Unicode data +------------------------------- + +http://www.unicode.org/copyright.html#License + +Copyright © 1991-2017 Unicode, Inc. All rights reserved. +Distributed under the Terms of Use in http://www.unicode.org/copyright.html. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Unicode data files and any associated documentation +(the "Data Files") or Unicode software and any associated documentation +(the "Software") to deal in the Data Files or Software +without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, and/or sell copies of +the Data Files or Software, and to permit persons to whom the Data Files +or Software are furnished to do so, provided that either +(a) this copyright and permission notice appear with all copies +of the Data Files or Software, or +(b) this copyright and permission notice appear in associated +Documentation. + +THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT OF THIRD PARTY RIGHTS. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS +NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL +DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THE DATA FILES OR SOFTWARE. + +Except as contained in this notice, the name of a copyright holder +shall not be used in advertising or otherwise to promote the sale, +use or other dealings in these Data Files or Software without prior +written authorization of the copyright holder. + +License notice for Zlib +----------------------- + +https://github.com/madler/zlib +http://zlib.net/zlib_license.html + +/* zlib.h -- interface of the 'zlib' general purpose compression library + version 1.2.11, January 15th, 2017 + + Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu + +*/ + +License notice for Mono +------------------------------- + +http://www.mono-project.com/docs/about-mono/ + +Copyright (c) .NET Foundation Contributors + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the Software), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +License notice for International Organization for Standardization +----------------------------------------------------------------- + +Portions (C) International Organization for Standardization 1986: + Permission to copy in any form is granted for use with + conforming SGML systems and applications as defined in + ISO 8879, provided this notice is included in all copies. + +License notice for Intel +------------------------ + +"Copyright (c) 2004-2006 Intel Corporation - All Rights Reserved + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +License notice for Xamarin and Novell +------------------------------------- + +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +Copyright (c) 2011 Novell, Inc (http://www.novell.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +Third party notice for W3C +-------------------------- + +"W3C SOFTWARE AND DOCUMENT NOTICE AND LICENSE +Status: This license takes effect 13 May, 2015. +This work is being provided by the copyright holders under the following license. +License +By obtaining and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions. +Permission to copy, modify, and distribute this work, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the work or portions thereof, including modifications: +The full text of this NOTICE in a location viewable to users of the redistributed or derivative work. +Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software and Document Short Notice should be included. +Notice of any changes or modifications, through a copyright statement on the new code or document such as "This software or document includes material copied from or derived from [title and URI of the W3C document]. Copyright © [YEAR] W3C® (MIT, ERCIM, Keio, Beihang)." +Disclaimers +THIS WORK IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENT WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. +COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENT. +The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the work without specific, written prior permission. Title to copyright in this work will at all times remain with copyright holders." + +License notice for Bit Twiddling Hacks +-------------------------------------- + +Bit Twiddling Hacks + +By Sean Eron Anderson +seander@cs.stanford.edu + +Individually, the code snippets here are in the public domain (unless otherwise +noted) — feel free to use them however you please. The aggregate collection and +descriptions are © 1997-2005 Sean Eron Anderson. The code and descriptions are +distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY and +without even the implied warranty of merchantability or fitness for a particular +purpose. + +License notice for Brotli +-------------------------------------- + +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +compress_fragment.c: +Copyright (c) 2011, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +decode_fuzzer.c: +Copyright (c) 2015 The Chromium Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." + diff --git a/packages/System.Drawing.Common.4.5.0/lib/MonoAndroid10/_._ b/packages/System.Drawing.Common.4.5.0/lib/MonoAndroid10/_._ new file mode 100644 index 0000000..e69de29 diff --git a/packages/System.Drawing.Common.4.5.0/lib/MonoTouch10/_._ b/packages/System.Drawing.Common.4.5.0/lib/MonoTouch10/_._ new file mode 100644 index 0000000..e69de29 diff --git a/packages/System.Drawing.Common.4.5.0/lib/net461/System.Drawing.Common.dll b/packages/System.Drawing.Common.4.5.0/lib/net461/System.Drawing.Common.dll new file mode 100644 index 0000000..099be79 Binary files /dev/null and b/packages/System.Drawing.Common.4.5.0/lib/net461/System.Drawing.Common.dll differ diff --git a/packages/System.Drawing.Common.4.5.0/lib/netstandard2.0/System.Drawing.Common.dll b/packages/System.Drawing.Common.4.5.0/lib/netstandard2.0/System.Drawing.Common.dll new file mode 100644 index 0000000..3011aaf Binary files /dev/null and b/packages/System.Drawing.Common.4.5.0/lib/netstandard2.0/System.Drawing.Common.dll differ diff --git a/packages/System.Drawing.Common.4.5.0/lib/xamarinios10/_._ b/packages/System.Drawing.Common.4.5.0/lib/xamarinios10/_._ new file mode 100644 index 0000000..e69de29 diff --git a/packages/System.Drawing.Common.4.5.0/lib/xamarinmac20/_._ b/packages/System.Drawing.Common.4.5.0/lib/xamarinmac20/_._ new file mode 100644 index 0000000..e69de29 diff --git a/packages/System.Drawing.Common.4.5.0/lib/xamarintvos10/_._ b/packages/System.Drawing.Common.4.5.0/lib/xamarintvos10/_._ new file mode 100644 index 0000000..e69de29 diff --git a/packages/System.Drawing.Common.4.5.0/lib/xamarinwatchos10/_._ b/packages/System.Drawing.Common.4.5.0/lib/xamarinwatchos10/_._ new file mode 100644 index 0000000..e69de29 diff --git a/packages/System.Drawing.Common.4.5.0/ref/MonoAndroid10/_._ b/packages/System.Drawing.Common.4.5.0/ref/MonoAndroid10/_._ new file mode 100644 index 0000000..e69de29 diff --git a/packages/System.Drawing.Common.4.5.0/ref/MonoTouch10/_._ b/packages/System.Drawing.Common.4.5.0/ref/MonoTouch10/_._ new file mode 100644 index 0000000..e69de29 diff --git a/packages/System.Drawing.Common.4.5.0/ref/net461/System.Drawing.Common.dll b/packages/System.Drawing.Common.4.5.0/ref/net461/System.Drawing.Common.dll new file mode 100644 index 0000000..bcaeee6 Binary files /dev/null and b/packages/System.Drawing.Common.4.5.0/ref/net461/System.Drawing.Common.dll differ diff --git a/packages/System.Drawing.Common.4.5.0/ref/netstandard2.0/System.Drawing.Common.dll b/packages/System.Drawing.Common.4.5.0/ref/netstandard2.0/System.Drawing.Common.dll new file mode 100644 index 0000000..f829a99 Binary files /dev/null and b/packages/System.Drawing.Common.4.5.0/ref/netstandard2.0/System.Drawing.Common.dll differ diff --git a/packages/System.Drawing.Common.4.5.0/ref/xamarinios10/_._ b/packages/System.Drawing.Common.4.5.0/ref/xamarinios10/_._ new file mode 100644 index 0000000..e69de29 diff --git a/packages/System.Drawing.Common.4.5.0/ref/xamarinmac20/_._ b/packages/System.Drawing.Common.4.5.0/ref/xamarinmac20/_._ new file mode 100644 index 0000000..e69de29 diff --git a/packages/System.Drawing.Common.4.5.0/ref/xamarintvos10/_._ b/packages/System.Drawing.Common.4.5.0/ref/xamarintvos10/_._ new file mode 100644 index 0000000..e69de29 diff --git a/packages/System.Drawing.Common.4.5.0/ref/xamarinwatchos10/_._ b/packages/System.Drawing.Common.4.5.0/ref/xamarinwatchos10/_._ new file mode 100644 index 0000000..e69de29 diff --git a/packages/System.Drawing.Common.4.5.0/runtimes/unix/lib/netcoreapp2.0/System.Drawing.Common.dll b/packages/System.Drawing.Common.4.5.0/runtimes/unix/lib/netcoreapp2.0/System.Drawing.Common.dll new file mode 100644 index 0000000..311c7f3 Binary files /dev/null and b/packages/System.Drawing.Common.4.5.0/runtimes/unix/lib/netcoreapp2.0/System.Drawing.Common.dll differ diff --git a/packages/System.Drawing.Common.4.5.0/runtimes/win/lib/netcoreapp2.0/System.Drawing.Common.dll b/packages/System.Drawing.Common.4.5.0/runtimes/win/lib/netcoreapp2.0/System.Drawing.Common.dll new file mode 100644 index 0000000..dcf5a77 Binary files /dev/null and b/packages/System.Drawing.Common.4.5.0/runtimes/win/lib/netcoreapp2.0/System.Drawing.Common.dll differ diff --git a/packages/System.Drawing.Common.4.5.0/useSharedDesignerContext.txt b/packages/System.Drawing.Common.4.5.0/useSharedDesignerContext.txt new file mode 100644 index 0000000..e69de29 diff --git a/packages/System.Drawing.Common.4.5.0/version.txt b/packages/System.Drawing.Common.4.5.0/version.txt new file mode 100644 index 0000000..47004a0 --- /dev/null +++ b/packages/System.Drawing.Common.4.5.0/version.txt @@ -0,0 +1 @@ +30ab651fcb4354552bd4891619a0bdd81e0ebdbf diff --git a/packages/Unity.4.0.1/Unity.4.0.1.nupkg b/packages/Unity.4.0.1/Unity.4.0.1.nupkg new file mode 100644 index 0000000..9a64e12 Binary files /dev/null and b/packages/Unity.4.0.1/Unity.4.0.1.nupkg differ diff --git a/packages/Unity.4.0.1/UnityConfiguration30.xsd b/packages/Unity.4.0.1/UnityConfiguration30.xsd new file mode 100644 index 0000000..0fc1bc8 --- /dev/null +++ b/packages/Unity.4.0.1/UnityConfiguration30.xsd @@ -0,0 +1,319 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/Unity.4.0.1/lib/net45/Microsoft.Practices.Unity.Configuration.XML b/packages/Unity.4.0.1/lib/net45/Microsoft.Practices.Unity.Configuration.XML new file mode 100644 index 0000000..5c24c78 --- /dev/null +++ b/packages/Unity.4.0.1/lib/net45/Microsoft.Practices.Unity.Configuration.XML @@ -0,0 +1,2424 @@ + + + + Microsoft.Practices.Unity.Configuration + + + + + A configuration element storing information about a single type alias. + + + + + Base class for configuration elements with a default implementation of + public deserialization. + + + + + Load this element from the given . + + Contains the XML to initialize from. + + + + Write the contents of this element to the given . + + The caller of this method has already written the start element tag before + calling this method, so deriving classes only need to write the element content, not + the start or end tags. + Writer to send XML content to. + + + + Construct a new, uninitialized . + + + + + Construct a new that is initialized + to alias to the target . + + Alias to use. + Type that is aliased. + + + + Write the contents of this element to the given . + + The caller of this method has already written the start element tag before + calling this method, so deriving classes only need to write the element content, not + the start or end tags. + Writer to send XML content to. + + + + The alias used for this type. + + + + + The fully qualified name this alias refers to. + + + + + A collection of s. + + + + + Specialization of + that provides a canned implementation of . + + Type of configuration element in the collection. + + + + A base helper class for implementing configuration collections. + + Type of configuration element contained in + the collection. + + + + Plug point to get objects out of the collection. + + Index in the collection to retrieve the item from. + Item at that index or null if not present. + + + + Plug point to get objects out of the collection. + + Key to look up the object by. + Item with that key or null if not present. + + + + Load this element from the given . + + Contains the XML to initialize from. + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + 1 + + + + Add a new element to the collection. + + Element to add. + + + + Remove an element from the collection at the given index. + + The index of the item to remove. + + + + Remove all the items in the collection. + + + + + Write out the contents of this collection to the given + without a containing element + corresponding directly to this container element. Each + child element will have a tag name given by + . + + to output XML to. + Name of tag to generate. + + + + Indexer to retrieve items in the collection by index. + + Index of the item to get or set. + The item at the given index. + + + + When overridden in a derived class, creates a new . + + + A new . + + + + + Causes the configuration system to throw an exception. + + + true if the unrecognized element was deserialized successfully; otherwise, false. The default is false. + + The name of the unrecognized element. + An input stream that reads XML from the configuration file. + The element specified in is the <clear> element. + starts with the reserved prefix "config" or "lock". + + + + Gets the element key for a specified configuration element when overridden in a derived class. + + + An that acts as the key for the specified . + + The to return the key for. + + + + Indexer that allows you to get or set an alias by the alias name. + + Alias of element to get or set. + The type name at that alias. + + + + A configuration element used to configure injection of + a specific set of values into an array. + + + + + Base class for configuration elements that describe a value that will + be injected. + + + + + Initialize a new instance of . + + + + + Generate an object + that will be used to configure the container for a type registration. + + Container that is being configured. Supplied in order + to let custom implementations retrieve services; do not configure the container + directly in this method. + Type of the + + + + + Validate that an expected attribute is present in the given + dictionary and that it has a non-empty value. + + Dictionary of name/value pairs to check. + attribute name to check. + + + + Return a unique string that can be used to identify this object. Used + by the configuration collection support. + + + + + Write the contents of this element to the given . + + The caller of this method has already written the start element tag before + calling this method, so deriving classes only need to write the element content, not + the start or end tags. + Writer to send XML content to. + + + + Generate an object + that will be used to configure the container for a type registration. + + Container that is being configured. Supplied in order + to let custom implementations retrieve services; do not configure the container + directly in this method. + Type of the + + + + + Type of array to inject. This is actually the type of the array elements, + not the array type. Optional, if not specified we take the type from + our containing element. + + + + + Values used to calculate the contents of the array. + + + + + A configuration element representing the namespace + tags in the config file. + + + + + An element with a single "name" property, used for + the namespaces and assemblies. + + + + + Write the contents of this element to the given . + + The caller of this method has already written the start element tag before + calling this method, so deriving classes only need to write the element content, not + the start or end tags. + Writer to send XML content to. + + + + Name attribute for this element. + + + + + A collection of s in configuration. + + + + + Gets the element key for a specified configuration element when overridden in a derived class. + + + An that acts as the key for the specified . + + The to return the key for. + + + + Helpful extension methods when implementing configuration sections + that deserialize "unwrapped" elements - elements that should be + deserialized into a container but can be present outside + that container in the actual config file. + + + + + Deserialize an element of the given type, store it in + the collection object, and + + Type of element to create and deserialize. + Parent element containing element to deserialize. + Xml reader containing state to deserialize from. + Collection to store the created element into. + The created element. + + + + Deserialize an element, basing the element type on the one + supplied at runtime, and then store the element into the + given . + + This method is useful when reading elements into a polymorphic collection. + Base type of element to store. + Element that contains the collection being stored into. + Xml Reader containing state to deserialize from. + Runtime type of element to create. + Collection to store the created element into. + The created element. + + + + Class that tracks the current input state of the parser. + + + + + A simple implementing of the rules for a Parsing Expression Grammar + parsing algorithm. This supplies basic methods to do the primitives + of the PEG, and combinators to create larger rules. + + + + + The PEG "dot" operator that matches and consumes one character. + + Input to the parser. + The parse result. + + + + Parse function generator that returns a method to match a single, + specific character. + + Character to match. + The generated parsing function. + + + + Parse function generator that checks if the current character matches + the predicate supplied. + + Predicate used to determine if the character is in + the given range. + The generated parsing function. + + + + The "*" operator - match zero or more of the inner parse expressions. + + Parse method to repeat matching. + The generated parsing function. + + + + Parsing combinator that matches all of the given expressions in + order, or matches none of them. + + Expressions that form the sequence to match. + The combined sequence. + + + + Parsing combinator that implements the PEG prioritized choice operator. Basically, + try each of the expressions in order, and match if any of them match, stopping on the + first match. + + Expressions that form the set of alternatives. + The combined parsing method. + + + + Parsing combinator implementing the "not" predicate. This wraps + the given parsing method with a check + to see if it matched. If it matched, then the Not fails, and vice + versa. The result consumes no input. + + The parse method to wrap. + The generated parsing function. + + + + Parsing expression that matches End of input. + + Parser input. + Parse result + + + + Combinator that executes an action if the given expression matched. + + Parsing expression to match. + Action to execute if + matched. Input is the matched text from . + The result of . + + + + Combinator that executes an action if the given expression matched. + + parsing expression to match. + Method to execute if a match happens. This method returns + the that will be returned from the combined expression. + The result of if expression matched, else + whatever returned. + + + + Object containing the result of attempting to match a PEG rule. + This object is the return type for all parsing methods. + + + + + Did the rule match? + + + + + The characters that were matched (if any) + + + + + Any extra information provided by the parsing expression + (only set if the parse matched). The nature + of the data varies depending on the parsing expression. + + + + + Helper methods to make it easier to pull the data + out of the result of a sequence expression. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + 2 + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + 1 + + + + Adds an item to the . + + The object to add to the . + The is read-only. + + + + Removes all items from the . + + The is read-only. + + + + Determines whether the contains a specific value. + + + true if is found in the ; otherwise, false. + + The object to locate in the . + + + + Copies the elements of the sequence to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from this sequence. The must have zero-based indexing. + The zero-based index in at which copying begins. + is null. + is less than 0. + is multidimensional. + -or- + is equal to or greater than the length of . + -or- + The number of elements in the source is greater than the available space from to the end of the destination . + + + + + Removes the first occurrence of a specific object from the . + + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + The object to remove from the . + The is read-only. + + + + Determines the index of a specific item in the . + + + The index of if found in the list; otherwise, -1. + + The object to locate in the . + + + + Inserts an item to the at the specified index. + + The zero-based index at which should be inserted. + The object to insert into the . + is not a valid index in the . + The is read-only. + + + + Removes the item at the specified index. + + The zero-based index of the item to remove. + is not a valid index in the . + The is read-only. + + + + Gets the number of elements contained in the . + + + The number of elements contained in the . + + + + + Gets a value indicating whether the is read-only. + + + true if the is read-only; otherwise, false. + + + + + Gets or sets the element at the specified index. + + + The element at the specified index. + + The zero-based index of the element to get or set. + is not a valid index in the . + The property is set and the is read-only. + + + + Class containing information about a type name. + + + + + The base name of the class + + + + + Namespace if any + + + + + Assembly name, if any + + + + + Helper methods on . + + + + + A helper method to make it more foolproof to write elements. This takes care of writing the + start and end element tags, and takes a nested closure with the code to write the content of + the tag. That way the caller doesn't need to worry about the details of getting the start + and end tags correct. + + + We don't support XML Namespaces here because .NET configuration doesn't use them so + we don't need it for this current implementation. + + XmlWriter to write to. + Name of element. + Nested lambda which, when executed, will create the content for the + element. + (for method chaining if desired). + + + + A helper method to make it easier to output attributes. If the is + null or an empty string, output nothing, else output the given XML attribute. + + Writer to output to. + Attribute name to write. + Value for the attribute. + (for method chaining if desired). + + + + A base class for those elements that can be used + to configure a unity container. + + + + + Create a new instance of . + + + + + Apply this element's configuration to the given . + + Container to configure. + + + + Return a unique key that can be used to manage this element in a collection. + + + + + A couple of useful extension methods on IDictionary + + + + + Get the value from a dictionary, or null if there is no value. + + Key type of dictionary. + Value type of dictionary. + Dictionary to search. + Key to look up. + The value at the key or null if not in the dictionary. + + + + A helper class used to map element tag names to a handler method + used to interpret that element. + + + + + + Add method to enable dictionary initializer syntax + + + + + + + Process an unknown element according to the map entries. + + Parent element that hit this unknown element. + Name of the unknown element. + XmlReader positioned at start of element. + true if processed, false if not. + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + 2 + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + 1 + + + + A helper class used to map element tag names to a handler method + used to interpret that element. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + 2 + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + 1 + + + + A helper class that assists in deserializing parameter and property + elements. These elements both have a single "value" child element that + specify the value to inject for the property or parameter. + + + + + Create a new that wraps reading + values and storing them in the given . + + Element that contains the value elements. + + + + Gets a , or if none is present, + returns a default . + + The . + The given , unless + is null, in which case returns + a . + + + + Helper method used during deserialization to handle + attributes for the dependency and value tags. + + attribute name. + attribute value. + true + + + + Helper method used during deserialization to handle the default + value element tags. + + The element name. + XML data to read. + True if deserialization succeeded, false if it failed. + + + + Call this method at the end of deserialization of your element to + set your value element. + + + + + Serialize a object out to XML. + This method is aware of and implements the shorthand attributes + for dependency and value elements. + + Writer to output XML to. + The to serialize. + If true, always output an element. If false, then + dependency and value elements will be serialized as attributes in the parent tag. + + + + Configuration element representing a constructor configuration. + + + + + Base class for configuration elements that generate + object to configure a container. + + + + + Return the set of s that are needed + to configure the container according to this configuration element. + + Container that is being configured. + Type that is being registered. + Type that is being mapped to. + Name this registration is under. + One or more objects that should be + applied to the container registration. + + + + Get the standard tag name for an + taking into account currently loaded section extensions. + + Element to get the name for. + The element name. + If the member element is not currently registered + with the section. + + + + Each element must have a unique key, which is generated by the subclasses. + + + + + Element name to use to serialize this into XML. + + + + + Write the contents of this element to the given . + + The caller of this method has already written the start element tag before + calling this method, so deriving classes only need to write the element content, not + the start or end tags. + Writer to send XML content to. + + + + Return the set of s that are needed + to configure the container according to this configuration element. + + Container that is being configured. + Type that is being registered. + Type that is being mapped to. + Name this registration is under. + One or more objects that should be + applied to the container registration. + + + + The parameters of the constructor to call. + + + + + Each element must have a unique key, which is generated by the subclasses. + + + + + Element name to use to serialize this into XML. + + + + + A collection of s as + loaded from configuration. + + + + + When overridden in a derived class, creates a new . + + + A new . + + + + + Gets the element key for a specified configuration element when overridden in a derived class. + + + An that acts as the key for the specified . + + The to return the key for. + + + + A configuration element class defining the set of registrations to be + put into a container. + + + + + Original configuration API kept for backwards compatibility. + + Container to configure + + + + Apply the configuration information in this element to the + given . + + Container to configure. + + + + Gets a value indicating whether an unknown element is encountered during deserialization. + + + true when an unknown element is encountered while deserializing; otherwise, false. + + The name of the unknown subelement. + The being used for deserialization. + The element identified by is locked. + - or - + One or more of the element's attributes is locked. + - or - + is unrecognized, or the element has an unrecognized attribute. + - or - + The element has a Boolean attribute with an invalid value. + - or - + An attempt was made to deserialize a property more than once. + - or - + An attempt was made to deserialize a property that is not a valid member of the element. + - or - + The element cannot contain a CDATA or text element. + + + + + Write the contents of this element to the given . + + The caller of this method has already written the start element tag before + calling this method, so deriving classes only need to write the element content, not + the start or end tags. + Writer to send XML content to. + + + + Name for this container configuration as given in the config file. + + + + + The type registrations in this container. + + + + + Any instances to register in the container. + + + + + Any extensions to add to the container. + + + + + Set of any extra configuration elements that were added by a + section extension. + + + This is not marked as a configuration property because we don't want + the actual property to show up as a nested element in the configuration. + + + + Configuration element representing an extension to add to a container. + + + + + Add the extension specified in this element to the container. + + Container to configure. + + + + Write the contents of this element to the given . + + The caller of this method has already written the start element tag before + calling this method, so deriving classes only need to write the element content, not + the start or end tags. + Writer to send XML content to. + + + + Type of the extension to add. + + + + + A collection of s. + + + + + Gets the element key for a specified configuration element when overridden in a derived class. + + + An that acts as the key for the specified . + + The to return the key for. + + + + A derived class that describes + a parameter that should be resolved through the container. + + + + + Create a new instance of . + + + + + Create a new instance of with + properties initialized from the contents of + . + + Dictionary of name/value pairs to + initialize this object with. + + + + Write the contents of this element to the given . + + The caller of this method has already written the start element tag before + calling this method, so deriving classes only need to write the element content, not + the start or end tags. + Writer to send XML content to. + + + + Write the contents of this element to the given . This + method always outputs an explicit <dependency> tag, instead of providing + attributes to the parent method. + + Writer to send XML content to. + + + + Generate an object + that will be used to configure the container for a type registration. + + Container that is being configured. Supplied in order + to let custom implementations retrieve services; do not configure the container + directly in this method. + Type of the + + + + + Name to use to when resolving. If empty, resolves the default. + + + + + Name of type this dependency should resolve to. This is optional; + without it the container will resolve the type of whatever + property or parameter this element is contained in. + + + + + Base class used to derive new elements that can occur + directly within a container element. + + + + + Initialize a new instance of . + + + + + When overridden in a derived class, this method will make configuration + calls into the given according to its contents. + + The container to configure. + + + + Unique key generated for use in the collection class. + + + + + A collection of s. + + + + + When overridden in a derived class, creates a new . + + + A new . + + + + + Gets the element key for a specified configuration element when overridden in a derived class. + + + An that acts as the key for the specified . + + The to return the key for. + + + + This class manages the set of extension elements + added by section elements. + + + + + Clear the current set of extension elements. + + + + + Register a new ContainerExtensionConfigurationElement with he section so it + can be read. + + prefix if any. + tag name. + Type of element to register. + + + + Register a new with the section + so it can be read. + + prefix if any. + Tag name. + Type of element to register. + + + + Register a new with the section + so it can be read. + + prefix if any. + Tag name. + Type of element to register. + + + + Retrieve the registered for the given + tag. + + Tag to look up. + Type of element, or null if not registered. + + + + Retrieve the ContainerExtensionConfigurationElement registered for the given + tag. + + Tag to look up. + Type of element, or null if not registered. + + + + Retrieve the ContainerExtensionConfigurationElement registered for the given + tag. + + Tag to look up. + Type of element, or null if not registered. + + + + Retrieve the correct tag to use when serializing the given + to XML. + + Element to be serialized. + The tag for that element type. + if the element is of a type that + is not registered with the section already. + + + + A polymorphic collection of s. + + + + + Causes the configuration system to throw an exception. + + + true if the unrecognized element was deserialized successfully; otherwise, false. The default is false. + + The name of the unrecognized element. + An input stream that reads XML from the configuration file. + The element specified in is the <clear> element. + starts with the reserved prefix "config" or "lock". + + + + + When overridden in a derived class, creates a new . + + + A new . + + + + + Gets the element key for a specified configuration element when overridden in a derived class. + + + An that acts as the key for the specified . + + The to return the key for. + + + + Indexer that lets you access elements by their key. + + Key to retrieve element with. + The element. + + + + A configuration element that describes an instance to add to the container. + + + + + Write the contents of this element to the given . + + The caller of this method has already written the start element tag before + calling this method, so deriving classes only need to write the element content, not + the start or end tags. + Writer to send XML content to. + + + + Add the instance defined by this element to the given container. + + Container to configure. + + + + Name to register instance under + + + + + Value for this instance + + + + + Type of the instance. If not given, defaults to string + + + + + Type name for the type converter to use to create the instance. If not + given, defaults to the default type converter for this instance type. + + + + + Key used to keep these instances unique in the config collection. + + + + + A collection of s. + + + + + Gets the element key for a specified configuration element when overridden in a derived class. + + + An that acts as the key for the specified . + + The to return the key for. + + + + An element that has a child Value property. + + + + + String that will be deserialized to provide the value. + + + + + A string describing where the value this element contains + is being used. For example, if setting a property Prop1, + this should return "property Prop1" (in english). + + + + + A configuration element that represents lifetime managers. + + + + + Create the described by + this element. + + A instance. + + + + Write the contents of this element to the given . + + The caller of this method has already written the start element tag before + calling this method, so deriving classes only need to write the element content, not + the start or end tags. + Writer to send XML content to. + + + + Type of the lifetime manager. + + + + + Extra initialization information used by the type converter for this lifetime manager. + + + + + Type of to use to create the + lifetime manager. + + + + + A configuration element representing a method to call. + + + + + Construct a new instance of . + + + + + Write the contents of this element to the given . + + The caller of this method has already written the start element tag before + calling this method, so deriving classes only need to write the element content, not + the start or end tags. + Writer to send XML content to. + + + + Return the set of s that are needed + to configure the container according to this configuration element. + + Container that is being configured. + Type that is being registered. + Type that is being mapped to. + Name this registration is under. + One or more objects that should be + applied to the container registration. + + + + Name of the method to call. + + + + + Parameters to the method call. + + + + + Each element must have a unique key, which is generated by the subclasses. + + + + + Element name to use to serialize this into XML. + + + + + A configuration element representing the namespace + tags in the config file. + + + + + A collection of s in configuration. + + + + + Gets the element key for a specified configuration element when overridden in a derived class. + + + An that acts as the key for the specified . + + The to return the key for + + + + A configuration element that specifies that a value + is optional. + + + + + Write the contents of this element to the given . + + The caller of this method has already written the start element tag before + calling this method, so deriving classes only need to write the element content, not + the start or end tags. + Writer to send XML content to. + + + + Generate an object + that will be used to configure the container for a type registration. + + Container that is being configured. Supplied in order + to let custom implementations retrieve services; do not configure the container + directly in this method. + Type of the + + + + + Name used to resolve the dependency, leave out or blank to resolve default. + + + + + Type of dependency to resolve. If left out, resolved the type of + the containing parameter or property. + + + + + Configuration element representing a parameter passed to a constructor + or a method. + + + + + Construct a new instance of . + + + + + Returns the required needed + to configure the container so that the correct value is injected. + + Container being configured. + Type of the parameter. + The value to use to configure the container. + + + + Does the information in this match + up with the given ? + + Information about the parameter. + True if this is a match, false if not. + + + + Reads XML from the configuration file. + + The that reads from the configuration file. + true to serialize only the collection key properties; otherwise, false. + The element to read is locked. + - or - + An attribute of the current node is not recognized. + - or - + The lock status of the current node cannot be determined. + + + + + Gets a value indicating whether an unknown attribute is encountered during deserialization. + + + true when an unknown attribute is encountered while deserializing; otherwise, false. + + The name of the unrecognized attribute. + The value of the unrecognized attribute. + + + + Gets a value indicating whether an unknown element is encountered during deserialization. + + + true when an unknown element is encountered while deserializing; otherwise, false. + + The name of the unknown subelement. + The being used for deserialization. + The element identified by is locked. + - or - + One or more of the element's attributes is locked. + - or - + is unrecognized, or the element has an unrecognized attribute. + - or - + The element has a Boolean attribute with an invalid value. + - or - + An attempt was made to deserialize a property more than once. + - or - + An attempt was made to deserialize a property that is not a valid member of the element. + - or - + The element cannot contain a CDATA or text element. + + + + + Write the contents of this element to the given . + + The caller of this method has already written the start element tag before + calling this method, so deriving classes only need to write the element content, not + the start or end tags. + Writer to send XML content to. + + + + Name of this parameter. + + + + + Type of this parameter. + + This is only needed in order to disambiguate method overloads. Normally + the parameter name is sufficient. + + + + Element that describes the value for this property. + + + This is NOT marked as a ConfigurationProperty because this + child element is polymorphic, and the element tag determines + the type. Standard configuration properties only let you do + this if it's a collection, but we only want one value. Thus + the separate property. The element is deserialized in + . + + + + A string describing where the value this element contains + is being used. For example, if setting a property Prop1, + this should return "property Prop1" (in english). + + + + + A collection of objects. + + + + + Gets the element key for a specified configuration element when overridden in a derived class. + + + An that acts as the key for the specified . + + The to return the key for. + + + + A collection of objects. + + + + + Causes the configuration system to throw an exception. + + + true if the unrecognized element was deserialized successfully; otherwise, false. The default is false. + + The name of the unrecognized element. + An input stream that reads XML from the configuration file. + The element specified in is the <clear> element. + starts with the reserved prefix "config" or "lock". + + + + When overridden in a derived class, creates a new . + + + A new . + + + + + Gets the element key for a specified configuration element when overridden in a derived class. + + + An that acts as the key for the specified . + + The to return the key for. + + + + String that will be deserialized to provide the value. + + + + + A string describing where the value this element contains + is being used. For example, if setting a property Prop1, + this should return "property Prop1" (in english). + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to An abstract ContainerConfiguringElement cannot be created. Please specify a concrete type.. + + + + + Looks up a localized string similar to An abstract ExtensionConfigurationElement object cannot be created. Please specify a concrete type.. + + + + + Looks up a localized string similar to An abstract InjectionMemberElement object cannot be created. Please specify a concrete type.. + + + + + Looks up a localized string similar to An abstract ParameterValueElement object cannot be created. Please specify a concrete type.. + + + + + Looks up a localized string similar to The type name or alias {0} could not be resolved. Please check your configuration file and verify this type name.. + + + + + Looks up a localized string similar to The dependency element for generic parameter {0} must not have an explicit type name but has '{1}'.. + + + + + Looks up a localized string similar to The optional dependency element for generic parameter {0} must not have an explicit type name but has '{1}'.. + + + + + Looks up a localized string similar to {0} {1}. + + + + + Looks up a localized string similar to The injection configuration for {0} has multiple values.. + + + + + Looks up a localized string similar to The configuration element type {0} has not been registered with the section.. + + + + + Looks up a localized string similar to The injection configuration for {0} is specified through both attributes and child value elements.. + + + + + Looks up a localized string similar to Could not load section extension type {0}.. + + + + + Looks up a localized string similar to The extension type {0} does not derive from SectionExtension.. + + + + + Looks up a localized string similar to The extension element type {0} that is being added does not derive from ContainerConfiguringElement, InjectionMemberElement, or ParameterValueElement. An extension element must derive from one of these types.. + + + + + Looks up a localized string similar to No valid attributes were found to construct the value for the {0}. Please check the configuration file.. + + + + + Looks up a localized string similar to Configuration is incorrect, the type {0} does not have a constructor that takes parameters named {1}.. + + + + + Looks up a localized string similar to Configuration is incorrect, the type {0} does not have a method named {1} that takes parameters named {2}.. + + + + + Looks up a localized string similar to The container named "{0}" is not defined in this configuration section.. + + + + + Looks up a localized string similar to The type {0} does not have a property named {1}.. + + + + + Looks up a localized string similar to The configuration is set to inject an array, but the type {0} is not an array type.. + + + + + Looks up a localized string similar to parameter. + + + + + Looks up a localized string similar to property. + + + + + Looks up a localized string similar to The attribute {0} must be present and non-empty.. + + + + + Looks up a localized string similar to The value element for {1} was specified for the generic array type {0}. Value elements are not allowed for generic array types.. + + + + + Looks up a localized string similar to The value element for {1} was specified for the generic parameter type {0}. Value elements are not allowed for generic parameter types.. + + + + + Looks up a localized string similar to The value element for {1} was specified for the generic type {0}. Value elements are not allowed for generic types.. + + + + + A class representing a property configuration element. + + + + + Construct a new instance of + + + + + Reads XML from the configuration file. + + The that reads from the configuration file. + true to serialize only the collection key properties; otherwise, false. + The element to read is locked. + - or - + An attribute of the current node is not recognized. + - or - + The lock status of the current node cannot be determined. + + + + + Gets a value indicating whether an unknown attribute is encountered during deserialization. + + + true when an unknown attribute is encountered while deserializing; otherwise, false. + + The name of the unrecognized attribute. + The value of the unrecognized attribute. + + + + Gets a value indicating whether an unknown element is encountered during deserialization. + + + true when an unknown element is encountered while deserializing; otherwise, false. + + The name of the unknown subelement. + The being used for deserialization. + The element identified by is locked. + - or - + One or more of the element's attributes is locked. + - or - + is unrecognized, or the element has an unrecognized attribute. + - or - + The element has a Boolean attribute with an invalid value. + - or - + An attempt was made to deserialize a property more than once. + - or - + An attempt was made to deserialize a property that is not a valid member of the element. + - or - + The element cannot contain a CDATA or text element. + + + + + Write the contents of this element to the given . + + The caller of this method has already written the start element tag before + calling this method, so deriving classes only need to write the element content, not + the start or end tags. + Writer to send XML content to. + + + + Return the set of s that are needed + to configure the container according to this configuration element. + + Container that is being configured. + Type that is being registered. + Type that is being mapped to. + Name this registration is under. + One or more objects that should be + applied to the container registration. + + + + Name of the property that will be set. + + + + + Each element must have a unique key, which is generated by the subclasses. + + + + + String that will be deserialized to provide the value. + + + + + A string describing where the value this element contains + is being used. For example, if setting a property Prop1, + this should return "property Prop1" (in english). + + + + + Element name to use to serialize this into XML. + + + + + A configuration element representing a single container type registration. + + + + + Apply the registrations from this element to the given container. + + Container to configure. + + + + Write the contents of this element to the given . + + The caller of this method has already written the start element tag before + calling this method, so deriving classes only need to write the element content, not + the start or end tags. + Writer to send XML content to. + + + + The type that is registered. + + + + + Name registered under. + + + + + Type that is mapped to. + + + + + Lifetime manager to register for this registration. + + + + + Any injection members (constructor, properties, etc.) that are specified for + this registration. + + + + + A collection of s. + + + + + Causes the configuration system to throw an exception. + + + true if the unrecognized element was deserialized successfully; otherwise, false. The default is false. + + The name of the unrecognized element. + An input stream that reads XML from the configuration file. + The element specified in is the <clear> element. + starts with the reserved prefix "config" or "lock". + + + + Gets the element key for a specified configuration element when overridden in a derived class. + + + An that acts as the key for the specified . + + The to return the key for. + + + + Base class for Unity configuration section extensions. + Derived classes are used to add custom elements and aliases + into the configuration section being loaded. + + + + + Add the extensions to the section via the context. + + Context object that can be used to add elements and aliases. + + + + An object that gives the ability to add + elements and aliases to a configuration section. + + + + + Add a new alias to the configuration section. This is useful + for those extensions that add commonly used types to configuration + so users don't have to alias them repeatedly. + + The alias to use. + Type the alias maps to. + + + + Add a new alias to the configuration section. This is useful + for those extensions that add commonly used types to configuration + so users don't have to alias them repeatedly. + + Type the alias maps to. + The alias to use + + + + Add a new element to the configuration section schema. + + Tag name in the XML. + Type the tag maps to. + + + + Add a new element to the configuration section schema. + + Type the tag maps to. + Tag name in the XML. + + + + A configuration element used to specify which extensions to + add to the configuration schema. + + + + + Reads XML from the configuration file. + + The that reads from the configuration file. + true to serialize only the collection key properties; otherwise, false. + The element to read is locked. + - or - + An attribute of the current node is not recognized. + - or - + The lock status of the current node cannot be determined. + + + + + Write the contents of this element to the given . + + The caller of this method has already written the start element tag before + calling this method, so deriving classes only need to write the element content, not + the start or end tags. + Writer to send XML content to. + + + + Type of the section extender object that will provide new elements to the schema. + + + + + Optional prefix that will be added to the element names added by this + section extender. If left out, no prefix will be added. + + + + + The extension object represented by this element. + + + + + A collection of s. + + + + + Gets the element key for a specified configuration element when overridden in a derived class. + + + An that acts as the key for the specified . + + The to return the key for. + + + + Type that manage access to a set of type aliases and implements + the logic for converting aliases to their actual types. + + + + + Set the set of aliases to use for resolution. + + Configuration section containing the various + type aliases, namespaces and assemblies. + + + + Resolves a type alias or type FullName to a concrete type. + + Type alias or type FullName + Type object or null if resolve fails. + Thrown if alias lookup fails. + + + + Resolves a type alias or type FullName to a concrete type. + + Alias or name to resolve. + if true and the alias does not + resolve, throw an , otherwise + return null on failure. + The type object or null if resolve fails and + is false. + + + + Resolve a type alias or type full name to a concrete type. + If is null or empty, return the + given instead. + + Type alias or full name to resolve. + Value to return if typeName is null or empty. + The concrete . + Thrown if alias lookup fails. + + + + Resolve a type alias or type full name to a concrete type. + If is null or empty, return the + given instead. + + Type alias or full name to resolve. + Value to return if typeName is null or empty. + if true and the alias does not + resolve, throw an , otherwise + return null on failure. + The concrete . + Thrown if alias lookup fails and + is true. + + + + A helper class that implements the actual logic for resolving a shorthand + type name (alias or raw type name) into an actual type object. + + + + + Construct a new that uses the given + sequence of alias, type name pairs to resolve types. + + Type aliases from the configuration file. + Assembly names to search. + Namespaces to search. + + + + Resolves a type alias or type FullName to a concrete type. + + Alias or name to resolve. + if true and the alias does not + resolve, throw an , otherwise + return null on failure. + The type object or null if resolve fails and + is false. + + + + Resolve a type alias or type full name to a concrete type. + If is null or empty, return the + given instead. + + Type alias or full name to resolve. + Value to return if typeName is null or empty. + if true and the alias does not + resolve, throw an , otherwise + return null on failure. + + If is null or an empty string, + then return . + Otherwise, return the resolved type object. If the resolution fails + and is false, then return null. + + + + + A configuration section describing configuration for an . + + + + + The name of the section where unity configuration is expected to be found. + + + + + XML Namespace string used for IntelliSense in this section. + + + + + Apply the configuration in the default container element to the given container. + + Container to configure. + The passed in . + + + + Apply the configuration in the default container element to the given container. + + Container to configure. + Name of the container element to use to configure the container. + The passed in . + + + + Reads XML from the configuration file. + + The object, which reads from the configuration file. + found no elements in the configuration file. + + + + Gets a value indicating whether an unknown element is encountered during deserialization. + + + true when an unknown element is encountered while deserializing; otherwise, false. + + The name of the unknown subelement. + The being used for deserialization. + + The element identified by is locked. + - or - + One or more of the element's attributes is locked. + - or - + is unrecognized, or the element has an unrecognized attribute. + - or - + The element has a Boolean attribute with an invalid value. + - or - + An attempt was made to deserialize a property more than once. + - or - + An attempt was made to deserialize a property that is not a valid member of the element. + - or - + The element cannot contain a CDATA or text element. + + + + + Creates an XML string containing an unmerged view of the object as a single section to write to a file. + + + An XML string containing an unmerged view of the object. + + The instance to use as the parent when performing the un-merge. + The name of the section to create. + The instance to use when writing to a string. + + + + The current that is being deserialized + or being configured from. + + + + + Storage for XML namespace. The namespace isn't used or validated by config, but + it is useful for Visual Studio XML IntelliSense to kick in. + + + + + The set of containers defined in this configuration section. + + + + + The set of type aliases defined in this configuration file. + + + + + Any schema extensions that are added. + + + + + Any namespaces added to the type search list. + + + + + Any assemblies added to the type search list. + + + + + Add a new alias to the configuration section. This is useful + for those extensions that add commonly used types to configuration + so users don't have to alias them repeatedly. + + The alias to use. + Type the alias maps to. + + + + Add a new element to the configuration section schema. + + Tag name in the XML. + Type the tag maps to. + + + + Collection element for s. + + + + + Plug point to get objects out of the collection. + + Index in the collection to retrieve the item from. + Item at that index or null if not present. + + + + Plug point to get objects out of the collection. + + Key to look up the object by. + Item with that key or null if not present. + + + + Gets the element key for a specified configuration element when overridden in a derived class. + + + An that acts as the key for the specified . + + The to return the key for. + + + + Retrieve a stored by name. + + Name to look up. + The stored container or null if not in the collection. + + + + Return the default container in the collection. The default is the one without a name. + + + + + Extensions to to simplify + loading configuration into a container. + + + + + Apply configuration from the given section and named container + into the given container. + + Unity container to configure. + Configuration section with config information. + Named container. + . + + + + Apply configuration from the default section (named "unity" pulled out of + ConfigurationManager) and the named container. + + Unity container to configure. + Named container element in configuration. + . + + + + Apply configuration from the default section and unnamed container element. + + Container to configure. + . + + + + Apply configuration from the default container in the given section. + + Unity container to configure. + Configuration section. + . + + + + Element that describes a constant value that will be + injected into the container. + + + + + Construct a new object. + + + + + Construct a new object, + initializing properties from the contents of + . + + Name/value pairs which + contain the values to initialize properties to. + + + + Write the contents of this element to the given . + + The caller of this method has already written the start element tag before + calling this method, so deriving classes only need to write the element content, not + the start or end tags. + Writer to send XML content to. + + + + Write the contents of this element to the given . This + method always outputs an explicit <dependency> tag, instead of providing + attributes to the parent method. + + Writer to send XML content to. + + + + Generate an object + that will be used to configure the container for a type registration. + + Container that is being configured. Supplied in order + to let custom implementations retrieve services; do not configure the container + directly in this method. + Type of the parameter to get the value for. + The required object. + + + + Value for this element + + + + + + + + + diff --git a/packages/Unity.4.0.1/lib/net45/Microsoft.Practices.Unity.Configuration.dll b/packages/Unity.4.0.1/lib/net45/Microsoft.Practices.Unity.Configuration.dll new file mode 100644 index 0000000..870581c Binary files /dev/null and b/packages/Unity.4.0.1/lib/net45/Microsoft.Practices.Unity.Configuration.dll differ diff --git a/packages/Unity.4.0.1/lib/net45/Microsoft.Practices.Unity.RegistrationByConvention.XML b/packages/Unity.4.0.1/lib/net45/Microsoft.Practices.Unity.RegistrationByConvention.XML new file mode 100644 index 0000000..7846440 --- /dev/null +++ b/packages/Unity.4.0.1/lib/net45/Microsoft.Practices.Unity.RegistrationByConvention.XML @@ -0,0 +1,328 @@ + + + + Microsoft.Practices.Unity.RegistrationByConvention + + + + + Provides helper methods to retrieve classes from assemblies. + + + + + Returns all visible, non-abstract classes from . + + The assemblies. + All visible, non-abstract classes found in the assemblies. + is . + contains elements. + All exceptions thrown while getting types from the assemblies are ignored, and the types that can be retrieved are returned. + + + + Returns all visible, non-abstract classes from , and optionally skips errors. + + to skip errors; otherwise, . + The assemblies. + + All visible, non-abstract classes. + + is . + contains elements. + + If is , all exceptions thrown while getting types from the assemblies are ignored, and the types + that can be retrieved are returned; otherwise, the original exception is thrown. + + + + + Returns all visible, non-abstract classes from . + + to skip errors; otherwise, . + The assemblies. + + All visible, non-abstract classes. + + is . + contains elements. + + If is , all exceptions thrown while getting types from the assemblies are ignored, and the types + that can be retrieved are returned; otherwise, the original exception is thrown. + + + + + Returns all visible, non-abstract classes from all assemblies that are loaded in the current application domain. + + to include system assemblies; otherwise, . Defaults to . + to include the Unity assemblies; otherwise, . Defaults to . + to include dynamic assemblies; otherwise, . Defaults to . + to skip errors; otherwise, . + + All visible, non-abstract classes in the loaded assemblies. + + + If is , all exceptions thrown while getting types from the assemblies are ignored, and the types + that can be retrieved are returned; otherwise, the original exception is thrown. + + + + + Returns all visible, non-abstract classes from all assemblies that are located in the base folder of the current application domain. + + to include system assemblies; otherwise, . Defaults to . + to include the Unity assemblies; otherwise, . Defaults to . + to skip errors; otherwise, . + + All visible, non-abstract classes. + + + If is , all exceptions thrown while loading assemblies or getting types from the assemblies are ignored, and the types + that can be retrieved are returned; otherwise, the original exception is thrown. + + + + + The exception that is thrown when registering multiple types would result in an type mapping being overwritten. + + + + + Initializes a new instance of the class. + + The name for the mapping. + The source type for the mapping. + The type currently mapped. + The new type to map. + + + + Gets the name for the mapping. + + + + + Gets the source type for the mapping. + + + + + Gets the type currently mapped. + + + + + Gets the new type to map. + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to An attempt to override an existing mapping was detected for type {1} with name "{0}", currently mapped to type {2}, to type {3}.. + + + + + Looks up a localized string similar to The set of assemblies contains a null element.. + + + + + Represents a set of types to register and their registration settings. + + + + + Gets types to register. + + + + + Gets a function to get the types that will be requested for each type to configure. + + + + + Gets a function to get the name to use for the registration of each type. + + + + + Gets a function to get the for the registration of each type. Defaults to no lifetime management. + + + + + + Gets a function to get the additional objects for the registration of each type. Defaults to no injection members. + + + + + + Provides a set of convenience overloads to the + interface to support registration of multiple types. + + + + + Registers the supplied types by using the specified rules for name, lifetime manager, injection members, and registration types. + + The container to configure. + The types to register. The methods in the class can be used to scan assemblies to get types, and further filtering can be performed using LINQ queries. + A function that gets the types that will be requested for each type to configure. It can be a method from the class or a custom function. Defaults to no registration types, and registers only the supplied types. + A function that gets the name to use for the registration of each type. It can be a method from the or a custom function. Defaults to no name. + A function that gets the for the registration of each type. It can be a method from the class or a custom function. Defaults to no lifetime management. + A function that gets the additional objects for the registration of each type. Defaults to no injection members. + to overwrite existing mappings; otherwise, . Defaults to . + + The container that this method was called on. + + A new registration would overwrite an existing mapping and is . + + + + Registers the types according to the . + + The container to configure. + The convention to determine which types will be registered and how. + to overwrite existing mappings; otherwise, . Defaults to . + + The container that this method was called on. + + + + + Provides helper methods to specify the lifetime for a type with registration by convention. + + + + + Returns a . + + The type. + A lifetime manager + + + + Returns a . + + The type. + A container controlled lifetime manager. + + + + Returns a . + + The type. + An externally controlled lifetime manager. + + + + Returns a . + + The type. + A hierarchical lifetime manager. + + + + Returns a . + + The type. + A per resolve lifetime manager. + + + + Returns a . + + The type. + A transient lifetime manager. + + + + Returns a . + + The custom type. + The type. + + A lifetime manager. + + + + + Returns a . + + The type. + A per thread lifetime manager. + + + + Provides helper methods to map types to the types interfaces to which register them. + + + + + Returns no types. + + The type to register. + An empty enumeration. + + + + Returns an enumeration with the interface that matches the name of . + + The type to register. + An enumeration with the first interface matching the name of (for example, if type is MyType, a matching interface is IMyType), + or an empty enumeration if no such interface is found. + + + + Returns an enumeration with all the interfaces implemented by . + + The type to register. + An enumeration with all the interfaces implemented by the implementation type except . + + + + Returns an enumeration with all the interfaces implemented by that belong to the same assembly as implementationType. + + The type to register. + An enumeration with all the interfaces implemented by the implementation type that belong to the same assembly. + + + + Provides helper methods to get type names. + + + + + Returns the type name. + + The type. + The type name. + + + + Returns null for the registration name. + + The type. + + + + diff --git a/packages/Unity.4.0.1/lib/net45/Microsoft.Practices.Unity.RegistrationByConvention.dll b/packages/Unity.4.0.1/lib/net45/Microsoft.Practices.Unity.RegistrationByConvention.dll new file mode 100644 index 0000000..fc76a46 Binary files /dev/null and b/packages/Unity.4.0.1/lib/net45/Microsoft.Practices.Unity.RegistrationByConvention.dll differ diff --git a/packages/Unity.4.0.1/lib/net45/Microsoft.Practices.Unity.dll b/packages/Unity.4.0.1/lib/net45/Microsoft.Practices.Unity.dll new file mode 100644 index 0000000..0d8c004 Binary files /dev/null and b/packages/Unity.4.0.1/lib/net45/Microsoft.Practices.Unity.dll differ diff --git a/packages/Unity.4.0.1/lib/net45/Microsoft.Practices.Unity.xml b/packages/Unity.4.0.1/lib/net45/Microsoft.Practices.Unity.xml new file mode 100644 index 0000000..f99ca70 --- /dev/null +++ b/packages/Unity.4.0.1/lib/net45/Microsoft.Practices.Unity.xml @@ -0,0 +1,5916 @@ + + + + Microsoft.Practices.Unity + + + + + Provides access to the names registered for a container. + + + + + Represents a builder policy interface. Since there are no fixed requirements + for policies, it acts as a marker interface from which to derive all other + policy interfaces. + + + + + Gets the names registered for a type. + + The type. + The names registered for . + + + + An implementation + that constructs a build plan for creating objects. + + + + + A that can create and return an + for the given build key. + + + + + Create a build plan using the given context and build key. + + Current build context. + Current build key. + The build plan. + + + + Creates a build plan using the given context and build key. + + Current build context. + Current build key. + + The build plan. + + + + + Provides extension methods to the class due to the introduction + of class in the .NET for Windows Store apps. + + + + + Returns the constructor in that matches the specified constructor parameter types. + + The type to inspect + The constructor parameter types. + The constructor that matches the specified parameter types. + + + + Returns the non-static declared methods of a type or its base types. + + The type to inspect + An enumerable of the objects. + + + + Returns the non-static method of a type or its based type. + + The type to inspect + The name of the method to seek. + The (closed) parameter type signature of the method. + The discovered + + + + Returns the declared properties of a type or its base types. + + The type to inspect + An enumerable of the objects. + + + + Determines if the types in a parameter set ordinally matches the set of supplied types. + + + + + + + + Base class for attributes that can be placed on parameters + or properties to specify how to resolve the value for + that parameter or property. + + + + + Create an instance of that + will be used to get the value for the member this attribute is + applied to. + + Type of parameter or property that + this attribute is decoration. + The resolver object. + + + + This attribute is used to indicate which constructor to choose when + the container attempts to build a type. + + + + + This attribute is used to mark methods that should be called when + the container is building an object. + + + + + This attribute is used to mark properties and parameters as targets for injection. + + + For properties, this attribute is necessary for injection to happen. For parameters, + it's not needed unless you want to specify additional information to control how + the parameter is resolved. + + + + + Create an instance of with no name. + + + + + Create an instance of with the given name. + + Name to use when resolving this dependency. + + + + Create an instance of that + will be used to get the value for the member this attribute is + applied to. + + Type of parameter or property that + this attribute is decoration. + The resolver object. + + + + The name specified in the constructor. + + + + + An used to mark a dependency + as optional - the container will try to resolve it, and return null + if the resolution fails rather than throw. + + + + + Construct a new object. + + + + + Construct a new object that + specifies a named dependency. + + Name of the dependency. + + + + Create an instance of that + will be used to get the value for the member this attribute is + applied to. + + Type of parameter or property that + this attribute is decoration. + The resolver object. + + + + Name of the dependency. + + + + + A that composites other + ResolverOverride objects. The GetResolver operation then + returns the resolver from the first child override that + matches the current context and request. + + + + + Base class for all override objects passed in the + method. + + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + Wrap this resolver in one that verifies the type of the object being built. + This allows you to narrow any override down to a specific type easily. + + Type to constrain the override to. + The new override. + + + + Wrap this resolver in one that verifies the type of the object being built. + This allows you to narrow any override down to a specific type easily. + + Type to constrain the override to. + The new override. + + + + Add a new to the collection + that is checked. + + item to add. + + + + Add a set of s to the collection. + + items to add. + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + 2 + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + 1 + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + Class that returns information about the types registered in a container. + + + + + The type that was passed to the method + as the "from" type, or the only type if type mapping wasn't done. + + + + + The type that this registration is mapped to. If no type mapping was done, the + property and this one will have the same value. + + + + + Name the type was registered under. Null for default registration. + + + + + The registered lifetime manager instance. + + + + + The lifetime manager for this registration. + + + This property will be null if this registration is for an open generic. + + + + A class that overrides + the value injected whenever there is a dependency of the + given type, regardless of where it appears in the object graph. + + + + + Create an instance of to override + the given type with the given value. + + Type of the dependency. + Value to use. + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + A convenience version of that lets you + specify the dependency type using generic syntax. + + Type of the dependency to override. + + + + Construct a new object that will + override the given dependency, and pass the given value. + + + + + A convenience form of that lets you + specify multiple parameter overrides in one shot rather than having + to construct multiple objects. + + + This class isn't really a collection, it just implements IEnumerable + so that we get use of the nice C# collection initializer syntax. + + + + + Base helper class for creating collections of objects + for use in passing a bunch of them to the resolve call. This base class provides + the mechanics needed to allow you to use the C# collection initializer syntax. + + Concrete type of the this class collects. + Key used to create the underlying override object. + Value that the override returns. + + + + Add a new override to the collection with the given key and value. + + Key - for example, a parameter or property name. + Value - the value to be returned by the override. + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + 2 + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + 1 + + + + When implemented in derived classes, this method is called from the + method to create the actual objects. + + Key value to create the resolver. + Value to store in the resolver. + The created . + + + + When implemented in derived classes, this method is called from the + method to create the actual objects. + + Key value to create the resolver. + Value to store in the resolver. + The created . + + + + Event argument class for the event. + + + + + Construct a new object with the + given child container object. + + An for the newly created child + container. + + + + The newly created child container. + + + + + An extension context for the created child container. + + + + + Base class for subclasses that let you specify that + an instance of a generic type parameter should be resolved. + + + + + Base type for objects that are used to configure parameters for + constructor or method injection, or for getting the value to + be injected into a property. + + + + + Test to see if this parameter value has a matching type for the given type. + + Type to check. + True if this parameter value is compatible with type , + false if not. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + Convert the given set of arbitrary values to a sequence of InjectionParameterValue + objects. The rules are: If it's already an InjectionParameterValue, return it. If + it's a Type, return a ResolvedParameter object for that type. Otherwise return + an InjectionParameter object for that value. + + The values to build the sequence from. + The resulting converted sequence. + + + + Convert an arbitrary value to an InjectionParameterValue object. The rules are: + If it's already an InjectionParameterValue, return it. If it's a Type, return a + ResolvedParameter object for that type. Otherwise return an InjectionParameter + object for that value. + + The value to convert. + The resulting . + + + + Name for the type represented by this . + This may be an actual type name or a generic argument name. + + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + name to use when looking up in the container. + + + + Test to see if this parameter value has a matching type for the given type. + + Type to check. + True if this parameter value is compatible with type , + false if not. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + Return a instance that will + return this types value for the parameter. + + The actual type to resolve. + The resolution key. + The . + + + + Name for the type represented by this . + This may be an actual type name or a generic argument name. + + + + + A that lets you specify that + an instance of a generic type parameter should be resolved, providing the + value if resolving fails. + + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + name to use when looking up in the container. + + + + Return a instance that will + return this types value for the parameter. + + The actual type to resolve. + The resolution key. + The . + + + + A class that lets you specify a factory method the container + will use to create the object. + + This is a significantly easier way to do the same + thing the old static factory extension was used for. + + + + Base class for objects that can be used to configure what + class members get injected by the container. + + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Type to register. + Policy list to add policies to. + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Type of interface being registered. If no interface, + this will be null. + Type of concrete type being registered. + Name used to resolve the type object. + Policy list to add policies to. + + + + Create a new instance of with + the given factory function. + + Factory function. + + + + Create a new instance of with + the given factory function. + + Factory function. + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Type of interface being registered. If no interface, + this will be null. This parameter is ignored in this implementation. + Type of concrete type being registered. + Name used to resolve the type object. + Policy list to add policies to. + + + + A that can be passed to + to configure a + parameter or property as an optional dependency. + + + + + A base class for implementing classes + that deal in explicit types. + + + + + Create a new that exposes + information about the given . + + Type of the parameter. + + + + Test to see if this parameter value has a matching type for the given type. + + Type to check. + True if this parameter value is compatible with type , + false if not. + + + + The type of parameter this object represents. + + + + + Name for the type represented by this . + This may be an actual type name or a generic argument name. + + + + + Construct a new object that + specifies the given . + + Type of the dependency. + + + + Construct a new object that + specifies the given and . + + Type of the dependency. + Name for the dependency. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + A generic version of that lets you + specify the type of the dependency using generics syntax. + + Type of the dependency. + + + + Construct a new . + + + + + Construct a new with the given + . + + Name of the dependency. + + + + A special lifetime manager which works like , + except that in the presence of child containers, each child gets it's own instance + of the object, instead of sharing one in the common parent. + + + + + A that holds onto the instance given to it. + When the is disposed, + the instance is disposed with it. + + + + + Base class for Lifetime managers which need to synchronize calls to + . + + + + The purpose of this class is to provide a basic implementation of the lifetime manager synchronization pattern. + + + Calls to the method of a + instance acquire a lock, and if the instance has not been initialized with a value yet the lock will only be released + when such an initialization takes place by calling the method or if + the build request which resulted in the call to the GetValue method fails. + + + + + + + Base class for Lifetime managers - classes that control how + and when instances are created by the Unity container. + + + + + A that controls how instances are + persisted and recovered from an external store. Used to implement + things like singletons and per-http-request lifetime. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. + + The object to store. + + + + Remove the value this lifetime policy is managing from backing store. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. + + The object being stored. + + + + Remove the given object from backing store. + + + + + This interface provides a hook for the builder context to + implement error recovery when a builder strategy throws + an exception. Since we can't get try/finally blocks onto + the call stack for later stages in the chain, we instead + add these objects to the context. If there's an exception, + all the current IRequiresRecovery instances will have + their Recover methods called. + + + + + A method that does whatever is needed to clean up + as part of cleaning up after an exception. + + + Don't do anything that could throw in this method, + it will cause later recover operations to get skipped + and play real havoc with the stack trace. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + Calls to this method acquire a lock which is released only if a non-null value + has been set for the lifetime manager. + + + + Performs the actual retrieval of a value from the backing store associated + with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + This method is invoked by + after it has acquired its lock. + + + + Stores the given value into backing store for retrieval later. + + The object being stored. + Setting a value will attempt to release the lock acquired by + . + + + + Performs the actual storage of the given value into backing store for retrieval later. + + The object being stored. + This method is invoked by + before releasing its lock. + + + + Remove the given object from backing store. + + + + + A method that does whatever is needed to clean up + as part of cleaning up after an exception. + + + Don't do anything that could throw in this method, + it will cause later recover operations to get skipped + and play real havoc with the stack trace. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. + + The object being stored. + + + + Remove the given object from backing store. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Standard Dispose pattern implementation. Not needed, but it keeps FxCop happy. + + Always true, since we don't have a finalizer. + + + + This is a custom lifetime manager that acts like , + but also provides a signal to the default build plan, marking the type so that + instances are reused across the build up object graph. + + + + + Construct a new object that does not + itself manage an instance. + + + + + Construct a new object that stores the + give value. This value will be returned by + but is not stored in the lifetime manager, nor is the value disposed. + This Lifetime manager is intended only for internal use, which is why the + normal method is not used here. + + Value to store. + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. In this class, + this is a noop, since it has special hooks down in the guts. + + The object being stored. + + + + Remove the given object from backing store. Noop in this class. + + + + + A strategy that handles Hierarchical lifetimes across a set of parent/child + containers. + + + + + Represents a strategy in the chain of responsibility. + Strategies are required to support both BuildUp and TearDown. + + + + + Represents a strategy in the chain of responsibility. + Strategies are required to support both BuildUp and TearDown. Although you + can implement this interface directly, you may also choose to use + as the base class for your strategies, as + this class provides useful helper methods and makes support BuildUp and TearDown + optional. + + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + Called during the chain of responsibility for a build operation. The + PostBuildUp method is called when the chain has finished the PreBuildUp + phase and executes in reverse order from the PreBuildUp calls. + + Context of the build operation. + + + + Called during the chain of responsibility for a teardown operation. The + PreTearDown method is called when the chain is being executed in the + forward direction. + + Context of the teardown operation. + + + + Called during the chain of responsibility for a teardown operation. The + PostTearDown method is called when the chain has finished the PreTearDown + phase and executes in reverse order from the PreTearDown calls. + + Context of the teardown operation. + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + Called during the chain of responsibility for a build operation. The + PostBuildUp method is called when the chain has finished the PreBuildUp + phase and executes in reverse order from the PreBuildUp calls. + + Context of the build operation. + + + + Called during the chain of responsibility for a teardown operation. The + PreTearDown method is called when the chain is being executed in the + forward direction. + + Context of the teardown operation. + + + + Called during the chain of responsibility for a teardown operation. The + PostTearDown method is called when the chain has finished the PreTearDown + phase and executes in reverse order from the PreTearDown calls. + + Context of the teardown operation. + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + A that will attempt to + resolve a value, and return null if it cannot rather than throwing. + + + + + A strategy that is used at build plan execution time + to resolve a dependent value. + + + + + Get the value for a dependency. + + Current build context. + The value for the dependency. + + + + Construct a new object + that will attempt to resolve the given name and type from the container. + + Type to resolve. Must be a reference type. + Name to resolve with. + + + + Construct a new object + that will attempt to resolve the given type from the container. + + Type to resolve. Must be a reference type. + + + + Get the value for a dependency. + + Current build context. + The value for the dependency. + + + + Type this resolver will resolve. + + + + + Name this resolver will resolve. + + + + + Extension methods on to provide convenience + overloads (generic versions, mostly). + + + + + Removes an individual policy type for a build key. + + The type the policy was registered as. + to remove the policy from. + The key the policy applies. + + + + Removes a default policy. + + The type the policy was registered as. + to remove the policy from. + + + + Gets an individual policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + The policy list that actually contains the returned policy. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + to search. + The interface the policy is registered under. + The key the policy applies. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + to search. + The interface the policy is registered under. + The key the policy applies. + The policy list that actually contains the returned policy. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy list that actually contains the returned policy. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + to search. + The interface the policy is registered under. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy in the list, if present; returns null otherwise. + + + + Get the non default policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy in the list, if present; returns null otherwise. + + + + Get the non default policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy list that actually contains the returned policy. + The policy in the list, if present; returns null otherwise. + + + + Get the non default policy. + + to search. + The interface the policy is registered under. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy in the list, if present; returns null otherwise. + + + + Sets an individual policy. + + The interface the policy is registered under. + to add the policy to. + The policy to be registered. + The key the policy applies. + + + + Sets a default policy. When checking for a policy, if no specific individual policy + is available, the default will be used. + + The interface to register the policy under. + to add the policy to. + The default policy to be registered. + + + + Base class for the current operation stored in the build context. + + + + + Create a new . + + Type currently being built. + + + + The type that's currently being built. + + + + + Build plan for that will return a Func that will resolve the requested type + through this container later. + + + + + A build plan is an object that, when invoked, will create a new object + or fill in a given existing one. It encapsulates all the information + gathered by the strategies to construct a particular object. + + + + + Creates an instance of this build plan's type, or fills + in the existing type if passed in. + + Context used to build up the object. + + + + Creates an instance of this build plan's type, or fills + in the existing type if passed in. + + Context used to build up the object. + + + + The almost inevitable collection of extra helper methods on + to augment the rich set of what + LINQ already gives us. + + + + + Execute the provided on every item in . + + Type of the items stored in + Sequence of items to process. + Code to run over each item. + + + + Create a single string from a sequence of items, separated by the provided , + and with the conversion to string done by the given . + + This method does basically the same thing as , + but will work on any sequence of items, not just arrays. + Type of items in the sequence. + Sequence of items to convert. + Separator to place between the items in the string. + The conversion function to change TItem -> string. + The resulting string. + + + + Create a single string from a sequence of items, separated by the provided , + and with the conversion to string done by the item's method. + + This method does basically the same thing as , + but will work on any sequence of items, not just arrays. + Type of items in the sequence. + Sequence of items to convert. + Separator to place between the items in the string. + The resulting string. + + + + A class that lets you + override a named parameter passed to a constructor. + + + + + Construct a new object that will + override the given named constructor parameter, and pass the given + value. + + Name of the constructor parameter. + Value to pass for the constructor. + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + A convenience form of that lets you + specify multiple parameter overrides in one shot rather than having + to construct multiple objects. + + + + + When implemented in derived classes, this method is called from the + method to create the actual objects. + + Key value to create the resolver. + Value to store in the resolver. + The created . + + + + A that lets you override + the value for a specified property. + + + + + Create an instance of . + + The property name. + Value to use for the property. + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + A convenience form of that lets you + specify multiple property overrides in one shot rather than having + to construct multiple objects. + + + + + When implemented in derived classes, this method is called from the + method to create the actual objects. + + Key value to create the resolver. + Value to store in the resolver. + The created . + + + + Interface defining the configuration interface exposed by the + Static Factory extension. + + + + + Base interface for all extension configuration interfaces. + + + + + Retrieve the container instance that we are currently configuring. + + + + + Register the given factory delegate to be called when the container is + asked to resolve . + + Type that will be requested from the container. + Delegate to invoke to create the instance. + The container extension object this method was invoked on. + + + + Register the given factory delegate to be called when the container is + asked to resolve and . + + Type that will be requested from the container. + The name that will be used when requesting to resolve this type. + Delegate to invoke to create the instance. + The container extension object this method was invoked on. + + + + Represents the context in which a build-up or tear-down operation runs. + + + + + Represents the context in which a build-up or tear-down operation runs. + + + + + Add a new set of resolver override objects to the current build operation. + + objects to add. + + + + Get a object for the given + or null if that dependency hasn't been overridden. + + Type of the dependency. + Resolver to use, or null if no override matches for the current operation. + + + + A convenience method to do a new buildup operation on an existing context. + + Key to use to build up. + Created object. + + + + A convenience method to do a new buildup operation on an existing context. This + overload allows you to specify extra policies which will be in effect for the duration + of the build. + + Key defining what to build up. + A delegate that takes a . This + is invoked with the new child context before the build up process starts. This gives callers + the opportunity to customize the context for the build process. + Created object. + + + + Gets the head of the strategy chain. + + + The strategy that's first in the chain; returns null if there are no + strategies in the chain. + + + + + Gets the associated with the build. + + + The associated with the build. + + + + + Gets the original build key for the build operation. + + + The original build key for the build operation. + + + + + Get the current build key for the current build operation. + + + + + The set of policies that were passed into this context. + + This returns the policies passed into the context. + Policies added here will remain after buildup completes. + The persistent policies for the current context. + + + + Gets the policies for the current context. + + Any policies added to this object are transient + and will be erased at the end of the buildup. + + The policies for the current context. + + + + + Gets the collection of objects + that need to execute in event of an exception. + + + + + The current object being built up or torn down. + + + The current object being manipulated by the build operation. May + be null if the object hasn't been created yet. + + + + Flag indicating if the build operation should continue. + + true means that building should not call any more + strategies, false means continue to the next strategy. + + + + An object representing what is currently being done in the + build chain. Used to report back errors if there's a failure. + + + + + The build context used to resolve a dependency during the build operation represented by this context. + + + + + Initialize a new instance of the class. + + + + + Initialize a new instance of the class with a , + , and the + build key used to start this build operation. + + The to use for this context. + The to use for this context. + The to use for this context. + Build key to start building. + The existing object to build up. + + + + Create a new using the explicitly provided + values. + + The to use for this context. + The to use for this context. + The set of persistent policies to use for this context. + The set of transient policies to use for this context. It is + the caller's responsibility to ensure that the transient and persistent policies are properly + combined. + Build key for this context. + Existing object to build up. + + + + Create a new using the explicitly provided + values. + + The to use for this context. + The to use for this context. + The set of persistent policies to use for this context. + The set of transient policies to use for this context. It is + the caller's responsibility to ensure that the transient and persistent policies are properly + combined. + Build key for this context. + The resolver overrides. + + + + Add a new set of resolver override objects to the current build operation. + + objects to add. + + + + Get a object for the given + or null if that dependency hasn't been overridden. + + Type of the dependency. + Resolver to use, or null if no override matches for the current operation. + + + + A convenience method to do a new buildup operation on an existing context. + + Key to use to build up. + Created object. + + + + A convenience method to do a new buildup operation on an existing context. This + overload allows you to specify extra policies which will be in effect for the duration + of the build. + + Key defining what to build up. + A delegate that takes a . This + is invoked with the new child context before the build up process starts. This gives callers + the opportunity to customize the context for the build process. + Created object. + + + + Gets the head of the strategy chain. + + + The strategy that's first in the chain; returns null if there are no + strategies in the chain. + + + + + Get the current build key for the current build operation. + + + + + The current object being built up or torn down. + + + The current object being manipulated by the build operation. May + be null if the object hasn't been created yet. + + + + Gets the associated with the build. + + + The associated with the build. + + + + + Gets the original build key for the build operation. + + + The original build key for the build operation. + + + + + The set of policies that were passed into this context. + + This returns the policies passed into the context. + Policies added here will remain after buildup completes. + The persistent policies for the current context. + + + + Gets the policies for the current context. + + + Any modifications will be transient (meaning, they will be forgotten when + the outer BuildUp for this context is finished executing). + + + The policies for the current context. + + + + + Gets the collection of objects + that need to execute in event of an exception. + + + + + Flag indicating if the build operation should continue. + + true means that building should not call any more + strategies, false means continue to the next strategy. + + + + An object representing what is currently being done in the + build chain. Used to report back errors if there's a failure. + + + + + The build context used to resolve a dependency during the build operation represented by this context. + + + + + Represents that a dependency could not be resolved. + + + + + Initializes a new instance of the class with no extra information. + + + + + Initializes a new instance of the class with the given message. + + Some random message. + + + + Initialize a new instance of the class with the given + message and inner exception. + + Some random message + Inner exception. + + + + Initializes a new instance of the class with the build key of the object begin built. + + The build key of the object begin built. + + + + The exception thrown when injection is attempted on a method + that is an open generic or has out or ref params. + + + + + Construct a new with no + message. + + + + + Construct a with the given message + + Message to return. + + + + Construct a with the given message + and inner exception. + + Message to return. + Inner exception + + + + Extension methods to provide convenience overloads over the + interface. + + + + + Start a recursive build up operation to retrieve the default + value for the given type. + + Type of object to build. + Parent context. + Resulting object. + + + + Start a recursive build up operation to retrieve the named + implementation for the given type. + + Type to resolve. + Parent context. + Name to resolve with. + The resulting object. + + + + Add a set of s to the context, specified as a + variable argument list. + + Context to add overrides to. + The overrides. + + + + Data structure that stores the set of + objects and executes them when requested. + + + + + Add a new object to this + list. + + Object to add. + + + + Execute the method + of everything in the recovery list. Recoveries will execute + in the opposite order of add - it's a stack. + + + + + Return the number of recovery objects currently in the stack. + + + + + Represents a lifetime container. + + + A lifetime container tracks the lifetime of an object, and implements + IDisposable. When the container is disposed, any objects in the + container which implement IDisposable are also disposed. + + + + + Adds an object to the lifetime container. + + The item to be added to the lifetime container. + + + + Determine if a given object is in the lifetime container. + + + The item to locate in the lifetime container. + + + Returns true if the object is contained in the lifetime + container; returns false otherwise. + + + + + Removes an item from the lifetime container. The item is + not disposed. + + The item to be removed. + + + + Gets the number of references in the lifetime container + + + The number of references in the lifetime container + + + + + Represents a lifetime container. + + + A lifetime container tracks the lifetime of an object, and implements + IDisposable. When the container is disposed, any objects in the + container which implement IDisposable are also disposed. + + + + + Adds an object to the lifetime container. + + The item to be added to the lifetime container. + + + + Determine if a given object is in the lifetime container. + + + The item to locate in the lifetime container. + + + Returns true if the object is contained in the lifetime + container; returns false otherwise. + + + + + Releases the resources used by the . + + + + + Releases the resources used by the . + + + true to release managed and unmanaged resources; false to release only unmanaged resources. + + + + + Returns an enumerator that iterates through the lifetime container. + + + An object that can be used to iterate through the life time container. + + + + + Returns an enumerator that iterates through the lifetime container. + + + An object that can be used to iterate through the life time container. + + + + + Removes an item from the lifetime container. The item is + not disposed. + + The item to be removed. + + + + Gets the number of references in the lifetime container + + + The number of references in the lifetime container + + + + + A custom collection over objects. + + + + + Removes an individual policy type for a build key. + + The type of policy to remove. + The key the policy applies. + + + + Removes all policies from the list. + + + + + Removes a default policy. + + The type the policy was registered as. + + + + Gets an individual policy. + + The interface the policy is registered under. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy list in the chain that the searched for policy was found in, null if the policy was + not found. + The policy in the list, if present; returns null otherwise. + + + + Get the non default policy. + + The interface the policy is registered under. + The key the policy applies to. + True if the search should be in the local policy list only; otherwise false to search up the parent chain. + The policy list in the chain that the searched for policy was found in, null if the policy was + not found. + The policy in the list if present; returns null otherwise. + + + + Sets an individual policy. + + The of the policy. + The policy to be registered. + The key the policy applies. + + + + Sets a default policy. When checking for a policy, if no specific individual policy + is available, the default will be used. + + The interface to register the policy under. + The default policy to be registered. + + + + A custom collection wrapper over objects. + + + + + Initialize a new instance of a class. + + + + + Initialize a new instance of a class with another policy list. + + An inner policy list to search. + + + + Removes an individual policy type for a build key. + + The type of policy to remove. + The key the policy applies. + + + + Removes all policies from the list. + + + + + Removes a default policy. + + The type the policy was registered as. + + + + Gets an individual policy. + + The interface the policy is registered under. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy list in the chain that the searched for policy was found in, null if the policy was + not found. + The policy in the list, if present; returns null otherwise. + + + + Get the non default policy. + + The interface the policy is registered under. + The key the policy applies to. + True if the search should be in the local policy list only; otherwise false to search up the parent chain. + The policy list in the chain that the searched for policy was found in, null if the policy was + not found. + The policy in the list if present; returns null otherwise. + + + + Sets an individual policy. + + The of the policy. + The policy to be registered. + The key the policy applies. + + + + Sets a default policy. When checking for a policy, if no specific individual policy + is available, the default will be used. + + The interface to register the policy under. + The default policy to be registered. + + + + Gets the number of items in the locator. + + + The number of items in the locator. + + + + + An implementation of . + + + + + Add a new object to this + list. + + Object to add. + + + + Execute the method + of everything in the recovery list. Recoveries will execute + in the opposite order of add - it's a stack. + + + + + Return the number of recovery objects currently in the stack. + + + + + Implementation of which will notify an object about + the completion of a BuildUp operation, or start of a TearDown operation. + + + This strategy checks the object that is passing through the builder chain to see if it + implements IBuilderAware and if it does, it will call + and . This strategy is meant to be used from the + stage. + + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + Called during the chain of responsibility for a teardown operation. The + PreTearDown method is called when the chain is being executed in the + forward direction. + + Context of the teardown operation. + + + + Implemented on a class when it wants to receive notifications + about the build process. + + + + + Called by the when the object is being built up. + + The key of the object that was just built up. + + + + Called by the when the object is being torn down. + + + + + Enumeration to represent the object builder stages. + + + The order of the values in the enumeration is the order in which the stages are run. + + + + + Strategies in this stage run before creation. Typical work done in this stage might + include strategies that use reflection to set policies into the context that other + strategies would later use. + + + + + Strategies in this stage create objects. Typically you will only have a single policy-driven + creation strategy in this stage. + + + + + Strategies in this stage work on created objects. Typical work done in this stage might + include setter injection and method calls. + + + + + Strategies in this stage work on objects that are already initialized. Typical work done in + this stage might include looking to see if the object implements some notification interface + to discover when its initialization stage has been completed. + + + + + Represents a builder policy for mapping build keys. + + + + + Represents a builder policy for mapping build keys. + + + + + Maps the build key. + + The build key to map. + Current build context. Used for contextual information + if writing a more sophisticated mapping. This parameter can be null + (called when getting container registrations). + The new build key. + + + + Initialize a new instance of the with the new build key. + + The new build key. + + + + Maps the build key. + + The build key to map. + Current build context. Used for contextual information + if writing a more sophisticated mapping, unused in this implementation. + The new build key. + + + + Represents a strategy for mapping build keys in the build up operation. + + + + + Called during the chain of responsibility for a build operation. Looks for the + and if found maps the build key for the current operation. + + The context for the operation. + + + + An implementation of that can map + generic types. + + + + + Create a new instance + that will map generic types. + + Build key to map to. This must be or contain an open generic type. + + + + Maps the build key. + + The build key to map. + Current build context. Used for contextual information + if writing a more sophisticated mapping. + The new build key. + + + + A that will look for a build plan + in the current context. If it exists, it invokes it, otherwise + it creates one and stores it for later, and invokes it. + + + + + Called during the chain of responsibility for a build operation. + + The context for the operation. + + + + An implementation of that chooses + constructors based on these criteria: first, pick a constructor marked with the + attribute. If there + isn't one, then choose the constructor with the longest parameter list. If that is ambiguous, + then throw. + + Thrown when the constructor to choose is ambiguous. + Attribute used to mark the constructor to call. + + + + Base class that provides an implementation of + which lets you override how the parameter resolvers are created. + + + + + A that, when implemented, + will determine which constructor to call from the build plan. + + + + + Choose the constructor to call for the given type. + + Current build context + The to add any + generated resolver objects into. + The chosen constructor. + + + + Choose the constructor to call for the given type. + + Current build context + The to add any + generated resolver objects into. + The chosen constructor. + + + + Create a instance for the given + . + + Parameter to create the resolver for. + The resolver object. + + + + Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other. + + The second object to compare. + The first object to compare. + + Value Condition Less than zero is less than y. Zero equals y. Greater than zero is greater than y. + + + + + Create a instance for the given + . + + Parameter to create the resolver for. + The resolver object. + + + + Objects of this type are the return value from . + It encapsulates the desired with the string keys + needed to look up the for each + parameter. + + + + + Base class for return values from selector policies that + return a MemberInfo of some sort plus a list of parameter + keys to look up the parameter resolvers. + + + + + Base class for return of selector policies that need + to keep track of a set of parameter resolvers. + + + + + Adds the parameter resolver. Resolvers are assumed + to be in the order of the parameters to the member. + + The new resolver. + + + + Gets the parameter resolvers. + + An array with the parameter resolvers. + + + + Construct a new , storing + the given member info. + + Member info to store. + + + + The member info stored. + + + + + Create a new instance which + contains the given constructor. + + The constructor to wrap. + + + + The constructor this object wraps. + + + + + This class records the information about which constructor argument is currently + being resolved, and is responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + The type that is being constructed. + A string representing the constructor being called. + Parameter being resolved. + + + + Generate the string describing what parameter was being resolved. + + The description string. + + + + String describing the constructor being set up. + + + + + Parameter that's being resolved. + + + + + A that emits IL to call constructors + as part of creating a build plan. + + + + + Called during the chain of responsibility for a build operation. + + Existing object is an instance of . + The context for the operation. + + + + A helper method used by the generated IL to set up a PerResolveLifetimeManager lifetime manager + if the current object is such. + + Current build context. + + + + Build up the string that will represent the constructor signature + in any exception message. + + + + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + A helper method used by the generated IL to throw an exception if + no existing object is present, but the user is attempting to build + an interface (usually due to the lack of a type mapping). + + The currently being + used for the build of this object. + + + + A helper method used by the generated IL to throw an exception if + no existing object is present, but the user is attempting to build + an abstract class (usually due to the lack of a type mapping). + + The currently being + used for the build of this object. + + + + A helper method used by the generated IL to throw an exception if + no existing object is present, but the user is attempting to build + an delegate other than Func{T} or Func{IEnumerable{T}}. + + The currently being + used for the build of this object. + + + + A helper method used by the generated IL to throw an exception if + a dependency cannot be resolved. + + The currently being + used for the build of this object. + + + + A helper method used by the generated IL to throw an exception if + a dependency cannot be resolved because of an invalid constructor. + + The currently being + used for the build of this object. + The signature of the invalid constructor. + + + + A class that records that a constructor is about to be call, and is + responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + + + + Generate the description string. + + The string. + + + + Constructor we're trying to call. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Helper method used by generated IL to look up a dependency resolver based on the given key. + + Current build context. + Type of the dependency being resolved. + Key the resolver was stored under. + The found dependency resolver. + + + + Helper method used by generated IL to look up a dependency resolver based on the given key. + + Current build context. + Type of the dependency being resolved. + The configured resolver. + The found dependency resolver. + + + + The type that is to be built with the dynamic build plan. + + + + + The context parameter representing the used when the build plan is executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + An implementation + that constructs a build plan via dynamic IL emission. + + + + + Construct a that + uses the given strategy chain to construct the build plan. + + The strategy chain. + + + + Construct a build plan. + + The current build context. + The current build key. + The created build plan. + + + + A class that records that a constructor is about to be call, and is + responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + + + + Generate the description string. + + The string. + + + + Method we're trying to call. + + + + + This class records the information about which constructor argument is currently + being resolved, and is responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + The type that is being constructed. + A string representing the method being called. + Parameter being resolved. + + + + Generate the string describing what parameter was being resolved. + + The description string. + + + + String describing the method being set up. + + + + + Parameter that's being resolved. + + + + + A that generates IL to call + chosen methods (as specified by the current ) + as part of object build up. + + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + A base class that holds the information shared by all operations + performed by the container while setting properties. + + + + + Initializes a new instance of the class. + + + + + Generate the description of this operation. + + The string. + + + + Get a format string used to create the description. Called by + the base method. + + The format string. + + + + The property value currently being resolved. + + + + + This class records the information about which property value is currently + being resolved, and is responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + + + + Get a format string used to create the description. Called by + the base method. + + The format string. + + + + A that generates IL to resolve properties + on an object being built. + + + + + Called during the chain of responsibility for a build operation. + + The context for the operation. + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + This class records the information about which property value is currently + being set, and is responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + Type property is on. + Name of property being set. + + + + Get a format string used to create the description. Called by + the base method. + + The format string. + + + + Creates an instance of this build plan's type, or fills + in the existing type if passed in. + + Context used to build up the object. + + + + An that will examine the given + types and return a sequence of objects + that should be called as part of building the object. + + + + + Return the sequence of methods to call while building the target object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of methods to call. + + + + An implementation of that selects + methods by looking for the given + attribute on those methods. + + Type of attribute used to mark methods + to inject. + + + + Base class that provides an implementation of + which lets you override how the parameter resolvers are created. + + Attribute that marks methods that should + be called. + + + + Return the sequence of methods to call while building the target object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of methods to call. + + + + Create a instance for the given + . + + Parameter to create the resolver for. + The resolver object. + + + + Create a instance for the given + . + + Parameter to create the resolver for. + The resolver object. + + + + Objects of this type are the return value from . + It encapsulates the desired with the string keys + needed to look up the for each + parameter. + + + + + Create a new instance which + contains the given method. + + The method + + + + The constructor this object wraps. + + + + + An that returns a sequence + of properties that should be injected for the given type. + + + + + Returns sequence of properties on the given type that + should be set as part of building that object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of objects + that contain the properties to set. + + + + Base class that provides an implementation of + which lets you override how the parameter resolvers are created. + + + + + Returns sequence of properties on the given type that + should be set as part of building that object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of objects + that contain the properties to set. + + + + Create a for the given + property. + + Property to create resolver for. + The resolver object. + + + + An implementation of that looks + for properties marked with the + attribute that are also settable and not indexers. + + + + + + Create a for the given + property. + + Property to create resolver for. + The resolver object. + + + + Objects of this type are returned from + . + This class combines the about + the property with the string key used to look up the resolver + for this property's value. + + + + + Create an instance of + with the given and key. + + The property. + + + + + PropertyInfo for this property. + + + + + IDependencyResolverPolicy for this property + + + + + Implementation of . + + + + + A builder policy that lets you keep track of the current + resolvers and will remove them from the given policy set. + + + + + Add a new resolver to track by key. + + Key that was used to add the resolver to the policy set. + + + + Remove the currently tracked resolvers from the given policy list. + + Policy list to remove the resolvers from. + + + + Add a new resolver to track by key. + + Key that was used to add the resolver to the policy set. + + + + Remove the currently tracked resolvers from the given policy list. + + Policy list to remove the resolvers from. + + + + Get an instance that implements , + either the current one in the policy set or creating a new one if it doesn't + exist. + + Policy list to look up from. + Build key to track. + The resolver tracker. + + + + Add a key to be tracked to the current tracker. + + Policy list containing the resolvers and trackers. + Build key for the resolvers being tracked. + Key for the resolver. + + + + Remove the resolvers for the given build key. + + Policy list containing the build key. + Build key. + + + + An implementation of that + calls back into the build chain to build up the dependency, passing + a type given at compile time as its build key. + + + + + Create a new instance storing the given type. + + Type to resolve. + + + + Get the value for a dependency. + + Current build context. + The value for the dependency. + + + + This interface defines a standard method to convert any regardless + of the stage enum into a regular, flat strategy chain. + + + + + Convert this into + a flat . + + The flattened . + + + + Represents a chain of responsibility for builder strategies. + + + + + Reverse the order of the strategy chain. + + The reversed strategy chain. + + + + Execute this strategy chain against the given context, + calling the Buildup methods on the strategies. + + Context for the build process. + The build up object + + + + Execute this strategy chain against the given context, + calling the TearDown methods on the strategies. + + Context for the teardown process. + + + + A builder policy used to create lifetime policy instances. + Used by the LifetimeStrategy when instantiating open + generic types. + + + + + Create a new instance of . + + The new instance. + + + + The type of Lifetime manager that will be created by this factory. + + + + + An implementation that uses + a to figure out if an object + has already been created and to update or remove that + object from some backing store. + + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + Called during the chain of responsibility for a build operation. The + PostBuildUp method is called when the chain has finished the PreBuildUp + phase and executes in reverse order from the PreBuildUp calls. + + Context of the build operation. + + + + Represents a chain of responsibility for builder strategies partitioned by stages. + + The stage enumeration to partition the strategies. + + + + Initialize a new instance of the class. + + + + + Initialize a new instance of the class with an inner strategy chain to use when building. + + The inner strategy chain to use first when finding strategies in the build operation. + + + + Adds a strategy to the chain at a particular stage. + + The strategy to add to the chain. + The stage to add the strategy. + + + + Add a new strategy for the . + + The of + The stage to add the strategy. + + + + Clear the current strategy chain list. + + + This will not clear the inner strategy chain if this instance was created with one. + + + + + Makes a strategy chain based on this instance. + + A new . + + + + Represents a chain of responsibility for builder strategies. + + + + + Initialize a new instance of the class. + + + + + Initialize a new instance of the class with a collection of strategies. + + A collection of strategies to initialize the chain. + + + + Adds a strategy to the chain. + + The strategy to add to the chain. + + + + Adds strategies to the chain. + + The strategies to add to the chain. + + + + Reverse the order of the strategy chain. + + The reversed strategy chain. + + + + Execute this strategy chain against the given context to build up. + + Context for the build processes. + The build up object + + + + Execute this strategy chain against the given context, + calling the TearDown methods on the strategies. + + Context for the teardown process. + + + + Returns an enumerator that iterates through the collection. + + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + + An object that can be used to iterate through the collection. + + + + + Build key used to combine a type object with a string name. Used by + ObjectBuilder to indicate exactly what is being built. + + + + + Create a new instance with the given + type and name. + + to build. + Key to use to look up type mappings and singletons. + + + + Create a new instance for the default + buildup of the given type. + + to build. + + + + This helper method creates a new instance. It is + initialized for the default key for the given type. + + Type to build. + A new instance. + + + + This helper method creates a new instance for + the given type and key. + + Type to build + Key to use to look up type mappings and singletons. + A new instance initialized with the given type and name. + + + + Compare two instances. + + Two instances compare equal + if they contain the same name and the same type. Also, comparing + against a different type will also return false. + Object to compare to. + True if the two keys are equal, false if not. + + + + Calculate a hash code for this instance. + + A hash code. + + + + Compare two instances for equality. + + Two instances compare equal + if they contain the same name and the same type. + First of the two keys to compare. + Second of the two keys to compare. + True if the values of the keys are the same, else false. + + + + Compare two instances for inequality. + + Two instances compare equal + if they contain the same name and the same type. If either field differs + the keys are not equal. + First of the two keys to compare. + Second of the two keys to compare. + false if the values of the keys are the same, else true. + + + + Formats the build key as a string (primarily for debugging). + + A readable string representation of the build key. + + + + Return the stored in this build key. + + The type to build. + + + + Returns the name stored in this build key. + + The name to use when building. + + + + A generic version of so that + you can new up a key using generic syntax. + + Type for the key. + + + + Construct a new that + specifies the given type. + + + + + Construct a new that + specifies the given type and name. + + Name for the key. + + + + A series of helper methods to deal with sequences - + objects that implement . + + + + + A function that turns an arbitrary parameter list into an + . + + Type of arguments. + The items to put into the collection. + An array that contains the values of the . + + + + Given two sequences, return a new sequence containing the corresponding values + from each one. + + Type of first sequence. + Type of second sequence. + First sequence of items. + Second sequence of items. + New sequence of pairs. This sequence ends when the shorter of sequence1 and sequence2 does. + + + + A that lets you register a + delegate with the container to create an object, rather than calling + the object's constructor. + + + + + Base class for all extension objects. + + + + + The container calls this method when the extension is added. + + A instance that gives the + extension access to the internals of the container. + + + + Initial the container with this extension's functionality. + + + When overridden in a derived class, this method will modify the given + by adding strategies, policies, etc. to + install it's functions into the container. + + + + Removes the extension's functions from the container. + + + + This method is called when extensions are being removed from the container. It can be + used to do things like disconnect event handlers or clean up member state. You do not + need to remove strategies or policies here; the container will do that automatically. + + + The default implementation of this method does nothing. + + + + + The container this extension has been added to. + + The that this extension has been added to. + + + + The object used to manipulate + the inner state of the container. + + + + + Initialize this extension. This particular extension requires no + initialization work. + + + + + Register the given factory delegate to be called when the container is + asked to resolve and . + + Type that will be requested from the container. + The name that will be used when requesting to resolve this type. + Delegate to invoke to create the instance. + The container extension object this method was invoked on. + + + + Register the given factory delegate to be called when the container is + asked to resolve . + + Type that will be requested from the container. + Delegate to invoke to create the instance. + The container extension object this method was invoked on. + + + + An implementation of that + acts as a decorator over another . + This checks to see if the current type being built is the + right one before checking the inner . + + + + + Create an instance of + + Type to check for. + Inner override to check after type matches. + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + A convenience version of that lets you + specify the type to construct via generics syntax. + + Type to check for. + + + + Create an instance of . + + Inner override to check after type matches. + + + + Extension class that adds a set of convenience overloads to the + interface. + + + + + Register a type with specific members to be injected. + + Type this registration is for. + Container to configure. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container. + + + + This method is used to tell the container that when asked for type , + actually return an instance of type . This is very useful for + getting instances of interfaces. + + + This overload registers a default mapping and transient lifetime. + + + that will be requested. + that will actually be returned. + Container to configure. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container, where the created instances will use + the given . + + that will be requested. + that will actually be returned. + Container to configure. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container. + + + This method is used to tell the container that when asked for type , + actually return an instance of type . This is very useful for + getting instances of interfaces. + + that will be requested. + that will actually be returned. + Container to configure. + Name of this mapping. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container, where the created instances will use + the given . + + that will be requested. + that will actually be returned. + Container to configure. + Name to use for registration, null if a default registration. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type with the container. + No type mapping is performed for this type. + + The type to apply the to. + Container to configure. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type with the container. + No type mapping is performed for this type. + + The type to configure injection on. + Container to configure. + Name that will be used to request the type. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type and name with the container. + No type mapping is performed for this type. + + The type to apply the to. + Container to configure. + Name that will be used to request the type. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type with specific members to be injected. + + Container to configure. + Type this registration is for. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container. + + + + This method is used to tell the container that when asked for type , + actually return an instance of type . This is very useful for + getting instances of interfaces. + + + This overload registers a default mapping. + + + Container to configure. + that will be requested. + that will actually be returned. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container. + + + This method is used to tell the container that when asked for type , + actually return an instance of type . This is very useful for + getting instances of interfaces. + + Container to configure. + that will be requested. + that will actually be returned. + Name to use for registration, null if a default registration. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container, where the created instances will use + the given . + + Container to configure. + that will be requested. + that will actually be returned. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type and name with the container. + No type mapping is performed for this type. + + Container to configure. + The to apply the to. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type and name with the container. + No type mapping is performed for this type. + + Container to configure. + The to configure in the container. + Name to use for registration, null if a default registration. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type and name with the container. + No type mapping is performed for this type. + + Container to configure. + The to apply the to. + Name to use for registration, null if a default registration. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload does a default registration and has the container take over the lifetime of the instance. + + Type of instance to register (may be an implemented interface instead of the full type). + Container to configure. + Object to returned. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload does a default registration (name = null). + + + Type of instance to register (may be an implemented interface instead of the full type). + Container to configure. + Object to returned. + + object that controls how this instance will be managed by the container. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload automatically has the container take ownership of the . + + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + Container to configure. + Name for registration. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + Container to configure. + Name for registration. + + object that controls how this instance will be managed by the container. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload does a default registration and has the container take over the lifetime of the instance. + + Container to configure. + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload does a default registration (name = null). + + + Container to configure. + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + + object that controls how this instance will be managed by the container. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload automatically has the container take ownership of the . + + Container to configure. + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + Name for registration. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Resolve an instance of the default requested type from the container. + + of object to get from the container. + Container to resolve from. + Any overrides for the resolve call. + The retrieved object. + + + + Resolve an instance of the requested type with the given name from the container. + + of object to get from the container. + Container to resolve from. + Name of the object to retrieve. + Any overrides for the resolve call. + The retrieved object. + + + + Resolve an instance of the default requested type from the container. + + Container to resolve from. + of object to get from the container. + Any overrides for the resolve call. + The retrieved object. + + + + Return instances of all registered types requested. + + + + This method is useful if you've registered multiple types with the same + but different names. + + + Be aware that this method does NOT return an instance for the default (unnamed) registration. + + + The type requested. + Container to resolve from. + Any overrides for the resolve calls. + Set of objects of type . + + + + Run an existing object through the container and perform injection on it. + + + + This method is useful when you don't control the construction of an + instance (ASP.NET pages or objects created via XAML, for instance) + but you still want properties and other injection performed. + + + This overload uses the default registrations. + + + of object to perform injection on. + Container to resolve through. + Instance to build up. + Any overrides for the buildup. + The resulting object. By default, this will be , but + container extensions may add things like automatic proxy creation which would + cause this to return a different object (but still type compatible with ). + + + + Run an existing object through the container and perform injection on it. + + + + This method is useful when you don't control the construction of an + instance (ASP.NET pages or objects created via XAML, for instance) + but you still want properties and other injection performed. + + of object to perform injection on. + Container to resolve through. + Instance to build up. + name to use when looking up the typemappings and other configurations. + Any overrides for the Buildup. + The resulting object. By default, this will be , but + container extensions may add things like automatic proxy creation which would + cause this to return a different object (but still type compatible with ). + + + + Run an existing object through the container and perform injection on it. + + + + This method is useful when you don't control the construction of an + instance (ASP.NET pages or objects created via XAML, for instance) + but you still want properties and other injection performed. + + + This overload uses the default registrations. + + + Container to resolve through. + of object to perform injection on. + Instance to build up. + Any overrides for the Buildup. + The resulting object. By default, this will be , but + container extensions may add things like automatic proxy creation which would + cause this to return a different object (but still type compatible with ). + + + + Creates a new extension object and adds it to the container. + + Type of to add. The extension type + will be resolved from within the supplied . + Container to add the extension to. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Resolve access to a configuration interface exposed by an extension. + + Extensions can expose configuration interfaces as well as adding + strategies and policies to the container. This method walks the list of + added extensions and returns the first one that implements the requested type. + + The configuration interface required. + Container to configure. + The requested extension's configuration interface, or null if not found. + + + + Check if a particular type has been registered with the container with + the default name. + + Container to inspect. + Type to check registration for. + True if this type has been registered, false if not. + + + + Check if a particular type/name pair has been registered with the container. + + Container to inspect. + Type to check registration for. + Name to check registration for. + True if this type/name pair has been registered, false if not. + + + + Check if a particular type has been registered with the container with the default name. + + Type to check registration for. + Container to inspect. + True if this type has been registered, false if not. + + + + Check if a particular type/name pair has been registered with the container. + + Type to check registration for. + Container to inspect. + Name to check registration for. + True if this type/name pair has been registered, false if not. + + + + The class provides the means for extension objects + to manipulate the internal state of the . + + + + + Store a type/name pair for later resolution. + + + + When users register type mappings (or other things) with a named key, this method + allows you to register that name with the container so that when the + method is called, that name is included in the list that is returned. + + to register. + Name associated with that type. + + + + The container that this context is associated with. + + The object. + + + + The strategies this container uses. + + The that the container uses to build objects. + + + + The strategies this container uses to construct build plans. + + The that this container uses when creating + build plans. + + + + The policies this container uses. + + The the that container uses to build objects. + + + + The that this container uses. + + The is used to manage objects that the container is managing. + + + + This event is raised when the method, + or one of its overloads, is called. + + + + + This event is raised when the method, + or one of its overloads, is called. + + + + + This event is raised when the method is called, providing + the newly created child container to extensions to act on as they see fit. + + + + + An EventArgs class that holds a string Name. + + + + + Create a new with a null name. + + + + + Create a new with the given name. + + Name to store. + + + + The name. + + Name used for this EventArg object. + + + + Event argument class for the event. + + + + + Create a new instance of . + + Type to map from. + Type to map to. + Name for the registration. + to manage instances. + + + + Type to map from. + + + + + Type to map to. + + + + + to manage instances. + + + + + Event argument class for the event. + + + + + Create a default instance. + + + + + Create a instance initialized with the given arguments. + + Type of instance being registered. + The instance object itself. + Name to register under, null if default registration. + object that handles how + the instance will be owned. + + + + Type of instance being registered. + + + Type of instance being registered. + + + + + Instance object being registered. + + Instance object being registered + + + + that controls ownership of + this instance. + + + + + A that lets you specify that + an instance of a generic type parameter should be resolved. + + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + name to use when looking up in the container. + + + + Return a instance that will + return this types value for the parameter. + + The actual type to resolve. + The resolution key. + The . + + + + A that lets you specify that + an array containing the registered instances of a generic type parameter + should be resolved. + + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + The values for the elements, that will + be converted to objects. + + + + Test to see if this parameter value has a matching type for the given type. + + Type to check. + True if this parameter value is compatible with type , + false if not. + A type is considered compatible if it is an array type of rank one + and its element type is a generic type parameter with a name matching this generic + parameter name configured for the receiver. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + Name for the type represented by this . + This may be an actual type name or a generic argument name. + + + + + A Unity container extension that allows you to configure + which constructors, properties, and methods get injected + via an API rather than through attributes. + + + + + Initial the container with this extension's functionality. + + + When overridden in a derived class, this method will modify the given + by adding strategies, policies, etc. to + install it's functions into the container. + + + + API to configure the injection settings for a particular type. + + Type the injection is being configured for. + Objects containing the details on which members to inject and how. + This extension object. + + + + API to configure the injection settings for a particular type/name pair. + + Type the injection is being configured for. + Name of registration + Objects containing the details on which members to inject and how. + This extension object. + + + + API to configure the injection settings for a particular type. + + Type to configure. + Objects containing the details on which members to inject and how. + This extension object. + + + + API to configure the injection settings for a particular type/name pair. + + Type to configure. + Name of registration. + Objects containing the details on which members to inject and how. + This extension object. + + + + API to configure the injection settings for a particular type/name pair. + + Type of interface/base class being registered (may be null). + Type of actual implementation class being registered. + Name of registration. + Objects containing the details on which members to inject and how. + This extension object. + + + + A class that holds the collection of information + for a constructor, so that the container can + be configured to call this constructor. + + + + + Create a new instance of that looks + for a constructor with the given set of parameters. + + The values for the parameters, that will + be converted to objects. + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Interface registered, ignored in this implementation. + Type to register. + Name used to resolve the type object. + Policy list to add policies to. + + + + An that configures the + container to call a method as part of buildup. + + + + + Create a new instance which will configure + the container to call the given methods with the given parameters. + + Name of the method to call. + Parameter values for the method. + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Type of interface registered, ignored in this implementation. + Type to register. + Name used to resolve the type object. + Policy list to add policies to. + + + + A small function to handle name matching. You can override this + to do things like case insensitive comparisons. + + MethodInfo for the method you're checking. + Name of the method you're looking for. + True if a match, false if not. + + + + A class that holds on to the given value and provides + the required + when the container is configured. + + + + + Create an instance of that stores + the given value, using the runtime type of that value as the + type of the parameter. + + Value to be injected for this parameter. + + + + Create an instance of that stores + the given value, associated with the given type. + + Type of the parameter. + Value of the parameter + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + A generic version of that makes it a + little easier to specify the type of the parameter. + + Type of parameter. + + + + Create a new . + + Value for the parameter. + + + + This class stores information about which properties to inject, + and will configure the container accordingly. + + + + + Configure the container to inject the given property name, + resolving the value via the container. + + Name of the property to inject. + + + + Configure the container to inject the given property name, + using the value supplied. This value is converted to an + object using the + rules defined by the + method. + + Name of property to inject. + Value for property. + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Interface being registered, ignored in this implementation. + Type to register. + Name used to resolve the type object. + Policy list to add policies to. + + + + A class that stores a type, and generates a + resolver object that resolves all the named instances or the + type registered in a container. + + + + + Construct a new that + resolves to the given element type and collection of element values. + + The type of elements to resolve. + The values for the elements, that will + be converted to objects. + + + + Construct a new that + resolves to the given array and element types and collection of element values. + + The type for the array of elements to resolve. + The type of elements to resolve. + The values for the elements, that will + be converted to objects. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + A generic version of for convenience + when creating them by hand. + + Type of the elements for the array of the parameter. + + + + Construct a new that + resolves to the given element generic type with the given element values. + + The values for the elements, that will + be converted to objects. + + + + Interface defining the behavior of the Unity dependency injection container. + + + + + Register a type mapping with the container, where the created instances will use + the given . + + that will be requested. + that will actually be returned. + Name to use for registration, null if a default registration. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + Name for registration. + + object that controls how this instance will be managed by the container. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Resolve an instance of the requested type with the given name from the container. + + of object to get from the container. + Name of the object to retrieve. + Any overrides for the resolve call. + The retrieved object. + + + + Return instances of all registered types requested. + + + + This method is useful if you've registered multiple types with the same + but different names. + + + Be aware that this method does NOT return an instance for the default (unnamed) registration. + + + The type requested. + Any overrides for the resolve calls. + Set of objects of type . + + + + Run an existing object through the container and perform injection on it. + + + + This method is useful when you don't control the construction of an + instance (ASP.NET pages or objects created via XAML, for instance) + but you still want properties and other injection performed. + + of object to perform injection on. + Instance to build up. + name to use when looking up the TypeMappings and other configurations. + Any overrides for the resolve calls. + The resulting object. By default, this will be , but + container extensions may add things like automatic proxy creation which would + cause this to return a different object (but still type compatible with ). + + + + Run an existing object through the container, and clean it up. + + The object to tear down. + + + + Add an extension object to the container. + + to add. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Resolve access to a configuration interface exposed by an extension. + + Extensions can expose configuration interfaces as well as adding + strategies and policies to the container. This method walks the list of + added extensions and returns the first one that implements the requested type. + + of configuration interface required. + The requested extension's configuration interface, or null if not found. + + + + Remove all installed extensions from this container. + + + + This method removes all extensions from the container, including the default ones + that implement the out-of-the-box behavior. After this method, if you want to use + the container again you will need to either read the default extensions or replace + them with your own. + + + The registered instances and singletons that have already been set up in this container + do not get removed. + + + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Create a child container. + + + A child container shares the parent's configuration, but can be configured with different + settings or lifetime. + The new child container. + + + + The parent of this container. + + The parent container, or null if this container doesn't have one. + + + + Get a sequence of that describe the current state + of the container. + + + + + A that holds a weak reference to + it's managed instance. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. + + The object being stored. + + + + Remove the given object from backing store. + + + + + An implementation of that + creates instances of the type of the given Lifetime Manager + by resolving them through the container. + + + + + Create a new that will + return instances of the given type, creating them by + resolving through the container. + + Container to resolve with. + Type of LifetimeManager to create. + + + + Create a new instance of . + + The new instance. + + + + The type of Lifetime manager that will be created by this factory. + + + + + A that holds the instances given to it, + keeping one instance per thread. + + + + This LifetimeManager does not dispose the instances it holds. + + + + + + Initializes a new instance of the class. + + + + + Retrieve a value from the backing store associated with this Lifetime policy for the + current thread. + + the object desired, or if no such object is currently + stored for the current thread. + + + + Stores the given value into backing store for retrieval later when requested + in the current thread. + + The object being stored. + + + + Remove the given object from backing store. + + Not implemented for this lifetime manager. + + + + An implementation that does nothing, + thus ensuring that instances are created new every time. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. + + The object being stored. + + + + Remove the given object from backing store. + + + + + This strategy implements the logic that will call container.ResolveAll + when an array parameter is detected. + + + + + Do the PreBuildUp stage of construction. This is where the actual work is performed. + + Current build context. + + + + An implementation of that is + aware of the build keys used by the Unity container. + + + + + Create a instance for the given + . + + + This implementation looks for the Unity on the + parameter and uses it to create an instance of + for this parameter. + Parameter to create the resolver for. + The resolver object. + + + + An implementation of that is aware + of the build keys used by the Unity container. + + + + + Create a instance for the given + . + + Parameter to create the resolver for. + The resolver object. + + + + An implementation of that is aware of + the build keys used by the unity container. + + + + + Create a for the given + property. + + Property to create resolver for. + The resolver object. + + + + A implementation that returns + the value set in the constructor. + + + + + Create a new instance of + which will return the given value when resolved. + + The value to return. + + + + Get the value for a dependency. + + Current build context. + The value for the dependency. + + + + An implementation of that stores a + type and name, and at resolution time puts them together into a + . + + + + + Create an instance of + with the given type and name. + + The type. + The name (may be null). + + + + Resolve the value for a dependency. + + Current build context. + The value for the dependency. + + + + The type that this resolver resolves. + + + + + The name that this resolver resolves. + + + + + An implementation of that resolves to + to an array populated with the values that result from resolving other instances + of . + + + + + Create an instance of + with the given type and a collection of + instances to use when populating the result. + + The type. + The resolver policies to use when populating an array. + + + + Resolve the value for a dependency. + + Current build context. + An array populated with the results of resolving the resolver policies. + + + + An implementation of that selects + the given constructor and creates the appropriate resolvers to call it with + the specified parameters. + + + + + Create an instance of that + will return the given constructor, being passed the given injection values + as parameters. + + The constructor to call. + Set of objects + that describes how to obtain the values for the constructor parameters. + + + + Choose the constructor to call for the given type. + + Current build context + The to add any + generated resolver objects into. + The chosen constructor. + + + + Helper class for implementing selector policies that need to + set up dependency resolver policies. + + + + + Add dependency resolvers to the parameter set. + + Type that's currently being built (used to resolve open generics). + PolicyList to add the resolvers to. + Objects supplying the dependency resolvers. + Result object to store the keys in. + + + + A implementation that calls the specific + methods with the given parameters. + + + + + Add the given method and parameter collection to the list of methods + that will be returned when the selector's + method is called. + + Method to call. + sequence of objects + that describe how to create the method parameter values. + + + + Return the sequence of methods to call while building the target object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of methods to call. + + + + An implementation of which returns + the set of specific properties that the selector was configured with. + + + + + Add a property that will be par of the set returned when the + is called. + + The property to set. + object describing + how to create the value to inject. + + + + Returns sequence of properties on the given type that + should be set as part of building that object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of objects + that contain the properties to set. + + + + The exception thrown by the Unity container when + an attempt to resolve a dependency fails. + + + + + Create a new that records + the exception for the given type and name. + + Type requested from the container. + Name requested from the container. + The actual exception that caused the failure of the build. + The build context representing the failed operation. + + + + The type that was being requested from the container at the time of failure. + + + + + The name that was being requested from the container at the time of failure. + + + + + A class that stores a name and type, and generates a + resolver object that resolves the parameter via the + container. + + + + + Construct a new that + resolves to the given type. + + Type of this parameter. + + + + Construct a new that + resolves the given type and name. + + Type of this parameter. + Name to use when resolving parameter. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + A generic version of for convenience + when creating them by hand. + + Type of the parameter + + + + Create a new for the given + generic type and the default name. + + + + + Create a new for the given + generic type and name. + + Name to use to resolve this parameter. + + + + An implementation of that wraps a Unity container. + + + + + Initializes a new instance of the class for a container. + + The to wrap with the + interface implementation. + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + 2 + + + + When implemented by inheriting classes, this method will do the actual work of resolving + the requested service instance. + + Type of instance requested.Name of registered service you want. May be null. + + The requested service instance. + + + + + When implemented by inheriting classes, this method will do the actual work of + resolving all the requested service instances. + + Type of service requested. + + Sequence of service instance objects. + + + + + A static helper class that includes various parameter checking routines. + + + + + Throws if the given argument is null. + + if tested value if null. + Argument value to test. + Name of the argument being tested. + + + + Throws an exception if the tested string argument is null or the empty string. + + Thrown if string value is null. + Thrown if the string is empty + Argument value to check. + Name of argument being checked. + + + + Verifies that an argument type is assignable from the provided type (meaning + interfaces are implemented, or classes exist in the base class hierarchy). + + The argument type that will be assigned to. + The type of the value being assigned. + Argument name. + + + + Verifies that an argument instance is assignable from the provided type (meaning + interfaces are implemented, or classes exist in the base class hierarchy, or instance can be + assigned through a runtime wrapper, as is the case for COM Objects). + + The argument type that will be assigned to. + The instance that will be assigned. + Argument name. + + + + A helper class to manage the names that get registered in the container + + + + + The build stages we use in the Unity container + strategy pipeline. + + + + + First stage. By default, nothing happens here. + + + + + Second stage. Type mapping occurs here. + + + + + Third stage. lifetime managers are checked here, + and if they're available the rest of the pipeline is skipped. + + + + + Fourth stage. Reflection over constructors, properties, etc. is + performed here. + + + + + Fifth stage. Instance creation happens here. + + + + + Sixth stage. Property sets and method injection happens here. + + + + + Seventh and final stage. By default, nothing happens here. + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to The type {0} has multiple constructors of length {1}. Unable to disambiguate.. + + + + + Looks up a localized string similar to The provided string argument must not be empty.. + + + + + Looks up a localized string similar to The current build operation (build key {2}) failed: {3} (Strategy type {0}, index {1}). + + + + + Looks up a localized string similar to The current type, {0}, is an abstract class and cannot be constructed. Are you missing a type mapping?. + + + + + Looks up a localized string similar to The current type, {0}, is delegate and cannot be constructed. Unity only supports resolving Func<T> and Func<IEnumerable<T>> by default.. + + + + + Looks up a localized string similar to The current type, {0}, is an interface and cannot be constructed. Are you missing a type mapping?. + + + + + Looks up a localized string similar to Cannot extract type from build key {0}.. + + + + + Looks up a localized string similar to The method {0}.{1}({2}) is an open generic method. Open generic methods cannot be injected.. + + + + + Looks up a localized string similar to The property {0} on type {1} is an indexer. Indexed properties cannot be injected.. + + + + + Looks up a localized string similar to The method {1} on type {0} has an out parameter. Injection cannot be performed.. + + + + + Looks up a localized string similar to The method {0}.{1}({2}) has at least one out parameter. Methods with out parameters cannot be injected.. + + + + + Looks up a localized string similar to The method {0}.{1}({2}) has at least one ref parameter.Methods with ref parameters cannot be injected.. + + + + + Looks up a localized string similar to The method {1} on type {0} is marked for injection, but it is an open generic method. Injection cannot be performed.. + + + + + Looks up a localized string similar to The method {0}.{1}({2}) is static. Static methods cannot be injected.. + + + + + Looks up a localized string similar to The type {0} is an open generic type. An open generic type cannot be resolved.. + + + + + Looks up a localized string similar to Resolving parameter "{0}" of constructor {1}. + + + + + Looks up a localized string similar to The parameter {0} could not be resolved when attempting to call constructor {1}.. + + + + + Looks up a localized string similar to Parameter type inference does not work for null values. Indicate the parameter type explicitly using a properly configured instance of the InjectionParameter or InjectionParameter<T> classes.. + + + + + Looks up a localized string similar to Calling constructor {0}. + + + + + Looks up a localized string similar to Calling method {0}.{1}. + + + + + Looks up a localized string similar to An item with the given key is already present in the dictionary.. + + + + + Looks up a localized string similar to The lifetime manager is already registered. Lifetime managers cannot be reused, please create a new one.. + + + + + Looks up a localized string similar to The override marker build plan policy has been invoked. This should never happen, looks like a bug in the container.. + + + + + Looks up a localized string similar to Resolving parameter "{0}" of method {1}.{2}. + + + + + Looks up a localized string similar to The value for parameter "{1}" of method {0} could not be resolved. . + + + + + Looks up a localized string similar to Could not resolve dependency for build key {0}.. + + + + + Looks up a localized string similar to The type {0} has multiple constructors marked with the InjectionConstructor attribute. Unable to disambiguate.. + + + + + Looks up a localized string similar to The supplied type {0} must be an open generic type.. + + + + + Looks up a localized string similar to The supplied type {0} does not have the same number of generic arguments as the target type {1}.. + + + + + Looks up a localized string similar to The type {0} does not have an accessible constructor.. + + + + + Looks up a localized string similar to The type {0} does not have a generic argument named "{1}". + + + + + Looks up a localized string similar to while resolving. + + + + + Looks up a localized string similar to The type {0} does not have a constructor that takes the parameters ({1}).. + + + + + Looks up a localized string similar to The type {0} does not have a public method named {1} that takes the parameters ({2}).. + + + + + Looks up a localized string similar to The type {0} does not contain an instance property named {1}.. + + + + + Looks up a localized string similar to The type {0} is not a generic type, and you are attempting to inject a generic parameter named "{1}".. + + + + + Looks up a localized string similar to The type {0} is not an array type with rank 1, and you are attempting to use a [DependencyArray] attribute on a parameter or property with this type.. + + + + + Looks up a localized string similar to Optional dependencies must be reference types. The type {0} is a value type.. + + + + + Looks up a localized string similar to The property {0} on type {1} is not settable.. + + + + + Looks up a localized string similar to The property {0} on type {1} is of type {2}, and cannot be injected with a value of type {3}.. + + + + + Looks up a localized string similar to The value for the property "{0}" could not be resolved.. + + + + + Looks up a localized string similar to The provided string argument must not be empty.. + + + + + Looks up a localized string similar to Resolution of the dependency failed, type = "{0}", name = "{1}". + Exception occurred while: {2}. + Exception is: {3} - {4} + ----------------------------------------------- + At the time of the exception, the container was: + . + + + + + Looks up a localized string similar to Resolving {0},{1}. + + + + + Looks up a localized string similar to Resolving {0},{1} (mapped from {2}, {3}). + + + + + Looks up a localized string similar to Resolving value for property {0}.{1}. + + + + + Looks up a localized string similar to The constructor {1} selected for type {0} has ref or out parameters. Such parameters are not supported for constructor injection.. + + + + + Looks up a localized string similar to Setting value for property {0}.{1}. + + + + + Looks up a localized string similar to The type {0} cannot be constructed. You must configure the container to supply this value.. + + + + + Looks up a localized string similar to The type {1} cannot be assigned to variables of type {0}.. + + + + + Looks up a localized string similar to <unknown>. + + + + + A simple, extensible dependency injection container. + + + + + Create a default . + + + + + Create a with the given parent container. + + The parent . The current object + will apply its own settings first, and then check the parent for additional ones. + + + + RegisterType a type mapping with the container, where the created instances will use + the given . + + that will be requested. + that will actually be returned. + Name to use for registration, null if a default registration. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + RegisterType an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + Name for registration. + + If true, the container will take over the lifetime of the instance, + calling Dispose on it (if it's ) when the container is Disposed. + + If false, container will not maintain a strong reference to . User is responsible + for disposing instance, and for keeping the instance from being garbage collected. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Get an instance of the requested type with the given name from the container. + + of object to get from the container. + Name of the object to retrieve. + Any overrides for the resolve call. + The retrieved object. + + + + Return instances of all registered types requested. + + + + This method is useful if you've registered multiple types with the same + but different names. + + + Be aware that this method does NOT return an instance for the default (unnamed) registration. + + + The type requested. + Any overrides for the resolve calls. + Set of objects of type . + + + + Run an existing object through the container and perform injection on it. + + + + This method is useful when you don't control the construction of an + instance (ASP.NET pages or objects created via XAML, for instance) + but you still want properties and other injection performed. + + of object to perform injection on. + Instance to build up. + name to use when looking up the typemappings and other configurations. + Any overrides for the buildup. + The resulting object. By default, this will be , but + container extensions may add things like automatic proxy creation which would + cause this to return a different object (but still type compatible with ). + + + + Run an existing object through the container, and clean it up. + + The object to tear down. + + + + Add an extension object to the container. + + to add. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Get access to a configuration interface exposed by an extension. + + Extensions can expose configuration interfaces as well as adding + strategies and policies to the container. This method walks the list of + added extensions and returns the first one that implements the requested type. + + of configuration interface required. + The requested extension's configuration interface, or null if not found. + + + + Remove all installed extensions from this container. + + + + This method removes all extensions from the container, including the default ones + that implement the out-of-the-box behavior. After this method, if you want to use + the container again you will need to either read the default extensions or replace + them with your own. + + + The registered instances and singletons that have already been set up in this container + do not get removed. + + + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Create a child container. + + + A child container shares the parent's configuration, but can be configured with different + settings or lifetime. + The new child container. + + + + Dispose this container instance. + + + Disposing the container also disposes any child containers, + and disposes any instances whose lifetimes are managed + by the container. + + + + + Dispose this container instance. + + + This class doesn't have a finalizer, so will always be true. + True if being called from the IDisposable.Dispose + method, false if being called from a finalizer. + + + + Remove policies associated with building this type. This removes the + compiled build plan so that it can be rebuilt with the new settings + the next time this type is resolved. + + Type of object to clear the plan for. + Name the object is being registered with. + + + + The parent of this container. + + The parent container, or null if this container doesn't have one. + + + + Get a sequence of that describe the current state + of the container. + + + + + Implementation of the ExtensionContext that is actually used + by the UnityContainer implementation. + + + This is a nested class so that it can access state in the + container that would otherwise be inaccessible. + + + + + This event is raised when the method, + or one of its overloads, is called. + + + + + This extension supplies the default behavior of the UnityContainer API + by handling the context events and setting policies. + + + + + Install the default container behavior into the container. + + + + + Remove the default behavior from the container. + + + + + This extension installs the default strategies and policies into the container + to implement the standard behavior of the Unity container. + + + + + Add the default ObjectBuilder strategies & policies to the container. + + + + + Helper class to wrap common reflection stuff dealing with + methods. + + + + + Create a new instance that + lets us do more reflection stuff on that method. + + The method to reflect on. + + + + Given our set of generic type arguments, + + The generic type arguments. + An array with closed parameter types. + + + + Returns true if any of the parameters of this method + are open generics. + + + + + Return the of each parameter for this + method. + + Sequence of objects, one for + each parameter in order. + + + + A helper class that encapsulates two different + data items together into a a single item. + + + + + Create a new containing + the two values give. + + First value + Second value + + + + The first value of the pair. + + + + + The second value of the pair. + + + + + Container for a Pair helper method. + + + + + A helper factory method that lets users take advantage of type inference. + + Type of first value. + Type of second value. + First value. + Second value. + A new instance. + + + + A utility class that handles the logic of matching parameter + lists, so we can find the right constructor and method overloads. + + + + + Create a new that will attempt to + match the given parameter types. + + Target parameters to match against. + + + + Tests to see if the given set of types matches the ones + we're looking for. + + parameter list to look for. + true if they match, false if they don't. + + + + Tests to see if the given set of types matches the ones we're looking for. + + Candidate method signature to look for. + True if they match, false if they don't. + + + + Another reflection helper class that has extra methods + for dealing with ParameterInfo. + + + + + A small helper class to encapsulate details of the + reflection API, particularly around generics. + + + + + Create a new instance that + lets you look at information about the given type. + + Type to do reflection on. + + + + Test the given object, looking at + the parameters. Determine if any of the parameters are + open generic types that need type attributes filled in. + + The method to check. + True if any of the parameters are open generics. False if not. + + + + If this type is an open generic, use the + given array to + determine what the required closed type is and return that. + + If the parameter is not an open type, just + return this parameter's type. + Type arguments to substitute in for + the open type parameters. + Corresponding closed type of this parameter. + + + + Given a generic argument name, return the corresponding type for this + closed type. For example, if the current type is SomeType<User>, and the + corresponding definition was SomeType<TSomething>, calling this method + and passing "TSomething" will return typeof(User). + + Name of the generic parameter. + Type of the corresponding generic parameter, or null if there + is no matching name. + + + + The object we're reflecting over. + + + + + Is this type generic? + + + + + Is this type an open generic (no type parameter specified) + + + + + Is this type an array type? + + + + + Is this type an array of generic elements? + + + + + The type of the elements in this type (if it's an array). + + + + + Returns all the public constructors defined for the current reflected . + + + An enumeration of ConstructorInfo objects representing all the public instance constructors defined for the + current reflected , but not including the type initializer (static constructor). + + + + + Create a new instance of that + lets you query information about the given ParameterInfo object. + + Parameter to query. + + + + A set of helper methods to pick through lambdas and pull out + from them. + + + + + Pull out a object from an expression of the form + () => SomeClass.SomeMethod() + + Expression describing the method to call. + Corresponding . + + + + Pull out a object from an expression of the form + x => x.SomeMethod() + + The type where the method is defined. + Expression describing the method to call. + Corresponding . + + + + Pull out a object for the get method from an expression of the form + x => x.SomeProperty + + The type where the method is defined. + The type for the property. + Expression describing the property for which the get method is to be extracted. + Corresponding . + + + + Pull out a object for the set method from an expression of the form + x => x.SomeProperty + + The type where the method is defined. + The type for the property. + Expression describing the property for which the set method is to be extracted. + Corresponding . + + + + + + + + + + + + + Pull out a object from an expression of the form () => new SomeType() + + The type where the constructor is defined. + Expression invoking the desired constructor. + Corresponding . + + + diff --git a/packages/Unity.4.0.1/lib/portable-net45+wp80+win8+wpa81+MonoAndroid10+MonoTouch10/Microsoft.Practices.Unity.dll b/packages/Unity.4.0.1/lib/portable-net45+wp80+win8+wpa81+MonoAndroid10+MonoTouch10/Microsoft.Practices.Unity.dll new file mode 100644 index 0000000..0d8c004 Binary files /dev/null and b/packages/Unity.4.0.1/lib/portable-net45+wp80+win8+wpa81+MonoAndroid10+MonoTouch10/Microsoft.Practices.Unity.dll differ diff --git a/packages/Unity.4.0.1/lib/portable-net45+wp80+win8+wpa81+MonoAndroid10+MonoTouch10/Microsoft.Practices.Unity.xml b/packages/Unity.4.0.1/lib/portable-net45+wp80+win8+wpa81+MonoAndroid10+MonoTouch10/Microsoft.Practices.Unity.xml new file mode 100644 index 0000000..f99ca70 --- /dev/null +++ b/packages/Unity.4.0.1/lib/portable-net45+wp80+win8+wpa81+MonoAndroid10+MonoTouch10/Microsoft.Practices.Unity.xml @@ -0,0 +1,5916 @@ + + + + Microsoft.Practices.Unity + + + + + Provides access to the names registered for a container. + + + + + Represents a builder policy interface. Since there are no fixed requirements + for policies, it acts as a marker interface from which to derive all other + policy interfaces. + + + + + Gets the names registered for a type. + + The type. + The names registered for . + + + + An implementation + that constructs a build plan for creating objects. + + + + + A that can create and return an + for the given build key. + + + + + Create a build plan using the given context and build key. + + Current build context. + Current build key. + The build plan. + + + + Creates a build plan using the given context and build key. + + Current build context. + Current build key. + + The build plan. + + + + + Provides extension methods to the class due to the introduction + of class in the .NET for Windows Store apps. + + + + + Returns the constructor in that matches the specified constructor parameter types. + + The type to inspect + The constructor parameter types. + The constructor that matches the specified parameter types. + + + + Returns the non-static declared methods of a type or its base types. + + The type to inspect + An enumerable of the objects. + + + + Returns the non-static method of a type or its based type. + + The type to inspect + The name of the method to seek. + The (closed) parameter type signature of the method. + The discovered + + + + Returns the declared properties of a type or its base types. + + The type to inspect + An enumerable of the objects. + + + + Determines if the types in a parameter set ordinally matches the set of supplied types. + + + + + + + + Base class for attributes that can be placed on parameters + or properties to specify how to resolve the value for + that parameter or property. + + + + + Create an instance of that + will be used to get the value for the member this attribute is + applied to. + + Type of parameter or property that + this attribute is decoration. + The resolver object. + + + + This attribute is used to indicate which constructor to choose when + the container attempts to build a type. + + + + + This attribute is used to mark methods that should be called when + the container is building an object. + + + + + This attribute is used to mark properties and parameters as targets for injection. + + + For properties, this attribute is necessary for injection to happen. For parameters, + it's not needed unless you want to specify additional information to control how + the parameter is resolved. + + + + + Create an instance of with no name. + + + + + Create an instance of with the given name. + + Name to use when resolving this dependency. + + + + Create an instance of that + will be used to get the value for the member this attribute is + applied to. + + Type of parameter or property that + this attribute is decoration. + The resolver object. + + + + The name specified in the constructor. + + + + + An used to mark a dependency + as optional - the container will try to resolve it, and return null + if the resolution fails rather than throw. + + + + + Construct a new object. + + + + + Construct a new object that + specifies a named dependency. + + Name of the dependency. + + + + Create an instance of that + will be used to get the value for the member this attribute is + applied to. + + Type of parameter or property that + this attribute is decoration. + The resolver object. + + + + Name of the dependency. + + + + + A that composites other + ResolverOverride objects. The GetResolver operation then + returns the resolver from the first child override that + matches the current context and request. + + + + + Base class for all override objects passed in the + method. + + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + Wrap this resolver in one that verifies the type of the object being built. + This allows you to narrow any override down to a specific type easily. + + Type to constrain the override to. + The new override. + + + + Wrap this resolver in one that verifies the type of the object being built. + This allows you to narrow any override down to a specific type easily. + + Type to constrain the override to. + The new override. + + + + Add a new to the collection + that is checked. + + item to add. + + + + Add a set of s to the collection. + + items to add. + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + 2 + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + 1 + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + Class that returns information about the types registered in a container. + + + + + The type that was passed to the method + as the "from" type, or the only type if type mapping wasn't done. + + + + + The type that this registration is mapped to. If no type mapping was done, the + property and this one will have the same value. + + + + + Name the type was registered under. Null for default registration. + + + + + The registered lifetime manager instance. + + + + + The lifetime manager for this registration. + + + This property will be null if this registration is for an open generic. + + + + A class that overrides + the value injected whenever there is a dependency of the + given type, regardless of where it appears in the object graph. + + + + + Create an instance of to override + the given type with the given value. + + Type of the dependency. + Value to use. + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + A convenience version of that lets you + specify the dependency type using generic syntax. + + Type of the dependency to override. + + + + Construct a new object that will + override the given dependency, and pass the given value. + + + + + A convenience form of that lets you + specify multiple parameter overrides in one shot rather than having + to construct multiple objects. + + + This class isn't really a collection, it just implements IEnumerable + so that we get use of the nice C# collection initializer syntax. + + + + + Base helper class for creating collections of objects + for use in passing a bunch of them to the resolve call. This base class provides + the mechanics needed to allow you to use the C# collection initializer syntax. + + Concrete type of the this class collects. + Key used to create the underlying override object. + Value that the override returns. + + + + Add a new override to the collection with the given key and value. + + Key - for example, a parameter or property name. + Value - the value to be returned by the override. + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + 2 + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + 1 + + + + When implemented in derived classes, this method is called from the + method to create the actual objects. + + Key value to create the resolver. + Value to store in the resolver. + The created . + + + + When implemented in derived classes, this method is called from the + method to create the actual objects. + + Key value to create the resolver. + Value to store in the resolver. + The created . + + + + Event argument class for the event. + + + + + Construct a new object with the + given child container object. + + An for the newly created child + container. + + + + The newly created child container. + + + + + An extension context for the created child container. + + + + + Base class for subclasses that let you specify that + an instance of a generic type parameter should be resolved. + + + + + Base type for objects that are used to configure parameters for + constructor or method injection, or for getting the value to + be injected into a property. + + + + + Test to see if this parameter value has a matching type for the given type. + + Type to check. + True if this parameter value is compatible with type , + false if not. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + Convert the given set of arbitrary values to a sequence of InjectionParameterValue + objects. The rules are: If it's already an InjectionParameterValue, return it. If + it's a Type, return a ResolvedParameter object for that type. Otherwise return + an InjectionParameter object for that value. + + The values to build the sequence from. + The resulting converted sequence. + + + + Convert an arbitrary value to an InjectionParameterValue object. The rules are: + If it's already an InjectionParameterValue, return it. If it's a Type, return a + ResolvedParameter object for that type. Otherwise return an InjectionParameter + object for that value. + + The value to convert. + The resulting . + + + + Name for the type represented by this . + This may be an actual type name or a generic argument name. + + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + name to use when looking up in the container. + + + + Test to see if this parameter value has a matching type for the given type. + + Type to check. + True if this parameter value is compatible with type , + false if not. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + Return a instance that will + return this types value for the parameter. + + The actual type to resolve. + The resolution key. + The . + + + + Name for the type represented by this . + This may be an actual type name or a generic argument name. + + + + + A that lets you specify that + an instance of a generic type parameter should be resolved, providing the + value if resolving fails. + + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + name to use when looking up in the container. + + + + Return a instance that will + return this types value for the parameter. + + The actual type to resolve. + The resolution key. + The . + + + + A class that lets you specify a factory method the container + will use to create the object. + + This is a significantly easier way to do the same + thing the old static factory extension was used for. + + + + Base class for objects that can be used to configure what + class members get injected by the container. + + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Type to register. + Policy list to add policies to. + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Type of interface being registered. If no interface, + this will be null. + Type of concrete type being registered. + Name used to resolve the type object. + Policy list to add policies to. + + + + Create a new instance of with + the given factory function. + + Factory function. + + + + Create a new instance of with + the given factory function. + + Factory function. + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Type of interface being registered. If no interface, + this will be null. This parameter is ignored in this implementation. + Type of concrete type being registered. + Name used to resolve the type object. + Policy list to add policies to. + + + + A that can be passed to + to configure a + parameter or property as an optional dependency. + + + + + A base class for implementing classes + that deal in explicit types. + + + + + Create a new that exposes + information about the given . + + Type of the parameter. + + + + Test to see if this parameter value has a matching type for the given type. + + Type to check. + True if this parameter value is compatible with type , + false if not. + + + + The type of parameter this object represents. + + + + + Name for the type represented by this . + This may be an actual type name or a generic argument name. + + + + + Construct a new object that + specifies the given . + + Type of the dependency. + + + + Construct a new object that + specifies the given and . + + Type of the dependency. + Name for the dependency. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + A generic version of that lets you + specify the type of the dependency using generics syntax. + + Type of the dependency. + + + + Construct a new . + + + + + Construct a new with the given + . + + Name of the dependency. + + + + A special lifetime manager which works like , + except that in the presence of child containers, each child gets it's own instance + of the object, instead of sharing one in the common parent. + + + + + A that holds onto the instance given to it. + When the is disposed, + the instance is disposed with it. + + + + + Base class for Lifetime managers which need to synchronize calls to + . + + + + The purpose of this class is to provide a basic implementation of the lifetime manager synchronization pattern. + + + Calls to the method of a + instance acquire a lock, and if the instance has not been initialized with a value yet the lock will only be released + when such an initialization takes place by calling the method or if + the build request which resulted in the call to the GetValue method fails. + + + + + + + Base class for Lifetime managers - classes that control how + and when instances are created by the Unity container. + + + + + A that controls how instances are + persisted and recovered from an external store. Used to implement + things like singletons and per-http-request lifetime. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. + + The object to store. + + + + Remove the value this lifetime policy is managing from backing store. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. + + The object being stored. + + + + Remove the given object from backing store. + + + + + This interface provides a hook for the builder context to + implement error recovery when a builder strategy throws + an exception. Since we can't get try/finally blocks onto + the call stack for later stages in the chain, we instead + add these objects to the context. If there's an exception, + all the current IRequiresRecovery instances will have + their Recover methods called. + + + + + A method that does whatever is needed to clean up + as part of cleaning up after an exception. + + + Don't do anything that could throw in this method, + it will cause later recover operations to get skipped + and play real havoc with the stack trace. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + Calls to this method acquire a lock which is released only if a non-null value + has been set for the lifetime manager. + + + + Performs the actual retrieval of a value from the backing store associated + with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + This method is invoked by + after it has acquired its lock. + + + + Stores the given value into backing store for retrieval later. + + The object being stored. + Setting a value will attempt to release the lock acquired by + . + + + + Performs the actual storage of the given value into backing store for retrieval later. + + The object being stored. + This method is invoked by + before releasing its lock. + + + + Remove the given object from backing store. + + + + + A method that does whatever is needed to clean up + as part of cleaning up after an exception. + + + Don't do anything that could throw in this method, + it will cause later recover operations to get skipped + and play real havoc with the stack trace. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. + + The object being stored. + + + + Remove the given object from backing store. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Standard Dispose pattern implementation. Not needed, but it keeps FxCop happy. + + Always true, since we don't have a finalizer. + + + + This is a custom lifetime manager that acts like , + but also provides a signal to the default build plan, marking the type so that + instances are reused across the build up object graph. + + + + + Construct a new object that does not + itself manage an instance. + + + + + Construct a new object that stores the + give value. This value will be returned by + but is not stored in the lifetime manager, nor is the value disposed. + This Lifetime manager is intended only for internal use, which is why the + normal method is not used here. + + Value to store. + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. In this class, + this is a noop, since it has special hooks down in the guts. + + The object being stored. + + + + Remove the given object from backing store. Noop in this class. + + + + + A strategy that handles Hierarchical lifetimes across a set of parent/child + containers. + + + + + Represents a strategy in the chain of responsibility. + Strategies are required to support both BuildUp and TearDown. + + + + + Represents a strategy in the chain of responsibility. + Strategies are required to support both BuildUp and TearDown. Although you + can implement this interface directly, you may also choose to use + as the base class for your strategies, as + this class provides useful helper methods and makes support BuildUp and TearDown + optional. + + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + Called during the chain of responsibility for a build operation. The + PostBuildUp method is called when the chain has finished the PreBuildUp + phase and executes in reverse order from the PreBuildUp calls. + + Context of the build operation. + + + + Called during the chain of responsibility for a teardown operation. The + PreTearDown method is called when the chain is being executed in the + forward direction. + + Context of the teardown operation. + + + + Called during the chain of responsibility for a teardown operation. The + PostTearDown method is called when the chain has finished the PreTearDown + phase and executes in reverse order from the PreTearDown calls. + + Context of the teardown operation. + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + Called during the chain of responsibility for a build operation. The + PostBuildUp method is called when the chain has finished the PreBuildUp + phase and executes in reverse order from the PreBuildUp calls. + + Context of the build operation. + + + + Called during the chain of responsibility for a teardown operation. The + PreTearDown method is called when the chain is being executed in the + forward direction. + + Context of the teardown operation. + + + + Called during the chain of responsibility for a teardown operation. The + PostTearDown method is called when the chain has finished the PreTearDown + phase and executes in reverse order from the PreTearDown calls. + + Context of the teardown operation. + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + A that will attempt to + resolve a value, and return null if it cannot rather than throwing. + + + + + A strategy that is used at build plan execution time + to resolve a dependent value. + + + + + Get the value for a dependency. + + Current build context. + The value for the dependency. + + + + Construct a new object + that will attempt to resolve the given name and type from the container. + + Type to resolve. Must be a reference type. + Name to resolve with. + + + + Construct a new object + that will attempt to resolve the given type from the container. + + Type to resolve. Must be a reference type. + + + + Get the value for a dependency. + + Current build context. + The value for the dependency. + + + + Type this resolver will resolve. + + + + + Name this resolver will resolve. + + + + + Extension methods on to provide convenience + overloads (generic versions, mostly). + + + + + Removes an individual policy type for a build key. + + The type the policy was registered as. + to remove the policy from. + The key the policy applies. + + + + Removes a default policy. + + The type the policy was registered as. + to remove the policy from. + + + + Gets an individual policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + The policy list that actually contains the returned policy. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + to search. + The interface the policy is registered under. + The key the policy applies. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + to search. + The interface the policy is registered under. + The key the policy applies. + The policy list that actually contains the returned policy. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy list that actually contains the returned policy. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + to search. + The interface the policy is registered under. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy in the list, if present; returns null otherwise. + + + + Get the non default policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy in the list, if present; returns null otherwise. + + + + Get the non default policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy list that actually contains the returned policy. + The policy in the list, if present; returns null otherwise. + + + + Get the non default policy. + + to search. + The interface the policy is registered under. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy in the list, if present; returns null otherwise. + + + + Sets an individual policy. + + The interface the policy is registered under. + to add the policy to. + The policy to be registered. + The key the policy applies. + + + + Sets a default policy. When checking for a policy, if no specific individual policy + is available, the default will be used. + + The interface to register the policy under. + to add the policy to. + The default policy to be registered. + + + + Base class for the current operation stored in the build context. + + + + + Create a new . + + Type currently being built. + + + + The type that's currently being built. + + + + + Build plan for that will return a Func that will resolve the requested type + through this container later. + + + + + A build plan is an object that, when invoked, will create a new object + or fill in a given existing one. It encapsulates all the information + gathered by the strategies to construct a particular object. + + + + + Creates an instance of this build plan's type, or fills + in the existing type if passed in. + + Context used to build up the object. + + + + Creates an instance of this build plan's type, or fills + in the existing type if passed in. + + Context used to build up the object. + + + + The almost inevitable collection of extra helper methods on + to augment the rich set of what + LINQ already gives us. + + + + + Execute the provided on every item in . + + Type of the items stored in + Sequence of items to process. + Code to run over each item. + + + + Create a single string from a sequence of items, separated by the provided , + and with the conversion to string done by the given . + + This method does basically the same thing as , + but will work on any sequence of items, not just arrays. + Type of items in the sequence. + Sequence of items to convert. + Separator to place between the items in the string. + The conversion function to change TItem -> string. + The resulting string. + + + + Create a single string from a sequence of items, separated by the provided , + and with the conversion to string done by the item's method. + + This method does basically the same thing as , + but will work on any sequence of items, not just arrays. + Type of items in the sequence. + Sequence of items to convert. + Separator to place between the items in the string. + The resulting string. + + + + A class that lets you + override a named parameter passed to a constructor. + + + + + Construct a new object that will + override the given named constructor parameter, and pass the given + value. + + Name of the constructor parameter. + Value to pass for the constructor. + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + A convenience form of that lets you + specify multiple parameter overrides in one shot rather than having + to construct multiple objects. + + + + + When implemented in derived classes, this method is called from the + method to create the actual objects. + + Key value to create the resolver. + Value to store in the resolver. + The created . + + + + A that lets you override + the value for a specified property. + + + + + Create an instance of . + + The property name. + Value to use for the property. + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + A convenience form of that lets you + specify multiple property overrides in one shot rather than having + to construct multiple objects. + + + + + When implemented in derived classes, this method is called from the + method to create the actual objects. + + Key value to create the resolver. + Value to store in the resolver. + The created . + + + + Interface defining the configuration interface exposed by the + Static Factory extension. + + + + + Base interface for all extension configuration interfaces. + + + + + Retrieve the container instance that we are currently configuring. + + + + + Register the given factory delegate to be called when the container is + asked to resolve . + + Type that will be requested from the container. + Delegate to invoke to create the instance. + The container extension object this method was invoked on. + + + + Register the given factory delegate to be called when the container is + asked to resolve and . + + Type that will be requested from the container. + The name that will be used when requesting to resolve this type. + Delegate to invoke to create the instance. + The container extension object this method was invoked on. + + + + Represents the context in which a build-up or tear-down operation runs. + + + + + Represents the context in which a build-up or tear-down operation runs. + + + + + Add a new set of resolver override objects to the current build operation. + + objects to add. + + + + Get a object for the given + or null if that dependency hasn't been overridden. + + Type of the dependency. + Resolver to use, or null if no override matches for the current operation. + + + + A convenience method to do a new buildup operation on an existing context. + + Key to use to build up. + Created object. + + + + A convenience method to do a new buildup operation on an existing context. This + overload allows you to specify extra policies which will be in effect for the duration + of the build. + + Key defining what to build up. + A delegate that takes a . This + is invoked with the new child context before the build up process starts. This gives callers + the opportunity to customize the context for the build process. + Created object. + + + + Gets the head of the strategy chain. + + + The strategy that's first in the chain; returns null if there are no + strategies in the chain. + + + + + Gets the associated with the build. + + + The associated with the build. + + + + + Gets the original build key for the build operation. + + + The original build key for the build operation. + + + + + Get the current build key for the current build operation. + + + + + The set of policies that were passed into this context. + + This returns the policies passed into the context. + Policies added here will remain after buildup completes. + The persistent policies for the current context. + + + + Gets the policies for the current context. + + Any policies added to this object are transient + and will be erased at the end of the buildup. + + The policies for the current context. + + + + + Gets the collection of objects + that need to execute in event of an exception. + + + + + The current object being built up or torn down. + + + The current object being manipulated by the build operation. May + be null if the object hasn't been created yet. + + + + Flag indicating if the build operation should continue. + + true means that building should not call any more + strategies, false means continue to the next strategy. + + + + An object representing what is currently being done in the + build chain. Used to report back errors if there's a failure. + + + + + The build context used to resolve a dependency during the build operation represented by this context. + + + + + Initialize a new instance of the class. + + + + + Initialize a new instance of the class with a , + , and the + build key used to start this build operation. + + The to use for this context. + The to use for this context. + The to use for this context. + Build key to start building. + The existing object to build up. + + + + Create a new using the explicitly provided + values. + + The to use for this context. + The to use for this context. + The set of persistent policies to use for this context. + The set of transient policies to use for this context. It is + the caller's responsibility to ensure that the transient and persistent policies are properly + combined. + Build key for this context. + Existing object to build up. + + + + Create a new using the explicitly provided + values. + + The to use for this context. + The to use for this context. + The set of persistent policies to use for this context. + The set of transient policies to use for this context. It is + the caller's responsibility to ensure that the transient and persistent policies are properly + combined. + Build key for this context. + The resolver overrides. + + + + Add a new set of resolver override objects to the current build operation. + + objects to add. + + + + Get a object for the given + or null if that dependency hasn't been overridden. + + Type of the dependency. + Resolver to use, or null if no override matches for the current operation. + + + + A convenience method to do a new buildup operation on an existing context. + + Key to use to build up. + Created object. + + + + A convenience method to do a new buildup operation on an existing context. This + overload allows you to specify extra policies which will be in effect for the duration + of the build. + + Key defining what to build up. + A delegate that takes a . This + is invoked with the new child context before the build up process starts. This gives callers + the opportunity to customize the context for the build process. + Created object. + + + + Gets the head of the strategy chain. + + + The strategy that's first in the chain; returns null if there are no + strategies in the chain. + + + + + Get the current build key for the current build operation. + + + + + The current object being built up or torn down. + + + The current object being manipulated by the build operation. May + be null if the object hasn't been created yet. + + + + Gets the associated with the build. + + + The associated with the build. + + + + + Gets the original build key for the build operation. + + + The original build key for the build operation. + + + + + The set of policies that were passed into this context. + + This returns the policies passed into the context. + Policies added here will remain after buildup completes. + The persistent policies for the current context. + + + + Gets the policies for the current context. + + + Any modifications will be transient (meaning, they will be forgotten when + the outer BuildUp for this context is finished executing). + + + The policies for the current context. + + + + + Gets the collection of objects + that need to execute in event of an exception. + + + + + Flag indicating if the build operation should continue. + + true means that building should not call any more + strategies, false means continue to the next strategy. + + + + An object representing what is currently being done in the + build chain. Used to report back errors if there's a failure. + + + + + The build context used to resolve a dependency during the build operation represented by this context. + + + + + Represents that a dependency could not be resolved. + + + + + Initializes a new instance of the class with no extra information. + + + + + Initializes a new instance of the class with the given message. + + Some random message. + + + + Initialize a new instance of the class with the given + message and inner exception. + + Some random message + Inner exception. + + + + Initializes a new instance of the class with the build key of the object begin built. + + The build key of the object begin built. + + + + The exception thrown when injection is attempted on a method + that is an open generic or has out or ref params. + + + + + Construct a new with no + message. + + + + + Construct a with the given message + + Message to return. + + + + Construct a with the given message + and inner exception. + + Message to return. + Inner exception + + + + Extension methods to provide convenience overloads over the + interface. + + + + + Start a recursive build up operation to retrieve the default + value for the given type. + + Type of object to build. + Parent context. + Resulting object. + + + + Start a recursive build up operation to retrieve the named + implementation for the given type. + + Type to resolve. + Parent context. + Name to resolve with. + The resulting object. + + + + Add a set of s to the context, specified as a + variable argument list. + + Context to add overrides to. + The overrides. + + + + Data structure that stores the set of + objects and executes them when requested. + + + + + Add a new object to this + list. + + Object to add. + + + + Execute the method + of everything in the recovery list. Recoveries will execute + in the opposite order of add - it's a stack. + + + + + Return the number of recovery objects currently in the stack. + + + + + Represents a lifetime container. + + + A lifetime container tracks the lifetime of an object, and implements + IDisposable. When the container is disposed, any objects in the + container which implement IDisposable are also disposed. + + + + + Adds an object to the lifetime container. + + The item to be added to the lifetime container. + + + + Determine if a given object is in the lifetime container. + + + The item to locate in the lifetime container. + + + Returns true if the object is contained in the lifetime + container; returns false otherwise. + + + + + Removes an item from the lifetime container. The item is + not disposed. + + The item to be removed. + + + + Gets the number of references in the lifetime container + + + The number of references in the lifetime container + + + + + Represents a lifetime container. + + + A lifetime container tracks the lifetime of an object, and implements + IDisposable. When the container is disposed, any objects in the + container which implement IDisposable are also disposed. + + + + + Adds an object to the lifetime container. + + The item to be added to the lifetime container. + + + + Determine if a given object is in the lifetime container. + + + The item to locate in the lifetime container. + + + Returns true if the object is contained in the lifetime + container; returns false otherwise. + + + + + Releases the resources used by the . + + + + + Releases the resources used by the . + + + true to release managed and unmanaged resources; false to release only unmanaged resources. + + + + + Returns an enumerator that iterates through the lifetime container. + + + An object that can be used to iterate through the life time container. + + + + + Returns an enumerator that iterates through the lifetime container. + + + An object that can be used to iterate through the life time container. + + + + + Removes an item from the lifetime container. The item is + not disposed. + + The item to be removed. + + + + Gets the number of references in the lifetime container + + + The number of references in the lifetime container + + + + + A custom collection over objects. + + + + + Removes an individual policy type for a build key. + + The type of policy to remove. + The key the policy applies. + + + + Removes all policies from the list. + + + + + Removes a default policy. + + The type the policy was registered as. + + + + Gets an individual policy. + + The interface the policy is registered under. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy list in the chain that the searched for policy was found in, null if the policy was + not found. + The policy in the list, if present; returns null otherwise. + + + + Get the non default policy. + + The interface the policy is registered under. + The key the policy applies to. + True if the search should be in the local policy list only; otherwise false to search up the parent chain. + The policy list in the chain that the searched for policy was found in, null if the policy was + not found. + The policy in the list if present; returns null otherwise. + + + + Sets an individual policy. + + The of the policy. + The policy to be registered. + The key the policy applies. + + + + Sets a default policy. When checking for a policy, if no specific individual policy + is available, the default will be used. + + The interface to register the policy under. + The default policy to be registered. + + + + A custom collection wrapper over objects. + + + + + Initialize a new instance of a class. + + + + + Initialize a new instance of a class with another policy list. + + An inner policy list to search. + + + + Removes an individual policy type for a build key. + + The type of policy to remove. + The key the policy applies. + + + + Removes all policies from the list. + + + + + Removes a default policy. + + The type the policy was registered as. + + + + Gets an individual policy. + + The interface the policy is registered under. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy list in the chain that the searched for policy was found in, null if the policy was + not found. + The policy in the list, if present; returns null otherwise. + + + + Get the non default policy. + + The interface the policy is registered under. + The key the policy applies to. + True if the search should be in the local policy list only; otherwise false to search up the parent chain. + The policy list in the chain that the searched for policy was found in, null if the policy was + not found. + The policy in the list if present; returns null otherwise. + + + + Sets an individual policy. + + The of the policy. + The policy to be registered. + The key the policy applies. + + + + Sets a default policy. When checking for a policy, if no specific individual policy + is available, the default will be used. + + The interface to register the policy under. + The default policy to be registered. + + + + Gets the number of items in the locator. + + + The number of items in the locator. + + + + + An implementation of . + + + + + Add a new object to this + list. + + Object to add. + + + + Execute the method + of everything in the recovery list. Recoveries will execute + in the opposite order of add - it's a stack. + + + + + Return the number of recovery objects currently in the stack. + + + + + Implementation of which will notify an object about + the completion of a BuildUp operation, or start of a TearDown operation. + + + This strategy checks the object that is passing through the builder chain to see if it + implements IBuilderAware and if it does, it will call + and . This strategy is meant to be used from the + stage. + + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + Called during the chain of responsibility for a teardown operation. The + PreTearDown method is called when the chain is being executed in the + forward direction. + + Context of the teardown operation. + + + + Implemented on a class when it wants to receive notifications + about the build process. + + + + + Called by the when the object is being built up. + + The key of the object that was just built up. + + + + Called by the when the object is being torn down. + + + + + Enumeration to represent the object builder stages. + + + The order of the values in the enumeration is the order in which the stages are run. + + + + + Strategies in this stage run before creation. Typical work done in this stage might + include strategies that use reflection to set policies into the context that other + strategies would later use. + + + + + Strategies in this stage create objects. Typically you will only have a single policy-driven + creation strategy in this stage. + + + + + Strategies in this stage work on created objects. Typical work done in this stage might + include setter injection and method calls. + + + + + Strategies in this stage work on objects that are already initialized. Typical work done in + this stage might include looking to see if the object implements some notification interface + to discover when its initialization stage has been completed. + + + + + Represents a builder policy for mapping build keys. + + + + + Represents a builder policy for mapping build keys. + + + + + Maps the build key. + + The build key to map. + Current build context. Used for contextual information + if writing a more sophisticated mapping. This parameter can be null + (called when getting container registrations). + The new build key. + + + + Initialize a new instance of the with the new build key. + + The new build key. + + + + Maps the build key. + + The build key to map. + Current build context. Used for contextual information + if writing a more sophisticated mapping, unused in this implementation. + The new build key. + + + + Represents a strategy for mapping build keys in the build up operation. + + + + + Called during the chain of responsibility for a build operation. Looks for the + and if found maps the build key for the current operation. + + The context for the operation. + + + + An implementation of that can map + generic types. + + + + + Create a new instance + that will map generic types. + + Build key to map to. This must be or contain an open generic type. + + + + Maps the build key. + + The build key to map. + Current build context. Used for contextual information + if writing a more sophisticated mapping. + The new build key. + + + + A that will look for a build plan + in the current context. If it exists, it invokes it, otherwise + it creates one and stores it for later, and invokes it. + + + + + Called during the chain of responsibility for a build operation. + + The context for the operation. + + + + An implementation of that chooses + constructors based on these criteria: first, pick a constructor marked with the + attribute. If there + isn't one, then choose the constructor with the longest parameter list. If that is ambiguous, + then throw. + + Thrown when the constructor to choose is ambiguous. + Attribute used to mark the constructor to call. + + + + Base class that provides an implementation of + which lets you override how the parameter resolvers are created. + + + + + A that, when implemented, + will determine which constructor to call from the build plan. + + + + + Choose the constructor to call for the given type. + + Current build context + The to add any + generated resolver objects into. + The chosen constructor. + + + + Choose the constructor to call for the given type. + + Current build context + The to add any + generated resolver objects into. + The chosen constructor. + + + + Create a instance for the given + . + + Parameter to create the resolver for. + The resolver object. + + + + Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other. + + The second object to compare. + The first object to compare. + + Value Condition Less than zero is less than y. Zero equals y. Greater than zero is greater than y. + + + + + Create a instance for the given + . + + Parameter to create the resolver for. + The resolver object. + + + + Objects of this type are the return value from . + It encapsulates the desired with the string keys + needed to look up the for each + parameter. + + + + + Base class for return values from selector policies that + return a MemberInfo of some sort plus a list of parameter + keys to look up the parameter resolvers. + + + + + Base class for return of selector policies that need + to keep track of a set of parameter resolvers. + + + + + Adds the parameter resolver. Resolvers are assumed + to be in the order of the parameters to the member. + + The new resolver. + + + + Gets the parameter resolvers. + + An array with the parameter resolvers. + + + + Construct a new , storing + the given member info. + + Member info to store. + + + + The member info stored. + + + + + Create a new instance which + contains the given constructor. + + The constructor to wrap. + + + + The constructor this object wraps. + + + + + This class records the information about which constructor argument is currently + being resolved, and is responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + The type that is being constructed. + A string representing the constructor being called. + Parameter being resolved. + + + + Generate the string describing what parameter was being resolved. + + The description string. + + + + String describing the constructor being set up. + + + + + Parameter that's being resolved. + + + + + A that emits IL to call constructors + as part of creating a build plan. + + + + + Called during the chain of responsibility for a build operation. + + Existing object is an instance of . + The context for the operation. + + + + A helper method used by the generated IL to set up a PerResolveLifetimeManager lifetime manager + if the current object is such. + + Current build context. + + + + Build up the string that will represent the constructor signature + in any exception message. + + + + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + A helper method used by the generated IL to throw an exception if + no existing object is present, but the user is attempting to build + an interface (usually due to the lack of a type mapping). + + The currently being + used for the build of this object. + + + + A helper method used by the generated IL to throw an exception if + no existing object is present, but the user is attempting to build + an abstract class (usually due to the lack of a type mapping). + + The currently being + used for the build of this object. + + + + A helper method used by the generated IL to throw an exception if + no existing object is present, but the user is attempting to build + an delegate other than Func{T} or Func{IEnumerable{T}}. + + The currently being + used for the build of this object. + + + + A helper method used by the generated IL to throw an exception if + a dependency cannot be resolved. + + The currently being + used for the build of this object. + + + + A helper method used by the generated IL to throw an exception if + a dependency cannot be resolved because of an invalid constructor. + + The currently being + used for the build of this object. + The signature of the invalid constructor. + + + + A class that records that a constructor is about to be call, and is + responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + + + + Generate the description string. + + The string. + + + + Constructor we're trying to call. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Helper method used by generated IL to look up a dependency resolver based on the given key. + + Current build context. + Type of the dependency being resolved. + Key the resolver was stored under. + The found dependency resolver. + + + + Helper method used by generated IL to look up a dependency resolver based on the given key. + + Current build context. + Type of the dependency being resolved. + The configured resolver. + The found dependency resolver. + + + + The type that is to be built with the dynamic build plan. + + + + + The context parameter representing the used when the build plan is executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + An implementation + that constructs a build plan via dynamic IL emission. + + + + + Construct a that + uses the given strategy chain to construct the build plan. + + The strategy chain. + + + + Construct a build plan. + + The current build context. + The current build key. + The created build plan. + + + + A class that records that a constructor is about to be call, and is + responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + + + + Generate the description string. + + The string. + + + + Method we're trying to call. + + + + + This class records the information about which constructor argument is currently + being resolved, and is responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + The type that is being constructed. + A string representing the method being called. + Parameter being resolved. + + + + Generate the string describing what parameter was being resolved. + + The description string. + + + + String describing the method being set up. + + + + + Parameter that's being resolved. + + + + + A that generates IL to call + chosen methods (as specified by the current ) + as part of object build up. + + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + A base class that holds the information shared by all operations + performed by the container while setting properties. + + + + + Initializes a new instance of the class. + + + + + Generate the description of this operation. + + The string. + + + + Get a format string used to create the description. Called by + the base method. + + The format string. + + + + The property value currently being resolved. + + + + + This class records the information about which property value is currently + being resolved, and is responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + + + + Get a format string used to create the description. Called by + the base method. + + The format string. + + + + A that generates IL to resolve properties + on an object being built. + + + + + Called during the chain of responsibility for a build operation. + + The context for the operation. + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + This class records the information about which property value is currently + being set, and is responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + Type property is on. + Name of property being set. + + + + Get a format string used to create the description. Called by + the base method. + + The format string. + + + + Creates an instance of this build plan's type, or fills + in the existing type if passed in. + + Context used to build up the object. + + + + An that will examine the given + types and return a sequence of objects + that should be called as part of building the object. + + + + + Return the sequence of methods to call while building the target object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of methods to call. + + + + An implementation of that selects + methods by looking for the given + attribute on those methods. + + Type of attribute used to mark methods + to inject. + + + + Base class that provides an implementation of + which lets you override how the parameter resolvers are created. + + Attribute that marks methods that should + be called. + + + + Return the sequence of methods to call while building the target object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of methods to call. + + + + Create a instance for the given + . + + Parameter to create the resolver for. + The resolver object. + + + + Create a instance for the given + . + + Parameter to create the resolver for. + The resolver object. + + + + Objects of this type are the return value from . + It encapsulates the desired with the string keys + needed to look up the for each + parameter. + + + + + Create a new instance which + contains the given method. + + The method + + + + The constructor this object wraps. + + + + + An that returns a sequence + of properties that should be injected for the given type. + + + + + Returns sequence of properties on the given type that + should be set as part of building that object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of objects + that contain the properties to set. + + + + Base class that provides an implementation of + which lets you override how the parameter resolvers are created. + + + + + Returns sequence of properties on the given type that + should be set as part of building that object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of objects + that contain the properties to set. + + + + Create a for the given + property. + + Property to create resolver for. + The resolver object. + + + + An implementation of that looks + for properties marked with the + attribute that are also settable and not indexers. + + + + + + Create a for the given + property. + + Property to create resolver for. + The resolver object. + + + + Objects of this type are returned from + . + This class combines the about + the property with the string key used to look up the resolver + for this property's value. + + + + + Create an instance of + with the given and key. + + The property. + + + + + PropertyInfo for this property. + + + + + IDependencyResolverPolicy for this property + + + + + Implementation of . + + + + + A builder policy that lets you keep track of the current + resolvers and will remove them from the given policy set. + + + + + Add a new resolver to track by key. + + Key that was used to add the resolver to the policy set. + + + + Remove the currently tracked resolvers from the given policy list. + + Policy list to remove the resolvers from. + + + + Add a new resolver to track by key. + + Key that was used to add the resolver to the policy set. + + + + Remove the currently tracked resolvers from the given policy list. + + Policy list to remove the resolvers from. + + + + Get an instance that implements , + either the current one in the policy set or creating a new one if it doesn't + exist. + + Policy list to look up from. + Build key to track. + The resolver tracker. + + + + Add a key to be tracked to the current tracker. + + Policy list containing the resolvers and trackers. + Build key for the resolvers being tracked. + Key for the resolver. + + + + Remove the resolvers for the given build key. + + Policy list containing the build key. + Build key. + + + + An implementation of that + calls back into the build chain to build up the dependency, passing + a type given at compile time as its build key. + + + + + Create a new instance storing the given type. + + Type to resolve. + + + + Get the value for a dependency. + + Current build context. + The value for the dependency. + + + + This interface defines a standard method to convert any regardless + of the stage enum into a regular, flat strategy chain. + + + + + Convert this into + a flat . + + The flattened . + + + + Represents a chain of responsibility for builder strategies. + + + + + Reverse the order of the strategy chain. + + The reversed strategy chain. + + + + Execute this strategy chain against the given context, + calling the Buildup methods on the strategies. + + Context for the build process. + The build up object + + + + Execute this strategy chain against the given context, + calling the TearDown methods on the strategies. + + Context for the teardown process. + + + + A builder policy used to create lifetime policy instances. + Used by the LifetimeStrategy when instantiating open + generic types. + + + + + Create a new instance of . + + The new instance. + + + + The type of Lifetime manager that will be created by this factory. + + + + + An implementation that uses + a to figure out if an object + has already been created and to update or remove that + object from some backing store. + + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + Called during the chain of responsibility for a build operation. The + PostBuildUp method is called when the chain has finished the PreBuildUp + phase and executes in reverse order from the PreBuildUp calls. + + Context of the build operation. + + + + Represents a chain of responsibility for builder strategies partitioned by stages. + + The stage enumeration to partition the strategies. + + + + Initialize a new instance of the class. + + + + + Initialize a new instance of the class with an inner strategy chain to use when building. + + The inner strategy chain to use first when finding strategies in the build operation. + + + + Adds a strategy to the chain at a particular stage. + + The strategy to add to the chain. + The stage to add the strategy. + + + + Add a new strategy for the . + + The of + The stage to add the strategy. + + + + Clear the current strategy chain list. + + + This will not clear the inner strategy chain if this instance was created with one. + + + + + Makes a strategy chain based on this instance. + + A new . + + + + Represents a chain of responsibility for builder strategies. + + + + + Initialize a new instance of the class. + + + + + Initialize a new instance of the class with a collection of strategies. + + A collection of strategies to initialize the chain. + + + + Adds a strategy to the chain. + + The strategy to add to the chain. + + + + Adds strategies to the chain. + + The strategies to add to the chain. + + + + Reverse the order of the strategy chain. + + The reversed strategy chain. + + + + Execute this strategy chain against the given context to build up. + + Context for the build processes. + The build up object + + + + Execute this strategy chain against the given context, + calling the TearDown methods on the strategies. + + Context for the teardown process. + + + + Returns an enumerator that iterates through the collection. + + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + + An object that can be used to iterate through the collection. + + + + + Build key used to combine a type object with a string name. Used by + ObjectBuilder to indicate exactly what is being built. + + + + + Create a new instance with the given + type and name. + + to build. + Key to use to look up type mappings and singletons. + + + + Create a new instance for the default + buildup of the given type. + + to build. + + + + This helper method creates a new instance. It is + initialized for the default key for the given type. + + Type to build. + A new instance. + + + + This helper method creates a new instance for + the given type and key. + + Type to build + Key to use to look up type mappings and singletons. + A new instance initialized with the given type and name. + + + + Compare two instances. + + Two instances compare equal + if they contain the same name and the same type. Also, comparing + against a different type will also return false. + Object to compare to. + True if the two keys are equal, false if not. + + + + Calculate a hash code for this instance. + + A hash code. + + + + Compare two instances for equality. + + Two instances compare equal + if they contain the same name and the same type. + First of the two keys to compare. + Second of the two keys to compare. + True if the values of the keys are the same, else false. + + + + Compare two instances for inequality. + + Two instances compare equal + if they contain the same name and the same type. If either field differs + the keys are not equal. + First of the two keys to compare. + Second of the two keys to compare. + false if the values of the keys are the same, else true. + + + + Formats the build key as a string (primarily for debugging). + + A readable string representation of the build key. + + + + Return the stored in this build key. + + The type to build. + + + + Returns the name stored in this build key. + + The name to use when building. + + + + A generic version of so that + you can new up a key using generic syntax. + + Type for the key. + + + + Construct a new that + specifies the given type. + + + + + Construct a new that + specifies the given type and name. + + Name for the key. + + + + A series of helper methods to deal with sequences - + objects that implement . + + + + + A function that turns an arbitrary parameter list into an + . + + Type of arguments. + The items to put into the collection. + An array that contains the values of the . + + + + Given two sequences, return a new sequence containing the corresponding values + from each one. + + Type of first sequence. + Type of second sequence. + First sequence of items. + Second sequence of items. + New sequence of pairs. This sequence ends when the shorter of sequence1 and sequence2 does. + + + + A that lets you register a + delegate with the container to create an object, rather than calling + the object's constructor. + + + + + Base class for all extension objects. + + + + + The container calls this method when the extension is added. + + A instance that gives the + extension access to the internals of the container. + + + + Initial the container with this extension's functionality. + + + When overridden in a derived class, this method will modify the given + by adding strategies, policies, etc. to + install it's functions into the container. + + + + Removes the extension's functions from the container. + + + + This method is called when extensions are being removed from the container. It can be + used to do things like disconnect event handlers or clean up member state. You do not + need to remove strategies or policies here; the container will do that automatically. + + + The default implementation of this method does nothing. + + + + + The container this extension has been added to. + + The that this extension has been added to. + + + + The object used to manipulate + the inner state of the container. + + + + + Initialize this extension. This particular extension requires no + initialization work. + + + + + Register the given factory delegate to be called when the container is + asked to resolve and . + + Type that will be requested from the container. + The name that will be used when requesting to resolve this type. + Delegate to invoke to create the instance. + The container extension object this method was invoked on. + + + + Register the given factory delegate to be called when the container is + asked to resolve . + + Type that will be requested from the container. + Delegate to invoke to create the instance. + The container extension object this method was invoked on. + + + + An implementation of that + acts as a decorator over another . + This checks to see if the current type being built is the + right one before checking the inner . + + + + + Create an instance of + + Type to check for. + Inner override to check after type matches. + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + A convenience version of that lets you + specify the type to construct via generics syntax. + + Type to check for. + + + + Create an instance of . + + Inner override to check after type matches. + + + + Extension class that adds a set of convenience overloads to the + interface. + + + + + Register a type with specific members to be injected. + + Type this registration is for. + Container to configure. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container. + + + + This method is used to tell the container that when asked for type , + actually return an instance of type . This is very useful for + getting instances of interfaces. + + + This overload registers a default mapping and transient lifetime. + + + that will be requested. + that will actually be returned. + Container to configure. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container, where the created instances will use + the given . + + that will be requested. + that will actually be returned. + Container to configure. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container. + + + This method is used to tell the container that when asked for type , + actually return an instance of type . This is very useful for + getting instances of interfaces. + + that will be requested. + that will actually be returned. + Container to configure. + Name of this mapping. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container, where the created instances will use + the given . + + that will be requested. + that will actually be returned. + Container to configure. + Name to use for registration, null if a default registration. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type with the container. + No type mapping is performed for this type. + + The type to apply the to. + Container to configure. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type with the container. + No type mapping is performed for this type. + + The type to configure injection on. + Container to configure. + Name that will be used to request the type. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type and name with the container. + No type mapping is performed for this type. + + The type to apply the to. + Container to configure. + Name that will be used to request the type. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type with specific members to be injected. + + Container to configure. + Type this registration is for. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container. + + + + This method is used to tell the container that when asked for type , + actually return an instance of type . This is very useful for + getting instances of interfaces. + + + This overload registers a default mapping. + + + Container to configure. + that will be requested. + that will actually be returned. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container. + + + This method is used to tell the container that when asked for type , + actually return an instance of type . This is very useful for + getting instances of interfaces. + + Container to configure. + that will be requested. + that will actually be returned. + Name to use for registration, null if a default registration. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container, where the created instances will use + the given . + + Container to configure. + that will be requested. + that will actually be returned. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type and name with the container. + No type mapping is performed for this type. + + Container to configure. + The to apply the to. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type and name with the container. + No type mapping is performed for this type. + + Container to configure. + The to configure in the container. + Name to use for registration, null if a default registration. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type and name with the container. + No type mapping is performed for this type. + + Container to configure. + The to apply the to. + Name to use for registration, null if a default registration. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload does a default registration and has the container take over the lifetime of the instance. + + Type of instance to register (may be an implemented interface instead of the full type). + Container to configure. + Object to returned. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload does a default registration (name = null). + + + Type of instance to register (may be an implemented interface instead of the full type). + Container to configure. + Object to returned. + + object that controls how this instance will be managed by the container. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload automatically has the container take ownership of the . + + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + Container to configure. + Name for registration. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + Container to configure. + Name for registration. + + object that controls how this instance will be managed by the container. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload does a default registration and has the container take over the lifetime of the instance. + + Container to configure. + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload does a default registration (name = null). + + + Container to configure. + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + + object that controls how this instance will be managed by the container. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload automatically has the container take ownership of the . + + Container to configure. + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + Name for registration. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Resolve an instance of the default requested type from the container. + + of object to get from the container. + Container to resolve from. + Any overrides for the resolve call. + The retrieved object. + + + + Resolve an instance of the requested type with the given name from the container. + + of object to get from the container. + Container to resolve from. + Name of the object to retrieve. + Any overrides for the resolve call. + The retrieved object. + + + + Resolve an instance of the default requested type from the container. + + Container to resolve from. + of object to get from the container. + Any overrides for the resolve call. + The retrieved object. + + + + Return instances of all registered types requested. + + + + This method is useful if you've registered multiple types with the same + but different names. + + + Be aware that this method does NOT return an instance for the default (unnamed) registration. + + + The type requested. + Container to resolve from. + Any overrides for the resolve calls. + Set of objects of type . + + + + Run an existing object through the container and perform injection on it. + + + + This method is useful when you don't control the construction of an + instance (ASP.NET pages or objects created via XAML, for instance) + but you still want properties and other injection performed. + + + This overload uses the default registrations. + + + of object to perform injection on. + Container to resolve through. + Instance to build up. + Any overrides for the buildup. + The resulting object. By default, this will be , but + container extensions may add things like automatic proxy creation which would + cause this to return a different object (but still type compatible with ). + + + + Run an existing object through the container and perform injection on it. + + + + This method is useful when you don't control the construction of an + instance (ASP.NET pages or objects created via XAML, for instance) + but you still want properties and other injection performed. + + of object to perform injection on. + Container to resolve through. + Instance to build up. + name to use when looking up the typemappings and other configurations. + Any overrides for the Buildup. + The resulting object. By default, this will be , but + container extensions may add things like automatic proxy creation which would + cause this to return a different object (but still type compatible with ). + + + + Run an existing object through the container and perform injection on it. + + + + This method is useful when you don't control the construction of an + instance (ASP.NET pages or objects created via XAML, for instance) + but you still want properties and other injection performed. + + + This overload uses the default registrations. + + + Container to resolve through. + of object to perform injection on. + Instance to build up. + Any overrides for the Buildup. + The resulting object. By default, this will be , but + container extensions may add things like automatic proxy creation which would + cause this to return a different object (but still type compatible with ). + + + + Creates a new extension object and adds it to the container. + + Type of to add. The extension type + will be resolved from within the supplied . + Container to add the extension to. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Resolve access to a configuration interface exposed by an extension. + + Extensions can expose configuration interfaces as well as adding + strategies and policies to the container. This method walks the list of + added extensions and returns the first one that implements the requested type. + + The configuration interface required. + Container to configure. + The requested extension's configuration interface, or null if not found. + + + + Check if a particular type has been registered with the container with + the default name. + + Container to inspect. + Type to check registration for. + True if this type has been registered, false if not. + + + + Check if a particular type/name pair has been registered with the container. + + Container to inspect. + Type to check registration for. + Name to check registration for. + True if this type/name pair has been registered, false if not. + + + + Check if a particular type has been registered with the container with the default name. + + Type to check registration for. + Container to inspect. + True if this type has been registered, false if not. + + + + Check if a particular type/name pair has been registered with the container. + + Type to check registration for. + Container to inspect. + Name to check registration for. + True if this type/name pair has been registered, false if not. + + + + The class provides the means for extension objects + to manipulate the internal state of the . + + + + + Store a type/name pair for later resolution. + + + + When users register type mappings (or other things) with a named key, this method + allows you to register that name with the container so that when the + method is called, that name is included in the list that is returned. + + to register. + Name associated with that type. + + + + The container that this context is associated with. + + The object. + + + + The strategies this container uses. + + The that the container uses to build objects. + + + + The strategies this container uses to construct build plans. + + The that this container uses when creating + build plans. + + + + The policies this container uses. + + The the that container uses to build objects. + + + + The that this container uses. + + The is used to manage objects that the container is managing. + + + + This event is raised when the method, + or one of its overloads, is called. + + + + + This event is raised when the method, + or one of its overloads, is called. + + + + + This event is raised when the method is called, providing + the newly created child container to extensions to act on as they see fit. + + + + + An EventArgs class that holds a string Name. + + + + + Create a new with a null name. + + + + + Create a new with the given name. + + Name to store. + + + + The name. + + Name used for this EventArg object. + + + + Event argument class for the event. + + + + + Create a new instance of . + + Type to map from. + Type to map to. + Name for the registration. + to manage instances. + + + + Type to map from. + + + + + Type to map to. + + + + + to manage instances. + + + + + Event argument class for the event. + + + + + Create a default instance. + + + + + Create a instance initialized with the given arguments. + + Type of instance being registered. + The instance object itself. + Name to register under, null if default registration. + object that handles how + the instance will be owned. + + + + Type of instance being registered. + + + Type of instance being registered. + + + + + Instance object being registered. + + Instance object being registered + + + + that controls ownership of + this instance. + + + + + A that lets you specify that + an instance of a generic type parameter should be resolved. + + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + name to use when looking up in the container. + + + + Return a instance that will + return this types value for the parameter. + + The actual type to resolve. + The resolution key. + The . + + + + A that lets you specify that + an array containing the registered instances of a generic type parameter + should be resolved. + + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + The values for the elements, that will + be converted to objects. + + + + Test to see if this parameter value has a matching type for the given type. + + Type to check. + True if this parameter value is compatible with type , + false if not. + A type is considered compatible if it is an array type of rank one + and its element type is a generic type parameter with a name matching this generic + parameter name configured for the receiver. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + Name for the type represented by this . + This may be an actual type name or a generic argument name. + + + + + A Unity container extension that allows you to configure + which constructors, properties, and methods get injected + via an API rather than through attributes. + + + + + Initial the container with this extension's functionality. + + + When overridden in a derived class, this method will modify the given + by adding strategies, policies, etc. to + install it's functions into the container. + + + + API to configure the injection settings for a particular type. + + Type the injection is being configured for. + Objects containing the details on which members to inject and how. + This extension object. + + + + API to configure the injection settings for a particular type/name pair. + + Type the injection is being configured for. + Name of registration + Objects containing the details on which members to inject and how. + This extension object. + + + + API to configure the injection settings for a particular type. + + Type to configure. + Objects containing the details on which members to inject and how. + This extension object. + + + + API to configure the injection settings for a particular type/name pair. + + Type to configure. + Name of registration. + Objects containing the details on which members to inject and how. + This extension object. + + + + API to configure the injection settings for a particular type/name pair. + + Type of interface/base class being registered (may be null). + Type of actual implementation class being registered. + Name of registration. + Objects containing the details on which members to inject and how. + This extension object. + + + + A class that holds the collection of information + for a constructor, so that the container can + be configured to call this constructor. + + + + + Create a new instance of that looks + for a constructor with the given set of parameters. + + The values for the parameters, that will + be converted to objects. + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Interface registered, ignored in this implementation. + Type to register. + Name used to resolve the type object. + Policy list to add policies to. + + + + An that configures the + container to call a method as part of buildup. + + + + + Create a new instance which will configure + the container to call the given methods with the given parameters. + + Name of the method to call. + Parameter values for the method. + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Type of interface registered, ignored in this implementation. + Type to register. + Name used to resolve the type object. + Policy list to add policies to. + + + + A small function to handle name matching. You can override this + to do things like case insensitive comparisons. + + MethodInfo for the method you're checking. + Name of the method you're looking for. + True if a match, false if not. + + + + A class that holds on to the given value and provides + the required + when the container is configured. + + + + + Create an instance of that stores + the given value, using the runtime type of that value as the + type of the parameter. + + Value to be injected for this parameter. + + + + Create an instance of that stores + the given value, associated with the given type. + + Type of the parameter. + Value of the parameter + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + A generic version of that makes it a + little easier to specify the type of the parameter. + + Type of parameter. + + + + Create a new . + + Value for the parameter. + + + + This class stores information about which properties to inject, + and will configure the container accordingly. + + + + + Configure the container to inject the given property name, + resolving the value via the container. + + Name of the property to inject. + + + + Configure the container to inject the given property name, + using the value supplied. This value is converted to an + object using the + rules defined by the + method. + + Name of property to inject. + Value for property. + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Interface being registered, ignored in this implementation. + Type to register. + Name used to resolve the type object. + Policy list to add policies to. + + + + A class that stores a type, and generates a + resolver object that resolves all the named instances or the + type registered in a container. + + + + + Construct a new that + resolves to the given element type and collection of element values. + + The type of elements to resolve. + The values for the elements, that will + be converted to objects. + + + + Construct a new that + resolves to the given array and element types and collection of element values. + + The type for the array of elements to resolve. + The type of elements to resolve. + The values for the elements, that will + be converted to objects. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + A generic version of for convenience + when creating them by hand. + + Type of the elements for the array of the parameter. + + + + Construct a new that + resolves to the given element generic type with the given element values. + + The values for the elements, that will + be converted to objects. + + + + Interface defining the behavior of the Unity dependency injection container. + + + + + Register a type mapping with the container, where the created instances will use + the given . + + that will be requested. + that will actually be returned. + Name to use for registration, null if a default registration. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + Name for registration. + + object that controls how this instance will be managed by the container. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Resolve an instance of the requested type with the given name from the container. + + of object to get from the container. + Name of the object to retrieve. + Any overrides for the resolve call. + The retrieved object. + + + + Return instances of all registered types requested. + + + + This method is useful if you've registered multiple types with the same + but different names. + + + Be aware that this method does NOT return an instance for the default (unnamed) registration. + + + The type requested. + Any overrides for the resolve calls. + Set of objects of type . + + + + Run an existing object through the container and perform injection on it. + + + + This method is useful when you don't control the construction of an + instance (ASP.NET pages or objects created via XAML, for instance) + but you still want properties and other injection performed. + + of object to perform injection on. + Instance to build up. + name to use when looking up the TypeMappings and other configurations. + Any overrides for the resolve calls. + The resulting object. By default, this will be , but + container extensions may add things like automatic proxy creation which would + cause this to return a different object (but still type compatible with ). + + + + Run an existing object through the container, and clean it up. + + The object to tear down. + + + + Add an extension object to the container. + + to add. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Resolve access to a configuration interface exposed by an extension. + + Extensions can expose configuration interfaces as well as adding + strategies and policies to the container. This method walks the list of + added extensions and returns the first one that implements the requested type. + + of configuration interface required. + The requested extension's configuration interface, or null if not found. + + + + Remove all installed extensions from this container. + + + + This method removes all extensions from the container, including the default ones + that implement the out-of-the-box behavior. After this method, if you want to use + the container again you will need to either read the default extensions or replace + them with your own. + + + The registered instances and singletons that have already been set up in this container + do not get removed. + + + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Create a child container. + + + A child container shares the parent's configuration, but can be configured with different + settings or lifetime. + The new child container. + + + + The parent of this container. + + The parent container, or null if this container doesn't have one. + + + + Get a sequence of that describe the current state + of the container. + + + + + A that holds a weak reference to + it's managed instance. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. + + The object being stored. + + + + Remove the given object from backing store. + + + + + An implementation of that + creates instances of the type of the given Lifetime Manager + by resolving them through the container. + + + + + Create a new that will + return instances of the given type, creating them by + resolving through the container. + + Container to resolve with. + Type of LifetimeManager to create. + + + + Create a new instance of . + + The new instance. + + + + The type of Lifetime manager that will be created by this factory. + + + + + A that holds the instances given to it, + keeping one instance per thread. + + + + This LifetimeManager does not dispose the instances it holds. + + + + + + Initializes a new instance of the class. + + + + + Retrieve a value from the backing store associated with this Lifetime policy for the + current thread. + + the object desired, or if no such object is currently + stored for the current thread. + + + + Stores the given value into backing store for retrieval later when requested + in the current thread. + + The object being stored. + + + + Remove the given object from backing store. + + Not implemented for this lifetime manager. + + + + An implementation that does nothing, + thus ensuring that instances are created new every time. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. + + The object being stored. + + + + Remove the given object from backing store. + + + + + This strategy implements the logic that will call container.ResolveAll + when an array parameter is detected. + + + + + Do the PreBuildUp stage of construction. This is where the actual work is performed. + + Current build context. + + + + An implementation of that is + aware of the build keys used by the Unity container. + + + + + Create a instance for the given + . + + + This implementation looks for the Unity on the + parameter and uses it to create an instance of + for this parameter. + Parameter to create the resolver for. + The resolver object. + + + + An implementation of that is aware + of the build keys used by the Unity container. + + + + + Create a instance for the given + . + + Parameter to create the resolver for. + The resolver object. + + + + An implementation of that is aware of + the build keys used by the unity container. + + + + + Create a for the given + property. + + Property to create resolver for. + The resolver object. + + + + A implementation that returns + the value set in the constructor. + + + + + Create a new instance of + which will return the given value when resolved. + + The value to return. + + + + Get the value for a dependency. + + Current build context. + The value for the dependency. + + + + An implementation of that stores a + type and name, and at resolution time puts them together into a + . + + + + + Create an instance of + with the given type and name. + + The type. + The name (may be null). + + + + Resolve the value for a dependency. + + Current build context. + The value for the dependency. + + + + The type that this resolver resolves. + + + + + The name that this resolver resolves. + + + + + An implementation of that resolves to + to an array populated with the values that result from resolving other instances + of . + + + + + Create an instance of + with the given type and a collection of + instances to use when populating the result. + + The type. + The resolver policies to use when populating an array. + + + + Resolve the value for a dependency. + + Current build context. + An array populated with the results of resolving the resolver policies. + + + + An implementation of that selects + the given constructor and creates the appropriate resolvers to call it with + the specified parameters. + + + + + Create an instance of that + will return the given constructor, being passed the given injection values + as parameters. + + The constructor to call. + Set of objects + that describes how to obtain the values for the constructor parameters. + + + + Choose the constructor to call for the given type. + + Current build context + The to add any + generated resolver objects into. + The chosen constructor. + + + + Helper class for implementing selector policies that need to + set up dependency resolver policies. + + + + + Add dependency resolvers to the parameter set. + + Type that's currently being built (used to resolve open generics). + PolicyList to add the resolvers to. + Objects supplying the dependency resolvers. + Result object to store the keys in. + + + + A implementation that calls the specific + methods with the given parameters. + + + + + Add the given method and parameter collection to the list of methods + that will be returned when the selector's + method is called. + + Method to call. + sequence of objects + that describe how to create the method parameter values. + + + + Return the sequence of methods to call while building the target object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of methods to call. + + + + An implementation of which returns + the set of specific properties that the selector was configured with. + + + + + Add a property that will be par of the set returned when the + is called. + + The property to set. + object describing + how to create the value to inject. + + + + Returns sequence of properties on the given type that + should be set as part of building that object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of objects + that contain the properties to set. + + + + The exception thrown by the Unity container when + an attempt to resolve a dependency fails. + + + + + Create a new that records + the exception for the given type and name. + + Type requested from the container. + Name requested from the container. + The actual exception that caused the failure of the build. + The build context representing the failed operation. + + + + The type that was being requested from the container at the time of failure. + + + + + The name that was being requested from the container at the time of failure. + + + + + A class that stores a name and type, and generates a + resolver object that resolves the parameter via the + container. + + + + + Construct a new that + resolves to the given type. + + Type of this parameter. + + + + Construct a new that + resolves the given type and name. + + Type of this parameter. + Name to use when resolving parameter. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + A generic version of for convenience + when creating them by hand. + + Type of the parameter + + + + Create a new for the given + generic type and the default name. + + + + + Create a new for the given + generic type and name. + + Name to use to resolve this parameter. + + + + An implementation of that wraps a Unity container. + + + + + Initializes a new instance of the class for a container. + + The to wrap with the + interface implementation. + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + 2 + + + + When implemented by inheriting classes, this method will do the actual work of resolving + the requested service instance. + + Type of instance requested.Name of registered service you want. May be null. + + The requested service instance. + + + + + When implemented by inheriting classes, this method will do the actual work of + resolving all the requested service instances. + + Type of service requested. + + Sequence of service instance objects. + + + + + A static helper class that includes various parameter checking routines. + + + + + Throws if the given argument is null. + + if tested value if null. + Argument value to test. + Name of the argument being tested. + + + + Throws an exception if the tested string argument is null or the empty string. + + Thrown if string value is null. + Thrown if the string is empty + Argument value to check. + Name of argument being checked. + + + + Verifies that an argument type is assignable from the provided type (meaning + interfaces are implemented, or classes exist in the base class hierarchy). + + The argument type that will be assigned to. + The type of the value being assigned. + Argument name. + + + + Verifies that an argument instance is assignable from the provided type (meaning + interfaces are implemented, or classes exist in the base class hierarchy, or instance can be + assigned through a runtime wrapper, as is the case for COM Objects). + + The argument type that will be assigned to. + The instance that will be assigned. + Argument name. + + + + A helper class to manage the names that get registered in the container + + + + + The build stages we use in the Unity container + strategy pipeline. + + + + + First stage. By default, nothing happens here. + + + + + Second stage. Type mapping occurs here. + + + + + Third stage. lifetime managers are checked here, + and if they're available the rest of the pipeline is skipped. + + + + + Fourth stage. Reflection over constructors, properties, etc. is + performed here. + + + + + Fifth stage. Instance creation happens here. + + + + + Sixth stage. Property sets and method injection happens here. + + + + + Seventh and final stage. By default, nothing happens here. + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to The type {0} has multiple constructors of length {1}. Unable to disambiguate.. + + + + + Looks up a localized string similar to The provided string argument must not be empty.. + + + + + Looks up a localized string similar to The current build operation (build key {2}) failed: {3} (Strategy type {0}, index {1}). + + + + + Looks up a localized string similar to The current type, {0}, is an abstract class and cannot be constructed. Are you missing a type mapping?. + + + + + Looks up a localized string similar to The current type, {0}, is delegate and cannot be constructed. Unity only supports resolving Func<T> and Func<IEnumerable<T>> by default.. + + + + + Looks up a localized string similar to The current type, {0}, is an interface and cannot be constructed. Are you missing a type mapping?. + + + + + Looks up a localized string similar to Cannot extract type from build key {0}.. + + + + + Looks up a localized string similar to The method {0}.{1}({2}) is an open generic method. Open generic methods cannot be injected.. + + + + + Looks up a localized string similar to The property {0} on type {1} is an indexer. Indexed properties cannot be injected.. + + + + + Looks up a localized string similar to The method {1} on type {0} has an out parameter. Injection cannot be performed.. + + + + + Looks up a localized string similar to The method {0}.{1}({2}) has at least one out parameter. Methods with out parameters cannot be injected.. + + + + + Looks up a localized string similar to The method {0}.{1}({2}) has at least one ref parameter.Methods with ref parameters cannot be injected.. + + + + + Looks up a localized string similar to The method {1} on type {0} is marked for injection, but it is an open generic method. Injection cannot be performed.. + + + + + Looks up a localized string similar to The method {0}.{1}({2}) is static. Static methods cannot be injected.. + + + + + Looks up a localized string similar to The type {0} is an open generic type. An open generic type cannot be resolved.. + + + + + Looks up a localized string similar to Resolving parameter "{0}" of constructor {1}. + + + + + Looks up a localized string similar to The parameter {0} could not be resolved when attempting to call constructor {1}.. + + + + + Looks up a localized string similar to Parameter type inference does not work for null values. Indicate the parameter type explicitly using a properly configured instance of the InjectionParameter or InjectionParameter<T> classes.. + + + + + Looks up a localized string similar to Calling constructor {0}. + + + + + Looks up a localized string similar to Calling method {0}.{1}. + + + + + Looks up a localized string similar to An item with the given key is already present in the dictionary.. + + + + + Looks up a localized string similar to The lifetime manager is already registered. Lifetime managers cannot be reused, please create a new one.. + + + + + Looks up a localized string similar to The override marker build plan policy has been invoked. This should never happen, looks like a bug in the container.. + + + + + Looks up a localized string similar to Resolving parameter "{0}" of method {1}.{2}. + + + + + Looks up a localized string similar to The value for parameter "{1}" of method {0} could not be resolved. . + + + + + Looks up a localized string similar to Could not resolve dependency for build key {0}.. + + + + + Looks up a localized string similar to The type {0} has multiple constructors marked with the InjectionConstructor attribute. Unable to disambiguate.. + + + + + Looks up a localized string similar to The supplied type {0} must be an open generic type.. + + + + + Looks up a localized string similar to The supplied type {0} does not have the same number of generic arguments as the target type {1}.. + + + + + Looks up a localized string similar to The type {0} does not have an accessible constructor.. + + + + + Looks up a localized string similar to The type {0} does not have a generic argument named "{1}". + + + + + Looks up a localized string similar to while resolving. + + + + + Looks up a localized string similar to The type {0} does not have a constructor that takes the parameters ({1}).. + + + + + Looks up a localized string similar to The type {0} does not have a public method named {1} that takes the parameters ({2}).. + + + + + Looks up a localized string similar to The type {0} does not contain an instance property named {1}.. + + + + + Looks up a localized string similar to The type {0} is not a generic type, and you are attempting to inject a generic parameter named "{1}".. + + + + + Looks up a localized string similar to The type {0} is not an array type with rank 1, and you are attempting to use a [DependencyArray] attribute on a parameter or property with this type.. + + + + + Looks up a localized string similar to Optional dependencies must be reference types. The type {0} is a value type.. + + + + + Looks up a localized string similar to The property {0} on type {1} is not settable.. + + + + + Looks up a localized string similar to The property {0} on type {1} is of type {2}, and cannot be injected with a value of type {3}.. + + + + + Looks up a localized string similar to The value for the property "{0}" could not be resolved.. + + + + + Looks up a localized string similar to The provided string argument must not be empty.. + + + + + Looks up a localized string similar to Resolution of the dependency failed, type = "{0}", name = "{1}". + Exception occurred while: {2}. + Exception is: {3} - {4} + ----------------------------------------------- + At the time of the exception, the container was: + . + + + + + Looks up a localized string similar to Resolving {0},{1}. + + + + + Looks up a localized string similar to Resolving {0},{1} (mapped from {2}, {3}). + + + + + Looks up a localized string similar to Resolving value for property {0}.{1}. + + + + + Looks up a localized string similar to The constructor {1} selected for type {0} has ref or out parameters. Such parameters are not supported for constructor injection.. + + + + + Looks up a localized string similar to Setting value for property {0}.{1}. + + + + + Looks up a localized string similar to The type {0} cannot be constructed. You must configure the container to supply this value.. + + + + + Looks up a localized string similar to The type {1} cannot be assigned to variables of type {0}.. + + + + + Looks up a localized string similar to <unknown>. + + + + + A simple, extensible dependency injection container. + + + + + Create a default . + + + + + Create a with the given parent container. + + The parent . The current object + will apply its own settings first, and then check the parent for additional ones. + + + + RegisterType a type mapping with the container, where the created instances will use + the given . + + that will be requested. + that will actually be returned. + Name to use for registration, null if a default registration. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + RegisterType an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + Name for registration. + + If true, the container will take over the lifetime of the instance, + calling Dispose on it (if it's ) when the container is Disposed. + + If false, container will not maintain a strong reference to . User is responsible + for disposing instance, and for keeping the instance from being garbage collected. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Get an instance of the requested type with the given name from the container. + + of object to get from the container. + Name of the object to retrieve. + Any overrides for the resolve call. + The retrieved object. + + + + Return instances of all registered types requested. + + + + This method is useful if you've registered multiple types with the same + but different names. + + + Be aware that this method does NOT return an instance for the default (unnamed) registration. + + + The type requested. + Any overrides for the resolve calls. + Set of objects of type . + + + + Run an existing object through the container and perform injection on it. + + + + This method is useful when you don't control the construction of an + instance (ASP.NET pages or objects created via XAML, for instance) + but you still want properties and other injection performed. + + of object to perform injection on. + Instance to build up. + name to use when looking up the typemappings and other configurations. + Any overrides for the buildup. + The resulting object. By default, this will be , but + container extensions may add things like automatic proxy creation which would + cause this to return a different object (but still type compatible with ). + + + + Run an existing object through the container, and clean it up. + + The object to tear down. + + + + Add an extension object to the container. + + to add. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Get access to a configuration interface exposed by an extension. + + Extensions can expose configuration interfaces as well as adding + strategies and policies to the container. This method walks the list of + added extensions and returns the first one that implements the requested type. + + of configuration interface required. + The requested extension's configuration interface, or null if not found. + + + + Remove all installed extensions from this container. + + + + This method removes all extensions from the container, including the default ones + that implement the out-of-the-box behavior. After this method, if you want to use + the container again you will need to either read the default extensions or replace + them with your own. + + + The registered instances and singletons that have already been set up in this container + do not get removed. + + + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Create a child container. + + + A child container shares the parent's configuration, but can be configured with different + settings or lifetime. + The new child container. + + + + Dispose this container instance. + + + Disposing the container also disposes any child containers, + and disposes any instances whose lifetimes are managed + by the container. + + + + + Dispose this container instance. + + + This class doesn't have a finalizer, so will always be true. + True if being called from the IDisposable.Dispose + method, false if being called from a finalizer. + + + + Remove policies associated with building this type. This removes the + compiled build plan so that it can be rebuilt with the new settings + the next time this type is resolved. + + Type of object to clear the plan for. + Name the object is being registered with. + + + + The parent of this container. + + The parent container, or null if this container doesn't have one. + + + + Get a sequence of that describe the current state + of the container. + + + + + Implementation of the ExtensionContext that is actually used + by the UnityContainer implementation. + + + This is a nested class so that it can access state in the + container that would otherwise be inaccessible. + + + + + This event is raised when the method, + or one of its overloads, is called. + + + + + This extension supplies the default behavior of the UnityContainer API + by handling the context events and setting policies. + + + + + Install the default container behavior into the container. + + + + + Remove the default behavior from the container. + + + + + This extension installs the default strategies and policies into the container + to implement the standard behavior of the Unity container. + + + + + Add the default ObjectBuilder strategies & policies to the container. + + + + + Helper class to wrap common reflection stuff dealing with + methods. + + + + + Create a new instance that + lets us do more reflection stuff on that method. + + The method to reflect on. + + + + Given our set of generic type arguments, + + The generic type arguments. + An array with closed parameter types. + + + + Returns true if any of the parameters of this method + are open generics. + + + + + Return the of each parameter for this + method. + + Sequence of objects, one for + each parameter in order. + + + + A helper class that encapsulates two different + data items together into a a single item. + + + + + Create a new containing + the two values give. + + First value + Second value + + + + The first value of the pair. + + + + + The second value of the pair. + + + + + Container for a Pair helper method. + + + + + A helper factory method that lets users take advantage of type inference. + + Type of first value. + Type of second value. + First value. + Second value. + A new instance. + + + + A utility class that handles the logic of matching parameter + lists, so we can find the right constructor and method overloads. + + + + + Create a new that will attempt to + match the given parameter types. + + Target parameters to match against. + + + + Tests to see if the given set of types matches the ones + we're looking for. + + parameter list to look for. + true if they match, false if they don't. + + + + Tests to see if the given set of types matches the ones we're looking for. + + Candidate method signature to look for. + True if they match, false if they don't. + + + + Another reflection helper class that has extra methods + for dealing with ParameterInfo. + + + + + A small helper class to encapsulate details of the + reflection API, particularly around generics. + + + + + Create a new instance that + lets you look at information about the given type. + + Type to do reflection on. + + + + Test the given object, looking at + the parameters. Determine if any of the parameters are + open generic types that need type attributes filled in. + + The method to check. + True if any of the parameters are open generics. False if not. + + + + If this type is an open generic, use the + given array to + determine what the required closed type is and return that. + + If the parameter is not an open type, just + return this parameter's type. + Type arguments to substitute in for + the open type parameters. + Corresponding closed type of this parameter. + + + + Given a generic argument name, return the corresponding type for this + closed type. For example, if the current type is SomeType<User>, and the + corresponding definition was SomeType<TSomething>, calling this method + and passing "TSomething" will return typeof(User). + + Name of the generic parameter. + Type of the corresponding generic parameter, or null if there + is no matching name. + + + + The object we're reflecting over. + + + + + Is this type generic? + + + + + Is this type an open generic (no type parameter specified) + + + + + Is this type an array type? + + + + + Is this type an array of generic elements? + + + + + The type of the elements in this type (if it's an array). + + + + + Returns all the public constructors defined for the current reflected . + + + An enumeration of ConstructorInfo objects representing all the public instance constructors defined for the + current reflected , but not including the type initializer (static constructor). + + + + + Create a new instance of that + lets you query information about the given ParameterInfo object. + + Parameter to query. + + + + A set of helper methods to pick through lambdas and pull out + from them. + + + + + Pull out a object from an expression of the form + () => SomeClass.SomeMethod() + + Expression describing the method to call. + Corresponding . + + + + Pull out a object from an expression of the form + x => x.SomeMethod() + + The type where the method is defined. + Expression describing the method to call. + Corresponding . + + + + Pull out a object for the get method from an expression of the form + x => x.SomeProperty + + The type where the method is defined. + The type for the property. + Expression describing the property for which the get method is to be extracted. + Corresponding . + + + + Pull out a object for the set method from an expression of the form + x => x.SomeProperty + + The type where the method is defined. + The type for the property. + Expression describing the property for which the set method is to be extracted. + Corresponding . + + + + + + + + + + + + + Pull out a object from an expression of the form () => new SomeType() + + The type where the constructor is defined. + Expression invoking the desired constructor. + Corresponding . + + + diff --git a/packages/Unity.4.0.1/lib/win8/Microsoft.Practices.Unity.RegistrationByConvention.XML b/packages/Unity.4.0.1/lib/win8/Microsoft.Practices.Unity.RegistrationByConvention.XML new file mode 100644 index 0000000..b706e6f --- /dev/null +++ b/packages/Unity.4.0.1/lib/win8/Microsoft.Practices.Unity.RegistrationByConvention.XML @@ -0,0 +1,306 @@ + + + + Microsoft.Practices.Unity.RegistrationByConvention + + + + + Provides helper methods to retrieve classes from assemblies. + + + + + Returns all visible, non-abstract classes from . + + The assemblies. + All visible, non-abstract classes found in the assemblies. + is . + contains elements. + All exceptions thrown while getting types from the assemblies are ignored, and the types that can be retrieved are returned. + + + + Returns all visible, non-abstract classes from , and optionally skips errors. + + to skip errors; otherwise, . + The assemblies. + + All visible, non-abstract classes. + + is . + contains elements. + + If is , all exceptions thrown while getting types from the assemblies are ignored, and the types + that can be retrieved are returned; otherwise, the original exception is thrown. + + + + + Returns all visible, non-abstract classes from . + + to skip errors; otherwise, . + The assemblies. + + All visible, non-abstract classes. + + is . + contains elements. + + If is , all exceptions thrown while getting types from the assemblies are ignored, and the types + that can be retrieved are returned; otherwise, the original exception is thrown. + + + + + Returns all visible, non-abstract classes from all assemblies located where the application is installed. + + to include the Unity assemblies; otherwise, . Defaults to . + to skip errors; otherwise, . + + All visible, non-abstract classes. + + + If is , all exceptions thrown while loading assemblies or getting types from the assemblies + are ignored, and the types that can be retrieved are returned; otherwise, the original exception is thrown. These exceptions might be wrapped in a + . + + + + + The exception that is thrown when registering multiple types would result in an type mapping being overwritten. + + + + + Initializes a new instance of the class. + + The name for the mapping. + The source type for the mapping. + The type currently mapped. + The new type to map. + + + + Gets the name for the mapping. + + + + + Gets the source type for the mapping. + + + + + Gets the type currently mapped. + + + + + Gets the new type to map. + + + + + Represents a set of types to register and their registration settings. + + + + + Gets types to register. + + + + + Gets a function to get the types that will be requested for each type to configure. + + + + + Gets a function to get the name to use for the registration of each type. + + + + + Gets a function to get the for the registration of each type. Defaults to no lifetime management. + + + + + + Gets a function to get the additional objects for the registration of each type. Defaults to no injection members. + + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + An attempt to override an existing mapping was detected for type {1} wit... + + + + + The set of assemblies contains a null element. + + + + + Provides a set of convenience overloads to the + interface to support registration of multiple types. + + + + + Registers the supplied types by using the specified rules for name, lifetime manager, injection members, and registration types. + + The container to configure. + The types to register. The methods in the class can be used to scan assemblies to get types, and further filtering can be performed using LINQ queries. + A function that gets the types that will be requested for each type to configure. It can be a method from the class or a custom function. Defaults to no registration types, and registers only the supplied types. + A function that gets the name to use for the registration of each type. It can be a method from the or a custom function. Defaults to no name. + A function that gets the for the registration of each type. It can be a method from the class or a custom function. Defaults to no lifetime management. + A function that gets the additional objects for the registration of each type. Defaults to no injection members. + to overwrite existing mappings; otherwise, . Defaults to . + + The container that this method was called on. + + A new registration would overwrite an existing mapping and is . + + + + Registers the types according to the . + + The container to configure. + The convention to determine which types will be registered and how. + to overwrite existing mappings; otherwise, . Defaults to . + + The container that this method was called on. + + + + + Provides helper methods to specify the lifetime for a type with registration by convention. + + + + + Returns a . + + The type. + A lifetime manager + + + + Returns a . + + The type. + A container controlled lifetime manager. + + + + Returns a . + + The type. + An externally controlled lifetime manager. + + + + Returns a . + + The type. + A hierarchical lifetime manager. + + + + Returns a . + + The type. + A per resolve lifetime manager. + + + + Returns a . + + The type. + A transient lifetime manager. + + + + Returns a . + + The custom type. + The type. + + A lifetime manager. + + + + + Returns a . + + The type. + A per thread lifetime manager. + + + + Provides helper methods to map types to the types interfaces to which register them. + + + + + Returns no types. + + The type to register. + An empty enumeration. + + + + Returns an enumeration with the interface that matches the name of . + + The type to register. + An enumeration with the first interface matching the name of (for example, if type is MyType, a matching interface is IMyType), + or an empty enumeration if no such interface is found. + + + + Returns an enumeration with all the interfaces implemented by . + + The type to register. + An enumeration with all the interfaces implemented by the implementation type except . + + + + Returns an enumeration with all the interfaces implemented by that belong to the same assembly as implementationType. + + The type to register. + An enumeration with all the interfaces implemented by the implementation type that belong to the same assembly. + + + + Provides helper methods to get type names. + + + + + Returns the type name. + + The type. + The type name. + + + + Returns null for the registration name. + + The type. + + + + diff --git a/packages/Unity.4.0.1/lib/win8/Microsoft.Practices.Unity.RegistrationByConvention.dll b/packages/Unity.4.0.1/lib/win8/Microsoft.Practices.Unity.RegistrationByConvention.dll new file mode 100644 index 0000000..d6b2432 Binary files /dev/null and b/packages/Unity.4.0.1/lib/win8/Microsoft.Practices.Unity.RegistrationByConvention.dll differ diff --git a/packages/Unity.4.0.1/lib/win8/Microsoft.Practices.Unity.RegistrationByConvention.pri b/packages/Unity.4.0.1/lib/win8/Microsoft.Practices.Unity.RegistrationByConvention.pri new file mode 100644 index 0000000..7a2c9e2 Binary files /dev/null and b/packages/Unity.4.0.1/lib/win8/Microsoft.Practices.Unity.RegistrationByConvention.pri differ diff --git a/packages/Unity.4.0.1/lib/win8/Microsoft.Practices.Unity.dll b/packages/Unity.4.0.1/lib/win8/Microsoft.Practices.Unity.dll new file mode 100644 index 0000000..0d8c004 Binary files /dev/null and b/packages/Unity.4.0.1/lib/win8/Microsoft.Practices.Unity.dll differ diff --git a/packages/Unity.4.0.1/lib/win8/Microsoft.Practices.Unity.xml b/packages/Unity.4.0.1/lib/win8/Microsoft.Practices.Unity.xml new file mode 100644 index 0000000..f99ca70 --- /dev/null +++ b/packages/Unity.4.0.1/lib/win8/Microsoft.Practices.Unity.xml @@ -0,0 +1,5916 @@ + + + + Microsoft.Practices.Unity + + + + + Provides access to the names registered for a container. + + + + + Represents a builder policy interface. Since there are no fixed requirements + for policies, it acts as a marker interface from which to derive all other + policy interfaces. + + + + + Gets the names registered for a type. + + The type. + The names registered for . + + + + An implementation + that constructs a build plan for creating objects. + + + + + A that can create and return an + for the given build key. + + + + + Create a build plan using the given context and build key. + + Current build context. + Current build key. + The build plan. + + + + Creates a build plan using the given context and build key. + + Current build context. + Current build key. + + The build plan. + + + + + Provides extension methods to the class due to the introduction + of class in the .NET for Windows Store apps. + + + + + Returns the constructor in that matches the specified constructor parameter types. + + The type to inspect + The constructor parameter types. + The constructor that matches the specified parameter types. + + + + Returns the non-static declared methods of a type or its base types. + + The type to inspect + An enumerable of the objects. + + + + Returns the non-static method of a type or its based type. + + The type to inspect + The name of the method to seek. + The (closed) parameter type signature of the method. + The discovered + + + + Returns the declared properties of a type or its base types. + + The type to inspect + An enumerable of the objects. + + + + Determines if the types in a parameter set ordinally matches the set of supplied types. + + + + + + + + Base class for attributes that can be placed on parameters + or properties to specify how to resolve the value for + that parameter or property. + + + + + Create an instance of that + will be used to get the value for the member this attribute is + applied to. + + Type of parameter or property that + this attribute is decoration. + The resolver object. + + + + This attribute is used to indicate which constructor to choose when + the container attempts to build a type. + + + + + This attribute is used to mark methods that should be called when + the container is building an object. + + + + + This attribute is used to mark properties and parameters as targets for injection. + + + For properties, this attribute is necessary for injection to happen. For parameters, + it's not needed unless you want to specify additional information to control how + the parameter is resolved. + + + + + Create an instance of with no name. + + + + + Create an instance of with the given name. + + Name to use when resolving this dependency. + + + + Create an instance of that + will be used to get the value for the member this attribute is + applied to. + + Type of parameter or property that + this attribute is decoration. + The resolver object. + + + + The name specified in the constructor. + + + + + An used to mark a dependency + as optional - the container will try to resolve it, and return null + if the resolution fails rather than throw. + + + + + Construct a new object. + + + + + Construct a new object that + specifies a named dependency. + + Name of the dependency. + + + + Create an instance of that + will be used to get the value for the member this attribute is + applied to. + + Type of parameter or property that + this attribute is decoration. + The resolver object. + + + + Name of the dependency. + + + + + A that composites other + ResolverOverride objects. The GetResolver operation then + returns the resolver from the first child override that + matches the current context and request. + + + + + Base class for all override objects passed in the + method. + + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + Wrap this resolver in one that verifies the type of the object being built. + This allows you to narrow any override down to a specific type easily. + + Type to constrain the override to. + The new override. + + + + Wrap this resolver in one that verifies the type of the object being built. + This allows you to narrow any override down to a specific type easily. + + Type to constrain the override to. + The new override. + + + + Add a new to the collection + that is checked. + + item to add. + + + + Add a set of s to the collection. + + items to add. + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + 2 + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + 1 + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + Class that returns information about the types registered in a container. + + + + + The type that was passed to the method + as the "from" type, or the only type if type mapping wasn't done. + + + + + The type that this registration is mapped to. If no type mapping was done, the + property and this one will have the same value. + + + + + Name the type was registered under. Null for default registration. + + + + + The registered lifetime manager instance. + + + + + The lifetime manager for this registration. + + + This property will be null if this registration is for an open generic. + + + + A class that overrides + the value injected whenever there is a dependency of the + given type, regardless of where it appears in the object graph. + + + + + Create an instance of to override + the given type with the given value. + + Type of the dependency. + Value to use. + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + A convenience version of that lets you + specify the dependency type using generic syntax. + + Type of the dependency to override. + + + + Construct a new object that will + override the given dependency, and pass the given value. + + + + + A convenience form of that lets you + specify multiple parameter overrides in one shot rather than having + to construct multiple objects. + + + This class isn't really a collection, it just implements IEnumerable + so that we get use of the nice C# collection initializer syntax. + + + + + Base helper class for creating collections of objects + for use in passing a bunch of them to the resolve call. This base class provides + the mechanics needed to allow you to use the C# collection initializer syntax. + + Concrete type of the this class collects. + Key used to create the underlying override object. + Value that the override returns. + + + + Add a new override to the collection with the given key and value. + + Key - for example, a parameter or property name. + Value - the value to be returned by the override. + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + 2 + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + 1 + + + + When implemented in derived classes, this method is called from the + method to create the actual objects. + + Key value to create the resolver. + Value to store in the resolver. + The created . + + + + When implemented in derived classes, this method is called from the + method to create the actual objects. + + Key value to create the resolver. + Value to store in the resolver. + The created . + + + + Event argument class for the event. + + + + + Construct a new object with the + given child container object. + + An for the newly created child + container. + + + + The newly created child container. + + + + + An extension context for the created child container. + + + + + Base class for subclasses that let you specify that + an instance of a generic type parameter should be resolved. + + + + + Base type for objects that are used to configure parameters for + constructor or method injection, or for getting the value to + be injected into a property. + + + + + Test to see if this parameter value has a matching type for the given type. + + Type to check. + True if this parameter value is compatible with type , + false if not. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + Convert the given set of arbitrary values to a sequence of InjectionParameterValue + objects. The rules are: If it's already an InjectionParameterValue, return it. If + it's a Type, return a ResolvedParameter object for that type. Otherwise return + an InjectionParameter object for that value. + + The values to build the sequence from. + The resulting converted sequence. + + + + Convert an arbitrary value to an InjectionParameterValue object. The rules are: + If it's already an InjectionParameterValue, return it. If it's a Type, return a + ResolvedParameter object for that type. Otherwise return an InjectionParameter + object for that value. + + The value to convert. + The resulting . + + + + Name for the type represented by this . + This may be an actual type name or a generic argument name. + + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + name to use when looking up in the container. + + + + Test to see if this parameter value has a matching type for the given type. + + Type to check. + True if this parameter value is compatible with type , + false if not. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + Return a instance that will + return this types value for the parameter. + + The actual type to resolve. + The resolution key. + The . + + + + Name for the type represented by this . + This may be an actual type name or a generic argument name. + + + + + A that lets you specify that + an instance of a generic type parameter should be resolved, providing the + value if resolving fails. + + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + name to use when looking up in the container. + + + + Return a instance that will + return this types value for the parameter. + + The actual type to resolve. + The resolution key. + The . + + + + A class that lets you specify a factory method the container + will use to create the object. + + This is a significantly easier way to do the same + thing the old static factory extension was used for. + + + + Base class for objects that can be used to configure what + class members get injected by the container. + + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Type to register. + Policy list to add policies to. + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Type of interface being registered. If no interface, + this will be null. + Type of concrete type being registered. + Name used to resolve the type object. + Policy list to add policies to. + + + + Create a new instance of with + the given factory function. + + Factory function. + + + + Create a new instance of with + the given factory function. + + Factory function. + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Type of interface being registered. If no interface, + this will be null. This parameter is ignored in this implementation. + Type of concrete type being registered. + Name used to resolve the type object. + Policy list to add policies to. + + + + A that can be passed to + to configure a + parameter or property as an optional dependency. + + + + + A base class for implementing classes + that deal in explicit types. + + + + + Create a new that exposes + information about the given . + + Type of the parameter. + + + + Test to see if this parameter value has a matching type for the given type. + + Type to check. + True if this parameter value is compatible with type , + false if not. + + + + The type of parameter this object represents. + + + + + Name for the type represented by this . + This may be an actual type name or a generic argument name. + + + + + Construct a new object that + specifies the given . + + Type of the dependency. + + + + Construct a new object that + specifies the given and . + + Type of the dependency. + Name for the dependency. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + A generic version of that lets you + specify the type of the dependency using generics syntax. + + Type of the dependency. + + + + Construct a new . + + + + + Construct a new with the given + . + + Name of the dependency. + + + + A special lifetime manager which works like , + except that in the presence of child containers, each child gets it's own instance + of the object, instead of sharing one in the common parent. + + + + + A that holds onto the instance given to it. + When the is disposed, + the instance is disposed with it. + + + + + Base class for Lifetime managers which need to synchronize calls to + . + + + + The purpose of this class is to provide a basic implementation of the lifetime manager synchronization pattern. + + + Calls to the method of a + instance acquire a lock, and if the instance has not been initialized with a value yet the lock will only be released + when such an initialization takes place by calling the method or if + the build request which resulted in the call to the GetValue method fails. + + + + + + + Base class for Lifetime managers - classes that control how + and when instances are created by the Unity container. + + + + + A that controls how instances are + persisted and recovered from an external store. Used to implement + things like singletons and per-http-request lifetime. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. + + The object to store. + + + + Remove the value this lifetime policy is managing from backing store. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. + + The object being stored. + + + + Remove the given object from backing store. + + + + + This interface provides a hook for the builder context to + implement error recovery when a builder strategy throws + an exception. Since we can't get try/finally blocks onto + the call stack for later stages in the chain, we instead + add these objects to the context. If there's an exception, + all the current IRequiresRecovery instances will have + their Recover methods called. + + + + + A method that does whatever is needed to clean up + as part of cleaning up after an exception. + + + Don't do anything that could throw in this method, + it will cause later recover operations to get skipped + and play real havoc with the stack trace. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + Calls to this method acquire a lock which is released only if a non-null value + has been set for the lifetime manager. + + + + Performs the actual retrieval of a value from the backing store associated + with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + This method is invoked by + after it has acquired its lock. + + + + Stores the given value into backing store for retrieval later. + + The object being stored. + Setting a value will attempt to release the lock acquired by + . + + + + Performs the actual storage of the given value into backing store for retrieval later. + + The object being stored. + This method is invoked by + before releasing its lock. + + + + Remove the given object from backing store. + + + + + A method that does whatever is needed to clean up + as part of cleaning up after an exception. + + + Don't do anything that could throw in this method, + it will cause later recover operations to get skipped + and play real havoc with the stack trace. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. + + The object being stored. + + + + Remove the given object from backing store. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Standard Dispose pattern implementation. Not needed, but it keeps FxCop happy. + + Always true, since we don't have a finalizer. + + + + This is a custom lifetime manager that acts like , + but also provides a signal to the default build plan, marking the type so that + instances are reused across the build up object graph. + + + + + Construct a new object that does not + itself manage an instance. + + + + + Construct a new object that stores the + give value. This value will be returned by + but is not stored in the lifetime manager, nor is the value disposed. + This Lifetime manager is intended only for internal use, which is why the + normal method is not used here. + + Value to store. + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. In this class, + this is a noop, since it has special hooks down in the guts. + + The object being stored. + + + + Remove the given object from backing store. Noop in this class. + + + + + A strategy that handles Hierarchical lifetimes across a set of parent/child + containers. + + + + + Represents a strategy in the chain of responsibility. + Strategies are required to support both BuildUp and TearDown. + + + + + Represents a strategy in the chain of responsibility. + Strategies are required to support both BuildUp and TearDown. Although you + can implement this interface directly, you may also choose to use + as the base class for your strategies, as + this class provides useful helper methods and makes support BuildUp and TearDown + optional. + + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + Called during the chain of responsibility for a build operation. The + PostBuildUp method is called when the chain has finished the PreBuildUp + phase and executes in reverse order from the PreBuildUp calls. + + Context of the build operation. + + + + Called during the chain of responsibility for a teardown operation. The + PreTearDown method is called when the chain is being executed in the + forward direction. + + Context of the teardown operation. + + + + Called during the chain of responsibility for a teardown operation. The + PostTearDown method is called when the chain has finished the PreTearDown + phase and executes in reverse order from the PreTearDown calls. + + Context of the teardown operation. + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + Called during the chain of responsibility for a build operation. The + PostBuildUp method is called when the chain has finished the PreBuildUp + phase and executes in reverse order from the PreBuildUp calls. + + Context of the build operation. + + + + Called during the chain of responsibility for a teardown operation. The + PreTearDown method is called when the chain is being executed in the + forward direction. + + Context of the teardown operation. + + + + Called during the chain of responsibility for a teardown operation. The + PostTearDown method is called when the chain has finished the PreTearDown + phase and executes in reverse order from the PreTearDown calls. + + Context of the teardown operation. + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + A that will attempt to + resolve a value, and return null if it cannot rather than throwing. + + + + + A strategy that is used at build plan execution time + to resolve a dependent value. + + + + + Get the value for a dependency. + + Current build context. + The value for the dependency. + + + + Construct a new object + that will attempt to resolve the given name and type from the container. + + Type to resolve. Must be a reference type. + Name to resolve with. + + + + Construct a new object + that will attempt to resolve the given type from the container. + + Type to resolve. Must be a reference type. + + + + Get the value for a dependency. + + Current build context. + The value for the dependency. + + + + Type this resolver will resolve. + + + + + Name this resolver will resolve. + + + + + Extension methods on to provide convenience + overloads (generic versions, mostly). + + + + + Removes an individual policy type for a build key. + + The type the policy was registered as. + to remove the policy from. + The key the policy applies. + + + + Removes a default policy. + + The type the policy was registered as. + to remove the policy from. + + + + Gets an individual policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + The policy list that actually contains the returned policy. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + to search. + The interface the policy is registered under. + The key the policy applies. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + to search. + The interface the policy is registered under. + The key the policy applies. + The policy list that actually contains the returned policy. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy list that actually contains the returned policy. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + to search. + The interface the policy is registered under. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy in the list, if present; returns null otherwise. + + + + Get the non default policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy in the list, if present; returns null otherwise. + + + + Get the non default policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy list that actually contains the returned policy. + The policy in the list, if present; returns null otherwise. + + + + Get the non default policy. + + to search. + The interface the policy is registered under. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy in the list, if present; returns null otherwise. + + + + Sets an individual policy. + + The interface the policy is registered under. + to add the policy to. + The policy to be registered. + The key the policy applies. + + + + Sets a default policy. When checking for a policy, if no specific individual policy + is available, the default will be used. + + The interface to register the policy under. + to add the policy to. + The default policy to be registered. + + + + Base class for the current operation stored in the build context. + + + + + Create a new . + + Type currently being built. + + + + The type that's currently being built. + + + + + Build plan for that will return a Func that will resolve the requested type + through this container later. + + + + + A build plan is an object that, when invoked, will create a new object + or fill in a given existing one. It encapsulates all the information + gathered by the strategies to construct a particular object. + + + + + Creates an instance of this build plan's type, or fills + in the existing type if passed in. + + Context used to build up the object. + + + + Creates an instance of this build plan's type, or fills + in the existing type if passed in. + + Context used to build up the object. + + + + The almost inevitable collection of extra helper methods on + to augment the rich set of what + LINQ already gives us. + + + + + Execute the provided on every item in . + + Type of the items stored in + Sequence of items to process. + Code to run over each item. + + + + Create a single string from a sequence of items, separated by the provided , + and with the conversion to string done by the given . + + This method does basically the same thing as , + but will work on any sequence of items, not just arrays. + Type of items in the sequence. + Sequence of items to convert. + Separator to place between the items in the string. + The conversion function to change TItem -> string. + The resulting string. + + + + Create a single string from a sequence of items, separated by the provided , + and with the conversion to string done by the item's method. + + This method does basically the same thing as , + but will work on any sequence of items, not just arrays. + Type of items in the sequence. + Sequence of items to convert. + Separator to place between the items in the string. + The resulting string. + + + + A class that lets you + override a named parameter passed to a constructor. + + + + + Construct a new object that will + override the given named constructor parameter, and pass the given + value. + + Name of the constructor parameter. + Value to pass for the constructor. + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + A convenience form of that lets you + specify multiple parameter overrides in one shot rather than having + to construct multiple objects. + + + + + When implemented in derived classes, this method is called from the + method to create the actual objects. + + Key value to create the resolver. + Value to store in the resolver. + The created . + + + + A that lets you override + the value for a specified property. + + + + + Create an instance of . + + The property name. + Value to use for the property. + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + A convenience form of that lets you + specify multiple property overrides in one shot rather than having + to construct multiple objects. + + + + + When implemented in derived classes, this method is called from the + method to create the actual objects. + + Key value to create the resolver. + Value to store in the resolver. + The created . + + + + Interface defining the configuration interface exposed by the + Static Factory extension. + + + + + Base interface for all extension configuration interfaces. + + + + + Retrieve the container instance that we are currently configuring. + + + + + Register the given factory delegate to be called when the container is + asked to resolve . + + Type that will be requested from the container. + Delegate to invoke to create the instance. + The container extension object this method was invoked on. + + + + Register the given factory delegate to be called when the container is + asked to resolve and . + + Type that will be requested from the container. + The name that will be used when requesting to resolve this type. + Delegate to invoke to create the instance. + The container extension object this method was invoked on. + + + + Represents the context in which a build-up or tear-down operation runs. + + + + + Represents the context in which a build-up or tear-down operation runs. + + + + + Add a new set of resolver override objects to the current build operation. + + objects to add. + + + + Get a object for the given + or null if that dependency hasn't been overridden. + + Type of the dependency. + Resolver to use, or null if no override matches for the current operation. + + + + A convenience method to do a new buildup operation on an existing context. + + Key to use to build up. + Created object. + + + + A convenience method to do a new buildup operation on an existing context. This + overload allows you to specify extra policies which will be in effect for the duration + of the build. + + Key defining what to build up. + A delegate that takes a . This + is invoked with the new child context before the build up process starts. This gives callers + the opportunity to customize the context for the build process. + Created object. + + + + Gets the head of the strategy chain. + + + The strategy that's first in the chain; returns null if there are no + strategies in the chain. + + + + + Gets the associated with the build. + + + The associated with the build. + + + + + Gets the original build key for the build operation. + + + The original build key for the build operation. + + + + + Get the current build key for the current build operation. + + + + + The set of policies that were passed into this context. + + This returns the policies passed into the context. + Policies added here will remain after buildup completes. + The persistent policies for the current context. + + + + Gets the policies for the current context. + + Any policies added to this object are transient + and will be erased at the end of the buildup. + + The policies for the current context. + + + + + Gets the collection of objects + that need to execute in event of an exception. + + + + + The current object being built up or torn down. + + + The current object being manipulated by the build operation. May + be null if the object hasn't been created yet. + + + + Flag indicating if the build operation should continue. + + true means that building should not call any more + strategies, false means continue to the next strategy. + + + + An object representing what is currently being done in the + build chain. Used to report back errors if there's a failure. + + + + + The build context used to resolve a dependency during the build operation represented by this context. + + + + + Initialize a new instance of the class. + + + + + Initialize a new instance of the class with a , + , and the + build key used to start this build operation. + + The to use for this context. + The to use for this context. + The to use for this context. + Build key to start building. + The existing object to build up. + + + + Create a new using the explicitly provided + values. + + The to use for this context. + The to use for this context. + The set of persistent policies to use for this context. + The set of transient policies to use for this context. It is + the caller's responsibility to ensure that the transient and persistent policies are properly + combined. + Build key for this context. + Existing object to build up. + + + + Create a new using the explicitly provided + values. + + The to use for this context. + The to use for this context. + The set of persistent policies to use for this context. + The set of transient policies to use for this context. It is + the caller's responsibility to ensure that the transient and persistent policies are properly + combined. + Build key for this context. + The resolver overrides. + + + + Add a new set of resolver override objects to the current build operation. + + objects to add. + + + + Get a object for the given + or null if that dependency hasn't been overridden. + + Type of the dependency. + Resolver to use, or null if no override matches for the current operation. + + + + A convenience method to do a new buildup operation on an existing context. + + Key to use to build up. + Created object. + + + + A convenience method to do a new buildup operation on an existing context. This + overload allows you to specify extra policies which will be in effect for the duration + of the build. + + Key defining what to build up. + A delegate that takes a . This + is invoked with the new child context before the build up process starts. This gives callers + the opportunity to customize the context for the build process. + Created object. + + + + Gets the head of the strategy chain. + + + The strategy that's first in the chain; returns null if there are no + strategies in the chain. + + + + + Get the current build key for the current build operation. + + + + + The current object being built up or torn down. + + + The current object being manipulated by the build operation. May + be null if the object hasn't been created yet. + + + + Gets the associated with the build. + + + The associated with the build. + + + + + Gets the original build key for the build operation. + + + The original build key for the build operation. + + + + + The set of policies that were passed into this context. + + This returns the policies passed into the context. + Policies added here will remain after buildup completes. + The persistent policies for the current context. + + + + Gets the policies for the current context. + + + Any modifications will be transient (meaning, they will be forgotten when + the outer BuildUp for this context is finished executing). + + + The policies for the current context. + + + + + Gets the collection of objects + that need to execute in event of an exception. + + + + + Flag indicating if the build operation should continue. + + true means that building should not call any more + strategies, false means continue to the next strategy. + + + + An object representing what is currently being done in the + build chain. Used to report back errors if there's a failure. + + + + + The build context used to resolve a dependency during the build operation represented by this context. + + + + + Represents that a dependency could not be resolved. + + + + + Initializes a new instance of the class with no extra information. + + + + + Initializes a new instance of the class with the given message. + + Some random message. + + + + Initialize a new instance of the class with the given + message and inner exception. + + Some random message + Inner exception. + + + + Initializes a new instance of the class with the build key of the object begin built. + + The build key of the object begin built. + + + + The exception thrown when injection is attempted on a method + that is an open generic or has out or ref params. + + + + + Construct a new with no + message. + + + + + Construct a with the given message + + Message to return. + + + + Construct a with the given message + and inner exception. + + Message to return. + Inner exception + + + + Extension methods to provide convenience overloads over the + interface. + + + + + Start a recursive build up operation to retrieve the default + value for the given type. + + Type of object to build. + Parent context. + Resulting object. + + + + Start a recursive build up operation to retrieve the named + implementation for the given type. + + Type to resolve. + Parent context. + Name to resolve with. + The resulting object. + + + + Add a set of s to the context, specified as a + variable argument list. + + Context to add overrides to. + The overrides. + + + + Data structure that stores the set of + objects and executes them when requested. + + + + + Add a new object to this + list. + + Object to add. + + + + Execute the method + of everything in the recovery list. Recoveries will execute + in the opposite order of add - it's a stack. + + + + + Return the number of recovery objects currently in the stack. + + + + + Represents a lifetime container. + + + A lifetime container tracks the lifetime of an object, and implements + IDisposable. When the container is disposed, any objects in the + container which implement IDisposable are also disposed. + + + + + Adds an object to the lifetime container. + + The item to be added to the lifetime container. + + + + Determine if a given object is in the lifetime container. + + + The item to locate in the lifetime container. + + + Returns true if the object is contained in the lifetime + container; returns false otherwise. + + + + + Removes an item from the lifetime container. The item is + not disposed. + + The item to be removed. + + + + Gets the number of references in the lifetime container + + + The number of references in the lifetime container + + + + + Represents a lifetime container. + + + A lifetime container tracks the lifetime of an object, and implements + IDisposable. When the container is disposed, any objects in the + container which implement IDisposable are also disposed. + + + + + Adds an object to the lifetime container. + + The item to be added to the lifetime container. + + + + Determine if a given object is in the lifetime container. + + + The item to locate in the lifetime container. + + + Returns true if the object is contained in the lifetime + container; returns false otherwise. + + + + + Releases the resources used by the . + + + + + Releases the resources used by the . + + + true to release managed and unmanaged resources; false to release only unmanaged resources. + + + + + Returns an enumerator that iterates through the lifetime container. + + + An object that can be used to iterate through the life time container. + + + + + Returns an enumerator that iterates through the lifetime container. + + + An object that can be used to iterate through the life time container. + + + + + Removes an item from the lifetime container. The item is + not disposed. + + The item to be removed. + + + + Gets the number of references in the lifetime container + + + The number of references in the lifetime container + + + + + A custom collection over objects. + + + + + Removes an individual policy type for a build key. + + The type of policy to remove. + The key the policy applies. + + + + Removes all policies from the list. + + + + + Removes a default policy. + + The type the policy was registered as. + + + + Gets an individual policy. + + The interface the policy is registered under. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy list in the chain that the searched for policy was found in, null if the policy was + not found. + The policy in the list, if present; returns null otherwise. + + + + Get the non default policy. + + The interface the policy is registered under. + The key the policy applies to. + True if the search should be in the local policy list only; otherwise false to search up the parent chain. + The policy list in the chain that the searched for policy was found in, null if the policy was + not found. + The policy in the list if present; returns null otherwise. + + + + Sets an individual policy. + + The of the policy. + The policy to be registered. + The key the policy applies. + + + + Sets a default policy. When checking for a policy, if no specific individual policy + is available, the default will be used. + + The interface to register the policy under. + The default policy to be registered. + + + + A custom collection wrapper over objects. + + + + + Initialize a new instance of a class. + + + + + Initialize a new instance of a class with another policy list. + + An inner policy list to search. + + + + Removes an individual policy type for a build key. + + The type of policy to remove. + The key the policy applies. + + + + Removes all policies from the list. + + + + + Removes a default policy. + + The type the policy was registered as. + + + + Gets an individual policy. + + The interface the policy is registered under. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy list in the chain that the searched for policy was found in, null if the policy was + not found. + The policy in the list, if present; returns null otherwise. + + + + Get the non default policy. + + The interface the policy is registered under. + The key the policy applies to. + True if the search should be in the local policy list only; otherwise false to search up the parent chain. + The policy list in the chain that the searched for policy was found in, null if the policy was + not found. + The policy in the list if present; returns null otherwise. + + + + Sets an individual policy. + + The of the policy. + The policy to be registered. + The key the policy applies. + + + + Sets a default policy. When checking for a policy, if no specific individual policy + is available, the default will be used. + + The interface to register the policy under. + The default policy to be registered. + + + + Gets the number of items in the locator. + + + The number of items in the locator. + + + + + An implementation of . + + + + + Add a new object to this + list. + + Object to add. + + + + Execute the method + of everything in the recovery list. Recoveries will execute + in the opposite order of add - it's a stack. + + + + + Return the number of recovery objects currently in the stack. + + + + + Implementation of which will notify an object about + the completion of a BuildUp operation, or start of a TearDown operation. + + + This strategy checks the object that is passing through the builder chain to see if it + implements IBuilderAware and if it does, it will call + and . This strategy is meant to be used from the + stage. + + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + Called during the chain of responsibility for a teardown operation. The + PreTearDown method is called when the chain is being executed in the + forward direction. + + Context of the teardown operation. + + + + Implemented on a class when it wants to receive notifications + about the build process. + + + + + Called by the when the object is being built up. + + The key of the object that was just built up. + + + + Called by the when the object is being torn down. + + + + + Enumeration to represent the object builder stages. + + + The order of the values in the enumeration is the order in which the stages are run. + + + + + Strategies in this stage run before creation. Typical work done in this stage might + include strategies that use reflection to set policies into the context that other + strategies would later use. + + + + + Strategies in this stage create objects. Typically you will only have a single policy-driven + creation strategy in this stage. + + + + + Strategies in this stage work on created objects. Typical work done in this stage might + include setter injection and method calls. + + + + + Strategies in this stage work on objects that are already initialized. Typical work done in + this stage might include looking to see if the object implements some notification interface + to discover when its initialization stage has been completed. + + + + + Represents a builder policy for mapping build keys. + + + + + Represents a builder policy for mapping build keys. + + + + + Maps the build key. + + The build key to map. + Current build context. Used for contextual information + if writing a more sophisticated mapping. This parameter can be null + (called when getting container registrations). + The new build key. + + + + Initialize a new instance of the with the new build key. + + The new build key. + + + + Maps the build key. + + The build key to map. + Current build context. Used for contextual information + if writing a more sophisticated mapping, unused in this implementation. + The new build key. + + + + Represents a strategy for mapping build keys in the build up operation. + + + + + Called during the chain of responsibility for a build operation. Looks for the + and if found maps the build key for the current operation. + + The context for the operation. + + + + An implementation of that can map + generic types. + + + + + Create a new instance + that will map generic types. + + Build key to map to. This must be or contain an open generic type. + + + + Maps the build key. + + The build key to map. + Current build context. Used for contextual information + if writing a more sophisticated mapping. + The new build key. + + + + A that will look for a build plan + in the current context. If it exists, it invokes it, otherwise + it creates one and stores it for later, and invokes it. + + + + + Called during the chain of responsibility for a build operation. + + The context for the operation. + + + + An implementation of that chooses + constructors based on these criteria: first, pick a constructor marked with the + attribute. If there + isn't one, then choose the constructor with the longest parameter list. If that is ambiguous, + then throw. + + Thrown when the constructor to choose is ambiguous. + Attribute used to mark the constructor to call. + + + + Base class that provides an implementation of + which lets you override how the parameter resolvers are created. + + + + + A that, when implemented, + will determine which constructor to call from the build plan. + + + + + Choose the constructor to call for the given type. + + Current build context + The to add any + generated resolver objects into. + The chosen constructor. + + + + Choose the constructor to call for the given type. + + Current build context + The to add any + generated resolver objects into. + The chosen constructor. + + + + Create a instance for the given + . + + Parameter to create the resolver for. + The resolver object. + + + + Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other. + + The second object to compare. + The first object to compare. + + Value Condition Less than zero is less than y. Zero equals y. Greater than zero is greater than y. + + + + + Create a instance for the given + . + + Parameter to create the resolver for. + The resolver object. + + + + Objects of this type are the return value from . + It encapsulates the desired with the string keys + needed to look up the for each + parameter. + + + + + Base class for return values from selector policies that + return a MemberInfo of some sort plus a list of parameter + keys to look up the parameter resolvers. + + + + + Base class for return of selector policies that need + to keep track of a set of parameter resolvers. + + + + + Adds the parameter resolver. Resolvers are assumed + to be in the order of the parameters to the member. + + The new resolver. + + + + Gets the parameter resolvers. + + An array with the parameter resolvers. + + + + Construct a new , storing + the given member info. + + Member info to store. + + + + The member info stored. + + + + + Create a new instance which + contains the given constructor. + + The constructor to wrap. + + + + The constructor this object wraps. + + + + + This class records the information about which constructor argument is currently + being resolved, and is responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + The type that is being constructed. + A string representing the constructor being called. + Parameter being resolved. + + + + Generate the string describing what parameter was being resolved. + + The description string. + + + + String describing the constructor being set up. + + + + + Parameter that's being resolved. + + + + + A that emits IL to call constructors + as part of creating a build plan. + + + + + Called during the chain of responsibility for a build operation. + + Existing object is an instance of . + The context for the operation. + + + + A helper method used by the generated IL to set up a PerResolveLifetimeManager lifetime manager + if the current object is such. + + Current build context. + + + + Build up the string that will represent the constructor signature + in any exception message. + + + + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + A helper method used by the generated IL to throw an exception if + no existing object is present, but the user is attempting to build + an interface (usually due to the lack of a type mapping). + + The currently being + used for the build of this object. + + + + A helper method used by the generated IL to throw an exception if + no existing object is present, but the user is attempting to build + an abstract class (usually due to the lack of a type mapping). + + The currently being + used for the build of this object. + + + + A helper method used by the generated IL to throw an exception if + no existing object is present, but the user is attempting to build + an delegate other than Func{T} or Func{IEnumerable{T}}. + + The currently being + used for the build of this object. + + + + A helper method used by the generated IL to throw an exception if + a dependency cannot be resolved. + + The currently being + used for the build of this object. + + + + A helper method used by the generated IL to throw an exception if + a dependency cannot be resolved because of an invalid constructor. + + The currently being + used for the build of this object. + The signature of the invalid constructor. + + + + A class that records that a constructor is about to be call, and is + responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + + + + Generate the description string. + + The string. + + + + Constructor we're trying to call. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Helper method used by generated IL to look up a dependency resolver based on the given key. + + Current build context. + Type of the dependency being resolved. + Key the resolver was stored under. + The found dependency resolver. + + + + Helper method used by generated IL to look up a dependency resolver based on the given key. + + Current build context. + Type of the dependency being resolved. + The configured resolver. + The found dependency resolver. + + + + The type that is to be built with the dynamic build plan. + + + + + The context parameter representing the used when the build plan is executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + An implementation + that constructs a build plan via dynamic IL emission. + + + + + Construct a that + uses the given strategy chain to construct the build plan. + + The strategy chain. + + + + Construct a build plan. + + The current build context. + The current build key. + The created build plan. + + + + A class that records that a constructor is about to be call, and is + responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + + + + Generate the description string. + + The string. + + + + Method we're trying to call. + + + + + This class records the information about which constructor argument is currently + being resolved, and is responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + The type that is being constructed. + A string representing the method being called. + Parameter being resolved. + + + + Generate the string describing what parameter was being resolved. + + The description string. + + + + String describing the method being set up. + + + + + Parameter that's being resolved. + + + + + A that generates IL to call + chosen methods (as specified by the current ) + as part of object build up. + + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + A base class that holds the information shared by all operations + performed by the container while setting properties. + + + + + Initializes a new instance of the class. + + + + + Generate the description of this operation. + + The string. + + + + Get a format string used to create the description. Called by + the base method. + + The format string. + + + + The property value currently being resolved. + + + + + This class records the information about which property value is currently + being resolved, and is responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + + + + Get a format string used to create the description. Called by + the base method. + + The format string. + + + + A that generates IL to resolve properties + on an object being built. + + + + + Called during the chain of responsibility for a build operation. + + The context for the operation. + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + This class records the information about which property value is currently + being set, and is responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + Type property is on. + Name of property being set. + + + + Get a format string used to create the description. Called by + the base method. + + The format string. + + + + Creates an instance of this build plan's type, or fills + in the existing type if passed in. + + Context used to build up the object. + + + + An that will examine the given + types and return a sequence of objects + that should be called as part of building the object. + + + + + Return the sequence of methods to call while building the target object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of methods to call. + + + + An implementation of that selects + methods by looking for the given + attribute on those methods. + + Type of attribute used to mark methods + to inject. + + + + Base class that provides an implementation of + which lets you override how the parameter resolvers are created. + + Attribute that marks methods that should + be called. + + + + Return the sequence of methods to call while building the target object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of methods to call. + + + + Create a instance for the given + . + + Parameter to create the resolver for. + The resolver object. + + + + Create a instance for the given + . + + Parameter to create the resolver for. + The resolver object. + + + + Objects of this type are the return value from . + It encapsulates the desired with the string keys + needed to look up the for each + parameter. + + + + + Create a new instance which + contains the given method. + + The method + + + + The constructor this object wraps. + + + + + An that returns a sequence + of properties that should be injected for the given type. + + + + + Returns sequence of properties on the given type that + should be set as part of building that object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of objects + that contain the properties to set. + + + + Base class that provides an implementation of + which lets you override how the parameter resolvers are created. + + + + + Returns sequence of properties on the given type that + should be set as part of building that object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of objects + that contain the properties to set. + + + + Create a for the given + property. + + Property to create resolver for. + The resolver object. + + + + An implementation of that looks + for properties marked with the + attribute that are also settable and not indexers. + + + + + + Create a for the given + property. + + Property to create resolver for. + The resolver object. + + + + Objects of this type are returned from + . + This class combines the about + the property with the string key used to look up the resolver + for this property's value. + + + + + Create an instance of + with the given and key. + + The property. + + + + + PropertyInfo for this property. + + + + + IDependencyResolverPolicy for this property + + + + + Implementation of . + + + + + A builder policy that lets you keep track of the current + resolvers and will remove them from the given policy set. + + + + + Add a new resolver to track by key. + + Key that was used to add the resolver to the policy set. + + + + Remove the currently tracked resolvers from the given policy list. + + Policy list to remove the resolvers from. + + + + Add a new resolver to track by key. + + Key that was used to add the resolver to the policy set. + + + + Remove the currently tracked resolvers from the given policy list. + + Policy list to remove the resolvers from. + + + + Get an instance that implements , + either the current one in the policy set or creating a new one if it doesn't + exist. + + Policy list to look up from. + Build key to track. + The resolver tracker. + + + + Add a key to be tracked to the current tracker. + + Policy list containing the resolvers and trackers. + Build key for the resolvers being tracked. + Key for the resolver. + + + + Remove the resolvers for the given build key. + + Policy list containing the build key. + Build key. + + + + An implementation of that + calls back into the build chain to build up the dependency, passing + a type given at compile time as its build key. + + + + + Create a new instance storing the given type. + + Type to resolve. + + + + Get the value for a dependency. + + Current build context. + The value for the dependency. + + + + This interface defines a standard method to convert any regardless + of the stage enum into a regular, flat strategy chain. + + + + + Convert this into + a flat . + + The flattened . + + + + Represents a chain of responsibility for builder strategies. + + + + + Reverse the order of the strategy chain. + + The reversed strategy chain. + + + + Execute this strategy chain against the given context, + calling the Buildup methods on the strategies. + + Context for the build process. + The build up object + + + + Execute this strategy chain against the given context, + calling the TearDown methods on the strategies. + + Context for the teardown process. + + + + A builder policy used to create lifetime policy instances. + Used by the LifetimeStrategy when instantiating open + generic types. + + + + + Create a new instance of . + + The new instance. + + + + The type of Lifetime manager that will be created by this factory. + + + + + An implementation that uses + a to figure out if an object + has already been created and to update or remove that + object from some backing store. + + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + Called during the chain of responsibility for a build operation. The + PostBuildUp method is called when the chain has finished the PreBuildUp + phase and executes in reverse order from the PreBuildUp calls. + + Context of the build operation. + + + + Represents a chain of responsibility for builder strategies partitioned by stages. + + The stage enumeration to partition the strategies. + + + + Initialize a new instance of the class. + + + + + Initialize a new instance of the class with an inner strategy chain to use when building. + + The inner strategy chain to use first when finding strategies in the build operation. + + + + Adds a strategy to the chain at a particular stage. + + The strategy to add to the chain. + The stage to add the strategy. + + + + Add a new strategy for the . + + The of + The stage to add the strategy. + + + + Clear the current strategy chain list. + + + This will not clear the inner strategy chain if this instance was created with one. + + + + + Makes a strategy chain based on this instance. + + A new . + + + + Represents a chain of responsibility for builder strategies. + + + + + Initialize a new instance of the class. + + + + + Initialize a new instance of the class with a collection of strategies. + + A collection of strategies to initialize the chain. + + + + Adds a strategy to the chain. + + The strategy to add to the chain. + + + + Adds strategies to the chain. + + The strategies to add to the chain. + + + + Reverse the order of the strategy chain. + + The reversed strategy chain. + + + + Execute this strategy chain against the given context to build up. + + Context for the build processes. + The build up object + + + + Execute this strategy chain against the given context, + calling the TearDown methods on the strategies. + + Context for the teardown process. + + + + Returns an enumerator that iterates through the collection. + + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + + An object that can be used to iterate through the collection. + + + + + Build key used to combine a type object with a string name. Used by + ObjectBuilder to indicate exactly what is being built. + + + + + Create a new instance with the given + type and name. + + to build. + Key to use to look up type mappings and singletons. + + + + Create a new instance for the default + buildup of the given type. + + to build. + + + + This helper method creates a new instance. It is + initialized for the default key for the given type. + + Type to build. + A new instance. + + + + This helper method creates a new instance for + the given type and key. + + Type to build + Key to use to look up type mappings and singletons. + A new instance initialized with the given type and name. + + + + Compare two instances. + + Two instances compare equal + if they contain the same name and the same type. Also, comparing + against a different type will also return false. + Object to compare to. + True if the two keys are equal, false if not. + + + + Calculate a hash code for this instance. + + A hash code. + + + + Compare two instances for equality. + + Two instances compare equal + if they contain the same name and the same type. + First of the two keys to compare. + Second of the two keys to compare. + True if the values of the keys are the same, else false. + + + + Compare two instances for inequality. + + Two instances compare equal + if they contain the same name and the same type. If either field differs + the keys are not equal. + First of the two keys to compare. + Second of the two keys to compare. + false if the values of the keys are the same, else true. + + + + Formats the build key as a string (primarily for debugging). + + A readable string representation of the build key. + + + + Return the stored in this build key. + + The type to build. + + + + Returns the name stored in this build key. + + The name to use when building. + + + + A generic version of so that + you can new up a key using generic syntax. + + Type for the key. + + + + Construct a new that + specifies the given type. + + + + + Construct a new that + specifies the given type and name. + + Name for the key. + + + + A series of helper methods to deal with sequences - + objects that implement . + + + + + A function that turns an arbitrary parameter list into an + . + + Type of arguments. + The items to put into the collection. + An array that contains the values of the . + + + + Given two sequences, return a new sequence containing the corresponding values + from each one. + + Type of first sequence. + Type of second sequence. + First sequence of items. + Second sequence of items. + New sequence of pairs. This sequence ends when the shorter of sequence1 and sequence2 does. + + + + A that lets you register a + delegate with the container to create an object, rather than calling + the object's constructor. + + + + + Base class for all extension objects. + + + + + The container calls this method when the extension is added. + + A instance that gives the + extension access to the internals of the container. + + + + Initial the container with this extension's functionality. + + + When overridden in a derived class, this method will modify the given + by adding strategies, policies, etc. to + install it's functions into the container. + + + + Removes the extension's functions from the container. + + + + This method is called when extensions are being removed from the container. It can be + used to do things like disconnect event handlers or clean up member state. You do not + need to remove strategies or policies here; the container will do that automatically. + + + The default implementation of this method does nothing. + + + + + The container this extension has been added to. + + The that this extension has been added to. + + + + The object used to manipulate + the inner state of the container. + + + + + Initialize this extension. This particular extension requires no + initialization work. + + + + + Register the given factory delegate to be called when the container is + asked to resolve and . + + Type that will be requested from the container. + The name that will be used when requesting to resolve this type. + Delegate to invoke to create the instance. + The container extension object this method was invoked on. + + + + Register the given factory delegate to be called when the container is + asked to resolve . + + Type that will be requested from the container. + Delegate to invoke to create the instance. + The container extension object this method was invoked on. + + + + An implementation of that + acts as a decorator over another . + This checks to see if the current type being built is the + right one before checking the inner . + + + + + Create an instance of + + Type to check for. + Inner override to check after type matches. + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + A convenience version of that lets you + specify the type to construct via generics syntax. + + Type to check for. + + + + Create an instance of . + + Inner override to check after type matches. + + + + Extension class that adds a set of convenience overloads to the + interface. + + + + + Register a type with specific members to be injected. + + Type this registration is for. + Container to configure. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container. + + + + This method is used to tell the container that when asked for type , + actually return an instance of type . This is very useful for + getting instances of interfaces. + + + This overload registers a default mapping and transient lifetime. + + + that will be requested. + that will actually be returned. + Container to configure. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container, where the created instances will use + the given . + + that will be requested. + that will actually be returned. + Container to configure. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container. + + + This method is used to tell the container that when asked for type , + actually return an instance of type . This is very useful for + getting instances of interfaces. + + that will be requested. + that will actually be returned. + Container to configure. + Name of this mapping. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container, where the created instances will use + the given . + + that will be requested. + that will actually be returned. + Container to configure. + Name to use for registration, null if a default registration. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type with the container. + No type mapping is performed for this type. + + The type to apply the to. + Container to configure. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type with the container. + No type mapping is performed for this type. + + The type to configure injection on. + Container to configure. + Name that will be used to request the type. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type and name with the container. + No type mapping is performed for this type. + + The type to apply the to. + Container to configure. + Name that will be used to request the type. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type with specific members to be injected. + + Container to configure. + Type this registration is for. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container. + + + + This method is used to tell the container that when asked for type , + actually return an instance of type . This is very useful for + getting instances of interfaces. + + + This overload registers a default mapping. + + + Container to configure. + that will be requested. + that will actually be returned. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container. + + + This method is used to tell the container that when asked for type , + actually return an instance of type . This is very useful for + getting instances of interfaces. + + Container to configure. + that will be requested. + that will actually be returned. + Name to use for registration, null if a default registration. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container, where the created instances will use + the given . + + Container to configure. + that will be requested. + that will actually be returned. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type and name with the container. + No type mapping is performed for this type. + + Container to configure. + The to apply the to. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type and name with the container. + No type mapping is performed for this type. + + Container to configure. + The to configure in the container. + Name to use for registration, null if a default registration. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type and name with the container. + No type mapping is performed for this type. + + Container to configure. + The to apply the to. + Name to use for registration, null if a default registration. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload does a default registration and has the container take over the lifetime of the instance. + + Type of instance to register (may be an implemented interface instead of the full type). + Container to configure. + Object to returned. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload does a default registration (name = null). + + + Type of instance to register (may be an implemented interface instead of the full type). + Container to configure. + Object to returned. + + object that controls how this instance will be managed by the container. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload automatically has the container take ownership of the . + + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + Container to configure. + Name for registration. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + Container to configure. + Name for registration. + + object that controls how this instance will be managed by the container. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload does a default registration and has the container take over the lifetime of the instance. + + Container to configure. + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload does a default registration (name = null). + + + Container to configure. + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + + object that controls how this instance will be managed by the container. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload automatically has the container take ownership of the . + + Container to configure. + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + Name for registration. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Resolve an instance of the default requested type from the container. + + of object to get from the container. + Container to resolve from. + Any overrides for the resolve call. + The retrieved object. + + + + Resolve an instance of the requested type with the given name from the container. + + of object to get from the container. + Container to resolve from. + Name of the object to retrieve. + Any overrides for the resolve call. + The retrieved object. + + + + Resolve an instance of the default requested type from the container. + + Container to resolve from. + of object to get from the container. + Any overrides for the resolve call. + The retrieved object. + + + + Return instances of all registered types requested. + + + + This method is useful if you've registered multiple types with the same + but different names. + + + Be aware that this method does NOT return an instance for the default (unnamed) registration. + + + The type requested. + Container to resolve from. + Any overrides for the resolve calls. + Set of objects of type . + + + + Run an existing object through the container and perform injection on it. + + + + This method is useful when you don't control the construction of an + instance (ASP.NET pages or objects created via XAML, for instance) + but you still want properties and other injection performed. + + + This overload uses the default registrations. + + + of object to perform injection on. + Container to resolve through. + Instance to build up. + Any overrides for the buildup. + The resulting object. By default, this will be , but + container extensions may add things like automatic proxy creation which would + cause this to return a different object (but still type compatible with ). + + + + Run an existing object through the container and perform injection on it. + + + + This method is useful when you don't control the construction of an + instance (ASP.NET pages or objects created via XAML, for instance) + but you still want properties and other injection performed. + + of object to perform injection on. + Container to resolve through. + Instance to build up. + name to use when looking up the typemappings and other configurations. + Any overrides for the Buildup. + The resulting object. By default, this will be , but + container extensions may add things like automatic proxy creation which would + cause this to return a different object (but still type compatible with ). + + + + Run an existing object through the container and perform injection on it. + + + + This method is useful when you don't control the construction of an + instance (ASP.NET pages or objects created via XAML, for instance) + but you still want properties and other injection performed. + + + This overload uses the default registrations. + + + Container to resolve through. + of object to perform injection on. + Instance to build up. + Any overrides for the Buildup. + The resulting object. By default, this will be , but + container extensions may add things like automatic proxy creation which would + cause this to return a different object (but still type compatible with ). + + + + Creates a new extension object and adds it to the container. + + Type of to add. The extension type + will be resolved from within the supplied . + Container to add the extension to. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Resolve access to a configuration interface exposed by an extension. + + Extensions can expose configuration interfaces as well as adding + strategies and policies to the container. This method walks the list of + added extensions and returns the first one that implements the requested type. + + The configuration interface required. + Container to configure. + The requested extension's configuration interface, or null if not found. + + + + Check if a particular type has been registered with the container with + the default name. + + Container to inspect. + Type to check registration for. + True if this type has been registered, false if not. + + + + Check if a particular type/name pair has been registered with the container. + + Container to inspect. + Type to check registration for. + Name to check registration for. + True if this type/name pair has been registered, false if not. + + + + Check if a particular type has been registered with the container with the default name. + + Type to check registration for. + Container to inspect. + True if this type has been registered, false if not. + + + + Check if a particular type/name pair has been registered with the container. + + Type to check registration for. + Container to inspect. + Name to check registration for. + True if this type/name pair has been registered, false if not. + + + + The class provides the means for extension objects + to manipulate the internal state of the . + + + + + Store a type/name pair for later resolution. + + + + When users register type mappings (or other things) with a named key, this method + allows you to register that name with the container so that when the + method is called, that name is included in the list that is returned. + + to register. + Name associated with that type. + + + + The container that this context is associated with. + + The object. + + + + The strategies this container uses. + + The that the container uses to build objects. + + + + The strategies this container uses to construct build plans. + + The that this container uses when creating + build plans. + + + + The policies this container uses. + + The the that container uses to build objects. + + + + The that this container uses. + + The is used to manage objects that the container is managing. + + + + This event is raised when the method, + or one of its overloads, is called. + + + + + This event is raised when the method, + or one of its overloads, is called. + + + + + This event is raised when the method is called, providing + the newly created child container to extensions to act on as they see fit. + + + + + An EventArgs class that holds a string Name. + + + + + Create a new with a null name. + + + + + Create a new with the given name. + + Name to store. + + + + The name. + + Name used for this EventArg object. + + + + Event argument class for the event. + + + + + Create a new instance of . + + Type to map from. + Type to map to. + Name for the registration. + to manage instances. + + + + Type to map from. + + + + + Type to map to. + + + + + to manage instances. + + + + + Event argument class for the event. + + + + + Create a default instance. + + + + + Create a instance initialized with the given arguments. + + Type of instance being registered. + The instance object itself. + Name to register under, null if default registration. + object that handles how + the instance will be owned. + + + + Type of instance being registered. + + + Type of instance being registered. + + + + + Instance object being registered. + + Instance object being registered + + + + that controls ownership of + this instance. + + + + + A that lets you specify that + an instance of a generic type parameter should be resolved. + + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + name to use when looking up in the container. + + + + Return a instance that will + return this types value for the parameter. + + The actual type to resolve. + The resolution key. + The . + + + + A that lets you specify that + an array containing the registered instances of a generic type parameter + should be resolved. + + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + The values for the elements, that will + be converted to objects. + + + + Test to see if this parameter value has a matching type for the given type. + + Type to check. + True if this parameter value is compatible with type , + false if not. + A type is considered compatible if it is an array type of rank one + and its element type is a generic type parameter with a name matching this generic + parameter name configured for the receiver. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + Name for the type represented by this . + This may be an actual type name or a generic argument name. + + + + + A Unity container extension that allows you to configure + which constructors, properties, and methods get injected + via an API rather than through attributes. + + + + + Initial the container with this extension's functionality. + + + When overridden in a derived class, this method will modify the given + by adding strategies, policies, etc. to + install it's functions into the container. + + + + API to configure the injection settings for a particular type. + + Type the injection is being configured for. + Objects containing the details on which members to inject and how. + This extension object. + + + + API to configure the injection settings for a particular type/name pair. + + Type the injection is being configured for. + Name of registration + Objects containing the details on which members to inject and how. + This extension object. + + + + API to configure the injection settings for a particular type. + + Type to configure. + Objects containing the details on which members to inject and how. + This extension object. + + + + API to configure the injection settings for a particular type/name pair. + + Type to configure. + Name of registration. + Objects containing the details on which members to inject and how. + This extension object. + + + + API to configure the injection settings for a particular type/name pair. + + Type of interface/base class being registered (may be null). + Type of actual implementation class being registered. + Name of registration. + Objects containing the details on which members to inject and how. + This extension object. + + + + A class that holds the collection of information + for a constructor, so that the container can + be configured to call this constructor. + + + + + Create a new instance of that looks + for a constructor with the given set of parameters. + + The values for the parameters, that will + be converted to objects. + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Interface registered, ignored in this implementation. + Type to register. + Name used to resolve the type object. + Policy list to add policies to. + + + + An that configures the + container to call a method as part of buildup. + + + + + Create a new instance which will configure + the container to call the given methods with the given parameters. + + Name of the method to call. + Parameter values for the method. + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Type of interface registered, ignored in this implementation. + Type to register. + Name used to resolve the type object. + Policy list to add policies to. + + + + A small function to handle name matching. You can override this + to do things like case insensitive comparisons. + + MethodInfo for the method you're checking. + Name of the method you're looking for. + True if a match, false if not. + + + + A class that holds on to the given value and provides + the required + when the container is configured. + + + + + Create an instance of that stores + the given value, using the runtime type of that value as the + type of the parameter. + + Value to be injected for this parameter. + + + + Create an instance of that stores + the given value, associated with the given type. + + Type of the parameter. + Value of the parameter + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + A generic version of that makes it a + little easier to specify the type of the parameter. + + Type of parameter. + + + + Create a new . + + Value for the parameter. + + + + This class stores information about which properties to inject, + and will configure the container accordingly. + + + + + Configure the container to inject the given property name, + resolving the value via the container. + + Name of the property to inject. + + + + Configure the container to inject the given property name, + using the value supplied. This value is converted to an + object using the + rules defined by the + method. + + Name of property to inject. + Value for property. + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Interface being registered, ignored in this implementation. + Type to register. + Name used to resolve the type object. + Policy list to add policies to. + + + + A class that stores a type, and generates a + resolver object that resolves all the named instances or the + type registered in a container. + + + + + Construct a new that + resolves to the given element type and collection of element values. + + The type of elements to resolve. + The values for the elements, that will + be converted to objects. + + + + Construct a new that + resolves to the given array and element types and collection of element values. + + The type for the array of elements to resolve. + The type of elements to resolve. + The values for the elements, that will + be converted to objects. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + A generic version of for convenience + when creating them by hand. + + Type of the elements for the array of the parameter. + + + + Construct a new that + resolves to the given element generic type with the given element values. + + The values for the elements, that will + be converted to objects. + + + + Interface defining the behavior of the Unity dependency injection container. + + + + + Register a type mapping with the container, where the created instances will use + the given . + + that will be requested. + that will actually be returned. + Name to use for registration, null if a default registration. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + Name for registration. + + object that controls how this instance will be managed by the container. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Resolve an instance of the requested type with the given name from the container. + + of object to get from the container. + Name of the object to retrieve. + Any overrides for the resolve call. + The retrieved object. + + + + Return instances of all registered types requested. + + + + This method is useful if you've registered multiple types with the same + but different names. + + + Be aware that this method does NOT return an instance for the default (unnamed) registration. + + + The type requested. + Any overrides for the resolve calls. + Set of objects of type . + + + + Run an existing object through the container and perform injection on it. + + + + This method is useful when you don't control the construction of an + instance (ASP.NET pages or objects created via XAML, for instance) + but you still want properties and other injection performed. + + of object to perform injection on. + Instance to build up. + name to use when looking up the TypeMappings and other configurations. + Any overrides for the resolve calls. + The resulting object. By default, this will be , but + container extensions may add things like automatic proxy creation which would + cause this to return a different object (but still type compatible with ). + + + + Run an existing object through the container, and clean it up. + + The object to tear down. + + + + Add an extension object to the container. + + to add. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Resolve access to a configuration interface exposed by an extension. + + Extensions can expose configuration interfaces as well as adding + strategies and policies to the container. This method walks the list of + added extensions and returns the first one that implements the requested type. + + of configuration interface required. + The requested extension's configuration interface, or null if not found. + + + + Remove all installed extensions from this container. + + + + This method removes all extensions from the container, including the default ones + that implement the out-of-the-box behavior. After this method, if you want to use + the container again you will need to either read the default extensions or replace + them with your own. + + + The registered instances and singletons that have already been set up in this container + do not get removed. + + + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Create a child container. + + + A child container shares the parent's configuration, but can be configured with different + settings or lifetime. + The new child container. + + + + The parent of this container. + + The parent container, or null if this container doesn't have one. + + + + Get a sequence of that describe the current state + of the container. + + + + + A that holds a weak reference to + it's managed instance. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. + + The object being stored. + + + + Remove the given object from backing store. + + + + + An implementation of that + creates instances of the type of the given Lifetime Manager + by resolving them through the container. + + + + + Create a new that will + return instances of the given type, creating them by + resolving through the container. + + Container to resolve with. + Type of LifetimeManager to create. + + + + Create a new instance of . + + The new instance. + + + + The type of Lifetime manager that will be created by this factory. + + + + + A that holds the instances given to it, + keeping one instance per thread. + + + + This LifetimeManager does not dispose the instances it holds. + + + + + + Initializes a new instance of the class. + + + + + Retrieve a value from the backing store associated with this Lifetime policy for the + current thread. + + the object desired, or if no such object is currently + stored for the current thread. + + + + Stores the given value into backing store for retrieval later when requested + in the current thread. + + The object being stored. + + + + Remove the given object from backing store. + + Not implemented for this lifetime manager. + + + + An implementation that does nothing, + thus ensuring that instances are created new every time. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. + + The object being stored. + + + + Remove the given object from backing store. + + + + + This strategy implements the logic that will call container.ResolveAll + when an array parameter is detected. + + + + + Do the PreBuildUp stage of construction. This is where the actual work is performed. + + Current build context. + + + + An implementation of that is + aware of the build keys used by the Unity container. + + + + + Create a instance for the given + . + + + This implementation looks for the Unity on the + parameter and uses it to create an instance of + for this parameter. + Parameter to create the resolver for. + The resolver object. + + + + An implementation of that is aware + of the build keys used by the Unity container. + + + + + Create a instance for the given + . + + Parameter to create the resolver for. + The resolver object. + + + + An implementation of that is aware of + the build keys used by the unity container. + + + + + Create a for the given + property. + + Property to create resolver for. + The resolver object. + + + + A implementation that returns + the value set in the constructor. + + + + + Create a new instance of + which will return the given value when resolved. + + The value to return. + + + + Get the value for a dependency. + + Current build context. + The value for the dependency. + + + + An implementation of that stores a + type and name, and at resolution time puts them together into a + . + + + + + Create an instance of + with the given type and name. + + The type. + The name (may be null). + + + + Resolve the value for a dependency. + + Current build context. + The value for the dependency. + + + + The type that this resolver resolves. + + + + + The name that this resolver resolves. + + + + + An implementation of that resolves to + to an array populated with the values that result from resolving other instances + of . + + + + + Create an instance of + with the given type and a collection of + instances to use when populating the result. + + The type. + The resolver policies to use when populating an array. + + + + Resolve the value for a dependency. + + Current build context. + An array populated with the results of resolving the resolver policies. + + + + An implementation of that selects + the given constructor and creates the appropriate resolvers to call it with + the specified parameters. + + + + + Create an instance of that + will return the given constructor, being passed the given injection values + as parameters. + + The constructor to call. + Set of objects + that describes how to obtain the values for the constructor parameters. + + + + Choose the constructor to call for the given type. + + Current build context + The to add any + generated resolver objects into. + The chosen constructor. + + + + Helper class for implementing selector policies that need to + set up dependency resolver policies. + + + + + Add dependency resolvers to the parameter set. + + Type that's currently being built (used to resolve open generics). + PolicyList to add the resolvers to. + Objects supplying the dependency resolvers. + Result object to store the keys in. + + + + A implementation that calls the specific + methods with the given parameters. + + + + + Add the given method and parameter collection to the list of methods + that will be returned when the selector's + method is called. + + Method to call. + sequence of objects + that describe how to create the method parameter values. + + + + Return the sequence of methods to call while building the target object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of methods to call. + + + + An implementation of which returns + the set of specific properties that the selector was configured with. + + + + + Add a property that will be par of the set returned when the + is called. + + The property to set. + object describing + how to create the value to inject. + + + + Returns sequence of properties on the given type that + should be set as part of building that object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of objects + that contain the properties to set. + + + + The exception thrown by the Unity container when + an attempt to resolve a dependency fails. + + + + + Create a new that records + the exception for the given type and name. + + Type requested from the container. + Name requested from the container. + The actual exception that caused the failure of the build. + The build context representing the failed operation. + + + + The type that was being requested from the container at the time of failure. + + + + + The name that was being requested from the container at the time of failure. + + + + + A class that stores a name and type, and generates a + resolver object that resolves the parameter via the + container. + + + + + Construct a new that + resolves to the given type. + + Type of this parameter. + + + + Construct a new that + resolves the given type and name. + + Type of this parameter. + Name to use when resolving parameter. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + A generic version of for convenience + when creating them by hand. + + Type of the parameter + + + + Create a new for the given + generic type and the default name. + + + + + Create a new for the given + generic type and name. + + Name to use to resolve this parameter. + + + + An implementation of that wraps a Unity container. + + + + + Initializes a new instance of the class for a container. + + The to wrap with the + interface implementation. + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + 2 + + + + When implemented by inheriting classes, this method will do the actual work of resolving + the requested service instance. + + Type of instance requested.Name of registered service you want. May be null. + + The requested service instance. + + + + + When implemented by inheriting classes, this method will do the actual work of + resolving all the requested service instances. + + Type of service requested. + + Sequence of service instance objects. + + + + + A static helper class that includes various parameter checking routines. + + + + + Throws if the given argument is null. + + if tested value if null. + Argument value to test. + Name of the argument being tested. + + + + Throws an exception if the tested string argument is null or the empty string. + + Thrown if string value is null. + Thrown if the string is empty + Argument value to check. + Name of argument being checked. + + + + Verifies that an argument type is assignable from the provided type (meaning + interfaces are implemented, or classes exist in the base class hierarchy). + + The argument type that will be assigned to. + The type of the value being assigned. + Argument name. + + + + Verifies that an argument instance is assignable from the provided type (meaning + interfaces are implemented, or classes exist in the base class hierarchy, or instance can be + assigned through a runtime wrapper, as is the case for COM Objects). + + The argument type that will be assigned to. + The instance that will be assigned. + Argument name. + + + + A helper class to manage the names that get registered in the container + + + + + The build stages we use in the Unity container + strategy pipeline. + + + + + First stage. By default, nothing happens here. + + + + + Second stage. Type mapping occurs here. + + + + + Third stage. lifetime managers are checked here, + and if they're available the rest of the pipeline is skipped. + + + + + Fourth stage. Reflection over constructors, properties, etc. is + performed here. + + + + + Fifth stage. Instance creation happens here. + + + + + Sixth stage. Property sets and method injection happens here. + + + + + Seventh and final stage. By default, nothing happens here. + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to The type {0} has multiple constructors of length {1}. Unable to disambiguate.. + + + + + Looks up a localized string similar to The provided string argument must not be empty.. + + + + + Looks up a localized string similar to The current build operation (build key {2}) failed: {3} (Strategy type {0}, index {1}). + + + + + Looks up a localized string similar to The current type, {0}, is an abstract class and cannot be constructed. Are you missing a type mapping?. + + + + + Looks up a localized string similar to The current type, {0}, is delegate and cannot be constructed. Unity only supports resolving Func<T> and Func<IEnumerable<T>> by default.. + + + + + Looks up a localized string similar to The current type, {0}, is an interface and cannot be constructed. Are you missing a type mapping?. + + + + + Looks up a localized string similar to Cannot extract type from build key {0}.. + + + + + Looks up a localized string similar to The method {0}.{1}({2}) is an open generic method. Open generic methods cannot be injected.. + + + + + Looks up a localized string similar to The property {0} on type {1} is an indexer. Indexed properties cannot be injected.. + + + + + Looks up a localized string similar to The method {1} on type {0} has an out parameter. Injection cannot be performed.. + + + + + Looks up a localized string similar to The method {0}.{1}({2}) has at least one out parameter. Methods with out parameters cannot be injected.. + + + + + Looks up a localized string similar to The method {0}.{1}({2}) has at least one ref parameter.Methods with ref parameters cannot be injected.. + + + + + Looks up a localized string similar to The method {1} on type {0} is marked for injection, but it is an open generic method. Injection cannot be performed.. + + + + + Looks up a localized string similar to The method {0}.{1}({2}) is static. Static methods cannot be injected.. + + + + + Looks up a localized string similar to The type {0} is an open generic type. An open generic type cannot be resolved.. + + + + + Looks up a localized string similar to Resolving parameter "{0}" of constructor {1}. + + + + + Looks up a localized string similar to The parameter {0} could not be resolved when attempting to call constructor {1}.. + + + + + Looks up a localized string similar to Parameter type inference does not work for null values. Indicate the parameter type explicitly using a properly configured instance of the InjectionParameter or InjectionParameter<T> classes.. + + + + + Looks up a localized string similar to Calling constructor {0}. + + + + + Looks up a localized string similar to Calling method {0}.{1}. + + + + + Looks up a localized string similar to An item with the given key is already present in the dictionary.. + + + + + Looks up a localized string similar to The lifetime manager is already registered. Lifetime managers cannot be reused, please create a new one.. + + + + + Looks up a localized string similar to The override marker build plan policy has been invoked. This should never happen, looks like a bug in the container.. + + + + + Looks up a localized string similar to Resolving parameter "{0}" of method {1}.{2}. + + + + + Looks up a localized string similar to The value for parameter "{1}" of method {0} could not be resolved. . + + + + + Looks up a localized string similar to Could not resolve dependency for build key {0}.. + + + + + Looks up a localized string similar to The type {0} has multiple constructors marked with the InjectionConstructor attribute. Unable to disambiguate.. + + + + + Looks up a localized string similar to The supplied type {0} must be an open generic type.. + + + + + Looks up a localized string similar to The supplied type {0} does not have the same number of generic arguments as the target type {1}.. + + + + + Looks up a localized string similar to The type {0} does not have an accessible constructor.. + + + + + Looks up a localized string similar to The type {0} does not have a generic argument named "{1}". + + + + + Looks up a localized string similar to while resolving. + + + + + Looks up a localized string similar to The type {0} does not have a constructor that takes the parameters ({1}).. + + + + + Looks up a localized string similar to The type {0} does not have a public method named {1} that takes the parameters ({2}).. + + + + + Looks up a localized string similar to The type {0} does not contain an instance property named {1}.. + + + + + Looks up a localized string similar to The type {0} is not a generic type, and you are attempting to inject a generic parameter named "{1}".. + + + + + Looks up a localized string similar to The type {0} is not an array type with rank 1, and you are attempting to use a [DependencyArray] attribute on a parameter or property with this type.. + + + + + Looks up a localized string similar to Optional dependencies must be reference types. The type {0} is a value type.. + + + + + Looks up a localized string similar to The property {0} on type {1} is not settable.. + + + + + Looks up a localized string similar to The property {0} on type {1} is of type {2}, and cannot be injected with a value of type {3}.. + + + + + Looks up a localized string similar to The value for the property "{0}" could not be resolved.. + + + + + Looks up a localized string similar to The provided string argument must not be empty.. + + + + + Looks up a localized string similar to Resolution of the dependency failed, type = "{0}", name = "{1}". + Exception occurred while: {2}. + Exception is: {3} - {4} + ----------------------------------------------- + At the time of the exception, the container was: + . + + + + + Looks up a localized string similar to Resolving {0},{1}. + + + + + Looks up a localized string similar to Resolving {0},{1} (mapped from {2}, {3}). + + + + + Looks up a localized string similar to Resolving value for property {0}.{1}. + + + + + Looks up a localized string similar to The constructor {1} selected for type {0} has ref or out parameters. Such parameters are not supported for constructor injection.. + + + + + Looks up a localized string similar to Setting value for property {0}.{1}. + + + + + Looks up a localized string similar to The type {0} cannot be constructed. You must configure the container to supply this value.. + + + + + Looks up a localized string similar to The type {1} cannot be assigned to variables of type {0}.. + + + + + Looks up a localized string similar to <unknown>. + + + + + A simple, extensible dependency injection container. + + + + + Create a default . + + + + + Create a with the given parent container. + + The parent . The current object + will apply its own settings first, and then check the parent for additional ones. + + + + RegisterType a type mapping with the container, where the created instances will use + the given . + + that will be requested. + that will actually be returned. + Name to use for registration, null if a default registration. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + RegisterType an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + Name for registration. + + If true, the container will take over the lifetime of the instance, + calling Dispose on it (if it's ) when the container is Disposed. + + If false, container will not maintain a strong reference to . User is responsible + for disposing instance, and for keeping the instance from being garbage collected. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Get an instance of the requested type with the given name from the container. + + of object to get from the container. + Name of the object to retrieve. + Any overrides for the resolve call. + The retrieved object. + + + + Return instances of all registered types requested. + + + + This method is useful if you've registered multiple types with the same + but different names. + + + Be aware that this method does NOT return an instance for the default (unnamed) registration. + + + The type requested. + Any overrides for the resolve calls. + Set of objects of type . + + + + Run an existing object through the container and perform injection on it. + + + + This method is useful when you don't control the construction of an + instance (ASP.NET pages or objects created via XAML, for instance) + but you still want properties and other injection performed. + + of object to perform injection on. + Instance to build up. + name to use when looking up the typemappings and other configurations. + Any overrides for the buildup. + The resulting object. By default, this will be , but + container extensions may add things like automatic proxy creation which would + cause this to return a different object (but still type compatible with ). + + + + Run an existing object through the container, and clean it up. + + The object to tear down. + + + + Add an extension object to the container. + + to add. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Get access to a configuration interface exposed by an extension. + + Extensions can expose configuration interfaces as well as adding + strategies and policies to the container. This method walks the list of + added extensions and returns the first one that implements the requested type. + + of configuration interface required. + The requested extension's configuration interface, or null if not found. + + + + Remove all installed extensions from this container. + + + + This method removes all extensions from the container, including the default ones + that implement the out-of-the-box behavior. After this method, if you want to use + the container again you will need to either read the default extensions or replace + them with your own. + + + The registered instances and singletons that have already been set up in this container + do not get removed. + + + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Create a child container. + + + A child container shares the parent's configuration, but can be configured with different + settings or lifetime. + The new child container. + + + + Dispose this container instance. + + + Disposing the container also disposes any child containers, + and disposes any instances whose lifetimes are managed + by the container. + + + + + Dispose this container instance. + + + This class doesn't have a finalizer, so will always be true. + True if being called from the IDisposable.Dispose + method, false if being called from a finalizer. + + + + Remove policies associated with building this type. This removes the + compiled build plan so that it can be rebuilt with the new settings + the next time this type is resolved. + + Type of object to clear the plan for. + Name the object is being registered with. + + + + The parent of this container. + + The parent container, or null if this container doesn't have one. + + + + Get a sequence of that describe the current state + of the container. + + + + + Implementation of the ExtensionContext that is actually used + by the UnityContainer implementation. + + + This is a nested class so that it can access state in the + container that would otherwise be inaccessible. + + + + + This event is raised when the method, + or one of its overloads, is called. + + + + + This extension supplies the default behavior of the UnityContainer API + by handling the context events and setting policies. + + + + + Install the default container behavior into the container. + + + + + Remove the default behavior from the container. + + + + + This extension installs the default strategies and policies into the container + to implement the standard behavior of the Unity container. + + + + + Add the default ObjectBuilder strategies & policies to the container. + + + + + Helper class to wrap common reflection stuff dealing with + methods. + + + + + Create a new instance that + lets us do more reflection stuff on that method. + + The method to reflect on. + + + + Given our set of generic type arguments, + + The generic type arguments. + An array with closed parameter types. + + + + Returns true if any of the parameters of this method + are open generics. + + + + + Return the of each parameter for this + method. + + Sequence of objects, one for + each parameter in order. + + + + A helper class that encapsulates two different + data items together into a a single item. + + + + + Create a new containing + the two values give. + + First value + Second value + + + + The first value of the pair. + + + + + The second value of the pair. + + + + + Container for a Pair helper method. + + + + + A helper factory method that lets users take advantage of type inference. + + Type of first value. + Type of second value. + First value. + Second value. + A new instance. + + + + A utility class that handles the logic of matching parameter + lists, so we can find the right constructor and method overloads. + + + + + Create a new that will attempt to + match the given parameter types. + + Target parameters to match against. + + + + Tests to see if the given set of types matches the ones + we're looking for. + + parameter list to look for. + true if they match, false if they don't. + + + + Tests to see if the given set of types matches the ones we're looking for. + + Candidate method signature to look for. + True if they match, false if they don't. + + + + Another reflection helper class that has extra methods + for dealing with ParameterInfo. + + + + + A small helper class to encapsulate details of the + reflection API, particularly around generics. + + + + + Create a new instance that + lets you look at information about the given type. + + Type to do reflection on. + + + + Test the given object, looking at + the parameters. Determine if any of the parameters are + open generic types that need type attributes filled in. + + The method to check. + True if any of the parameters are open generics. False if not. + + + + If this type is an open generic, use the + given array to + determine what the required closed type is and return that. + + If the parameter is not an open type, just + return this parameter's type. + Type arguments to substitute in for + the open type parameters. + Corresponding closed type of this parameter. + + + + Given a generic argument name, return the corresponding type for this + closed type. For example, if the current type is SomeType<User>, and the + corresponding definition was SomeType<TSomething>, calling this method + and passing "TSomething" will return typeof(User). + + Name of the generic parameter. + Type of the corresponding generic parameter, or null if there + is no matching name. + + + + The object we're reflecting over. + + + + + Is this type generic? + + + + + Is this type an open generic (no type parameter specified) + + + + + Is this type an array type? + + + + + Is this type an array of generic elements? + + + + + The type of the elements in this type (if it's an array). + + + + + Returns all the public constructors defined for the current reflected . + + + An enumeration of ConstructorInfo objects representing all the public instance constructors defined for the + current reflected , but not including the type initializer (static constructor). + + + + + Create a new instance of that + lets you query information about the given ParameterInfo object. + + Parameter to query. + + + + A set of helper methods to pick through lambdas and pull out + from them. + + + + + Pull out a object from an expression of the form + () => SomeClass.SomeMethod() + + Expression describing the method to call. + Corresponding . + + + + Pull out a object from an expression of the form + x => x.SomeMethod() + + The type where the method is defined. + Expression describing the method to call. + Corresponding . + + + + Pull out a object for the get method from an expression of the form + x => x.SomeProperty + + The type where the method is defined. + The type for the property. + Expression describing the property for which the get method is to be extracted. + Corresponding . + + + + Pull out a object for the set method from an expression of the form + x => x.SomeProperty + + The type where the method is defined. + The type for the property. + Expression describing the property for which the set method is to be extracted. + Corresponding . + + + + + + + + + + + + + Pull out a object from an expression of the form () => new SomeType() + + The type where the constructor is defined. + Expression invoking the desired constructor. + Corresponding . + + + diff --git a/packages/Unity.4.0.1/lib/wp80/Microsoft.Practices.Unity.RegistrationByConvention.XML b/packages/Unity.4.0.1/lib/wp80/Microsoft.Practices.Unity.RegistrationByConvention.XML new file mode 100644 index 0000000..a679199 --- /dev/null +++ b/packages/Unity.4.0.1/lib/wp80/Microsoft.Practices.Unity.RegistrationByConvention.XML @@ -0,0 +1,312 @@ + + + + Microsoft.Practices.Unity.RegistrationByConvention + + + + + Provides helper methods to retrieve classes from assemblies. + + + + + Returns all visible, non-abstract classes from . + + The assemblies. + All visible, non-abstract classes found in the assemblies. + is . + contains elements. + All exceptions thrown while getting types from the assemblies are ignored, and the types that can be retrieved are returned. + + + + Returns all visible, non-abstract classes from , and optionally skips errors. + + to skip errors; otherwise, . + The assemblies. + + All visible, non-abstract classes. + + is . + contains elements. + + If is , all exceptions thrown while getting types from the assemblies are ignored, and the types + that can be retrieved are returned; otherwise, the original exception is thrown. + + + + + Returns all visible, non-abstract classes from . + + to skip errors; otherwise, . + The assemblies. + + All visible, non-abstract classes. + + is . + contains elements. + + If is , all exceptions thrown while getting types from the assemblies are ignored, and the types + that can be retrieved are returned; otherwise, the original exception is thrown. + + + + + Returns all visible, non-abstract classes from all assemblies located where the application is installed. + + to include the Unity assemblies; otherwise, . Defaults to . + to skip errors; otherwise, . + + All visible, non-abstract classes. + + + If is , all exceptions thrown while loading assemblies or getting types from the assemblies + are ignored, and the types that can be retrieved are returned; otherwise, the original exception is thrown. These exceptions might be wrapped in a + . + + + + + The exception that is thrown when registering multiple types would result in an type mapping being overwritten. + + + + + Initializes a new instance of the class. + + The name for the mapping. + The source type for the mapping. + The type currently mapped. + The new type to map. + + + + Gets the name for the mapping. + + + + + Gets the source type for the mapping. + + + + + Gets the type currently mapped. + + + + + Gets the new type to map. + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to An attempt to override an existing mapping was detected for type {1} with name "{0}", currently mapped to type {2}, to type {3}.. + + + + + Looks up a localized string similar to The set of assemblies contains a null element.. + + + + + Represents a set of types to register and their registration settings. + + + + + Gets types to register. + + + + + Gets a function to get the types that will be requested for each type to configure. + + + + + Gets a function to get the name to use for the registration of each type. + + + + + Gets a function to get the for the registration of each type. Defaults to no lifetime management. + + + + + + Gets a function to get the additional objects for the registration of each type. Defaults to no injection members. + + + + + + Provides a set of convenience overloads to the + interface to support registration of multiple types. + + + + + Registers the supplied types by using the specified rules for name, lifetime manager, injection members, and registration types. + + The container to configure. + The types to register. The methods in the class can be used to scan assemblies to get types, and further filtering can be performed using LINQ queries. + A function that gets the types that will be requested for each type to configure. It can be a method from the class or a custom function. Defaults to no registration types, and registers only the supplied types. + A function that gets the name to use for the registration of each type. It can be a method from the or a custom function. Defaults to no name. + A function that gets the for the registration of each type. It can be a method from the class or a custom function. Defaults to no lifetime management. + A function that gets the additional objects for the registration of each type. Defaults to no injection members. + to overwrite existing mappings; otherwise, . Defaults to . + + The container that this method was called on. + + A new registration would overwrite an existing mapping and is . + + + + Registers the types according to the . + + The container to configure. + The convention to determine which types will be registered and how. + to overwrite existing mappings; otherwise, . Defaults to . + + The container that this method was called on. + + + + + Provides helper methods to specify the lifetime for a type with registration by convention. + + + + + Returns a . + + The type. + A lifetime manager + + + + Returns a . + + The type. + A container controlled lifetime manager. + + + + Returns a . + + The type. + An externally controlled lifetime manager. + + + + Returns a . + + The type. + A hierarchical lifetime manager. + + + + Returns a . + + The type. + A per resolve lifetime manager. + + + + Returns a . + + The type. + A transient lifetime manager. + + + + Returns a . + + The custom type. + The type. + + A lifetime manager. + + + + + Returns a . + + The type. + A per thread lifetime manager. + + + + Provides helper methods to map types to the types interfaces to which register them. + + + + + Returns no types. + + The type to register. + An empty enumeration. + + + + Returns an enumeration with the interface that matches the name of . + + The type to register. + An enumeration with the first interface matching the name of (for example, if type is MyType, a matching interface is IMyType), + or an empty enumeration if no such interface is found. + + + + Returns an enumeration with all the interfaces implemented by . + + The type to register. + An enumeration with all the interfaces implemented by the implementation type except . + + + + Returns an enumeration with all the interfaces implemented by that belong to the same assembly as implementationType. + + The type to register. + An enumeration with all the interfaces implemented by the implementation type that belong to the same assembly. + + + + Provides helper methods to get type names. + + + + + Returns the type name. + + The type. + The type name. + + + + Returns null for the registration name. + + The type. + + + + diff --git a/packages/Unity.4.0.1/lib/wp80/Microsoft.Practices.Unity.RegistrationByConvention.dll b/packages/Unity.4.0.1/lib/wp80/Microsoft.Practices.Unity.RegistrationByConvention.dll new file mode 100644 index 0000000..e65d0d7 Binary files /dev/null and b/packages/Unity.4.0.1/lib/wp80/Microsoft.Practices.Unity.RegistrationByConvention.dll differ diff --git a/packages/Unity.4.0.1/lib/wp80/Microsoft.Practices.Unity.dll b/packages/Unity.4.0.1/lib/wp80/Microsoft.Practices.Unity.dll new file mode 100644 index 0000000..0d8c004 Binary files /dev/null and b/packages/Unity.4.0.1/lib/wp80/Microsoft.Practices.Unity.dll differ diff --git a/packages/Unity.4.0.1/lib/wp80/Microsoft.Practices.Unity.xml b/packages/Unity.4.0.1/lib/wp80/Microsoft.Practices.Unity.xml new file mode 100644 index 0000000..f99ca70 --- /dev/null +++ b/packages/Unity.4.0.1/lib/wp80/Microsoft.Practices.Unity.xml @@ -0,0 +1,5916 @@ + + + + Microsoft.Practices.Unity + + + + + Provides access to the names registered for a container. + + + + + Represents a builder policy interface. Since there are no fixed requirements + for policies, it acts as a marker interface from which to derive all other + policy interfaces. + + + + + Gets the names registered for a type. + + The type. + The names registered for . + + + + An implementation + that constructs a build plan for creating objects. + + + + + A that can create and return an + for the given build key. + + + + + Create a build plan using the given context and build key. + + Current build context. + Current build key. + The build plan. + + + + Creates a build plan using the given context and build key. + + Current build context. + Current build key. + + The build plan. + + + + + Provides extension methods to the class due to the introduction + of class in the .NET for Windows Store apps. + + + + + Returns the constructor in that matches the specified constructor parameter types. + + The type to inspect + The constructor parameter types. + The constructor that matches the specified parameter types. + + + + Returns the non-static declared methods of a type or its base types. + + The type to inspect + An enumerable of the objects. + + + + Returns the non-static method of a type or its based type. + + The type to inspect + The name of the method to seek. + The (closed) parameter type signature of the method. + The discovered + + + + Returns the declared properties of a type or its base types. + + The type to inspect + An enumerable of the objects. + + + + Determines if the types in a parameter set ordinally matches the set of supplied types. + + + + + + + + Base class for attributes that can be placed on parameters + or properties to specify how to resolve the value for + that parameter or property. + + + + + Create an instance of that + will be used to get the value for the member this attribute is + applied to. + + Type of parameter or property that + this attribute is decoration. + The resolver object. + + + + This attribute is used to indicate which constructor to choose when + the container attempts to build a type. + + + + + This attribute is used to mark methods that should be called when + the container is building an object. + + + + + This attribute is used to mark properties and parameters as targets for injection. + + + For properties, this attribute is necessary for injection to happen. For parameters, + it's not needed unless you want to specify additional information to control how + the parameter is resolved. + + + + + Create an instance of with no name. + + + + + Create an instance of with the given name. + + Name to use when resolving this dependency. + + + + Create an instance of that + will be used to get the value for the member this attribute is + applied to. + + Type of parameter or property that + this attribute is decoration. + The resolver object. + + + + The name specified in the constructor. + + + + + An used to mark a dependency + as optional - the container will try to resolve it, and return null + if the resolution fails rather than throw. + + + + + Construct a new object. + + + + + Construct a new object that + specifies a named dependency. + + Name of the dependency. + + + + Create an instance of that + will be used to get the value for the member this attribute is + applied to. + + Type of parameter or property that + this attribute is decoration. + The resolver object. + + + + Name of the dependency. + + + + + A that composites other + ResolverOverride objects. The GetResolver operation then + returns the resolver from the first child override that + matches the current context and request. + + + + + Base class for all override objects passed in the + method. + + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + Wrap this resolver in one that verifies the type of the object being built. + This allows you to narrow any override down to a specific type easily. + + Type to constrain the override to. + The new override. + + + + Wrap this resolver in one that verifies the type of the object being built. + This allows you to narrow any override down to a specific type easily. + + Type to constrain the override to. + The new override. + + + + Add a new to the collection + that is checked. + + item to add. + + + + Add a set of s to the collection. + + items to add. + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + 2 + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + 1 + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + Class that returns information about the types registered in a container. + + + + + The type that was passed to the method + as the "from" type, or the only type if type mapping wasn't done. + + + + + The type that this registration is mapped to. If no type mapping was done, the + property and this one will have the same value. + + + + + Name the type was registered under. Null for default registration. + + + + + The registered lifetime manager instance. + + + + + The lifetime manager for this registration. + + + This property will be null if this registration is for an open generic. + + + + A class that overrides + the value injected whenever there is a dependency of the + given type, regardless of where it appears in the object graph. + + + + + Create an instance of to override + the given type with the given value. + + Type of the dependency. + Value to use. + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + A convenience version of that lets you + specify the dependency type using generic syntax. + + Type of the dependency to override. + + + + Construct a new object that will + override the given dependency, and pass the given value. + + + + + A convenience form of that lets you + specify multiple parameter overrides in one shot rather than having + to construct multiple objects. + + + This class isn't really a collection, it just implements IEnumerable + so that we get use of the nice C# collection initializer syntax. + + + + + Base helper class for creating collections of objects + for use in passing a bunch of them to the resolve call. This base class provides + the mechanics needed to allow you to use the C# collection initializer syntax. + + Concrete type of the this class collects. + Key used to create the underlying override object. + Value that the override returns. + + + + Add a new override to the collection with the given key and value. + + Key - for example, a parameter or property name. + Value - the value to be returned by the override. + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + 2 + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + 1 + + + + When implemented in derived classes, this method is called from the + method to create the actual objects. + + Key value to create the resolver. + Value to store in the resolver. + The created . + + + + When implemented in derived classes, this method is called from the + method to create the actual objects. + + Key value to create the resolver. + Value to store in the resolver. + The created . + + + + Event argument class for the event. + + + + + Construct a new object with the + given child container object. + + An for the newly created child + container. + + + + The newly created child container. + + + + + An extension context for the created child container. + + + + + Base class for subclasses that let you specify that + an instance of a generic type parameter should be resolved. + + + + + Base type for objects that are used to configure parameters for + constructor or method injection, or for getting the value to + be injected into a property. + + + + + Test to see if this parameter value has a matching type for the given type. + + Type to check. + True if this parameter value is compatible with type , + false if not. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + Convert the given set of arbitrary values to a sequence of InjectionParameterValue + objects. The rules are: If it's already an InjectionParameterValue, return it. If + it's a Type, return a ResolvedParameter object for that type. Otherwise return + an InjectionParameter object for that value. + + The values to build the sequence from. + The resulting converted sequence. + + + + Convert an arbitrary value to an InjectionParameterValue object. The rules are: + If it's already an InjectionParameterValue, return it. If it's a Type, return a + ResolvedParameter object for that type. Otherwise return an InjectionParameter + object for that value. + + The value to convert. + The resulting . + + + + Name for the type represented by this . + This may be an actual type name or a generic argument name. + + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + name to use when looking up in the container. + + + + Test to see if this parameter value has a matching type for the given type. + + Type to check. + True if this parameter value is compatible with type , + false if not. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + Return a instance that will + return this types value for the parameter. + + The actual type to resolve. + The resolution key. + The . + + + + Name for the type represented by this . + This may be an actual type name or a generic argument name. + + + + + A that lets you specify that + an instance of a generic type parameter should be resolved, providing the + value if resolving fails. + + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + name to use when looking up in the container. + + + + Return a instance that will + return this types value for the parameter. + + The actual type to resolve. + The resolution key. + The . + + + + A class that lets you specify a factory method the container + will use to create the object. + + This is a significantly easier way to do the same + thing the old static factory extension was used for. + + + + Base class for objects that can be used to configure what + class members get injected by the container. + + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Type to register. + Policy list to add policies to. + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Type of interface being registered. If no interface, + this will be null. + Type of concrete type being registered. + Name used to resolve the type object. + Policy list to add policies to. + + + + Create a new instance of with + the given factory function. + + Factory function. + + + + Create a new instance of with + the given factory function. + + Factory function. + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Type of interface being registered. If no interface, + this will be null. This parameter is ignored in this implementation. + Type of concrete type being registered. + Name used to resolve the type object. + Policy list to add policies to. + + + + A that can be passed to + to configure a + parameter or property as an optional dependency. + + + + + A base class for implementing classes + that deal in explicit types. + + + + + Create a new that exposes + information about the given . + + Type of the parameter. + + + + Test to see if this parameter value has a matching type for the given type. + + Type to check. + True if this parameter value is compatible with type , + false if not. + + + + The type of parameter this object represents. + + + + + Name for the type represented by this . + This may be an actual type name or a generic argument name. + + + + + Construct a new object that + specifies the given . + + Type of the dependency. + + + + Construct a new object that + specifies the given and . + + Type of the dependency. + Name for the dependency. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + A generic version of that lets you + specify the type of the dependency using generics syntax. + + Type of the dependency. + + + + Construct a new . + + + + + Construct a new with the given + . + + Name of the dependency. + + + + A special lifetime manager which works like , + except that in the presence of child containers, each child gets it's own instance + of the object, instead of sharing one in the common parent. + + + + + A that holds onto the instance given to it. + When the is disposed, + the instance is disposed with it. + + + + + Base class for Lifetime managers which need to synchronize calls to + . + + + + The purpose of this class is to provide a basic implementation of the lifetime manager synchronization pattern. + + + Calls to the method of a + instance acquire a lock, and if the instance has not been initialized with a value yet the lock will only be released + when such an initialization takes place by calling the method or if + the build request which resulted in the call to the GetValue method fails. + + + + + + + Base class for Lifetime managers - classes that control how + and when instances are created by the Unity container. + + + + + A that controls how instances are + persisted and recovered from an external store. Used to implement + things like singletons and per-http-request lifetime. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. + + The object to store. + + + + Remove the value this lifetime policy is managing from backing store. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. + + The object being stored. + + + + Remove the given object from backing store. + + + + + This interface provides a hook for the builder context to + implement error recovery when a builder strategy throws + an exception. Since we can't get try/finally blocks onto + the call stack for later stages in the chain, we instead + add these objects to the context. If there's an exception, + all the current IRequiresRecovery instances will have + their Recover methods called. + + + + + A method that does whatever is needed to clean up + as part of cleaning up after an exception. + + + Don't do anything that could throw in this method, + it will cause later recover operations to get skipped + and play real havoc with the stack trace. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + Calls to this method acquire a lock which is released only if a non-null value + has been set for the lifetime manager. + + + + Performs the actual retrieval of a value from the backing store associated + with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + This method is invoked by + after it has acquired its lock. + + + + Stores the given value into backing store for retrieval later. + + The object being stored. + Setting a value will attempt to release the lock acquired by + . + + + + Performs the actual storage of the given value into backing store for retrieval later. + + The object being stored. + This method is invoked by + before releasing its lock. + + + + Remove the given object from backing store. + + + + + A method that does whatever is needed to clean up + as part of cleaning up after an exception. + + + Don't do anything that could throw in this method, + it will cause later recover operations to get skipped + and play real havoc with the stack trace. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. + + The object being stored. + + + + Remove the given object from backing store. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Standard Dispose pattern implementation. Not needed, but it keeps FxCop happy. + + Always true, since we don't have a finalizer. + + + + This is a custom lifetime manager that acts like , + but also provides a signal to the default build plan, marking the type so that + instances are reused across the build up object graph. + + + + + Construct a new object that does not + itself manage an instance. + + + + + Construct a new object that stores the + give value. This value will be returned by + but is not stored in the lifetime manager, nor is the value disposed. + This Lifetime manager is intended only for internal use, which is why the + normal method is not used here. + + Value to store. + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. In this class, + this is a noop, since it has special hooks down in the guts. + + The object being stored. + + + + Remove the given object from backing store. Noop in this class. + + + + + A strategy that handles Hierarchical lifetimes across a set of parent/child + containers. + + + + + Represents a strategy in the chain of responsibility. + Strategies are required to support both BuildUp and TearDown. + + + + + Represents a strategy in the chain of responsibility. + Strategies are required to support both BuildUp and TearDown. Although you + can implement this interface directly, you may also choose to use + as the base class for your strategies, as + this class provides useful helper methods and makes support BuildUp and TearDown + optional. + + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + Called during the chain of responsibility for a build operation. The + PostBuildUp method is called when the chain has finished the PreBuildUp + phase and executes in reverse order from the PreBuildUp calls. + + Context of the build operation. + + + + Called during the chain of responsibility for a teardown operation. The + PreTearDown method is called when the chain is being executed in the + forward direction. + + Context of the teardown operation. + + + + Called during the chain of responsibility for a teardown operation. The + PostTearDown method is called when the chain has finished the PreTearDown + phase and executes in reverse order from the PreTearDown calls. + + Context of the teardown operation. + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + Called during the chain of responsibility for a build operation. The + PostBuildUp method is called when the chain has finished the PreBuildUp + phase and executes in reverse order from the PreBuildUp calls. + + Context of the build operation. + + + + Called during the chain of responsibility for a teardown operation. The + PreTearDown method is called when the chain is being executed in the + forward direction. + + Context of the teardown operation. + + + + Called during the chain of responsibility for a teardown operation. The + PostTearDown method is called when the chain has finished the PreTearDown + phase and executes in reverse order from the PreTearDown calls. + + Context of the teardown operation. + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + A that will attempt to + resolve a value, and return null if it cannot rather than throwing. + + + + + A strategy that is used at build plan execution time + to resolve a dependent value. + + + + + Get the value for a dependency. + + Current build context. + The value for the dependency. + + + + Construct a new object + that will attempt to resolve the given name and type from the container. + + Type to resolve. Must be a reference type. + Name to resolve with. + + + + Construct a new object + that will attempt to resolve the given type from the container. + + Type to resolve. Must be a reference type. + + + + Get the value for a dependency. + + Current build context. + The value for the dependency. + + + + Type this resolver will resolve. + + + + + Name this resolver will resolve. + + + + + Extension methods on to provide convenience + overloads (generic versions, mostly). + + + + + Removes an individual policy type for a build key. + + The type the policy was registered as. + to remove the policy from. + The key the policy applies. + + + + Removes a default policy. + + The type the policy was registered as. + to remove the policy from. + + + + Gets an individual policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + The policy list that actually contains the returned policy. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + to search. + The interface the policy is registered under. + The key the policy applies. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + to search. + The interface the policy is registered under. + The key the policy applies. + The policy list that actually contains the returned policy. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy list that actually contains the returned policy. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + to search. + The interface the policy is registered under. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy in the list, if present; returns null otherwise. + + + + Get the non default policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy in the list, if present; returns null otherwise. + + + + Get the non default policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy list that actually contains the returned policy. + The policy in the list, if present; returns null otherwise. + + + + Get the non default policy. + + to search. + The interface the policy is registered under. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy in the list, if present; returns null otherwise. + + + + Sets an individual policy. + + The interface the policy is registered under. + to add the policy to. + The policy to be registered. + The key the policy applies. + + + + Sets a default policy. When checking for a policy, if no specific individual policy + is available, the default will be used. + + The interface to register the policy under. + to add the policy to. + The default policy to be registered. + + + + Base class for the current operation stored in the build context. + + + + + Create a new . + + Type currently being built. + + + + The type that's currently being built. + + + + + Build plan for that will return a Func that will resolve the requested type + through this container later. + + + + + A build plan is an object that, when invoked, will create a new object + or fill in a given existing one. It encapsulates all the information + gathered by the strategies to construct a particular object. + + + + + Creates an instance of this build plan's type, or fills + in the existing type if passed in. + + Context used to build up the object. + + + + Creates an instance of this build plan's type, or fills + in the existing type if passed in. + + Context used to build up the object. + + + + The almost inevitable collection of extra helper methods on + to augment the rich set of what + LINQ already gives us. + + + + + Execute the provided on every item in . + + Type of the items stored in + Sequence of items to process. + Code to run over each item. + + + + Create a single string from a sequence of items, separated by the provided , + and with the conversion to string done by the given . + + This method does basically the same thing as , + but will work on any sequence of items, not just arrays. + Type of items in the sequence. + Sequence of items to convert. + Separator to place between the items in the string. + The conversion function to change TItem -> string. + The resulting string. + + + + Create a single string from a sequence of items, separated by the provided , + and with the conversion to string done by the item's method. + + This method does basically the same thing as , + but will work on any sequence of items, not just arrays. + Type of items in the sequence. + Sequence of items to convert. + Separator to place between the items in the string. + The resulting string. + + + + A class that lets you + override a named parameter passed to a constructor. + + + + + Construct a new object that will + override the given named constructor parameter, and pass the given + value. + + Name of the constructor parameter. + Value to pass for the constructor. + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + A convenience form of that lets you + specify multiple parameter overrides in one shot rather than having + to construct multiple objects. + + + + + When implemented in derived classes, this method is called from the + method to create the actual objects. + + Key value to create the resolver. + Value to store in the resolver. + The created . + + + + A that lets you override + the value for a specified property. + + + + + Create an instance of . + + The property name. + Value to use for the property. + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + A convenience form of that lets you + specify multiple property overrides in one shot rather than having + to construct multiple objects. + + + + + When implemented in derived classes, this method is called from the + method to create the actual objects. + + Key value to create the resolver. + Value to store in the resolver. + The created . + + + + Interface defining the configuration interface exposed by the + Static Factory extension. + + + + + Base interface for all extension configuration interfaces. + + + + + Retrieve the container instance that we are currently configuring. + + + + + Register the given factory delegate to be called when the container is + asked to resolve . + + Type that will be requested from the container. + Delegate to invoke to create the instance. + The container extension object this method was invoked on. + + + + Register the given factory delegate to be called when the container is + asked to resolve and . + + Type that will be requested from the container. + The name that will be used when requesting to resolve this type. + Delegate to invoke to create the instance. + The container extension object this method was invoked on. + + + + Represents the context in which a build-up or tear-down operation runs. + + + + + Represents the context in which a build-up or tear-down operation runs. + + + + + Add a new set of resolver override objects to the current build operation. + + objects to add. + + + + Get a object for the given + or null if that dependency hasn't been overridden. + + Type of the dependency. + Resolver to use, or null if no override matches for the current operation. + + + + A convenience method to do a new buildup operation on an existing context. + + Key to use to build up. + Created object. + + + + A convenience method to do a new buildup operation on an existing context. This + overload allows you to specify extra policies which will be in effect for the duration + of the build. + + Key defining what to build up. + A delegate that takes a . This + is invoked with the new child context before the build up process starts. This gives callers + the opportunity to customize the context for the build process. + Created object. + + + + Gets the head of the strategy chain. + + + The strategy that's first in the chain; returns null if there are no + strategies in the chain. + + + + + Gets the associated with the build. + + + The associated with the build. + + + + + Gets the original build key for the build operation. + + + The original build key for the build operation. + + + + + Get the current build key for the current build operation. + + + + + The set of policies that were passed into this context. + + This returns the policies passed into the context. + Policies added here will remain after buildup completes. + The persistent policies for the current context. + + + + Gets the policies for the current context. + + Any policies added to this object are transient + and will be erased at the end of the buildup. + + The policies for the current context. + + + + + Gets the collection of objects + that need to execute in event of an exception. + + + + + The current object being built up or torn down. + + + The current object being manipulated by the build operation. May + be null if the object hasn't been created yet. + + + + Flag indicating if the build operation should continue. + + true means that building should not call any more + strategies, false means continue to the next strategy. + + + + An object representing what is currently being done in the + build chain. Used to report back errors if there's a failure. + + + + + The build context used to resolve a dependency during the build operation represented by this context. + + + + + Initialize a new instance of the class. + + + + + Initialize a new instance of the class with a , + , and the + build key used to start this build operation. + + The to use for this context. + The to use for this context. + The to use for this context. + Build key to start building. + The existing object to build up. + + + + Create a new using the explicitly provided + values. + + The to use for this context. + The to use for this context. + The set of persistent policies to use for this context. + The set of transient policies to use for this context. It is + the caller's responsibility to ensure that the transient and persistent policies are properly + combined. + Build key for this context. + Existing object to build up. + + + + Create a new using the explicitly provided + values. + + The to use for this context. + The to use for this context. + The set of persistent policies to use for this context. + The set of transient policies to use for this context. It is + the caller's responsibility to ensure that the transient and persistent policies are properly + combined. + Build key for this context. + The resolver overrides. + + + + Add a new set of resolver override objects to the current build operation. + + objects to add. + + + + Get a object for the given + or null if that dependency hasn't been overridden. + + Type of the dependency. + Resolver to use, or null if no override matches for the current operation. + + + + A convenience method to do a new buildup operation on an existing context. + + Key to use to build up. + Created object. + + + + A convenience method to do a new buildup operation on an existing context. This + overload allows you to specify extra policies which will be in effect for the duration + of the build. + + Key defining what to build up. + A delegate that takes a . This + is invoked with the new child context before the build up process starts. This gives callers + the opportunity to customize the context for the build process. + Created object. + + + + Gets the head of the strategy chain. + + + The strategy that's first in the chain; returns null if there are no + strategies in the chain. + + + + + Get the current build key for the current build operation. + + + + + The current object being built up or torn down. + + + The current object being manipulated by the build operation. May + be null if the object hasn't been created yet. + + + + Gets the associated with the build. + + + The associated with the build. + + + + + Gets the original build key for the build operation. + + + The original build key for the build operation. + + + + + The set of policies that were passed into this context. + + This returns the policies passed into the context. + Policies added here will remain after buildup completes. + The persistent policies for the current context. + + + + Gets the policies for the current context. + + + Any modifications will be transient (meaning, they will be forgotten when + the outer BuildUp for this context is finished executing). + + + The policies for the current context. + + + + + Gets the collection of objects + that need to execute in event of an exception. + + + + + Flag indicating if the build operation should continue. + + true means that building should not call any more + strategies, false means continue to the next strategy. + + + + An object representing what is currently being done in the + build chain. Used to report back errors if there's a failure. + + + + + The build context used to resolve a dependency during the build operation represented by this context. + + + + + Represents that a dependency could not be resolved. + + + + + Initializes a new instance of the class with no extra information. + + + + + Initializes a new instance of the class with the given message. + + Some random message. + + + + Initialize a new instance of the class with the given + message and inner exception. + + Some random message + Inner exception. + + + + Initializes a new instance of the class with the build key of the object begin built. + + The build key of the object begin built. + + + + The exception thrown when injection is attempted on a method + that is an open generic or has out or ref params. + + + + + Construct a new with no + message. + + + + + Construct a with the given message + + Message to return. + + + + Construct a with the given message + and inner exception. + + Message to return. + Inner exception + + + + Extension methods to provide convenience overloads over the + interface. + + + + + Start a recursive build up operation to retrieve the default + value for the given type. + + Type of object to build. + Parent context. + Resulting object. + + + + Start a recursive build up operation to retrieve the named + implementation for the given type. + + Type to resolve. + Parent context. + Name to resolve with. + The resulting object. + + + + Add a set of s to the context, specified as a + variable argument list. + + Context to add overrides to. + The overrides. + + + + Data structure that stores the set of + objects and executes them when requested. + + + + + Add a new object to this + list. + + Object to add. + + + + Execute the method + of everything in the recovery list. Recoveries will execute + in the opposite order of add - it's a stack. + + + + + Return the number of recovery objects currently in the stack. + + + + + Represents a lifetime container. + + + A lifetime container tracks the lifetime of an object, and implements + IDisposable. When the container is disposed, any objects in the + container which implement IDisposable are also disposed. + + + + + Adds an object to the lifetime container. + + The item to be added to the lifetime container. + + + + Determine if a given object is in the lifetime container. + + + The item to locate in the lifetime container. + + + Returns true if the object is contained in the lifetime + container; returns false otherwise. + + + + + Removes an item from the lifetime container. The item is + not disposed. + + The item to be removed. + + + + Gets the number of references in the lifetime container + + + The number of references in the lifetime container + + + + + Represents a lifetime container. + + + A lifetime container tracks the lifetime of an object, and implements + IDisposable. When the container is disposed, any objects in the + container which implement IDisposable are also disposed. + + + + + Adds an object to the lifetime container. + + The item to be added to the lifetime container. + + + + Determine if a given object is in the lifetime container. + + + The item to locate in the lifetime container. + + + Returns true if the object is contained in the lifetime + container; returns false otherwise. + + + + + Releases the resources used by the . + + + + + Releases the resources used by the . + + + true to release managed and unmanaged resources; false to release only unmanaged resources. + + + + + Returns an enumerator that iterates through the lifetime container. + + + An object that can be used to iterate through the life time container. + + + + + Returns an enumerator that iterates through the lifetime container. + + + An object that can be used to iterate through the life time container. + + + + + Removes an item from the lifetime container. The item is + not disposed. + + The item to be removed. + + + + Gets the number of references in the lifetime container + + + The number of references in the lifetime container + + + + + A custom collection over objects. + + + + + Removes an individual policy type for a build key. + + The type of policy to remove. + The key the policy applies. + + + + Removes all policies from the list. + + + + + Removes a default policy. + + The type the policy was registered as. + + + + Gets an individual policy. + + The interface the policy is registered under. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy list in the chain that the searched for policy was found in, null if the policy was + not found. + The policy in the list, if present; returns null otherwise. + + + + Get the non default policy. + + The interface the policy is registered under. + The key the policy applies to. + True if the search should be in the local policy list only; otherwise false to search up the parent chain. + The policy list in the chain that the searched for policy was found in, null if the policy was + not found. + The policy in the list if present; returns null otherwise. + + + + Sets an individual policy. + + The of the policy. + The policy to be registered. + The key the policy applies. + + + + Sets a default policy. When checking for a policy, if no specific individual policy + is available, the default will be used. + + The interface to register the policy under. + The default policy to be registered. + + + + A custom collection wrapper over objects. + + + + + Initialize a new instance of a class. + + + + + Initialize a new instance of a class with another policy list. + + An inner policy list to search. + + + + Removes an individual policy type for a build key. + + The type of policy to remove. + The key the policy applies. + + + + Removes all policies from the list. + + + + + Removes a default policy. + + The type the policy was registered as. + + + + Gets an individual policy. + + The interface the policy is registered under. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy list in the chain that the searched for policy was found in, null if the policy was + not found. + The policy in the list, if present; returns null otherwise. + + + + Get the non default policy. + + The interface the policy is registered under. + The key the policy applies to. + True if the search should be in the local policy list only; otherwise false to search up the parent chain. + The policy list in the chain that the searched for policy was found in, null if the policy was + not found. + The policy in the list if present; returns null otherwise. + + + + Sets an individual policy. + + The of the policy. + The policy to be registered. + The key the policy applies. + + + + Sets a default policy. When checking for a policy, if no specific individual policy + is available, the default will be used. + + The interface to register the policy under. + The default policy to be registered. + + + + Gets the number of items in the locator. + + + The number of items in the locator. + + + + + An implementation of . + + + + + Add a new object to this + list. + + Object to add. + + + + Execute the method + of everything in the recovery list. Recoveries will execute + in the opposite order of add - it's a stack. + + + + + Return the number of recovery objects currently in the stack. + + + + + Implementation of which will notify an object about + the completion of a BuildUp operation, or start of a TearDown operation. + + + This strategy checks the object that is passing through the builder chain to see if it + implements IBuilderAware and if it does, it will call + and . This strategy is meant to be used from the + stage. + + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + Called during the chain of responsibility for a teardown operation. The + PreTearDown method is called when the chain is being executed in the + forward direction. + + Context of the teardown operation. + + + + Implemented on a class when it wants to receive notifications + about the build process. + + + + + Called by the when the object is being built up. + + The key of the object that was just built up. + + + + Called by the when the object is being torn down. + + + + + Enumeration to represent the object builder stages. + + + The order of the values in the enumeration is the order in which the stages are run. + + + + + Strategies in this stage run before creation. Typical work done in this stage might + include strategies that use reflection to set policies into the context that other + strategies would later use. + + + + + Strategies in this stage create objects. Typically you will only have a single policy-driven + creation strategy in this stage. + + + + + Strategies in this stage work on created objects. Typical work done in this stage might + include setter injection and method calls. + + + + + Strategies in this stage work on objects that are already initialized. Typical work done in + this stage might include looking to see if the object implements some notification interface + to discover when its initialization stage has been completed. + + + + + Represents a builder policy for mapping build keys. + + + + + Represents a builder policy for mapping build keys. + + + + + Maps the build key. + + The build key to map. + Current build context. Used for contextual information + if writing a more sophisticated mapping. This parameter can be null + (called when getting container registrations). + The new build key. + + + + Initialize a new instance of the with the new build key. + + The new build key. + + + + Maps the build key. + + The build key to map. + Current build context. Used for contextual information + if writing a more sophisticated mapping, unused in this implementation. + The new build key. + + + + Represents a strategy for mapping build keys in the build up operation. + + + + + Called during the chain of responsibility for a build operation. Looks for the + and if found maps the build key for the current operation. + + The context for the operation. + + + + An implementation of that can map + generic types. + + + + + Create a new instance + that will map generic types. + + Build key to map to. This must be or contain an open generic type. + + + + Maps the build key. + + The build key to map. + Current build context. Used for contextual information + if writing a more sophisticated mapping. + The new build key. + + + + A that will look for a build plan + in the current context. If it exists, it invokes it, otherwise + it creates one and stores it for later, and invokes it. + + + + + Called during the chain of responsibility for a build operation. + + The context for the operation. + + + + An implementation of that chooses + constructors based on these criteria: first, pick a constructor marked with the + attribute. If there + isn't one, then choose the constructor with the longest parameter list. If that is ambiguous, + then throw. + + Thrown when the constructor to choose is ambiguous. + Attribute used to mark the constructor to call. + + + + Base class that provides an implementation of + which lets you override how the parameter resolvers are created. + + + + + A that, when implemented, + will determine which constructor to call from the build plan. + + + + + Choose the constructor to call for the given type. + + Current build context + The to add any + generated resolver objects into. + The chosen constructor. + + + + Choose the constructor to call for the given type. + + Current build context + The to add any + generated resolver objects into. + The chosen constructor. + + + + Create a instance for the given + . + + Parameter to create the resolver for. + The resolver object. + + + + Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other. + + The second object to compare. + The first object to compare. + + Value Condition Less than zero is less than y. Zero equals y. Greater than zero is greater than y. + + + + + Create a instance for the given + . + + Parameter to create the resolver for. + The resolver object. + + + + Objects of this type are the return value from . + It encapsulates the desired with the string keys + needed to look up the for each + parameter. + + + + + Base class for return values from selector policies that + return a MemberInfo of some sort plus a list of parameter + keys to look up the parameter resolvers. + + + + + Base class for return of selector policies that need + to keep track of a set of parameter resolvers. + + + + + Adds the parameter resolver. Resolvers are assumed + to be in the order of the parameters to the member. + + The new resolver. + + + + Gets the parameter resolvers. + + An array with the parameter resolvers. + + + + Construct a new , storing + the given member info. + + Member info to store. + + + + The member info stored. + + + + + Create a new instance which + contains the given constructor. + + The constructor to wrap. + + + + The constructor this object wraps. + + + + + This class records the information about which constructor argument is currently + being resolved, and is responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + The type that is being constructed. + A string representing the constructor being called. + Parameter being resolved. + + + + Generate the string describing what parameter was being resolved. + + The description string. + + + + String describing the constructor being set up. + + + + + Parameter that's being resolved. + + + + + A that emits IL to call constructors + as part of creating a build plan. + + + + + Called during the chain of responsibility for a build operation. + + Existing object is an instance of . + The context for the operation. + + + + A helper method used by the generated IL to set up a PerResolveLifetimeManager lifetime manager + if the current object is such. + + Current build context. + + + + Build up the string that will represent the constructor signature + in any exception message. + + + + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + A helper method used by the generated IL to throw an exception if + no existing object is present, but the user is attempting to build + an interface (usually due to the lack of a type mapping). + + The currently being + used for the build of this object. + + + + A helper method used by the generated IL to throw an exception if + no existing object is present, but the user is attempting to build + an abstract class (usually due to the lack of a type mapping). + + The currently being + used for the build of this object. + + + + A helper method used by the generated IL to throw an exception if + no existing object is present, but the user is attempting to build + an delegate other than Func{T} or Func{IEnumerable{T}}. + + The currently being + used for the build of this object. + + + + A helper method used by the generated IL to throw an exception if + a dependency cannot be resolved. + + The currently being + used for the build of this object. + + + + A helper method used by the generated IL to throw an exception if + a dependency cannot be resolved because of an invalid constructor. + + The currently being + used for the build of this object. + The signature of the invalid constructor. + + + + A class that records that a constructor is about to be call, and is + responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + + + + Generate the description string. + + The string. + + + + Constructor we're trying to call. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Helper method used by generated IL to look up a dependency resolver based on the given key. + + Current build context. + Type of the dependency being resolved. + Key the resolver was stored under. + The found dependency resolver. + + + + Helper method used by generated IL to look up a dependency resolver based on the given key. + + Current build context. + Type of the dependency being resolved. + The configured resolver. + The found dependency resolver. + + + + The type that is to be built with the dynamic build plan. + + + + + The context parameter representing the used when the build plan is executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + An implementation + that constructs a build plan via dynamic IL emission. + + + + + Construct a that + uses the given strategy chain to construct the build plan. + + The strategy chain. + + + + Construct a build plan. + + The current build context. + The current build key. + The created build plan. + + + + A class that records that a constructor is about to be call, and is + responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + + + + Generate the description string. + + The string. + + + + Method we're trying to call. + + + + + This class records the information about which constructor argument is currently + being resolved, and is responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + The type that is being constructed. + A string representing the method being called. + Parameter being resolved. + + + + Generate the string describing what parameter was being resolved. + + The description string. + + + + String describing the method being set up. + + + + + Parameter that's being resolved. + + + + + A that generates IL to call + chosen methods (as specified by the current ) + as part of object build up. + + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + A base class that holds the information shared by all operations + performed by the container while setting properties. + + + + + Initializes a new instance of the class. + + + + + Generate the description of this operation. + + The string. + + + + Get a format string used to create the description. Called by + the base method. + + The format string. + + + + The property value currently being resolved. + + + + + This class records the information about which property value is currently + being resolved, and is responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + + + + Get a format string used to create the description. Called by + the base method. + + The format string. + + + + A that generates IL to resolve properties + on an object being built. + + + + + Called during the chain of responsibility for a build operation. + + The context for the operation. + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + This class records the information about which property value is currently + being set, and is responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + Type property is on. + Name of property being set. + + + + Get a format string used to create the description. Called by + the base method. + + The format string. + + + + Creates an instance of this build plan's type, or fills + in the existing type if passed in. + + Context used to build up the object. + + + + An that will examine the given + types and return a sequence of objects + that should be called as part of building the object. + + + + + Return the sequence of methods to call while building the target object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of methods to call. + + + + An implementation of that selects + methods by looking for the given + attribute on those methods. + + Type of attribute used to mark methods + to inject. + + + + Base class that provides an implementation of + which lets you override how the parameter resolvers are created. + + Attribute that marks methods that should + be called. + + + + Return the sequence of methods to call while building the target object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of methods to call. + + + + Create a instance for the given + . + + Parameter to create the resolver for. + The resolver object. + + + + Create a instance for the given + . + + Parameter to create the resolver for. + The resolver object. + + + + Objects of this type are the return value from . + It encapsulates the desired with the string keys + needed to look up the for each + parameter. + + + + + Create a new instance which + contains the given method. + + The method + + + + The constructor this object wraps. + + + + + An that returns a sequence + of properties that should be injected for the given type. + + + + + Returns sequence of properties on the given type that + should be set as part of building that object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of objects + that contain the properties to set. + + + + Base class that provides an implementation of + which lets you override how the parameter resolvers are created. + + + + + Returns sequence of properties on the given type that + should be set as part of building that object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of objects + that contain the properties to set. + + + + Create a for the given + property. + + Property to create resolver for. + The resolver object. + + + + An implementation of that looks + for properties marked with the + attribute that are also settable and not indexers. + + + + + + Create a for the given + property. + + Property to create resolver for. + The resolver object. + + + + Objects of this type are returned from + . + This class combines the about + the property with the string key used to look up the resolver + for this property's value. + + + + + Create an instance of + with the given and key. + + The property. + + + + + PropertyInfo for this property. + + + + + IDependencyResolverPolicy for this property + + + + + Implementation of . + + + + + A builder policy that lets you keep track of the current + resolvers and will remove them from the given policy set. + + + + + Add a new resolver to track by key. + + Key that was used to add the resolver to the policy set. + + + + Remove the currently tracked resolvers from the given policy list. + + Policy list to remove the resolvers from. + + + + Add a new resolver to track by key. + + Key that was used to add the resolver to the policy set. + + + + Remove the currently tracked resolvers from the given policy list. + + Policy list to remove the resolvers from. + + + + Get an instance that implements , + either the current one in the policy set or creating a new one if it doesn't + exist. + + Policy list to look up from. + Build key to track. + The resolver tracker. + + + + Add a key to be tracked to the current tracker. + + Policy list containing the resolvers and trackers. + Build key for the resolvers being tracked. + Key for the resolver. + + + + Remove the resolvers for the given build key. + + Policy list containing the build key. + Build key. + + + + An implementation of that + calls back into the build chain to build up the dependency, passing + a type given at compile time as its build key. + + + + + Create a new instance storing the given type. + + Type to resolve. + + + + Get the value for a dependency. + + Current build context. + The value for the dependency. + + + + This interface defines a standard method to convert any regardless + of the stage enum into a regular, flat strategy chain. + + + + + Convert this into + a flat . + + The flattened . + + + + Represents a chain of responsibility for builder strategies. + + + + + Reverse the order of the strategy chain. + + The reversed strategy chain. + + + + Execute this strategy chain against the given context, + calling the Buildup methods on the strategies. + + Context for the build process. + The build up object + + + + Execute this strategy chain against the given context, + calling the TearDown methods on the strategies. + + Context for the teardown process. + + + + A builder policy used to create lifetime policy instances. + Used by the LifetimeStrategy when instantiating open + generic types. + + + + + Create a new instance of . + + The new instance. + + + + The type of Lifetime manager that will be created by this factory. + + + + + An implementation that uses + a to figure out if an object + has already been created and to update or remove that + object from some backing store. + + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + Called during the chain of responsibility for a build operation. The + PostBuildUp method is called when the chain has finished the PreBuildUp + phase and executes in reverse order from the PreBuildUp calls. + + Context of the build operation. + + + + Represents a chain of responsibility for builder strategies partitioned by stages. + + The stage enumeration to partition the strategies. + + + + Initialize a new instance of the class. + + + + + Initialize a new instance of the class with an inner strategy chain to use when building. + + The inner strategy chain to use first when finding strategies in the build operation. + + + + Adds a strategy to the chain at a particular stage. + + The strategy to add to the chain. + The stage to add the strategy. + + + + Add a new strategy for the . + + The of + The stage to add the strategy. + + + + Clear the current strategy chain list. + + + This will not clear the inner strategy chain if this instance was created with one. + + + + + Makes a strategy chain based on this instance. + + A new . + + + + Represents a chain of responsibility for builder strategies. + + + + + Initialize a new instance of the class. + + + + + Initialize a new instance of the class with a collection of strategies. + + A collection of strategies to initialize the chain. + + + + Adds a strategy to the chain. + + The strategy to add to the chain. + + + + Adds strategies to the chain. + + The strategies to add to the chain. + + + + Reverse the order of the strategy chain. + + The reversed strategy chain. + + + + Execute this strategy chain against the given context to build up. + + Context for the build processes. + The build up object + + + + Execute this strategy chain against the given context, + calling the TearDown methods on the strategies. + + Context for the teardown process. + + + + Returns an enumerator that iterates through the collection. + + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + + An object that can be used to iterate through the collection. + + + + + Build key used to combine a type object with a string name. Used by + ObjectBuilder to indicate exactly what is being built. + + + + + Create a new instance with the given + type and name. + + to build. + Key to use to look up type mappings and singletons. + + + + Create a new instance for the default + buildup of the given type. + + to build. + + + + This helper method creates a new instance. It is + initialized for the default key for the given type. + + Type to build. + A new instance. + + + + This helper method creates a new instance for + the given type and key. + + Type to build + Key to use to look up type mappings and singletons. + A new instance initialized with the given type and name. + + + + Compare two instances. + + Two instances compare equal + if they contain the same name and the same type. Also, comparing + against a different type will also return false. + Object to compare to. + True if the two keys are equal, false if not. + + + + Calculate a hash code for this instance. + + A hash code. + + + + Compare two instances for equality. + + Two instances compare equal + if they contain the same name and the same type. + First of the two keys to compare. + Second of the two keys to compare. + True if the values of the keys are the same, else false. + + + + Compare two instances for inequality. + + Two instances compare equal + if they contain the same name and the same type. If either field differs + the keys are not equal. + First of the two keys to compare. + Second of the two keys to compare. + false if the values of the keys are the same, else true. + + + + Formats the build key as a string (primarily for debugging). + + A readable string representation of the build key. + + + + Return the stored in this build key. + + The type to build. + + + + Returns the name stored in this build key. + + The name to use when building. + + + + A generic version of so that + you can new up a key using generic syntax. + + Type for the key. + + + + Construct a new that + specifies the given type. + + + + + Construct a new that + specifies the given type and name. + + Name for the key. + + + + A series of helper methods to deal with sequences - + objects that implement . + + + + + A function that turns an arbitrary parameter list into an + . + + Type of arguments. + The items to put into the collection. + An array that contains the values of the . + + + + Given two sequences, return a new sequence containing the corresponding values + from each one. + + Type of first sequence. + Type of second sequence. + First sequence of items. + Second sequence of items. + New sequence of pairs. This sequence ends when the shorter of sequence1 and sequence2 does. + + + + A that lets you register a + delegate with the container to create an object, rather than calling + the object's constructor. + + + + + Base class for all extension objects. + + + + + The container calls this method when the extension is added. + + A instance that gives the + extension access to the internals of the container. + + + + Initial the container with this extension's functionality. + + + When overridden in a derived class, this method will modify the given + by adding strategies, policies, etc. to + install it's functions into the container. + + + + Removes the extension's functions from the container. + + + + This method is called when extensions are being removed from the container. It can be + used to do things like disconnect event handlers or clean up member state. You do not + need to remove strategies or policies here; the container will do that automatically. + + + The default implementation of this method does nothing. + + + + + The container this extension has been added to. + + The that this extension has been added to. + + + + The object used to manipulate + the inner state of the container. + + + + + Initialize this extension. This particular extension requires no + initialization work. + + + + + Register the given factory delegate to be called when the container is + asked to resolve and . + + Type that will be requested from the container. + The name that will be used when requesting to resolve this type. + Delegate to invoke to create the instance. + The container extension object this method was invoked on. + + + + Register the given factory delegate to be called when the container is + asked to resolve . + + Type that will be requested from the container. + Delegate to invoke to create the instance. + The container extension object this method was invoked on. + + + + An implementation of that + acts as a decorator over another . + This checks to see if the current type being built is the + right one before checking the inner . + + + + + Create an instance of + + Type to check for. + Inner override to check after type matches. + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + A convenience version of that lets you + specify the type to construct via generics syntax. + + Type to check for. + + + + Create an instance of . + + Inner override to check after type matches. + + + + Extension class that adds a set of convenience overloads to the + interface. + + + + + Register a type with specific members to be injected. + + Type this registration is for. + Container to configure. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container. + + + + This method is used to tell the container that when asked for type , + actually return an instance of type . This is very useful for + getting instances of interfaces. + + + This overload registers a default mapping and transient lifetime. + + + that will be requested. + that will actually be returned. + Container to configure. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container, where the created instances will use + the given . + + that will be requested. + that will actually be returned. + Container to configure. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container. + + + This method is used to tell the container that when asked for type , + actually return an instance of type . This is very useful for + getting instances of interfaces. + + that will be requested. + that will actually be returned. + Container to configure. + Name of this mapping. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container, where the created instances will use + the given . + + that will be requested. + that will actually be returned. + Container to configure. + Name to use for registration, null if a default registration. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type with the container. + No type mapping is performed for this type. + + The type to apply the to. + Container to configure. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type with the container. + No type mapping is performed for this type. + + The type to configure injection on. + Container to configure. + Name that will be used to request the type. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type and name with the container. + No type mapping is performed for this type. + + The type to apply the to. + Container to configure. + Name that will be used to request the type. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type with specific members to be injected. + + Container to configure. + Type this registration is for. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container. + + + + This method is used to tell the container that when asked for type , + actually return an instance of type . This is very useful for + getting instances of interfaces. + + + This overload registers a default mapping. + + + Container to configure. + that will be requested. + that will actually be returned. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container. + + + This method is used to tell the container that when asked for type , + actually return an instance of type . This is very useful for + getting instances of interfaces. + + Container to configure. + that will be requested. + that will actually be returned. + Name to use for registration, null if a default registration. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container, where the created instances will use + the given . + + Container to configure. + that will be requested. + that will actually be returned. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type and name with the container. + No type mapping is performed for this type. + + Container to configure. + The to apply the to. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type and name with the container. + No type mapping is performed for this type. + + Container to configure. + The to configure in the container. + Name to use for registration, null if a default registration. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type and name with the container. + No type mapping is performed for this type. + + Container to configure. + The to apply the to. + Name to use for registration, null if a default registration. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload does a default registration and has the container take over the lifetime of the instance. + + Type of instance to register (may be an implemented interface instead of the full type). + Container to configure. + Object to returned. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload does a default registration (name = null). + + + Type of instance to register (may be an implemented interface instead of the full type). + Container to configure. + Object to returned. + + object that controls how this instance will be managed by the container. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload automatically has the container take ownership of the . + + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + Container to configure. + Name for registration. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + Container to configure. + Name for registration. + + object that controls how this instance will be managed by the container. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload does a default registration and has the container take over the lifetime of the instance. + + Container to configure. + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload does a default registration (name = null). + + + Container to configure. + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + + object that controls how this instance will be managed by the container. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload automatically has the container take ownership of the . + + Container to configure. + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + Name for registration. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Resolve an instance of the default requested type from the container. + + of object to get from the container. + Container to resolve from. + Any overrides for the resolve call. + The retrieved object. + + + + Resolve an instance of the requested type with the given name from the container. + + of object to get from the container. + Container to resolve from. + Name of the object to retrieve. + Any overrides for the resolve call. + The retrieved object. + + + + Resolve an instance of the default requested type from the container. + + Container to resolve from. + of object to get from the container. + Any overrides for the resolve call. + The retrieved object. + + + + Return instances of all registered types requested. + + + + This method is useful if you've registered multiple types with the same + but different names. + + + Be aware that this method does NOT return an instance for the default (unnamed) registration. + + + The type requested. + Container to resolve from. + Any overrides for the resolve calls. + Set of objects of type . + + + + Run an existing object through the container and perform injection on it. + + + + This method is useful when you don't control the construction of an + instance (ASP.NET pages or objects created via XAML, for instance) + but you still want properties and other injection performed. + + + This overload uses the default registrations. + + + of object to perform injection on. + Container to resolve through. + Instance to build up. + Any overrides for the buildup. + The resulting object. By default, this will be , but + container extensions may add things like automatic proxy creation which would + cause this to return a different object (but still type compatible with ). + + + + Run an existing object through the container and perform injection on it. + + + + This method is useful when you don't control the construction of an + instance (ASP.NET pages or objects created via XAML, for instance) + but you still want properties and other injection performed. + + of object to perform injection on. + Container to resolve through. + Instance to build up. + name to use when looking up the typemappings and other configurations. + Any overrides for the Buildup. + The resulting object. By default, this will be , but + container extensions may add things like automatic proxy creation which would + cause this to return a different object (but still type compatible with ). + + + + Run an existing object through the container and perform injection on it. + + + + This method is useful when you don't control the construction of an + instance (ASP.NET pages or objects created via XAML, for instance) + but you still want properties and other injection performed. + + + This overload uses the default registrations. + + + Container to resolve through. + of object to perform injection on. + Instance to build up. + Any overrides for the Buildup. + The resulting object. By default, this will be , but + container extensions may add things like automatic proxy creation which would + cause this to return a different object (but still type compatible with ). + + + + Creates a new extension object and adds it to the container. + + Type of to add. The extension type + will be resolved from within the supplied . + Container to add the extension to. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Resolve access to a configuration interface exposed by an extension. + + Extensions can expose configuration interfaces as well as adding + strategies and policies to the container. This method walks the list of + added extensions and returns the first one that implements the requested type. + + The configuration interface required. + Container to configure. + The requested extension's configuration interface, or null if not found. + + + + Check if a particular type has been registered with the container with + the default name. + + Container to inspect. + Type to check registration for. + True if this type has been registered, false if not. + + + + Check if a particular type/name pair has been registered with the container. + + Container to inspect. + Type to check registration for. + Name to check registration for. + True if this type/name pair has been registered, false if not. + + + + Check if a particular type has been registered with the container with the default name. + + Type to check registration for. + Container to inspect. + True if this type has been registered, false if not. + + + + Check if a particular type/name pair has been registered with the container. + + Type to check registration for. + Container to inspect. + Name to check registration for. + True if this type/name pair has been registered, false if not. + + + + The class provides the means for extension objects + to manipulate the internal state of the . + + + + + Store a type/name pair for later resolution. + + + + When users register type mappings (or other things) with a named key, this method + allows you to register that name with the container so that when the + method is called, that name is included in the list that is returned. + + to register. + Name associated with that type. + + + + The container that this context is associated with. + + The object. + + + + The strategies this container uses. + + The that the container uses to build objects. + + + + The strategies this container uses to construct build plans. + + The that this container uses when creating + build plans. + + + + The policies this container uses. + + The the that container uses to build objects. + + + + The that this container uses. + + The is used to manage objects that the container is managing. + + + + This event is raised when the method, + or one of its overloads, is called. + + + + + This event is raised when the method, + or one of its overloads, is called. + + + + + This event is raised when the method is called, providing + the newly created child container to extensions to act on as they see fit. + + + + + An EventArgs class that holds a string Name. + + + + + Create a new with a null name. + + + + + Create a new with the given name. + + Name to store. + + + + The name. + + Name used for this EventArg object. + + + + Event argument class for the event. + + + + + Create a new instance of . + + Type to map from. + Type to map to. + Name for the registration. + to manage instances. + + + + Type to map from. + + + + + Type to map to. + + + + + to manage instances. + + + + + Event argument class for the event. + + + + + Create a default instance. + + + + + Create a instance initialized with the given arguments. + + Type of instance being registered. + The instance object itself. + Name to register under, null if default registration. + object that handles how + the instance will be owned. + + + + Type of instance being registered. + + + Type of instance being registered. + + + + + Instance object being registered. + + Instance object being registered + + + + that controls ownership of + this instance. + + + + + A that lets you specify that + an instance of a generic type parameter should be resolved. + + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + name to use when looking up in the container. + + + + Return a instance that will + return this types value for the parameter. + + The actual type to resolve. + The resolution key. + The . + + + + A that lets you specify that + an array containing the registered instances of a generic type parameter + should be resolved. + + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + The values for the elements, that will + be converted to objects. + + + + Test to see if this parameter value has a matching type for the given type. + + Type to check. + True if this parameter value is compatible with type , + false if not. + A type is considered compatible if it is an array type of rank one + and its element type is a generic type parameter with a name matching this generic + parameter name configured for the receiver. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + Name for the type represented by this . + This may be an actual type name or a generic argument name. + + + + + A Unity container extension that allows you to configure + which constructors, properties, and methods get injected + via an API rather than through attributes. + + + + + Initial the container with this extension's functionality. + + + When overridden in a derived class, this method will modify the given + by adding strategies, policies, etc. to + install it's functions into the container. + + + + API to configure the injection settings for a particular type. + + Type the injection is being configured for. + Objects containing the details on which members to inject and how. + This extension object. + + + + API to configure the injection settings for a particular type/name pair. + + Type the injection is being configured for. + Name of registration + Objects containing the details on which members to inject and how. + This extension object. + + + + API to configure the injection settings for a particular type. + + Type to configure. + Objects containing the details on which members to inject and how. + This extension object. + + + + API to configure the injection settings for a particular type/name pair. + + Type to configure. + Name of registration. + Objects containing the details on which members to inject and how. + This extension object. + + + + API to configure the injection settings for a particular type/name pair. + + Type of interface/base class being registered (may be null). + Type of actual implementation class being registered. + Name of registration. + Objects containing the details on which members to inject and how. + This extension object. + + + + A class that holds the collection of information + for a constructor, so that the container can + be configured to call this constructor. + + + + + Create a new instance of that looks + for a constructor with the given set of parameters. + + The values for the parameters, that will + be converted to objects. + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Interface registered, ignored in this implementation. + Type to register. + Name used to resolve the type object. + Policy list to add policies to. + + + + An that configures the + container to call a method as part of buildup. + + + + + Create a new instance which will configure + the container to call the given methods with the given parameters. + + Name of the method to call. + Parameter values for the method. + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Type of interface registered, ignored in this implementation. + Type to register. + Name used to resolve the type object. + Policy list to add policies to. + + + + A small function to handle name matching. You can override this + to do things like case insensitive comparisons. + + MethodInfo for the method you're checking. + Name of the method you're looking for. + True if a match, false if not. + + + + A class that holds on to the given value and provides + the required + when the container is configured. + + + + + Create an instance of that stores + the given value, using the runtime type of that value as the + type of the parameter. + + Value to be injected for this parameter. + + + + Create an instance of that stores + the given value, associated with the given type. + + Type of the parameter. + Value of the parameter + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + A generic version of that makes it a + little easier to specify the type of the parameter. + + Type of parameter. + + + + Create a new . + + Value for the parameter. + + + + This class stores information about which properties to inject, + and will configure the container accordingly. + + + + + Configure the container to inject the given property name, + resolving the value via the container. + + Name of the property to inject. + + + + Configure the container to inject the given property name, + using the value supplied. This value is converted to an + object using the + rules defined by the + method. + + Name of property to inject. + Value for property. + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Interface being registered, ignored in this implementation. + Type to register. + Name used to resolve the type object. + Policy list to add policies to. + + + + A class that stores a type, and generates a + resolver object that resolves all the named instances or the + type registered in a container. + + + + + Construct a new that + resolves to the given element type and collection of element values. + + The type of elements to resolve. + The values for the elements, that will + be converted to objects. + + + + Construct a new that + resolves to the given array and element types and collection of element values. + + The type for the array of elements to resolve. + The type of elements to resolve. + The values for the elements, that will + be converted to objects. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + A generic version of for convenience + when creating them by hand. + + Type of the elements for the array of the parameter. + + + + Construct a new that + resolves to the given element generic type with the given element values. + + The values for the elements, that will + be converted to objects. + + + + Interface defining the behavior of the Unity dependency injection container. + + + + + Register a type mapping with the container, where the created instances will use + the given . + + that will be requested. + that will actually be returned. + Name to use for registration, null if a default registration. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + Name for registration. + + object that controls how this instance will be managed by the container. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Resolve an instance of the requested type with the given name from the container. + + of object to get from the container. + Name of the object to retrieve. + Any overrides for the resolve call. + The retrieved object. + + + + Return instances of all registered types requested. + + + + This method is useful if you've registered multiple types with the same + but different names. + + + Be aware that this method does NOT return an instance for the default (unnamed) registration. + + + The type requested. + Any overrides for the resolve calls. + Set of objects of type . + + + + Run an existing object through the container and perform injection on it. + + + + This method is useful when you don't control the construction of an + instance (ASP.NET pages or objects created via XAML, for instance) + but you still want properties and other injection performed. + + of object to perform injection on. + Instance to build up. + name to use when looking up the TypeMappings and other configurations. + Any overrides for the resolve calls. + The resulting object. By default, this will be , but + container extensions may add things like automatic proxy creation which would + cause this to return a different object (but still type compatible with ). + + + + Run an existing object through the container, and clean it up. + + The object to tear down. + + + + Add an extension object to the container. + + to add. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Resolve access to a configuration interface exposed by an extension. + + Extensions can expose configuration interfaces as well as adding + strategies and policies to the container. This method walks the list of + added extensions and returns the first one that implements the requested type. + + of configuration interface required. + The requested extension's configuration interface, or null if not found. + + + + Remove all installed extensions from this container. + + + + This method removes all extensions from the container, including the default ones + that implement the out-of-the-box behavior. After this method, if you want to use + the container again you will need to either read the default extensions or replace + them with your own. + + + The registered instances and singletons that have already been set up in this container + do not get removed. + + + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Create a child container. + + + A child container shares the parent's configuration, but can be configured with different + settings or lifetime. + The new child container. + + + + The parent of this container. + + The parent container, or null if this container doesn't have one. + + + + Get a sequence of that describe the current state + of the container. + + + + + A that holds a weak reference to + it's managed instance. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. + + The object being stored. + + + + Remove the given object from backing store. + + + + + An implementation of that + creates instances of the type of the given Lifetime Manager + by resolving them through the container. + + + + + Create a new that will + return instances of the given type, creating them by + resolving through the container. + + Container to resolve with. + Type of LifetimeManager to create. + + + + Create a new instance of . + + The new instance. + + + + The type of Lifetime manager that will be created by this factory. + + + + + A that holds the instances given to it, + keeping one instance per thread. + + + + This LifetimeManager does not dispose the instances it holds. + + + + + + Initializes a new instance of the class. + + + + + Retrieve a value from the backing store associated with this Lifetime policy for the + current thread. + + the object desired, or if no such object is currently + stored for the current thread. + + + + Stores the given value into backing store for retrieval later when requested + in the current thread. + + The object being stored. + + + + Remove the given object from backing store. + + Not implemented for this lifetime manager. + + + + An implementation that does nothing, + thus ensuring that instances are created new every time. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. + + The object being stored. + + + + Remove the given object from backing store. + + + + + This strategy implements the logic that will call container.ResolveAll + when an array parameter is detected. + + + + + Do the PreBuildUp stage of construction. This is where the actual work is performed. + + Current build context. + + + + An implementation of that is + aware of the build keys used by the Unity container. + + + + + Create a instance for the given + . + + + This implementation looks for the Unity on the + parameter and uses it to create an instance of + for this parameter. + Parameter to create the resolver for. + The resolver object. + + + + An implementation of that is aware + of the build keys used by the Unity container. + + + + + Create a instance for the given + . + + Parameter to create the resolver for. + The resolver object. + + + + An implementation of that is aware of + the build keys used by the unity container. + + + + + Create a for the given + property. + + Property to create resolver for. + The resolver object. + + + + A implementation that returns + the value set in the constructor. + + + + + Create a new instance of + which will return the given value when resolved. + + The value to return. + + + + Get the value for a dependency. + + Current build context. + The value for the dependency. + + + + An implementation of that stores a + type and name, and at resolution time puts them together into a + . + + + + + Create an instance of + with the given type and name. + + The type. + The name (may be null). + + + + Resolve the value for a dependency. + + Current build context. + The value for the dependency. + + + + The type that this resolver resolves. + + + + + The name that this resolver resolves. + + + + + An implementation of that resolves to + to an array populated with the values that result from resolving other instances + of . + + + + + Create an instance of + with the given type and a collection of + instances to use when populating the result. + + The type. + The resolver policies to use when populating an array. + + + + Resolve the value for a dependency. + + Current build context. + An array populated with the results of resolving the resolver policies. + + + + An implementation of that selects + the given constructor and creates the appropriate resolvers to call it with + the specified parameters. + + + + + Create an instance of that + will return the given constructor, being passed the given injection values + as parameters. + + The constructor to call. + Set of objects + that describes how to obtain the values for the constructor parameters. + + + + Choose the constructor to call for the given type. + + Current build context + The to add any + generated resolver objects into. + The chosen constructor. + + + + Helper class for implementing selector policies that need to + set up dependency resolver policies. + + + + + Add dependency resolvers to the parameter set. + + Type that's currently being built (used to resolve open generics). + PolicyList to add the resolvers to. + Objects supplying the dependency resolvers. + Result object to store the keys in. + + + + A implementation that calls the specific + methods with the given parameters. + + + + + Add the given method and parameter collection to the list of methods + that will be returned when the selector's + method is called. + + Method to call. + sequence of objects + that describe how to create the method parameter values. + + + + Return the sequence of methods to call while building the target object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of methods to call. + + + + An implementation of which returns + the set of specific properties that the selector was configured with. + + + + + Add a property that will be par of the set returned when the + is called. + + The property to set. + object describing + how to create the value to inject. + + + + Returns sequence of properties on the given type that + should be set as part of building that object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of objects + that contain the properties to set. + + + + The exception thrown by the Unity container when + an attempt to resolve a dependency fails. + + + + + Create a new that records + the exception for the given type and name. + + Type requested from the container. + Name requested from the container. + The actual exception that caused the failure of the build. + The build context representing the failed operation. + + + + The type that was being requested from the container at the time of failure. + + + + + The name that was being requested from the container at the time of failure. + + + + + A class that stores a name and type, and generates a + resolver object that resolves the parameter via the + container. + + + + + Construct a new that + resolves to the given type. + + Type of this parameter. + + + + Construct a new that + resolves the given type and name. + + Type of this parameter. + Name to use when resolving parameter. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + A generic version of for convenience + when creating them by hand. + + Type of the parameter + + + + Create a new for the given + generic type and the default name. + + + + + Create a new for the given + generic type and name. + + Name to use to resolve this parameter. + + + + An implementation of that wraps a Unity container. + + + + + Initializes a new instance of the class for a container. + + The to wrap with the + interface implementation. + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + 2 + + + + When implemented by inheriting classes, this method will do the actual work of resolving + the requested service instance. + + Type of instance requested.Name of registered service you want. May be null. + + The requested service instance. + + + + + When implemented by inheriting classes, this method will do the actual work of + resolving all the requested service instances. + + Type of service requested. + + Sequence of service instance objects. + + + + + A static helper class that includes various parameter checking routines. + + + + + Throws if the given argument is null. + + if tested value if null. + Argument value to test. + Name of the argument being tested. + + + + Throws an exception if the tested string argument is null or the empty string. + + Thrown if string value is null. + Thrown if the string is empty + Argument value to check. + Name of argument being checked. + + + + Verifies that an argument type is assignable from the provided type (meaning + interfaces are implemented, or classes exist in the base class hierarchy). + + The argument type that will be assigned to. + The type of the value being assigned. + Argument name. + + + + Verifies that an argument instance is assignable from the provided type (meaning + interfaces are implemented, or classes exist in the base class hierarchy, or instance can be + assigned through a runtime wrapper, as is the case for COM Objects). + + The argument type that will be assigned to. + The instance that will be assigned. + Argument name. + + + + A helper class to manage the names that get registered in the container + + + + + The build stages we use in the Unity container + strategy pipeline. + + + + + First stage. By default, nothing happens here. + + + + + Second stage. Type mapping occurs here. + + + + + Third stage. lifetime managers are checked here, + and if they're available the rest of the pipeline is skipped. + + + + + Fourth stage. Reflection over constructors, properties, etc. is + performed here. + + + + + Fifth stage. Instance creation happens here. + + + + + Sixth stage. Property sets and method injection happens here. + + + + + Seventh and final stage. By default, nothing happens here. + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to The type {0} has multiple constructors of length {1}. Unable to disambiguate.. + + + + + Looks up a localized string similar to The provided string argument must not be empty.. + + + + + Looks up a localized string similar to The current build operation (build key {2}) failed: {3} (Strategy type {0}, index {1}). + + + + + Looks up a localized string similar to The current type, {0}, is an abstract class and cannot be constructed. Are you missing a type mapping?. + + + + + Looks up a localized string similar to The current type, {0}, is delegate and cannot be constructed. Unity only supports resolving Func<T> and Func<IEnumerable<T>> by default.. + + + + + Looks up a localized string similar to The current type, {0}, is an interface and cannot be constructed. Are you missing a type mapping?. + + + + + Looks up a localized string similar to Cannot extract type from build key {0}.. + + + + + Looks up a localized string similar to The method {0}.{1}({2}) is an open generic method. Open generic methods cannot be injected.. + + + + + Looks up a localized string similar to The property {0} on type {1} is an indexer. Indexed properties cannot be injected.. + + + + + Looks up a localized string similar to The method {1} on type {0} has an out parameter. Injection cannot be performed.. + + + + + Looks up a localized string similar to The method {0}.{1}({2}) has at least one out parameter. Methods with out parameters cannot be injected.. + + + + + Looks up a localized string similar to The method {0}.{1}({2}) has at least one ref parameter.Methods with ref parameters cannot be injected.. + + + + + Looks up a localized string similar to The method {1} on type {0} is marked for injection, but it is an open generic method. Injection cannot be performed.. + + + + + Looks up a localized string similar to The method {0}.{1}({2}) is static. Static methods cannot be injected.. + + + + + Looks up a localized string similar to The type {0} is an open generic type. An open generic type cannot be resolved.. + + + + + Looks up a localized string similar to Resolving parameter "{0}" of constructor {1}. + + + + + Looks up a localized string similar to The parameter {0} could not be resolved when attempting to call constructor {1}.. + + + + + Looks up a localized string similar to Parameter type inference does not work for null values. Indicate the parameter type explicitly using a properly configured instance of the InjectionParameter or InjectionParameter<T> classes.. + + + + + Looks up a localized string similar to Calling constructor {0}. + + + + + Looks up a localized string similar to Calling method {0}.{1}. + + + + + Looks up a localized string similar to An item with the given key is already present in the dictionary.. + + + + + Looks up a localized string similar to The lifetime manager is already registered. Lifetime managers cannot be reused, please create a new one.. + + + + + Looks up a localized string similar to The override marker build plan policy has been invoked. This should never happen, looks like a bug in the container.. + + + + + Looks up a localized string similar to Resolving parameter "{0}" of method {1}.{2}. + + + + + Looks up a localized string similar to The value for parameter "{1}" of method {0} could not be resolved. . + + + + + Looks up a localized string similar to Could not resolve dependency for build key {0}.. + + + + + Looks up a localized string similar to The type {0} has multiple constructors marked with the InjectionConstructor attribute. Unable to disambiguate.. + + + + + Looks up a localized string similar to The supplied type {0} must be an open generic type.. + + + + + Looks up a localized string similar to The supplied type {0} does not have the same number of generic arguments as the target type {1}.. + + + + + Looks up a localized string similar to The type {0} does not have an accessible constructor.. + + + + + Looks up a localized string similar to The type {0} does not have a generic argument named "{1}". + + + + + Looks up a localized string similar to while resolving. + + + + + Looks up a localized string similar to The type {0} does not have a constructor that takes the parameters ({1}).. + + + + + Looks up a localized string similar to The type {0} does not have a public method named {1} that takes the parameters ({2}).. + + + + + Looks up a localized string similar to The type {0} does not contain an instance property named {1}.. + + + + + Looks up a localized string similar to The type {0} is not a generic type, and you are attempting to inject a generic parameter named "{1}".. + + + + + Looks up a localized string similar to The type {0} is not an array type with rank 1, and you are attempting to use a [DependencyArray] attribute on a parameter or property with this type.. + + + + + Looks up a localized string similar to Optional dependencies must be reference types. The type {0} is a value type.. + + + + + Looks up a localized string similar to The property {0} on type {1} is not settable.. + + + + + Looks up a localized string similar to The property {0} on type {1} is of type {2}, and cannot be injected with a value of type {3}.. + + + + + Looks up a localized string similar to The value for the property "{0}" could not be resolved.. + + + + + Looks up a localized string similar to The provided string argument must not be empty.. + + + + + Looks up a localized string similar to Resolution of the dependency failed, type = "{0}", name = "{1}". + Exception occurred while: {2}. + Exception is: {3} - {4} + ----------------------------------------------- + At the time of the exception, the container was: + . + + + + + Looks up a localized string similar to Resolving {0},{1}. + + + + + Looks up a localized string similar to Resolving {0},{1} (mapped from {2}, {3}). + + + + + Looks up a localized string similar to Resolving value for property {0}.{1}. + + + + + Looks up a localized string similar to The constructor {1} selected for type {0} has ref or out parameters. Such parameters are not supported for constructor injection.. + + + + + Looks up a localized string similar to Setting value for property {0}.{1}. + + + + + Looks up a localized string similar to The type {0} cannot be constructed. You must configure the container to supply this value.. + + + + + Looks up a localized string similar to The type {1} cannot be assigned to variables of type {0}.. + + + + + Looks up a localized string similar to <unknown>. + + + + + A simple, extensible dependency injection container. + + + + + Create a default . + + + + + Create a with the given parent container. + + The parent . The current object + will apply its own settings first, and then check the parent for additional ones. + + + + RegisterType a type mapping with the container, where the created instances will use + the given . + + that will be requested. + that will actually be returned. + Name to use for registration, null if a default registration. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + RegisterType an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + Name for registration. + + If true, the container will take over the lifetime of the instance, + calling Dispose on it (if it's ) when the container is Disposed. + + If false, container will not maintain a strong reference to . User is responsible + for disposing instance, and for keeping the instance from being garbage collected. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Get an instance of the requested type with the given name from the container. + + of object to get from the container. + Name of the object to retrieve. + Any overrides for the resolve call. + The retrieved object. + + + + Return instances of all registered types requested. + + + + This method is useful if you've registered multiple types with the same + but different names. + + + Be aware that this method does NOT return an instance for the default (unnamed) registration. + + + The type requested. + Any overrides for the resolve calls. + Set of objects of type . + + + + Run an existing object through the container and perform injection on it. + + + + This method is useful when you don't control the construction of an + instance (ASP.NET pages or objects created via XAML, for instance) + but you still want properties and other injection performed. + + of object to perform injection on. + Instance to build up. + name to use when looking up the typemappings and other configurations. + Any overrides for the buildup. + The resulting object. By default, this will be , but + container extensions may add things like automatic proxy creation which would + cause this to return a different object (but still type compatible with ). + + + + Run an existing object through the container, and clean it up. + + The object to tear down. + + + + Add an extension object to the container. + + to add. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Get access to a configuration interface exposed by an extension. + + Extensions can expose configuration interfaces as well as adding + strategies and policies to the container. This method walks the list of + added extensions and returns the first one that implements the requested type. + + of configuration interface required. + The requested extension's configuration interface, or null if not found. + + + + Remove all installed extensions from this container. + + + + This method removes all extensions from the container, including the default ones + that implement the out-of-the-box behavior. After this method, if you want to use + the container again you will need to either read the default extensions or replace + them with your own. + + + The registered instances and singletons that have already been set up in this container + do not get removed. + + + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Create a child container. + + + A child container shares the parent's configuration, but can be configured with different + settings or lifetime. + The new child container. + + + + Dispose this container instance. + + + Disposing the container also disposes any child containers, + and disposes any instances whose lifetimes are managed + by the container. + + + + + Dispose this container instance. + + + This class doesn't have a finalizer, so will always be true. + True if being called from the IDisposable.Dispose + method, false if being called from a finalizer. + + + + Remove policies associated with building this type. This removes the + compiled build plan so that it can be rebuilt with the new settings + the next time this type is resolved. + + Type of object to clear the plan for. + Name the object is being registered with. + + + + The parent of this container. + + The parent container, or null if this container doesn't have one. + + + + Get a sequence of that describe the current state + of the container. + + + + + Implementation of the ExtensionContext that is actually used + by the UnityContainer implementation. + + + This is a nested class so that it can access state in the + container that would otherwise be inaccessible. + + + + + This event is raised when the method, + or one of its overloads, is called. + + + + + This extension supplies the default behavior of the UnityContainer API + by handling the context events and setting policies. + + + + + Install the default container behavior into the container. + + + + + Remove the default behavior from the container. + + + + + This extension installs the default strategies and policies into the container + to implement the standard behavior of the Unity container. + + + + + Add the default ObjectBuilder strategies & policies to the container. + + + + + Helper class to wrap common reflection stuff dealing with + methods. + + + + + Create a new instance that + lets us do more reflection stuff on that method. + + The method to reflect on. + + + + Given our set of generic type arguments, + + The generic type arguments. + An array with closed parameter types. + + + + Returns true if any of the parameters of this method + are open generics. + + + + + Return the of each parameter for this + method. + + Sequence of objects, one for + each parameter in order. + + + + A helper class that encapsulates two different + data items together into a a single item. + + + + + Create a new containing + the two values give. + + First value + Second value + + + + The first value of the pair. + + + + + The second value of the pair. + + + + + Container for a Pair helper method. + + + + + A helper factory method that lets users take advantage of type inference. + + Type of first value. + Type of second value. + First value. + Second value. + A new instance. + + + + A utility class that handles the logic of matching parameter + lists, so we can find the right constructor and method overloads. + + + + + Create a new that will attempt to + match the given parameter types. + + Target parameters to match against. + + + + Tests to see if the given set of types matches the ones + we're looking for. + + parameter list to look for. + true if they match, false if they don't. + + + + Tests to see if the given set of types matches the ones we're looking for. + + Candidate method signature to look for. + True if they match, false if they don't. + + + + Another reflection helper class that has extra methods + for dealing with ParameterInfo. + + + + + A small helper class to encapsulate details of the + reflection API, particularly around generics. + + + + + Create a new instance that + lets you look at information about the given type. + + Type to do reflection on. + + + + Test the given object, looking at + the parameters. Determine if any of the parameters are + open generic types that need type attributes filled in. + + The method to check. + True if any of the parameters are open generics. False if not. + + + + If this type is an open generic, use the + given array to + determine what the required closed type is and return that. + + If the parameter is not an open type, just + return this parameter's type. + Type arguments to substitute in for + the open type parameters. + Corresponding closed type of this parameter. + + + + Given a generic argument name, return the corresponding type for this + closed type. For example, if the current type is SomeType<User>, and the + corresponding definition was SomeType<TSomething>, calling this method + and passing "TSomething" will return typeof(User). + + Name of the generic parameter. + Type of the corresponding generic parameter, or null if there + is no matching name. + + + + The object we're reflecting over. + + + + + Is this type generic? + + + + + Is this type an open generic (no type parameter specified) + + + + + Is this type an array type? + + + + + Is this type an array of generic elements? + + + + + The type of the elements in this type (if it's an array). + + + + + Returns all the public constructors defined for the current reflected . + + + An enumeration of ConstructorInfo objects representing all the public instance constructors defined for the + current reflected , but not including the type initializer (static constructor). + + + + + Create a new instance of that + lets you query information about the given ParameterInfo object. + + Parameter to query. + + + + A set of helper methods to pick through lambdas and pull out + from them. + + + + + Pull out a object from an expression of the form + () => SomeClass.SomeMethod() + + Expression describing the method to call. + Corresponding . + + + + Pull out a object from an expression of the form + x => x.SomeMethod() + + The type where the method is defined. + Expression describing the method to call. + Corresponding . + + + + Pull out a object for the get method from an expression of the form + x => x.SomeProperty + + The type where the method is defined. + The type for the property. + Expression describing the property for which the get method is to be extracted. + Corresponding . + + + + Pull out a object for the set method from an expression of the form + x => x.SomeProperty + + The type where the method is defined. + The type for the property. + Expression describing the property for which the set method is to be extracted. + Corresponding . + + + + + + + + + + + + + Pull out a object from an expression of the form () => new SomeType() + + The type where the constructor is defined. + Expression invoking the desired constructor. + Corresponding . + + + diff --git a/packages/ZXing.Net.0.16.4/ZXing.Net.0.16.4.nupkg b/packages/ZXing.Net.0.16.4/ZXing.Net.0.16.4.nupkg new file mode 100644 index 0000000..d527179 Binary files /dev/null and b/packages/ZXing.Net.0.16.4/ZXing.Net.0.16.4.nupkg differ diff --git a/packages/ZXing.Net.0.16.4/lib/MonoAndroid/zxing.monoandroid.dll b/packages/ZXing.Net.0.16.4/lib/MonoAndroid/zxing.monoandroid.dll new file mode 100644 index 0000000..f408c7a Binary files /dev/null and b/packages/ZXing.Net.0.16.4/lib/MonoAndroid/zxing.monoandroid.dll differ diff --git a/packages/ZXing.Net.0.16.4/lib/MonoAndroid/zxing.monoandroid.xml b/packages/ZXing.Net.0.16.4/lib/MonoAndroid/zxing.monoandroid.xml new file mode 100644 index 0000000..59d8fab --- /dev/null +++ b/packages/ZXing.Net.0.16.4/lib/MonoAndroid/zxing.monoandroid.xml @@ -0,0 +1,11645 @@ + + + + zxing.monoandroid + + + + + Extends with more information specific to the Aztec format, + like the number of layers and whether it's compact. + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + Initializes a new instance of the class. + + The bits. + The points. + if set to true [compact]. + The nb datablocks. + The nb layers. + + + + The main class which implements Aztec Code decoding -- as opposed to locating and extracting + the Aztec Code from an image. + + David Olivier + + + + Decodes the specified detector result. + + The detector result. + + + + + This method is used for testing the high-level encoder + + + + + + + Gets the string encoded in the aztec code bits + + The corrected bits. + the decoded string + + + + gets the table corresponding to the char passed + + The t. + + + + + Gets the character (or string) corresponding to the passed code in the given table + + the table used + the code of the character + + + + + Performs RS error correction on an array of bits. + + The rawbits. + the corrected array + + + + Gets the array of bits from an Aztec Code matrix + + The matrix. + the array of bits + + + + Reads a code of given length and at given index in an array of bits + + The rawbits. + The start index. + The length. + + + + + Reads a code of length 8 in an array of bits, padding with zeros + + + + + + + + Packs a bit array into bytes, most significant bit first + + + + + + + Encapsulates logic that can detect an Aztec Code in an image, even if the Aztec Code + is rotated or skewed, or partially obscured. + + David Olivier + + + + Initializes a new instance of the class. + + The image. + + + + Detects an Aztec Code in an image. + + + + + Detects an Aztec Code in an image. + + if true, image is a mirror-image of original. + + encapsulating results of detecting an Aztec Code + + + + + Extracts the number of data layers and data blocks from the layer around the bull's eye + + bullEyeCornerPoints the array of bull's eye corners + + + + + Corrects the parameter bits using Reed-Solomon algorithm + + paremeter bits + compact true if this is a compact Aztec code + + + + + Finds the corners of a bull-eye centered on the passed point + This returns the centers of the diagonal points just outside the bull's eye + Returns [topRight, bottomRight, bottomLeft, topLeft] + + Center point + The corners of the bull-eye + + + + Finds a candidate center point of an Aztec code from an image + + the center point + + + + Gets the Aztec code corners from the bull's eye corners and the parameters. + + the array of bull's eye corners + the array of aztec code corners + + + + Creates a BitMatrix by sampling the provided image. + topLeft, topRight, bottomRight, and bottomLeft are the centers of the squares on the + diagonal just outside the bull's eye. + + The image. + The top left. + The bottom left. + The bottom right. + The top right. + + + + + Samples a line + + start point (inclusive) + end point (exclusive) + number of bits + the array of bits as an int (first bit is high-order bit of result) + + + + Determines whether [is white or black rectangle] [the specified p1]. + + The p1. + The p2. + The p3. + The p4. + true if the border of the rectangle passed in parameter is compound of white points only + or black points only + + + + Gets the color of a segment + + The p1. + The p2. + 1 if segment more than 90% black, -1 if segment is more than 90% white, 0 else + + + + Gets the coordinate of the first point with a different color in the given direction + + The init. + if set to true [color]. + The dx. + The dy. + + + + + Expand the square represented by the corner points by pushing out equally in all directions + + the corners of the square, which has the bull's eye at its center + the original length of the side of the square in the target bit matrix + the new length of the size of the square in the target bit matrix + the corners of the expanded square + + + + Aztec 2D code representation + + Rustam Abdullaev + + + + Compact or full symbol indicator + + + + + Size in pixels (width and height) + + + + + Number of levels + + + + + Number of data codewords + + + + + The symbol image + + + + + represents a token for a binary shift + + + + + initializing constructor + + + + + + + + appends the byte array to the BitArray + + + + + + + string representation + + + + + + Generates Aztec 2D barcodes. + + Rustam Abdullaev + + + + Encodes the given binary content as an Aztec symbol + + input data string + Aztec symbol matrix with metadata + + + + Encodes the given binary content as an Aztec symbol + + input data string + minimal percentage of error check words (According to ISO/IEC 24778:2008, + a minimum of 23% + 3 words is recommended) + if non-zero, a user-specified value for the number of layers + + Aztec symbol matrix with metadata + + + + + This produces nearly optimal encodings of text into the first-level of + encoding used by Aztec code. + It uses a dynamic algorithm. For each prefix of the string, it determines + a set of encodings that could lead to this prefix. We repeatedly add a + character and generate a new set of optimal encodings until we have read + through the entire input. + @author Frank Yellin + @author Rustam Abdullaev + + + + + + + + + + + Convert the text represented by this High Level Encoder into a BitArray. + + text represented by this encoder encoded as a + + + + State represents all information about a sequence necessary to generate the current output. + Note that a state is immutable. + + + + + Create a new state representing this state with a latch to a (not + necessary different) mode, and then a code. + + + + + Create a new state representing this state, with a temporary shift + to a different mode to output a single value. + + + + + Create a new state representing this state, but an additional character + output in Binary Shift mode. + + + + + Create the state identical to this one, but we are no longer in + Binary Shift mode. + + + + + Returns true if "this" state is better (or equal) to be in than "that" + state under all possible circumstances. + + + + + This implementation can detect and decode Aztec codes in an image. + + David Olivier + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + a String representing the content encoded by the Data Matrix code + + + + + Locates and decodes a Data Matrix code in an image. + + image of barcode to decode + passed as a {@link java.util.Hashtable} from {@link com.google.zxing.DecodeHintType} + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Aztec result meta data. + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + + + + + + + + + Renders an Aztec code as a + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + The class holds the available options for the + + + + + Representing the minimal percentage of error correction words. + Note: an Aztec symbol should have a minimum of 25% EC words. + + + + + Specifies the required number of layers for an Aztec code: + a negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + a positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + + + + + Enumerates barcode formats known to this package. + + Sean Owen + + + Aztec 2D barcode format. + + + CODABAR 1D format. + + + Code 39 1D format. + + + Code 93 1D format. + + + Code 128 1D format. + + + Data Matrix 2D barcode format. + + + EAN-8 1D format. + + + EAN-13 1D format. + + + ITF (Interleaved Two of Five) 1D format. + + + MaxiCode 2D barcode format. + + + PDF417 format. + + + QR Code 2D barcode format. + + + RSS 14 + + + RSS EXPANDED + + + UPC-A 1D format. + + + UPC-E 1D format. + + + UPC/EAN extension format. Not a stand-alone format. + + + MSI + + + Plessey + + + Intelligent Mail barcode + + + + UPC_A | UPC_E | EAN_13 | EAN_8 | CODABAR | CODE_39 | CODE_93 | CODE_128 | ITF | RSS_14 | RSS_EXPANDED + without MSI (to many false-positives) and IMB (not enough tested, and it looks more like a 2D) + + + + + A smart class to decode the barcode inside a bitmap object + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + A smart class to decode the barcode inside a bitmap object + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Constructor for additional image formats for one BarcodeReader class + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Optional: Gets or sets the function to create a luminance source object for a bitmap. + If null a platform specific default LuminanceSource is used + + + The function to create a luminance source object. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + A smart class to decode the barcode inside a bitmap object + + + + + represents the default function which is called to get a instance from a raw byte array + + + + + Gets or sets the options. + + + The options. + + + + + Gets the reader which should be used to find and decode the barcode. + + + The reader. + + + + + Gets or sets a method which is called if an important point is found + + + The result point callback. + + + + + event is executed if a result was found via decode + + + + + Gets or sets a value indicating whether the image should be automatically rotated. + Rotation is supported for 90, 180 and 270 degrees + + + true if image should be rotated; otherwise, false. + + + + + Gets or sets a value indicating whether the image should be automatically inverted + if no result is found in the original image. + ATTENTION: Please be carefully because it slows down the decoding process if it is used + + + true if image should be inverted; otherwise, false. + + + + + Optional: Gets or sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + The function to create a binarizer object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb array. + If null the RGBLuminanceSource is used. The handler is only called when Decode with a byte[] array is called. + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + raises the ResultFound event + + + + + + raises the ResultFound event + + + + + + calls the explicitResultPointFound action + + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + A smart class to encode some content to a barcode image + + + + + Initializes a new instance of the class. + + + + + A smart class to encode some content to raw pixel data + + + + + Initializes a new instance of the class. + + + + + A smart class to encode some content to a svg barcode image + + + + + Initializes a new instance of the class. + + + + + A base class for specific barcode writers with specific formats of barcode images. + + The type of the output. + + + + Gets or sets the renderer which should be used to render the encoded BitMatrix. + + + + + Encodes the specified contents and returns a rendered instance of the barcode. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The matrix. + + + + + A base class for specific barcode writers with specific formats of barcode images. + + + + + Gets or sets the barcode format. + The value is only suitable if the MultiFormatWriter is used. + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + + + + + + + + + + + + Encodes the specified contents and returns a BitMatrix array. + That array has to be rendered manually or with a IBarcodeRenderer. + + The contents. + + + + + The base class for luminance sources which supports + cropping and rotating based upon the luminance values. + + + + + weight of the red channel for calculating a gray scale image + + + + + weight of the green channel for calculating a gray scale image + + + + + weight of the blue channel for calculating a gray scale image + + + + + numbers of bits which for right shifting + + + + + + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + + The luminance array. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + gets the luminance matrix + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + TODO: not implemented yet + + + A rotated version of this object. + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + + Whether this subclass supports cropping. + + + + + Whether this subclass supports invertion. + + + + Inverts the luminance values (newValue = 255 - oldValue) + + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + This class hierarchy provides a set of methods to convert luminance data to 1 bit data. + It allows the algorithm to vary polymorphically, for example allowing a very expensive + thresholding technique for servers and a fast one for mobile. It also permits the implementation + to vary, e.g. a JNI version for Android and a Java fallback version for other platforms. + + dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The source. + + + + Gets the luminance source object. + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + For callers which only examine one row of pixels at a time, the same BitArray should be reused + and passed in with each call for performance. However it is legal to keep more than one row + at a time if needed. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + Converts a 2D array of luminance data to 1 bit data. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + A new concrete Binarizer implementation object. + + + + Gets the width of the luminance source object. + + + + + Gets the height of the luminance source object. + + + + + This class is the core bitmap class used by ZXing to represent 1 bit data. Reader objects + accept a BinaryBitmap and attempt to decode it. + + dswitkin@google.com (Daniel Switkin) + + + + + + + + + + The width of the bitmap. + + + + + The height of the bitmap. + + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + + The row to fetch, which must be in [0, bitmap height). + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + + Converts a 2D array of luminance data to 1 bit. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + + Whether this bitmap can be cropped. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if isCropSupported() is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + + Whether this bitmap supports counter-clockwise rotation. + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + +

See + + DoCoMo's documentation about the result types represented by subclasses of this class.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + Implements KDDI AU's address book format. See + + http://www.au.kddi.com/ezfactory/tec/two_dimensions/index.html. + (Thanks to Yuzo for translating!) + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Implements the "MECARD" address book entry format. + + Supported keys: N, SOUND, TEL, EMAIL, NOTE, ADR, BDAY, URL, plus ORG + Unsupported keys: TEL-AV, NICKNAME + + Except for TEL, multiple values for keys are also not supported; + the first one found takes precedence. + + Our understanding of the MECARD format is based on this document: + + http://www.mobicode.org.tw/files/OMIA%20Mobile%20Bar%20Code%20Standard%20v3.2.1.doc + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes contact information, like that in an address book entry. + + Sean Owen + + + + initializing constructor + + + + + + + + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + the names + + + + + the nicknames + + + + + In Japanese, the name is written in kanji, which can have multiple readings. Therefore a hint + is often provided, called furigana, which spells the name phonetically. + + The pronunciation of the getNames() field, often in hiragana or katakana. + + + + the phone numbers + + + + optional descriptions of the type of each phone number. It could be like "HOME", but, + there is no guaranteed or standard format. + + + + the e-mail addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the instant messenger addresses + + + + + the note field + + + + + the addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the title + + + + + the urls + + + + birthday formatted as yyyyMMdd (e.g. 19780917) + + + a location as a latitude/longitude pair + + + Implements the "BIZCARD" address book entry format, though this has been + largely reverse-engineered from examples observed in the wild -- still + looking for a definitive reference. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a calendar event at a certain time, optionally with attendees and a location. + + Sean Owen + + + + Gets the start. + + + + + Determines whether [is start all day]. + + if start time was specified as a whole day + + + + event end , or null if event has no duration + + + + + Gets a value indicating whether this instance is end all day. + + true if end time was specified as a whole day + + + + Parses a string as a date. RFC 2445 allows the start and end fields to be of type DATE (e.g. 20081021) + or DATE-TIME (e.g. 20081021T123000 for local time, or 20081021T123000Z for UTC). + + The string to parse + + if not a date formatted string + + + + Represents a parsed result that encodes an email message including recipients, subject and body text. + + Sean Owen + + + + the email address + + + + + the TOs + + + + + the CCs + + + + + the BCCs + + + + + the subject + + + + + the body + + + + + the mailto: uri + + + + + Represents a result that encodes an e-mail address, either as a plain address + like "joe@example.org" or a mailto: URL like "mailto:joe@example.org". + + Sean Owen + + + + Implements the "MATMSG" email message entry format. + + Supported keys: TO, SUB, BODY + + Sean Owen + + + + This implements only the most basic checking for an email address's validity -- that it contains + an '@' and contains no characters disallowed by RFC 2822. This is an overly lenient definition of + validity. We want to generally be lenient here since this class is only intended to encapsulate what's + in a barcode, not "judge" it. + + The email. + + true if it is basically a valid email address; otherwise, false. + + + + + Represents a parsed result that encodes extended product information as encoded by the RSS format, like weight, price, dates, etc. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + extension for kilogram weight type + + + + + extension for pounds weight type + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the raw text + + + + + the product id + + + + + the sscc + + + + + the lot number + + + + + the production date + + + + + the packaging date + + + + + the best before date + + + + + the expiration date + + + + + the weight + + + + + the weight type + + + + + the weight increment + + + + + the price + + + + + the price increment + + + + + the price currency + + + + + the uncommon AIs + + + + + the display representation (raw text) + + + + + Parses strings of digits that represent a RSS Extended code. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + tries to parse a text representation to a specific result object + + + + + + + Represents a parsed result that encodes a geographic coordinate, with latitude, longitude and altitude. + + Sean Owen + + + latitude in degrees + + + + longitude in degrees + + + + altitude in meters. If not specified, in the geo URI, returns 0.0 + + + + query string associated with geo URI or null if none exists + + + + the geo URI + + + + a URI link to Google Maps which display the point on the Earth described + by this instance, and sets the zoom level in a way that roughly reflects the + altitude, if specified + + + + Parses a "geo:" URI result, which specifies a location on the surface of + the Earth as well as an optional altitude above the surface. See + + http://tools.ietf.org/html/draft-mayrhofer-geo-uri-00. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a product ISBN number. + + jbreiden@google.com (Jeff Breidenbach) + + + + the ISBN number + + + + Parses strings of digits that represent a ISBN. + + + jbreiden@google.com (Jeff Breidenbach) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + See ISBN-13 For Dummies + + The result. + + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link ResultParser#parseResult(Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Represents the type of data encoded by a barcode -- from plain text, to a + URI, to an e-mail address, etc. + + Sean Owen + + + + Represents a parsed result that encodes a product by an identifier of some kind. + + dswitkin@google.com (Daniel Switkin) + + + + Parses strings of digits that represent a UPC code. + + dswitkin@google.com (Daniel Switkin) + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link #parseResult(com.google.zxing.Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Attempts to parse the raw {@link Result}'s contents as a particular type + of information (email, URL, etc.) and return a {@link ParsedResult} encapsulating + the result of parsing. + + the raw to parse + encapsulating the parsing result + + + + Parses the result. + + The result. + + + +

Parses an "sms:" URI result, which specifies a number to SMS and optional + "via" number. See + the IETF draft on this.

+ +

This actually also parses URIs starting with "mms:", "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + + Represents a parsed result that encodes an SMS message, including recipients, subject and body text. + + Sean Owen + + + +

Parses an "smsto:" URI result, whose format is not standardized but appears to be like: + {@code smsto:number(:body)}.

+

This actually also parses URIs starting with "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+
+ Sean Owen +
+ + +

Parses an "smtp:" URI result, whose format is not standardized but appears to be like: + smtp[:subject[:body]]}.

+

See http://code.google.com/p/zxing/issues/detail?id=536

+
+ Sean Owen +
+ + + Represents a parsed result that encodes a telephone number. + + Sean Owen + + + + Parses a "tel:" URI result, which specifies a phone number. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + A simple result type encapsulating a string that has no further interpretation. + + Sean Owen + + + + A simple result type encapsulating a URI that has no further interpretation. + + Sean Owen + + + true if the URI contains suspicious patterns that may suggest it intends to + mislead the user about its true nature. At the moment this looks for the presence + of user/password syntax in the host/authority portion of a URI which may be used + in attempts to make the URI's host appear to be other than it is. Example: + http://yourbank.com@phisher.com This URI connects to phisher.com but may appear + to connect to yourbank.com at first glance. + + + + Transforms a string that represents a URI into something more proper, by adding or canonicalizing + the protocol. + + + + + Tries to parse results that are a URI of some kind. + + Sean Owen + + + Parses the "URLTO" result format, which is of the form "URLTO:[title]:[url]". + This seems to be used sometimes, but I am not able to find documentation + on its origin or official format? + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Parses contact information formatted according to the VCard (2.1) format. This is not a complete + implementation but should parse information as commonly encoded in 2D barcodes. + + Sean Owen + + + Formats name fields of the form "Public;John;Q.;Reverend;III" into a form like + "Reverend John Q. Public III". + + @param names name values to format, in place + + + + Partially implements the iCalendar format's "VEVENT" format for specifying a + calendar event. See RFC 2445. This supports SUMMARY, DTSTART and DTEND fields. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a Vehicle Identification Number (VIN). + + + + + Detects a result that is likely a vehicle identification number. + @author Sean Owen + + + + + Represents a parsed result that encodes wifi network information, like SSID and password. + + Vikram Aggarwal + + + + + A simple, fast array of bits, represented compactly by an array of ints internally. + + Sean Owen + + + + size of the array, number of elements + + + + + size of the array in bytes + + + + + index accessor + + + + + + + default constructor + + + + + initializing constructor + + desired size of the array + + + + Flips bit i. + + bit to set + + + + + Gets the next set. + + first bit to check + index of first bit that is set, starting from the given index, or size if none are set + at or beyond this given index + + + + see getNextSet(int) + + index to start looking for unset bit + index of next unset bit, or if none are unset until the end + + + Sets a block of 32 bits, starting at bit i. + + + first bit to set + + the new value of the next 32 bits. Note again that the least-significant bit + corresponds to bit i, the next-least-significant to i+1, and so on. + + + + + Sets a range of bits. + + start of range, inclusive. + end of range, exclusive + + + Clears all bits (sets to false). + + + Efficient method to check if a range of bits is set, or not set. + + + start of range, inclusive. + + end of range, exclusive + + if true, checks that bits in range are set, otherwise checks that they are not set + + true iff all bits are set or not set in range, according to value argument + if end is less than start or the range is not contained in the array + + + + Appends the bit. + + The bit. + + + underlying array of ints. The first element holds the first 32 bits, and the least + significant bit is bit 0. + + + + + Appends the least-significant bits, from value, in order from most-significant to + least-significant. For example, appending 6 bits from 0x000001E will append the bits + 0, 1, 1, 1, 1, 0 in that order. + + containing bits to append + bits from value to append + + + + adds the array to the end + + + + + + XOR operation + + + + + + converts to bytes. + + first bit to start writing + array to write into. Bytes are written most-significant byte first. This is the opposite + of the internal representation, which is exposed by BitArray + position in array to start writing + how many bytes to write + + + Reverses all bits in the array. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Erstellt ein neues Objekt, das eine Kopie der aktuellen Instanz darstellt. + + + Ein neues Objekt, das eine Kopie dieser Instanz darstellt. + + + + +

Represents a 2D matrix of bits. In function arguments below, and throughout the common + module, x is the column position, and y is the row position. The ordering is always x, y. + The origin is at the top-left.

+

Internally the bits are represented in a 1-D array of 32-bit ints. However, each row begins + with a new int. This is done intentionally so that we can copy out a row into a BitArray very + efficiently.

+

The ordering of bits is row-major. Within each int, the least significant bits are used first, + meaning they represent lower x values. This is compatible with BitArray's implementation.

+
+ Sean Owen + dswitkin@google.com (Daniel Switkin) +
+ + The width of the matrix + + + + The height of the matrix + + + + This method is for compatibility with older code. It's only logical to call if the matrix + is square, so I'm throwing if that's not the case. + + + row/column dimension of this matrix + + + + + The rowsize of the matrix + + + + + Creates an empty square . + + height and width + + + + Creates an empty square . + + bit matrix width + bit matrix height + + + + Interprets a 2D array of booleans as a , where "true" means an "on" bit. + + bits of the image, as a row-major 2D array. Elements are arrays representing rows + representation of image + + +

Gets the requested bit, where true means black.

+ +
+ The horizontal component (i.e. which column) + + The vertical component (i.e. which row) + + value of given bit in matrix + +
+ + +

Flips the given bit.

+
+ The horizontal component (i.e. which column) + The vertical component (i.e. which row) +
+ + + flip all of the bits, if shouldBeFlipped is true for the coordinates + + should return true, if the bit at a given coordinate should be flipped + + + + Exclusive-or (XOR): Flip the bit in this {@code BitMatrix} if the corresponding + mask bit is set. + + The mask. + + + Clears all bits (sets to false). + + +

Sets a square region of the bit matrix to true.

+ +
+ The horizontal position to begin at (inclusive) + + The vertical position to begin at (inclusive) + + The width of the region + + The height of the region + +
+ + A fast method to retrieve one row of data from the matrix as a BitArray. + + + The row to retrieve + + An optional caller-allocated BitArray, will be allocated if null or too small + + The resulting BitArray - this reference should always be used even when passing + your own row + + + + + Sets the row. + + row to set + {@link BitArray} to copy from + + + + Modifies this {@code BitMatrix} to represent the same but rotated 180 degrees + + + + + This is useful in detecting the enclosing rectangle of a 'pure' barcode. + + {left,top,width,height} enclosing rectangle of all 1 bits, or null if it is all white + + + + This is useful in detecting a corner of a 'pure' barcode. + + {x,y} coordinate of top-left-most 1 bit, or null if it is all white + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + The line separator. + + A that represents this instance. + + + + + Clones this instance. + + + + +

This provides an easy abstraction to read bits at a time from a sequence of bytes, where the + number of bits read is not often a multiple of 8.

+ +

This class is thread-safe but not reentrant. Unless the caller modifies the bytes array + it passed in, in which case all bets are off.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + bytes from which this will read bits. Bits will be read from the first byte first. + Bits are read within a byte from most-significant to least-significant bit. + + + + + index of next bit in current byte which would be read by the next call to {@link #readBits(int)}. + + + + + index of next byte in input byte array which would be read by the next call to {@link #readBits(int)}. + + + + number of bits to read + + int representing the bits read. The bits will appear as the least-significant + bits of the int + + if numBits isn't in [1,32] or more than is available + + + number of bits that can be read successfully + + + + Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1 + of ISO 18004. + + + Sean Owen + + + character set ECI value + representing ECI of given value, or null if it is legal but unsupported + + + character set ECI encoding name + representing ECI for character encoding, or null if it is legalbut unsupported + + + + Encapsulates the result of decoding a matrix of bits. This typically + applies to 2D barcode formats. For now it contains the raw bytes obtained, + as well as a String interpretation of those bytes, if applicable. + Sean Owen + + + + + raw bytes representing the result, or null if not applicable + + + + + how many bits of are valid; typically 8 times its length + + + + + text representation of the result + + + + + list of byte segments in the result, or null if not applicable + + + + + name of error correction level used, or null if not applicable + + + + + gets a value which describe if structure append data was found + + + + + number of errors corrected, or null if not applicable + + + + + gives the sequence number of the result if structured append was found + + + + + number of erasures corrected, or null if not applicable + + + + + gives the parity information if structured append was found + + + + + Miscellanseous data value for the various decoders + + The other. + + + + initializing constructor + + + + + + + + + initializing constructor + + + + + + + + + + + initializing constructor + + + + + + + + + + initializing constructor + + + + + + + + + + + + Defines an container for encoder options + + + + + Gets the data container for all options + + + + + event is raised when a value is changed + + + + + Gets or sets a flag which cause a deeper look into the bitmap + + + true if [try harder]; otherwise, false. + + + + + Image is a pure monochrome image of a barcode. + + + true if monochrome image of a barcode; otherwise, false. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + The character set. + + + + + Image is known to be of one of a few possible formats. + Maps to a {@link java.util.List} of {@link BarcodeFormat}s. + + + The possible formats. + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + true if it should assume a Code 39 check digit; otherwise, false. + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). + + + true if it should assume GS1; otherwise, false. + + + + + Assume MSI codes employ a check digit. Maps to . + + + true if it should assume a MSI check digit; otherwise, false. + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Initializes a new instance of the class. + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Encapsulates the result of detecting a barcode in an image. This includes the raw + matrix of black/white pixels corresponding to the barcode, and possibly points of interest + in the image, like the location of finder patterns or corners of the barcode in the image.

+
+ Sean Owen +
+ + + the detected bits + + + + + the pixel points where the result is found + + + + + initializing constructor + + + + + + + General math-related and numeric utility functions. + + + + + Ends up being a bit faster than {@link Math#round(float)}. This merely rounds its + argument to the nearest int, where x.5 rounds up to x+1. Semantics of this shortcut + differ slightly from {@link Math#round(float)} in that half rounds down for negative + values. -2.5 rounds to -3, not -2. For purposes here it makes no difference. + + real value to round + nearest int + + + + + + + + + + Euclidean distance between points A and B + + + + + + + + + + Euclidean distance between points A and B + + + + + values to sum + sum of values in array + + +

A somewhat generic detector that looks for a barcode-like rectangular region within an image. + It looks within a mostly white region of an image for a region of black and white, but mostly + black. It returns the four corners of the region, as best it can determine.

+ +
+ Sean Owen +
+ + + initializing constructor + + + + + +

Detects a rectangular region of black and white -- mostly black -- with a region of mostly + white, in an image.

+
+ [] describing the corners of the rectangular region. The first and + last points are opposed on the diagonal, as are the second and third. The first point will be + the topmost point and the last, the bottommost. The second point will be leftmost and the + third, the rightmost + +
+ + Attempts to locate a corner of the barcode by scanning up, down, left or right from a center + point which should be within the barcode. + + + center's x component (horizontal) + + same as deltaY but change in x per step instead + + minimum value of x + + maximum value of x + + center's y component (vertical) + + change in y per step. If scanning up this is negative; down, positive; + left or right, 0 + + minimum value of y to search through (meaningless when di == 0) + + maximum value of y + + maximum run of white pixels that can still be considered to be within + the barcode + + a encapsulating the corner that was found + + + + Computes the start and end of a region of pixels, either horizontally or vertically, that could + be part of a Data Matrix barcode. + + + if scanning horizontally, this is the row (the fixed vertical location) + where we are scanning. If scanning vertically it's the column, the fixed horizontal location + + largest run of white pixels that can still be considered part of the + barcode region + + minimum pixel location, horizontally or vertically, to consider + + maximum pixel location, horizontally or vertically, to consider + + if true, we're scanning left-right, instead of up-down + + int[] with start and end of found range, or null if no such range is found + (e.g. only white was found) + + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. By keeping track of the + last black points it encountered, it determines the corners of the barcode. + + David Olivier + + + + Creates a WhiteRectangleDetector instance + + The image. + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + Creates a WhiteRectangleDetector instance + + barcode image to find a rectangle in + initial size of search area around center + x position of search center + y position of search center + + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + + Initializes a new instance of the class. + + The image. + if image is too small + + + + Initializes a new instance of the class. + + The image. + Size of the init. + The x. + The y. + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. + + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + recenters the points of a constant distance towards the center + + bottom most point + left most point + right most point + top most point + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + Determines whether a segment contains a black point + + min value of the scanned coordinate + max value of the scanned coordinate + value of fixed coordinate + set to true if scan must be horizontal, false if vertical + + true if a black point has been found, else false. + + + + + Superclass of classes encapsulating types ECIs, according to "Extended Channel Interpretations" + 5.3 of ISO 18004. + + Sean Owen + + + + the ECI value + + + + ECI value + representing ECI of given value, or null if it is legal but unsupported + ArgumentException if ECI value is invalid + + + + Defines an container for encoder options + + + + + Gets the data container for all options + + + + + Specifies the height of the barcode image + + + + + Specifies the width of the barcode image + + + + + Don't put the content string into the output image. + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + + + + + Specifies whether the data should be encoded to the GS1 standard; + FNC1 character is added in front of the data + + + + + Initializes a new instance of the class. + + + + This Binarizer implementation uses the old ZXing global histogram approach. It is suitable + for low-end mobile devices which don't have enough CPU or memory to use a local thresholding + algorithm. However, because it picks a global black point, it cannot handle difficult shadows + and gradients. + + Faster mobile devices and all desktop applications should probably use HybridBinarizer instead. + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The source. + + + + Applies simple sharpening to the row data to improve performance of the 1D Readers. + + + + + + + + Does not sharpen the data, as this call is intended to only be used by 2D Readers. + + + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + + A new concrete Binarizer implementation object. + + + + Implementations of this class can, given locations of finder patterns for a QR code in an + image, sample the right points in the image to reconstruct the QR code, accounting for + perspective distortion. It is abstracted since it is relatively expensive and should be allowed + to take advantage of platform-specific optimized implementations, like Sun's Java Advanced + Imaging library, but which may not be available in other environments such as J2ME, and vice + versa. + + The implementation used can be controlled by calling {@link #setGridSampler(GridSampler)} + with an instance of a class which implements this interface. + + Sean Owen + + + the current implementation of + + + + Sets the implementation of used by the library. One global + instance is stored, which may sound problematic. But, the implementation provided + ought to be appropriate for the entire platform, and all uses of this library + in the whole lifetime of the JVM. For instance, an Android activity can swap in + an implementation that takes advantage of native platform libraries. + + The platform-specific object to install. + + + +

Samples an image for a square matrix of bits of the given dimension. This is used to extract + the black/white modules of a 2D barcode like a QR Code found in an image. Because this barcode + may be rotated or perspective-distorted, the caller supplies four points in the source image + that define known points in the barcode, so that the image may be sampled appropriately.

+

The last eight "from" parameters are four X/Y coordinate pairs of locations of points in + the image that define some significant points in the image to be sample. For example, + these may be the location of finder pattern in a QR Code.

+

The first eight "to" parameters are four X/Y coordinate pairs measured in the destination + , from the top left, where the known points in the image given by the "from" + parameters map to.

+

These 16 parameters define the transformation needed to sample the image.

+
+ image to sample + The dimension X. + The dimension Y. + The p1 preimage X. + The p1 preimage Y. + The p2 preimage X. + The p2 preimage Y. + The p3 preimage X. + The p3 preimage Y. + The p4 preimage X. + The p4 preimage Y. + The p1 image X. + The p1 image Y. + The p2 image X. + The p2 image Y. + The p3 image X. + The p3 image Y. + The p4 image X. + The p4 image Y. + + representing a grid of points sampled from the image within a region + defined by the "from" parameters + + ReaderException if image can't be sampled, for example, if the transformation defined +
+ + + + + + + + + + + +

Checks a set of points that have been transformed to sample points on an image against + the image's dimensions to see if the point are even within the image.

+ +

This method will actually "nudge" the endpoints back onto the image if they are found to be + barely (less than 1 pixel) off the image. This accounts for imperfect detection of finder + patterns in an image where the QR Code runs all the way to the image border.

+ +

For efficiency, the method will check points from either end of the line until one is found + to be within the image. Because the set of points are assumed to be linear, this is valid.

+ +
+ image into which the points should map + + actual points in x1,y1,...,xn,yn form + +
+ + This class implements a local thresholding algorithm, which while slower than the + GlobalHistogramBinarizer, is fairly efficient for what it does. It is designed for + high frequency images of barcodes with black data on white backgrounds. For this application, + it does a much better job than a global blackpoint with severe shadows and gradients. + However it tends to produce artifacts on lower frequency images and is therefore not + a good general purpose binarizer for uses outside ZXing. + + This class extends GlobalHistogramBinarizer, using the older histogram approach for 1D readers, + and the newer local approach for 2D readers. 1D decoding using a per-row histogram is already + inherently local, and only fails for horizontal gradients. We can revisit that problem later, + but for now it was not a win to use local blocks for 1D. + + This Binarizer is the default for the unit tests and the recommended class for library users. + dswitkin@google.com (Daniel Switkin) + + + + + gives the black matrix + + + + + initializing constructor + + + + + + creates a new instance + + + + + + + Calculates the final BitMatrix once for all requests. This could be called once from the + constructor instead, but there are some advantages to doing it lazily, such as making + profiling easier, and not doing heavy lifting when callers don't expect it. + + + + + For each 8x8 block in the image, calculate the average black point using a 5x5 grid + of the blocks around it. Also handles the corner cases (fractional blocks are computed based + on the last 8 pixels in the row/column which are also used in the previous block). + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + The black points. + The matrix. + + + + Applies a single threshold to an 8x8 block of pixels. + + The luminances. + The xoffset. + The yoffset. + The threshold. + The stride. + The matrix. + + + + Calculates a single black point for each 8x8 block of pixels and saves it away. + See the following thread for a discussion of this algorithm: + http://groups.google.com/group/zxing/browse_thread/thread/d06efa2c35a7ddc0 + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + + + +

This class implements a perspective transform in two dimensions. Given four source and four + destination points, it will compute the transformation implied between them. The code is based + directly upon section 3.4.2 of George Wolberg's "Digital Image Warping"; see pages 54-56.

+
+ Sean Owen +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Convenience method, not optimized for performance. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

This class contains utility methods for performing mathematical operations over + the Galois Fields. Operations use a given primitive polynomial in calculations.

+

Throughout this package, elements of the GF are represented as an {@code int} + for convenience and speed (but at the cost of memory). +

+
+ Sean Owen +
+ + + Create a representation of GF(size) using the given primitive polynomial. + + irreducible polynomial whose coefficients are represented by + * the bits of an int, where the least-significant bit represents the constant + * coefficient + the size of the field + the factor b in the generator polynomial can be 0- or 1-based + * (g(x) = (x+a^b)(x+a^(b+1))...(x+a^(b+2t-1))). + * In most cases it should be 1, but for QR code it is 0. + + + + Builds the monomial. + + The degree. + The coefficient. + the monomial representing coefficient * x^degree + + + + Implements both addition and subtraction -- they are the same in GF(size). + + sum/difference of a and b + + + + Exps the specified a. + + 2 to the power of a in GF(size) + + + + Logs the specified a. + + A. + base 2 log of a in GF(size) + + + + Inverses the specified a. + + multiplicative inverse of a + + + + Multiplies the specified a with b. + + A. + The b. + product of a and b in GF(size) + + + + Gets the size. + + + + + Gets the generator base. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + +

Represents a polynomial whose coefficients are elements of a GF. + Instances of this class are immutable.

+

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + the {@link GenericGF} instance representing the field to use + to perform computations + coefficients as ints representing elements of GF(size), arranged + from most significant (highest-power term) coefficient to least significant + if argument is null or empty, + or if leading coefficient is 0 and this is not a + constant polynomial (that is, it is not the monomial "0") + + + + degree of this polynomial + + + + + Gets a value indicating whether this is zero. + + true iff this polynomial is the monomial "0" + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + +

Implements Reed-Solomon decoding, as the name implies.

+ +

The algorithm will not be explained here, but the following references were helpful + in creating this implementation:

+ + + +

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+ +
+ Sean Owen + William Rucklidge + sanfordsquires +
+ + +

Decodes given set of received codewords, which include both data and error-correction + codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place, + in the input.

+
+ data and error-correction codewords + number of error-correction codewords available + false: decoding fails +
+ + + Implements Reed-Solomon encoding, as the name implies. + + Sean Owen + William Rucklidge + + + + Common string-related functions. + + Sean Owen + Alex Dupre + + + + SJIS + + + + + GB2312 + + + + + Guesses the encoding. + + bytes encoding a string, whose encoding should be guessed + decode hints if applicable + name of guessed encoding; at the moment will only guess one of: + {@link #SHIFT_JIS}, {@link #UTF8}, {@link #ISO88591}, or the platform + default encoding if none of these can possibly be correct + + + + This implementation can detect and decode Data Matrix codes in an image. + + bbrown@google.com (Brian Brown) + + + + + Locates and decodes a Data Matrix code in an image. + + + a String representing the content encoded by the Data Matrix code + + + + Locates and decodes a Data Matrix code in an image. + + + + a String representing the content encoded by the Data Matrix code + + + + does nothing here + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a Data Matrix code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + Guillaume Le Biller Added to zxing lib. + + + + encodes the content to a BitMatrix + + + + + + + + + + encodes the content to a BitMatrix + + + + + + + + + + + Encode the given symbol info to a bit matrix. + + The DataMatrix placement. + The symbol info to encode. + + + The bit matrix generated. + + + + Convert the ByteMatrix to BitMatrix. + + The input matrix. + The requested width of the image (in pixels) with the Datamatrix code + The requested height of the image (in pixels) with the Datamatrix code + The output matrix. + + + + bbrown@google.com (Brian Brown) + + + + + to parse + if dimension is < 8 or > 144 or not 0 mod 2 + + + + +

Creates the version object based on the dimension of the original bit matrix from + the datamatrix code.

+ +

See ISO 16022:2006 Table 7 - ECC 200 symbol attributes

+ + Original including alignment patterns + encapsulating the Data Matrix Code's "version" + if the dimensions of the mapping matrix are not valid + Data Matrix dimensions. +
+
+ + +

Reads the bits in the representing the mapping matrix (No alignment patterns) + in the correct order in order to reconstitute the codewords bytes contained within the + Data Matrix Code.

+ + bytes encoded within the Data Matrix Code + if the exact number of bytes expected is not read +
+
+ + +

Reads a bit of the mapping matrix accounting for boundary wrapping.

+ + Row to read in the mapping matrix + Column to read in the mapping matrix + Number of rows in the mapping matrix + Number of columns in the mapping matrix + value of the given bit in the mapping matrix +
+
+ + +

Reads the 8 bits of the standard Utah-shaped pattern.

+ +

See ISO 16022:2006, 5.8.1 Figure 6

+ + Current row in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Current column in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the utah shape +
+
+ + +

Reads the 8 bits of the special corner condition 1.

+ +

See ISO 16022:2006, Figure F.3

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 1 +
+
+ + +

Reads the 8 bits of the special corner condition 2.

+ +

See ISO 16022:2006, Figure F.4

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 2 +
+
+ + +

Reads the 8 bits of the special corner condition 3.

+ +

See ISO 16022:2006, Figure F.5

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 3 +
+
+ + +

Reads the 8 bits of the special corner condition 4.

+ +

See ISO 16022:2006, Figure F.6

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 4 +
+
+ + +

Extracts the data region from a that contains + alignment patterns.

+ + Original with alignment patterns + BitMatrix that has the alignment patterns removed +
+
+ + +

Encapsulates a block of data within a Data Matrix Code. Data Matrix Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ + bbrown@google.com (Brian Brown) +
+
+ + +

When Data Matrix Codes use multiple data blocks, they actually interleave the bytes of each of them. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ + bytes as read directly from the Data Matrix Code + version of the Data Matrix Code + DataBlocks containing original bytes, "de-interleaved" from representation in the + Data Matrix Code +
+
+ + +

Data Matrix Codes can encode text as bits in one of several modes, and can use multiple modes + in one Data Matrix Code. This class decodes the bits back into text.

+ +

See ISO 16022:2006, 5.2.1 - 5.2.9.2

+ + bbrown@google.com (Brian Brown) + Sean Owen +
+
+ + + See ISO 16022:2006, Annex C Table C.1 + The C40 Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, Annex C Table C.2 + The Text Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, 5.2.3 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.5 and Annex C, Table C.1 + + + + + See ISO 16022:2006, 5.2.6 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.7 + + + + + See ISO 16022:2006, 5.2.8 and Annex C Table C.3 + + + + + See ISO 16022:2006, 5.2.9 and Annex B, B.2 + + + + + See ISO 16022:2006, Annex B, B.2 + + + + +

The main class which implements Data Matrix Code decoding -- as opposed to locating and extracting + the Data Matrix Code from an image.

+ + bbrown@google.com (Brian Brown) +
+
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a Data Matrix Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+ + booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code + if the Data Matrix Code cannot be decoded +
+
+ + +

Decodes a Data Matrix Code represented as a . A 1 or "true" is taken + to mean a black module.

+
+ booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+ + data and error correction codewords + number of codewords that are data bytes +
+
+ + + The Version object encapsulates attributes about a particular + size Data Matrix Code. + + bbrown@google.com (Brian Brown) + + + + + returns the version numer + + + + + + returns the symbol size rows + + + + + + returns the symbols size columns + + + + + + retursn the data region size rows + + + + + + returns the data region size columns + + + + + + returns the total codewords count + + + + + +

Deduces version information from Data Matrix dimensions.

+ + Number of rows in modules + Number of columns in modules + Version for a Data Matrix Code of those dimensions + if dimensions do correspond to a valid Data Matrix size +
+
+ + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the Data Matrix code version's format.

+
+
+ + + returns the version number as string + + + + + + See ISO 16022:2006 5.5.1 Table 7 + + + + +

Encapsulates logic that can detect a Data Matrix Code in an image, even if the Data Matrix Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + +

Detects a Data Matrix Code in an image.

+
+ encapsulating results of detecting a Data Matrix Code or null +
+ + + Calculates the position of the white top right module using the output of the rectangle detector + for a rectangular matrix + + + + + Calculates the position of the white top right module using the output of the rectangle detector + for a square matrix + + + + + Increments the Integer associated with a key by one. + + + + + Counts the number of black/white transitions between two points, using something like Bresenham's algorithm. + + + + + Simply encapsulates two points and a number of transitions between them. + + + + + Orders ResultPointsAndTransitions by number of transitions, ascending. + + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Symbol Character Placement Program. Adapted from Annex M.1 in ISO/IEC 16022:2000(E). + + + + + Main constructor + + the codewords to place + the number of columns + the number of rows + + + + Places the 8 bits of a utah-shaped symbol character in ECC200. + + The row. + The col. + character position + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Enumeration for encodation types + + + + + Error Correction Code for ECC200. + + + + + Lookup table which factors to use for which number of error correction codewords. + See FACTORS. + + + + + Precomputed polynomial factors for ECC 200. + + + + + Creates the ECC200 error correction for an encoded message. + + The codewords. + information about the symbol to be encoded + the codewords with interleaved error correction. + + + + DataMatrix ECC 200 data encoder following the algorithm described in ISO/IEC 16022:200(E) in + annex S. + + + + + Padding character + + + + + mode latch to C40 encodation mode + + + + + mode latch to Base 256 encodation mode + + + + + FNC1 Codeword + + + + + Structured Append Codeword + + + + + Reader Programming + + + + + Upper Shift + + + + + 05 Macro + + + + + 06 Macro + + + + + mode latch to ANSI X.12 encodation mode + + + + + mode latch to Text encodation mode + + + + + mode latch to EDIFACT encodation mode + + + + + ECI character (Extended Channel Interpretation) + + + + + Unlatch from C40 encodation + + + + + Unlatch from X12 encodation + + + + + 05 Macro header + + + + + 06 Macro header + + + + + Macro trailer + + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + the encoded message (the char values range from 0 to 255) + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + requested shape. May be {@code SymbolShapeHint.FORCE_NONE},{@code SymbolShapeHint.FORCE_SQUARE} or {@code SymbolShapeHint.FORCE_RECTANGLE}. + the minimum symbol size constraint or null for no constraint + the maximum symbol size constraint or null for no constraint + encoding mode to start with + the encoded message (the char values range from 0 to 255) + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + Symbol info table for DataMatrix. + + + + Overrides the symbol info set used by this class. Used for testing purposes. + + @param override the symbol info set to use + + + + Enumeration for DataMatrix symbol shape hint. It can be used to force square or rectangular + symbols. + + + + + The class holds the available options for the DatamatrixWriter + + + + + Specifies the matrix shape for Data Matrix + + + + + Specifies a minimum barcode size + + + + + Specifies a maximum barcode size + + + + + Specifies the default encodation + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Encapsulates a type of hint that a caller may pass to a barcode reader to help it + more quickly or accurately decode it. It is up to implementations to decide what, + if anything, to do with the information that is supplied. + + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Unspecified, application-specific hint. Maps to an unspecified . + + + + + Image is a pure monochrome image of a barcode. Doesn't matter what it maps to; + use = true. + + + + + Image is known to be of one of a few possible formats. + Maps to a of s. + + + + + Spend more time to try to find a barcode; optimize for accuracy, not speed. + Doesn't matter what it maps to; use = true. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + + + The caller needs to be notified via callback when a possible + is found. Maps to a . + + + + + Assume MSI codes employ a check digit. Maps to . + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + Maps to . + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + 1D readers supporting rotation with TRY_HARDER enabled. + But BarcodeReader class can do auto-rotating for 1D and 2D codes. + Enabling that option prevents 1D readers doing double rotation. + BarcodeReader enables that option automatically if "global" auto-rotation is enabled. + Maps to . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to; + use . + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Simply encapsulates a width and height. + + + + + initializing constructor + + + + + + + the width + + + + + the height + + + + + + + + + + + + + + + + + + + + + + + + These are a set of hints that you may pass to Writers to specify their behavior. + + dswitkin@google.com (Daniel Switkin) + + + + Specifies the width of the barcode image + type: + + + + + Specifies the height of the barcode image + type: + + + + + Don't put the content string into the output image. + type: + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + + For Aztec it is of type , representing the minimal percentage of error correction words. + In all cases, it can also be a representation of the desired value as well. + Note: an Aztec symbol should have a minimum of 25% EC words. + For PDF417 it is of type or (between 0 and 8), + + + + + Specifies what character encoding to use where applicable. + type: + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + type: , or representation of the integer value + + + + + Specifies the aspect ratio to use. Default is 4. + type: , or 1-4. + + + + + Specifies whether to use compact mode for PDF417 + type: , or "true" or "false" + value + + + + + Specifies what compaction mode to use for PDF417. + type: or value of one of its + enum values + + + + + Specifies the minimum and maximum number of rows and columns for PDF417. + type: + + + + + Don't append ECI segment. + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + type: + + + + + Specifies the matrix shape for Data Matrix (type ) + + + + + Specifies a minimum barcode size (type ). Only applicable to Data Matrix now. + + + + + Specifies a maximum barcode size (type ). Only applicable to Data Matrix now. + + + + + if true, don't switch to codeset C for numbers + + + + + Specifies the default encodation for Data Matrix (type ) + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Specifies the required number of layers for an Aztec code. + A negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + type: , or representation of the integer value + + + + + Specifies the exact version of QR code to be encoded. + (Type , or representation of the integer value). + + + + + Specifies whether the data should be encoded to the GS1 standard + type: , or "true" or "false" + value + + + + + Thrown when a barcode was successfully detected, but some aspect of + the content did not conform to the barcode's format rules. This could have + been due to a mis-detection. + Sean Owen + + + + + + + + + + + + + + + + + + + + + + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Decodes the specified barcode bitmap which is given by a generic byte array. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents. + + The contents. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + The matrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents. + + The contents. + + + + + implements an Intelligent Mail barcode + Rishabh Hatgadkar + + + + + A wrapper implementation of {@link LuminanceSource} which inverts the luminances it returns -- black becomes + white and vice versa, and each value becomes (255-value). + + Sean Owen + + + + Initializes a new instance of the class. + + The @delegate. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff; + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Inverts this instance. + + original delegate {@link LuminanceSource} since invert undoes itself + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + The purpose of this class hierarchy is to abstract different bitmap implementations across + platforms into a standard interface for requesting greyscale luminance values. The interface + only provides immutable methods; therefore crop and rotation create copies. This is to ensure + that one Reader does not modify the original luminance source and leave it in an unknown state + for other Readers in the chain. + + dswitkin@google.com (Daniel Switkin) + + + + initializing constructor + + + + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff + + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + The width of the bitmap. + + + The height of the bitmap. + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + Whether this subclass supports counter-clockwise rotation. + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + + Whether this subclass supports invertion. + + + + inverts the luminance values, not supported here. has to implemented in sub classes + + + + + + + + + + + + mike32767 + Manuel Kasten + + + + + to parse + + + + +

MaxiCodes can encode text or structured information as bits in one of several modes, + with multiple character sets in one code. This class decodes the bits back into text.

+ + mike32767 + Manuel Kasten +
+
+ + +

The main class which implements MaxiCode decoding -- as opposed to locating and extracting + the MaxiCode from an image.

+ + Manuel Kasten +
+
+ + + This implementation can detect and decode a MaxiCode in an image. + + + + + Locates and decodes a MaxiCode in an image. + + a String representing the content encoded by the MaxiCode + if a MaxiCode cannot be decoded + + + + + Locates and decodes a MaxiCode within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + + MultiFormatReader is a convenience class and the main entry point into the library for most uses. + By default it attempts to decode all barcode formats that the library supports. Optionally, you + can provide a hints object to request different behavior, for example only decoding QR codes. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + This version of decode honors the intent of Reader.decode(BinaryBitmap) in that it + passes null as a hint to the decoders. However, that makes it inefficient to call repeatedly. + Use setHints() followed by decodeWithState() for continuous scan applications. + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the hints provided. Does not honor existing state. + + + The pixel data to decode + + The hints to use, clearing the previous state. + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the state set up by calling setHints() previously. Continuous scan + clients will get a large speed increase by using this instead of decode(). + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls + to decodeWithState(image) can reuse the same set of readers without reallocating memory. This + is important for performance in continuous scan clients. + + + + + + resets all specific readers + + + + This is a factory class which finds the appropriate Writer subclass for the BarcodeFormat + requested and encodes the barcode with the supplied contents. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Gets the collection of supported writers. + + + + + encode the given data + + + + + + + + + + encode the given data + + + + + + + + + + + This class attempts to decode a barcode from an image, not by scanning the whole image, + but by scanning subsets of the image. This is important when there may be multiple barcodes in + an image, and detecting a barcode may find parts of multiple barcode and fail to decode + (e.g. QR Codes). Instead this scans the four quadrants of the image -- and also the center + 'quadrant' to cover the case where a barcode is found in the center. + + + + + + Initializes a new instance of the class. + + The @delegate. + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Attempts to locate multiple barcodes in an image by repeatedly decoding portion of the image. + After one barcode is found, the areas left, above, right and below the barcode's + {@link com.google.zxing.ResultPoint}s are scanned, recursively.

+

A caller may want to also employ {@link ByQuadrantReader} when attempting to find multiple + 2D barcodes, like QR Codes, in an image, where the presence of multiple barcodes might prevent + detecting any one of them.

+

That is, instead of passing a {@link Reader} a caller might pass + new ByQuadrantReader(reader).

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The @delegate. + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Implementation of this interface attempt to read several barcodes from one image. + Sean Owen + + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + +

Encapsulates logic that can detect one or more QR Codes in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+ + Sean Owen + Hannes Erven +
+
+ + + Initializes a new instance of the class. + + The image. + + + + Detects the multi. + + The hints. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +

In contrast to , this class will return an array of all possible + QR code locations in the image.

+ +

Use the TRY_HARDER hint to ask for a more thorough detection.

+ + Sean Owen + Hannes Erven +
+
+ + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF_PERCENT percent in their + estimated modules sizes. + + + + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF pixels/module in their + estimated modules sizes. + + + + + A comparator that orders FinderPatterns by their estimated module size. + + + + +

Creates a finder that will search the image for three finder patterns.

+ + image to search +
+
+ + + + the 3 best s from our list of candidates. The "best" are + those that have been detected at least CENTER_QUORUM times, and whose module + size differs from the average among those patterns the least + + + + + This implementation can detect and decode multiple QR Codes in an image. + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + +

Decodes Codabar barcodes.

+ + Bas Vijfwinkel +
+
+ + These represent the encodings of characters, as patterns of wide and narrow bars. The 7 least-significant bits of + each int correspond to the pattern of wide and narrow, with 1s representing "wide" and 0s representing narrow. + + + + Records the size of all runs of white and black pixels, starting with white. + This is just like recordPattern, except it records all the counters, and + uses our builtin "counters" member for storage. + + row to count from + + + + This class renders CodaBar as []. + + dsbnatut@gmail.com (Kazuki Nishiura) + + + + The class holds the available options for the QrCodeWriter + + + + + if true, don't switch to codeset C for numbers + + + + +

Decodes Code 128 barcodes.

+ + Sean Owen +
+
+ + + This object renders a CODE128 code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + +

Decodes Code 39 barcodes. Supports "Full ASCII Code 39" if USE_CODE_39_EXTENDED_MODE is set.

+ Sean Owen + @see Code93Reader +
+
+ + + Returns a string with all possible characters + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. It will not decoded "extended Code 39" sequences. + + + + + Creates a reader that can be configured to check the last character as a check digit. + It will not decoded "extended Code 39" sequences. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + + Creates a reader that can be configured to check the last character as a check digit, + or optionally attempt to decode "extended Code 39" sequences that are used to encode + the full ASCII character set. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + if true, will attempt to decode extended Code 39 sequences in the text. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a CODE39 code as a . + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Decodes Code 93 barcodes.

+ Sean Owen + +
+
+ + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a CODE93 code as a BitMatrix + + + + + + output to append to + start position + pattern to append + unused + 9 + + + +

Implements decoding of the EAN-13 format.

+ + dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Initializes a new instance of the class. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + Get the format of this decoder. + The 1D format. + + + + + Based on pattern of odd-even ('L' and 'G') patterns used to encoded the explicitly-encoded + digits in a barcode, determines the implicitly encoded first digit and adds it to the + result string. + + string to insert decoded first digit into + int whose bits indicates the pattern of odd/even L/G patterns used to + encode digits + -1 if first digit cannot be determined + + + + This object renders an EAN13 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Implements decoding of the EAN-8 format.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Get the format of this decoder. + The 1D format. + + + + + This object renders an EAN8 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + + + a byte array of horizontal pixels (false = white, true = black) + + + + + Records EAN prefix to GS1 Member Organization, where the member organization + correlates strongly with a country. This is an imperfect means of identifying + a country of origin by EAN-13 barcode value. See + + http://en.wikipedia.org/wiki/List_of_GS1_country_codes. + + Sean Owen + + + + +

Implements decoding of the ITF format, or Interleaved Two of Five.

+ +

This Reader will scan ITF barcodes of certain lengths only. + At the moment it reads length 6, 8, 10, 12, 14, 16, 18, 20, 24, 44 and 48 as these have appeared "in the wild". Not all + lengths are scanned, especially shorter ones, to avoid false positives. This in turn is due to a lack of + required checksum function.

+ +

The checksum is optional and is not applied by this Reader. The consumer of the decoded + value will have to apply a checksum if required.

+ +

http://en.wikipedia.org/wiki/Interleaved_2_of_5 + is a great reference for Interleaved 2 of 5 information.

+ + kevin.osullivan@sita.aero, SITA Lab. +
+
+ + + Valid ITF lengths. Anything longer than the largest value is also allowed. + + + + + Start/end guard pattern. + + Note: The end pattern is reversed because the row is reversed before + searching for the END_PATTERN + + + + + Patterns of Wide / Narrow lines to indicate each digit + + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + + row of black/white values to search + offset of start pattern + The payload end. + to append decoded chars to + + false, if decoding could not complete successfully + + + + + Identify where the start of the middle / payload section starts. + + row of black/white values to search + Array, containing index of start of 'start block' and end of 'start block' + + + + The start & end patterns must be pre/post fixed by a quiet zone. This + zone must be at least 10 times the width of a narrow line. Scan back until + we either get to the start of the barcode or match the necessary number of + quiet zone pixels. + + Note: Its assumed the row is reversed when using this method to find + quiet zone after the end pattern. + + ref: http://www.barcode-1.net/i25code.html + + bit array representing the scanned barcode. + index into row of the start or end pattern. + false, if the quiet zone cannot be found + + + + Skip all whitespace until we get to the first black line. + + row of black/white values to search + index of the first black line or -1 if no black lines are found in the row. + + + + Identify where the end of the middle / payload section ends. + + row of black/white values to search + Array, containing index of start of 'end block' and end of 'end + block' or null, if nothing found + + + + + row of black/white values to search + position to start search + pattern of counts of number of black and white pixels that are being searched for as a pattern + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a sequence of ITF black/white lines into single + digit. + + the counts of runs of observed black/white/black/... values + The decoded digit + + false, if digit cannot be decoded + + + + + This object renders a ITF code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code bool[]} of horizontal pixels (false = white, true = black) + + + + + + + Decodes MSI barcodes. + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. + + + + + Creates a reader that can be configured to check the last character as a check digit, + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a MSI code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + This object renders a Plessey code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

A reader that can read all available UPC/EAN formats. If a caller wants to try to + read all such formats, it is most efficient to use this implementation rather than invoke + individual readers.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Encapsulates functionality and implementation that is common to one-dimensional barcodes.

+ dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + a byte array of horizontal pixels (0 = white, 1 = black) + + + + Appends the given pattern to the target array starting at pos. + + encode black/white pattern into this array + position to start encoding at in target + lengths of black/white runs to encode + starting color - false for white, true for black + the number of elements added to target. + + + + Gets the default margin. + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + + barcode contents to encode + a bool[] of horizontal pixels (false = white, true = black) + + + + Calculates the checksum digit modulo10. + + The contents. + + + + + Encapsulates functionality and implementation that is common to all families + of one-dimensional barcodes. + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + + + + + + + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + Note that we don't try rotation without the try harder flag, even if rotation was supported. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + We're going to examine rows from the middle outward, searching alternately above and below the + middle, and farther out each time. rowStep is the number of rows between each successive + attempt above and below the middle. So we'd scan row middle, then middle - rowStep, then + middle + rowStep, then middle - (2 * rowStep), etc. + rowStep is bigger as the image is taller, but is always at least 1. We've somewhat arbitrarily + decided that moving up and down by about 1/16 of the image is pretty good; we try more of the + image if "trying harder". + + The image to decode + Any hints that were requested + The contents of the decoded barcode + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the pattern in reverse. + + The row. + The start. + The counters. + + + + + Determines how closely a set of observed counts of runs of black/white values matches a given + target pattern. This is reported as the ratio of the total variance from the expected pattern + proportions across all pattern elements, to the length of the pattern. + + observed counters + expected pattern + The most any counter can differ before we give up + ratio of total variance between counters and pattern compared to total pattern size, + where the ratio has been multiplied by 256. So, 0 means no variance (perfect match); 256 means + the total variance between counters and patterns equals the pattern length, higher values mean + even more variance + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + Superclass of implementations that read barcodes in the RSS family of formats. + + + + + Initializes a new instance of the class. + + + + + Gets the decode finder counters. + + + + + + Gets the data character counters. + + + + + + Gets the odd rounding errors. + + + + + + Gets the even rounding errors. + + + + + + Gets the odd counts. + + + + + + Gets the even counts. + + + + + + Parses the finder value. + + The counters. + The finder patterns. + The value. + + + + + Counts the specified array. + + The array. + + + + + Increments the specified array. + + The array. + The errors. + + + + Decrements the specified array. + + The array. + The errors. + + + + Determines whether [is finder pattern] [the specified counters]. + + The counters. + + true if [is finder pattern] [the specified counters]; otherwise, false. + + + + + Encapsulates a since character value in an RSS barcode, including its checksum information. + + + + + Gets the value. + + + + + Gets the checksum portion. + + + + + Initializes a new instance of the class. + + The value. + The checksum portion. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Gets the information. + + + + + + Parses the information. + + + + + + Creates the decoder. + + The information. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + One row of an RSS Expanded Stacked symbol, consisting of 1+ expanded pairs. + + + + + Did this row of the image have to be reversed (mirrored) to recognize the pairs? + + + + + Two rows are equal if they contain the same pairs in the same order. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Encapsulates an RSS barcode finder pattern, including its start/end position and row. + + + + + Gets the value. + + + + + Gets the start end. + + + + + Gets the result points. + + + + + Initializes a new instance of the class. + + The value. + The start end. + The start. + The end. + The row number. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Decodes RSS-14, including truncated and stacked variants. See ISO/IEC 24724:2006. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Adapted from listings in ISO/IEC 24724 Appendix B and Appendix G. + + + + + Gets the RS svalue. + + The widths. + Width of the max. + if set to true [no narrow]. + + + + +

Implements decoding of the UPC-A format.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen +
+
+ + +

Like decodeRow(int, BitArray, java.util.Map), but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ + + + + +
+ + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Decodes the specified image. + + The image. + The hints. + + + + + Get the format of this decoder. + The 1D format. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + This object renders a UPC-A code as a . + qwandor@google.com (Andrew Walbran) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + @see UPCEANExtension5Support + + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + + + @see UPCEANExtension2Support + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + one {@link ResultMetadataType} to appropriate value, or {@code null} if not known + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Start/end guard pattern. + + + + + Pattern marking the middle of a UPC/EAN pattern, separating the two halves. + + + + + end guard pattern. + + + + + "Odd", or "L" patterns used to encode UPC/EAN digits. + + + + + As above but also including the "even", or "G" patterns used to encode UPC/EAN digits. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + +

Like , but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ row index into the image + encoding of the row of the barcode image + start/end column where the opening start pattern was found + optional hints that influence decoding + encapsulating the result of decoding a barcode in the row +
+ + + + string of digits to check + see + + + + Computes the UPC/EAN checksum on a string of digits, and reports + whether the checksum is correct or not. + + string of digits to check + true iff string of digits passes the UPC/EAN checksum algorithm + + + + Decodes the end. + + The row. + The end start. + + + + + + row of black/white values to search + position to start search + if true, indicates that the pattern specifies white/black/white/... + pixel counts, otherwise, it is interpreted as black/white/black/... + pattern of counts of number of black and white pixels that are being + searched for as a pattern + array of counters, as long as pattern, to re-use + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a single UPC/EAN-encoded digit. + + row of black/white values to decode + the counts of runs of observed black/white/black/... values + horizontal offset to start decoding from + the set of patterns to use to decode -- sometimes different encodings + for the digits 0-9 are used, and this indicates the encodings for 0 to 9 that should + be used + horizontal offset of first pixel beyond the decoded digit + + + + Get the format of this decoder. + + The 1D format. + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ aripollak@gmail.com (Ari Pollak) + dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Gets the default margin. + + + + +

Implements decoding of the UPC-E format.

+

Thisis a great reference for + UPC-E information.

+ Sean Owen +
+
+ + + The pattern that marks the middle, and end, of a UPC-E pattern. + There is no "second half" to a UPC-E barcode. + + + + + See L_AND_G_PATTERNS these values similarly represent patterns of + even-odd parity encodings of digits that imply both the number system (0 or 1) + used, and the check digit. + + + + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Decodes the end. + + The row. + The end start. + + + + + see checkStandardUPCEANChecksum(String) + + + + + + + Determines the num sys and check digit. + + The result string. + The lg pattern found. + + + + + Get the format of this decoder. + The 1D format. + + + + + Expands a UPC-E value back into its full, equivalent UPC-A code value. + + UPC-E code as string of digits + equivalent UPC-A code as string of digits + + + + + This object renders an UPC-E code as a {@link BitMatrix}. + @author 0979097955s@gmail.com (RX) + + + + + Metadata about a PDF417 Barcode + + Guenther Grau + + + + A Barcode Value for the PDF417 barcode. + The scanner will iterate through the bitmatrix, + and given the different methods or iterations + will increment a given barcode value's confidence. + + When done, this will return the values of highest confidence. + + Guenther Grau + + + + Incremenets the Confidence for a given value. (Adds an occurance of a value) + + + Value. + + + + Determines the maximum occurrence of a set value and returns all values which were set with this occurrence. + + an array of int, containing the values with the highest occurrence, or null, if no value was set. + + + + Returns the confience value for a given barcode value + + Barcode value. + + + + A Bounding Box helper class + + Guenther Grau + + + + Initializes a new instance of the class. + returns null if the corner points don't match up correctly + + The image. + The top left. + The bottom left. + The top right. + The bottom right. + + + + + Creates the specified box. + + The box. + + + + + Initializes a new instance of the class. + Will throw an exception if the corner points don't match up correctly + + Image. + Top left. + Top right. + Bottom left. + Bottom right. + + + + Merge two Bounding Boxes, getting the left corners of left, and the right corners of right + (Images should be the same) + + Left. + Right. + + + + Adds the missing rows. + + The missing rows. + Missing start rows. + Missing end rows. + If set to true is left. + + + + Calculates the minimum and maximum X & Y values based on the corner points. + + + + + If we adjust the width, set a new right corner coordinate and recalculate + + Bottom right. + + + + A Codeword in the PDF417 barcode + + Guenther Grau + + + + Default value for the RowNumber (-1 being an invalid real number) + + + + + Initializes a new instance of the class. + + Start x. + End x. + Bucket. + Value. + + + + Gets the width. + + The width. + + + + Gets a value indicating whether this instance has valid row number. + + true if this instance has valid row number; otherwise, false. + + + + Determines whether this instance is valid row number the specified rowNumber. + + true if this instance is valid row number the specified rowNumber; otherwise, false. + Row number. + + + + Sets the row number as the row's indicator column. + + + + + Returns a that represents the current . + + A that represents the current . + + + +

This class contains the methods for decoding the PDF417 codewords.

+ + SITA Lab (kevin.osullivan@sita.aero) +
+
+ + + Table containing values for the exponent of 900. + This is used in the numeric compaction decode algorithm. + + + + + Text Compaction mode (see 5.4.1.5) permits all printable ASCII characters to be + encoded, i.e. values 32 - 126 inclusive in accordance with ISO/IEC 646 (IRV), as + well as selected control characters. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + The Text Compaction mode includes all the printable ASCII characters + (i.e. values from 32 to 126) and three ASCII control characters: HT or tab + (ASCII value 9), LF or line feed (ASCII value 10), and CR or carriage + return (ASCII value 13). The Text Compaction mode also includes various latch + and shift characters which are used exclusively within the mode. The Text + Compaction mode encodes up to 2 characters per codeword. The compaction rules + for converting data into PDF417 codewords are defined in 5.4.2.2. The sub-mode + switches are defined in 5.4.2.3. + + The text compaction data. + The byte compaction data if there + was a mode shift. + The size of the text compaction and byte compaction data. + The decoded data is appended to the result. + + + + + Byte Compaction mode (see 5.4.3) permits all 256 possible 8-bit byte values to be encoded. + This includes all ASCII characters value 0 to 127 inclusive and provides for international + character set support. + + The byte compaction mode i.e. 901 or 924 + The array of codewords (data + error) + Currently active character encoding + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Numeric Compaction mode (see 5.4.4) permits efficient encoding of numeric data strings. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Convert a list of Numeric Compacted codewords from Base 900 to Base 10. + EXAMPLE + Encode the fifteen digit numeric string 000213298174000 + Prefix the numeric string with a 1 and set the initial value of + t = 1 000 213 298 174 000 + Calculate codeword 0 + d0 = 1 000 213 298 174 000 mod 900 = 200 + + t = 1 000 213 298 174 000 div 900 = 1 111 348 109 082 + Calculate codeword 1 + d1 = 1 111 348 109 082 mod 900 = 282 + + t = 1 111 348 109 082 div 900 = 1 234 831 232 + Calculate codeword 2 + d2 = 1 234 831 232 mod 900 = 632 + + t = 1 234 831 232 div 900 = 1 372 034 + Calculate codeword 3 + d3 = 1 372 034 mod 900 = 434 + + t = 1 372 034 div 900 = 1 524 + Calculate codeword 4 + d4 = 1 524 mod 900 = 624 + + t = 1 524 div 900 = 1 + Calculate codeword 5 + d5 = 1 mod 900 = 1 + t = 1 div 900 = 0 + Codeword sequence is: 1, 624, 434, 632, 282, 200 + + Decode the above codewords involves + 1 x 900 power of 5 + 624 x 900 power of 4 + 434 x 900 power of 3 + + 632 x 900 power of 2 + 282 x 900 power of 1 + 200 x 900 power of 0 = 1000213298174000 + + Remove leading 1 => Result is 000213298174000 + The array of codewords + The number of codewords + The decoded string representing the Numeric data. + + + + + + + Guenther Grau + + + + Returns the DetectionResult Columns. This does a fair bit of calculation, so call it sparingly. + + The detection result columns. + + + + Adjusts the indicator column row numbers. + + Detection result column. + + + + return number of codewords which don't have a valid row number. Note that the count is not accurate as codewords . + will be counted several times. It just serves as an indicator to see when we can stop adjusting row numbers + + The row numbers. + + + + Adjusts the row numbers by row. + + The row numbers by row. + + + + Adjusts the row numbers from both Row Indicators + + zero + + + + Adjusts the row numbers from Right Row Indicator. + + The unadjusted row count. + + + + Adjusts the row numbers from Left Row Indicator. + + Unadjusted row Count. + + + + Adjusts the row number if valid. + + The invalid rows + Row indicator row number. + Invalid row counts. + Codeword. + + + + Adjusts the row numbers. + + Barcode column. + Codewords row. + Codewords. + + + + Adjusts the row number. + + true, if row number was adjusted, false otherwise. + Codeword. + Other codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + The maximum distance to search in the codeword array in both the positive and negative directions + + + + + The Bounding Box around the column (in the BitMatrix) + + The box. + + + + The Codewords the Box encodes for, offset by the Box minY. + Remember to Access this ONLY through GetCodeword(imageRow) if you're accessing it in that manner. + + The codewords. + + + + Initializes a new instance of the class. + + The Bounding Box around the column (in the BitMatrix) + + + + Converts the Image's Row to the index in the Codewords array + + The Codeword Index. + Image row. + + + + Converts the Codeword array index into a Row in the Image (BitMatrix) + + The Image Row. + Codeword index. + + + + Gets the codeword for a given row + + The codeword. + Image row. + + + + Gets the codeword closest to the specified row in the image + + Image row. + + + + Sets the codeword for an image row + + Image row. + Codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + Gets or sets a value indicating whether this instance is the left indicator + + true if this instance is left; otherwise, false. + + + + Initializes a new instance of the class. + + Box. + If set to true is left. + + + + Sets the Row Numbers as Inidicator Columns + + + + + TODO implement properly + TODO maybe we should add missing codewords to store the correct row number to make + finding row numbers for other columns easier + use row height count to make detection of invalid row numbers more reliable + + The indicator column row numbers. + Metadata. + + + + Gets the row heights. + + The row heights. + + + + Adjusts the in omplete indicator column row numbers. + + Metadata. + + + + Gets the barcode metadata. + + The barcode metadata. + + + + Prune the codewords which do not match the metadata + TODO Maybe we should keep the incorrect codewords for the start and end positions? + + Codewords. + Metadata. + + + + Returns a that represents the current . + + A that represents the current . + + + +

PDF417 error correction implementation.

+

This example + is quite useful in understanding the algorithm.

+ Sean Owen + +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the specified received. + + received codewords + number of those codewords used for EC + location of erasures + The error locations count. + + + + + Runs the euclidean algorithm (Greatest Common Divisor) until r's degree is less than R/2 + + The euclidean algorithm. + + + + Finds the error locations as a direct application of Chien's search + + The error locations. + Error locator. + + + + Finds the error magnitudes by directly applying Forney's Formula + + The error magnitudes. + Error evaluator. + Error locator. + Error locations. + + + +

A field based on powers of a generator integer, modulo some modulus.

+ +
+ Sean Owen +
+ + + + + Sean Owen + + + + Gets the coefficients. + + The coefficients. + + + + degree of this polynomial + + + + + Gets a value indicating whether this instance is zero. + + true if this polynomial is the monomial "0" + + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + + + Adds another Modulus + + Other. + + + + Subtract another Modulus + + Other. + + + + Multiply by another Modulus + + Other. + + + + Returns a Negative version of this instance + + + + + Multiply by a Scalar. + + Scalar. + + + + Multiplies by a Monomial + + The by monomial. + Degree. + Coefficient. + + + + Returns a that represents the current . + + A that represents the current . + + + + + + Guenther Grau + creatale GmbH (christoph.schulz@creatale.de) + + + + The ratios table + + + + + Initializes the class & Pre-computes the symbol ratio table. + + + + + Gets the decoded value. + + The decoded value. + Module bit count. + + + + Samples the bit counts. + + The bit counts. + Module bit count. + + + + Gets the decoded codeword value. + + The decoded codeword value. + Module bit count. + + + + Gets the bit value. + + The bit value. + Module bit count. + + + + Gets the closest decoded value. + + The closest decoded value. + Module bit count. + + + + + + Guenther Grau + + + + Decode the specified image, imageTopLeft, imageBottomLeft, imageTopRight, imageBottomRight, minCodewordWidth + and maxCodewordWidth. + TODO: don't pass in minCodewordWidth and maxCodewordWidth, pass in barcode columns for start and stop pattern + columns. That way width can be deducted from the pattern column. + This approach also allows to detect more details about the barcode, e.g. if a bar type (white or black) is wider + than it should be. This can happen if the scanner used a bad blackpoint. + + Image. + Image top left. + Image bottom left. + Image top right. + Image bottom right. + Minimum codeword width. + Max codeword width. + + + + Merge the specified leftRowIndicatorColumn and rightRowIndicatorColumn. + + Left row indicator column. + Right row indicator column. + + + + Adjusts the bounding box. + + The bounding box. + Row indicator column. + + + + Gets the barcode metadata. + + The barcode metadata. + Left row indicator column. + Right row indicator column. + + + + Gets the row indicator column. + + The row indicator column. + Image. + Bounding box. + Start point. + If set to true left to right. + Minimum codeword width. + Max codeword width. + + + + Adjusts the codeword count. + + Detection result. + Barcode matrix. + + + + Creates the decoder result. + + The decoder result. + Detection result. + + + + This method deals with the fact, that the decoding process doesn't always yield a single most likely value. The + current error correction implementation doesn't deal with erasures very well, so it's better to provide a value + for these ambiguous codewords instead of treating it as an erasure. The problem is that we don't know which of + the ambiguous values to choose. We try decode using the first value, and if that fails, we use another of the + ambiguous values and try to decode again. This usually only happens on very hard to read and decode barcodes, + so decoding the normal barcodes is not affected by this. + + The decoder result from ambiguous values. + Ec level. + Codewords. + contains the indexes of erasures. + array with the indexes that have more than one most likely value. + two dimensional array that contains the ambiguous values. The first dimension must + be the same Length as the ambiguousIndexes array. + + + + Creates the barcode matrix. + + The barcode matrix. + Detection result. + + + + Tests to see if the Barcode Column is Valid + + true, if barcode column is valid, false otherwise. + Detection result. + Barcode column. + + + + Gets the start column. + + The start column. + Detection result. + Barcode column. + Image row. + If set to true left to right. + + + + Detects the codeword. + + The codeword. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + Minimum codeword width. + Max codeword width. + + + + Gets the module bit count. + + The module bit count. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + + + + Gets the number of EC code words. + + The number of EC code words. + Barcode EC level. + + + + Adjusts the codeword start column. + + The codeword start column. + Image. + Minimum column. + Max column. + If set to true left to right. + Codeword start column. + Image row. + + + + Checks the codeword for any skew. + + true, if codeword is within the skew, false otherwise. + Codeword size. + Minimum codeword width. + Max codeword width. + + + + Decodes the codewords. + + The codewords. + Codewords. + Ec level. + Erasures. + + + + Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place. + + The errors. + data and error correction codewords. + positions of any known erasures. + number of error correction codewords that are available in codewords. + + + + Verifies that all is well with the the codeword array. + + Codewords. + Number EC codewords. + + + + Gets the bit count for codeword. + + The bit count for codeword. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Module bit count. + + + + Returns a that represents the jagged array. + + A that represents the jagged array. + Barcode matrix as a jagged array. + + + +

Encapsulates logic that can detect a PDF417 Code in an image, even if the + PDF417 Code is rotated or skewed, or partially obscured.

+ + SITA Lab (kevin.osullivan@sita.aero) + dswitkin@google.com (Daniel Switkin) + Guenther Grau +
+
+ + + B S B S B S B S Bar/Space pattern + 11111111 0 1 0 1 0 1 000. + + + + + 1111111 0 1 000 1 0 1 00 1 + + + + + if we set the value too low, then we don't detect the correct height of the bar if the start patterns are damaged. + if we set the value too high, then we might detect the start pattern from a neighbor barcode. + + + + + A PDF471 barcode should have at least 3 rows, with each row being >= 3 times the module width. Therefore it should be at least + 9 pixels tall. To be conservative, we use about half the size to ensure we don't miss it. + + + + +

Detects a PDF417 Code in an image. Only checks 0 and 180 degree rotations.

+
+ barcode image to decode + optional hints to detector + if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned + + encapsulating results of detecting a PDF417 code + +
+ + + Detects PDF417 codes in an image. Only checks 0 degree rotation (so rotate the matrix and check again outside of this method) + + multiple if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned. + bit matrix to detect barcodes in. + List of ResultPoint arrays containing the coordinates of found barcodes + + + + Locate the vertices and the codewords area of a black blob using the Start and Stop patterns as locators. + + Matrix. + Start row. + Start column. + an array containing the vertices: + vertices[0] x, y top left barcode + vertices[1] x, y bottom left barcode + vertices[2] x, y top right barcode + vertices[3] x, y bottom right barcode + vertices[4] x, y top left codeword area + vertices[5] x, y bottom left codeword area + vertices[6] x, y top right codeword area + vertices[7] x, y bottom right codeword area + + + + + Copies the temp data to the final result + + Result. + Temp result. + Destination indexes. + + + + Finds the rows with the given pattern. + + The rows with pattern. + Matrix. + Height. + Width. + Start row. + Start column. + Pattern. + + + + Finds the guard pattern. Uses System.Linq.Enumerable.Repeat to fill in counters. This might be a performance issue? + + start/end horizontal offset of guard pattern, as an array of two ints. + matrix row of black/white values to search + column x position to start search. + row y position to start search. + width the number of pixels to search on this row. + If set to true search the white patterns first. + pattern of counts of number of black and white pixels that are being searched for as a pattern. + counters array of counters, as long as pattern, to re-use . + + + + Determines how closely a set of observed counts of runs of black/white. + values matches a given target pattern. This is reported as the ratio of + the total variance from the expected pattern proportions across all + pattern elements, to the length of the pattern. + + + ratio of total variance between counters and pattern compared to + total pattern size, where the ratio has been multiplied by 256. + So, 0 means no variance (perfect match); 256 means the total + variance between counters and patterns equals the pattern length, + higher values mean even more variance + + observed counters. + expected pattern. + The most any counter can differ before we give up. + + + + PDF 417 Detector Result class. Skipped private backing stores. + Guenther Grau + + + + + Initializes a new instance of the class. + + Bits. + Points. + + + + defines the level of the error correction / count of error correction codewords + + + + + Holds all of the information for a barcode in a format where it can be easily accessible + + Jacob Haynes + + + + + the height of the matrix (Rows) + the width of the matrix (Cols) + + + + + Jacob Haynes + + + + + Creates a Barcode row of the width + + The width. + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + A boolean which is true if the bar black false if it is white + How many spots wide the bar is. + + + + + This function scales the row + + How much you want the image to be scaled, must be greater than or equal to 1. + the scaled row + + + + + Represents possible PDF417 barcode compaction types. + + + + + + + + + + + + + + + + + + + + + + + + + Data object to specify the minimum and maximum number of rows and columns for a PDF417 barcode. + @author qwandor@google.com (Andrew Walbran) + + + + + Initializes a new instance of the class. + + The min cols. + The max cols. + The min rows. + The max rows. + + + + Gets the min cols. + + + + + Gets the max cols. + + + + + Gets the min rows. + + + + + Gets the max rows. + + + + + Top-level class for the logic part of the PDF417 implementation. + + + + + The start pattern (17 bits) + + + + + The stop pattern (18 bits) + + + + + The codeword table from the Annex A of ISO/IEC 15438:2001(E). + + + + + Calculates the necessary number of rows as described in annex Q of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol (r) + + + + Calculates the number of pad codewords as described in 4.9.2 of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol + the number of pad codewords + + + + Generates the barcode logic. + + the message to encode + PDF417 error correction level to use + + + + Determine optimal nr of columns and rows for the specified number of + codewords. + + number of code words + number of error correction code words + The longest dimension of the barcode, used for columns + The short dimension of the barcode, used for rows + The height of a row, will alter this parameter if aspectRatio>4 (aspectRatio==AUTO) + dimension object containing cols as width and rows as height + + + + Sets max/min row/col values + + maximum allowed columns + minimum allowed columns + maximum allowed rows + minimum allowed rows + + + + Sets compaction to values stored in enum + + compaction mode to use + + + + Sets compact to be true or false + + if true, enables compaction + + + + Sets output encoding. + + sets character encoding to use + + + + Sets the disable eci. + + if set to true don't add an ECI segment for different encodings than default. + + + + PDF417 error correction code following the algorithm described in ISO/IEC 15438:2001(E) in + chapter 4.10. + + + + + Tables of coefficients for calculating error correction words + (see annex F, ISO/IEC 15438:2001(E)) + + + + + Determines the number of error correction codewords for a specified error correction + level. + + the error correction level (0-8) + the number of codewords generated for error correction + + + + Determines the error correction level for AUTO + + The error correction level (0-9) + The number of codewords for AUTO errorCorrectionLevel + the number of codewords generated for error correction + + + + Returns the recommended minimum error correction level as described in annex E of + ISO/IEC 15438:2001(E). + + the number of data codewords + the recommended minimum error correction level + + + + Generates the error correction codewords according to 4.10 in ISO/IEC 15438:2001(E). + + the data codewords + the error correction level (0-8) + the String representing the error correction codewords + + + + defines the level of the error correction / count of error correction codewords + + + + + PDF417 high-level encoder following the algorithm described in ISO/IEC 15438:2001(E) in + annex P. + + + + + code for Text compaction + + + + + code for Byte compaction + + + + + code for Numeric compaction + + + + + Text compaction submode Alpha + + + + + Text compaction submode Lower + + + + + Text compaction submode Mixed + + + + + Text compaction submode Punctuation + + + + + mode latch to Text Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters NOT a multiple of 6) + + + + + mode latch to Numeric Compaction mode + + + + + mode shift to Byte Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters a multiple of 6) + + + + + identifier for a user defined Extended Channel Interpretation (ECI) + + + + + identifier for a general purpose ECO format + + + + + identifier for an ECI of a character set of code page + + + + + Raw code table for text compaction Mixed sub-mode + + + + + Raw code table for text compaction: Punctuation sub-mode + + + + + Performs high-level encoding of a PDF417 message using the algorithm described in annex P + of ISO/IEC 15438:2001(E). If byte compaction has been selected, then only byte compaction + is used. + + the message + compaction mode to use + character encoding used to encode in default or byte compaction + or null for default / not applicable + if true, don't add an ECI segment for different encodings than default + the encoded message (the char values range from 0 to 928) + + + + Encode parts of the message using Text Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.2. + + the message + the start position within the message + the number of characters to encode + receives the encoded codewords + should normally be SUBMODE_ALPHA + the text submode in which this method ends + + + + + Encode parts of the message using Byte Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.3. The Unicode characters will be converted to binary using the cp437 + codepage. + + the message converted to a byte array + the start position within the message + the number of bytes to encode + the mode from which this method starts + receives the encoded codewords + + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using text compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using binary compaction. + + the message + the message converted to a byte array + the start position within the message + + the requested character count + + + + The class holds the available options for the + + + + + Specifies whether to use compact mode for PDF417 (type ). + + + + + Specifies what compaction mode to use for PDF417 (type + ). + + + + + Specifies the minimum and maximum number of rows and columns for PDF417 (type + ). + + + + + Specifies what degree of error correction to use + + + + + Specifies what degree of error correction to use + + + + + Specifies what character encoding to use where applicable (type {@link String}) + + + + + Explicitly disables ECI segment when generating PDF417 Code + That is against the specification but some + readers have problems if the charset is switched from + CP437 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use different encodings + and the ECI segment is omitted. + + + + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Maximum Codewords (Data + Error). + + + + + Gets the bit count sum. + + The bit count sum. + Module bit count. + + + + Converts an ICollection<int> to an int[] + Carry-over from Java. Will likely remove and replace with the Generic .ToArray() method. + + The int array. + List. + + + + Translate the symbol into a codeword + + the codeword corresponding to the symbol. + encoded symbol to translate to a codeword + + + + The sorted table of all possible symbols. Extracted from the PDF417 + specification. The index of a symbol in this table corresponds to the + index into the codeword table. + + + + + This table contains to codewords for all symbols. + + + + + This implementation can detect and decode PDF417 codes in an image. + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Locates and decodes a PDF417 code in an image. + + a String representing the content encoded by the PDF417 code + if a PDF417 cannot be decoded + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + **Note** this will return the FIRST barcode discovered if there are many. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Locates and decodes Multiple PDF417 codes in an image. + + an array of Strings representing the content encoded by the PDF417 codes + + + + + Locates and decodes multiple barcodes in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcodes encode + + + + + Decode the specified image, with the hints and optionally multiple barcodes. + Based on Owen's Comments in , this method has been modified to continue silently + if a barcode was not decoded where it was detected instead of throwing a new exception object. + + Image. + Hints. + If set to true multiple. + + + + Gets the maximum width of the barcode + + The max width. + P1. + P2. + + + + Gets the minimum width of the barcode + + The minimum width. + P1. + P2. + + + + Gets the maximum width of the codeword. + + The max codeword width. + P. + + + + Gets the minimum width of the codeword. + + The minimum codeword width. + P. + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + PDF 417 result meta data. + Guenther Grau + + + + + The Segment ID represents the segment of the whole file distributed over different symbols. + + + + + Is the same for each related PDF417 symbol + + + + + always null + + + + + true if it is the last segment + + + + + count of segments, -1 if not set + + + + + Filename of the encoded file + + + + + filesize in bytes of the encoded file + returns filesize in bytes, -1 if not set + + + + + 16-bit CRC checksum using CCITT-16 + returns crc checksum, -1 if not set + + + + + unix epock timestamp, elapsed seconds since 1970-01-01 + returns elapsed seconds, -1 if not set + + + + + Jacob Haynes + qwandor@google.com (Andrew Walbran) + + + + + default white space (margin) around the code + + + + + default error correction level + + + + + default aspect ratio + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The height of a row in the barcode + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Takes encoder, accounts for width/height, and retrieves bit matrix + + + + + This takes an array holding the values of the PDF 417 + + a byte array of information with 0 is black, and 1 is white + border around the barcode + BitMatrix of the input + + + + Takes and rotates the it 90 degrees + + + + + This object extends LuminanceSource around an array of YUV data returned from the camera driver, + with the option to crop to a rectangle within the full data. This can be used to exclude + superfluous pixels around the perimeter and speed up decoding. + It works for any pixel format where the Y channel is planar and appears first, including + YCbCr_420_SP and YCbCr_422_SP. + @author dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The yuv data. + Width of the data. + Height of the data. + The left. + The top. + The width. + The height. + if set to true [reverse horiz]. + + + + Initializes a new instance of the class. + + The luminances. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + + + + + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Renders the cropped greyscale bitmap. + + + + + + width of image from {@link #renderThumbnail()} + + + + + height of image from {@link #renderThumbnail()} + + + + + creates a new instance + + + + + + + + Sean Owen + + + {@link BitMatrix} to parse + ReaderException if dimension is not >= 21 and 1 mod 4 + + +

Reads format information from one of its two locations within the QR Code.

+ +
+ {@link FormatInformation} encapsulating the QR Code's format info + + ReaderException if both format information locations cannot be parsed as + the valid encoding of format information + +
+ +

Reads version information from one of its two locations within the QR Code.

+ +
+ {@link Version} encapsulating the QR Code's version + + ReaderException if both version information locations cannot be parsed as + the valid encoding of version information + +
+ +

Reads the bits in the {@link BitMatrix} representing the finder pattern in the + correct order in order to reconstruct the codewords bytes contained within the + QR Code.

+ +
+ bytes encoded within the QR Code + + ReaderException if the exact number of bytes expected is not read +
+ + Revert the mask removal done while reading the code words. The bit matrix should revert to its original state. + + + Prepare the parser for a mirrored operation. + This flag has effect only on the {@link #readFormatInformation()} and the + {@link #readVersion()}. Before proceeding with {@link #readCodewords()} the + {@link #mirror()} method should be called. + + @param mirror Whether to read version and format information mirrored. + + + Mirror the bit matrix in order to attempt a second reading. + + +

Encapsulates a block of data within a QR Code. QR Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

When QR Codes use multiple data blocks, they are actually interleaved. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ +
+ bytes as read directly from the QR Code + + version of the QR Code + + error-correction level of the QR Code + + {@link DataBlock}s containing original bytes, "de-interleaved" from representation in the + QR Code + +
+ +

Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations + of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix, + including areas used for finder patterns, timing patterns, etc. These areas should be unused + after the point they are unmasked anyway.

+ +

Note that the diagram in section 6.8.1 is misleading since it indicates that i is column position + and j is row position. In fact, as the text says, i is row position and j is column position.

+ +
+ Sean Owen +
+ + See ISO 18004:2006 6.8.1 + + +

Implementations of this method reverse the data masking process applied to a QR Code and + make its bits ready to read.

+
+ + representation of QR Code bits + dimension of QR Code, represented by bits, being unmasked +
+ +

QR Codes can encode text as bits in one of several modes, and can use multiple modes + in one QR Code. This class decodes the bits back into text.

+ +

See ISO 18004:2006, 6.4.3 - 6.4.7

+ Sean Owen +
+
+ + + See ISO 18004:2006, 6.4.4 Table 5 + + + + + See specification GBT 18284-2000 + + The bits. + The result. + The count. + + + + +

The main class which implements QR Code decoding -- as opposed to locating and extracting + the QR Code from an image.

+
+ + Sean Owen + +
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a QR Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Decodes a QR Code represented as a {@link BitMatrix}. A 1 or "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+
+ data and error correction codewords + number of codewords that are data bytes + +
+ + +

See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels + defined by the QR code standard.

+
+ Sean Owen +
+ + L = ~7% correction + + + M = ~15% correction + + + Q = ~25% correction + + + H = ~30% correction + + + + Gets the bits. + + + + + Gets the name. + + + + + Ordinals this instance. + + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Fors the bits. + + int containing the two bits encoding a QR Code's error correction level + + representing the encoded error correction level + + + +

Encapsulates a QR Code's format information, including the data mask used and + error correction level.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + +
+ + See ISO 18004:2006, Annex C, Table C.1 + + + Offset i holds the number of 1 bits in the binary representation of i + + + + Decodes the format information. + + format info indicator, with mask still applied + The masked format info2. + + information about the format it specifies, or null + if doesn't seem to match any known pattern + + + + +

See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which + data can be encoded to bits in the QR code standard.

+
+ Sean Owen +
+ + + Gets the name. + + + + + enumeration for encoding modes + + + + + + + + + + numeric encoding + + + + + alpha-numeric encoding + + + + + structured append + + + + + byte mode encoding + + + + + ECI segment + + + + + Kanji mode + + + + + FNC1 char, first position + + + + + FNC1 char, second position + + + + + Hanzi mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See GBT 18284-2000; "Hanzi" is a transliteration of this mode name. + + + + Fors the bits. + + four bits encoding a QR Code data mode + + encoded by these bits + + if bits do not correspond to a known mode + + + version in question + + number of bits used, in this QR Code symbol {@link Version}, to encode the + count of characters that will follow encoded in this {@link Mode} + + + + + Gets the bits. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Meta-data container for QR Code decoding. Instances of this class may be used to convey information back to the + decoding caller. Callers are expected to process this. + + + + + Initializes a new instance of the class. + + if set to true [mirrored]. + + + + true if the QR Code was mirrored. + + + + + Apply the result points' order correction due to mirroring. + + Array of points to apply mirror correction to. + + + + See ISO 18004:2006 Annex D + + Sean Owen + + + See ISO 18004:2006 Annex D. + Element i represents the raw version bits that specify version i + 7 + + + + + Gets the version number. + + + + + Gets the alignment pattern centers. + + + + + Gets the total codewords. + + + + + Gets the dimension for version. + + + + + Gets the EC blocks for level. + + The ec level. + + + +

Deduces version information purely from QR Code dimensions.

+ +
+ dimension in modules + + for a QR Code of that dimension or null +
+ + + Gets the version for number. + + The version number. + + + + See ISO 18004:2006 Annex E + + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + + Gets the EC codewords per block. + + + + + Gets the num blocks. + + + + + Gets the total EC codewords. + + + + + Gets the EC blocks. + + + + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the QR code version's format.

+
+
+ + + Gets the count. + + + + + Gets the data codewords. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + See ISO 18004:2006 6.5.1 Table 9 + + +

Encapsulates an alignment pattern, which are the smaller square patterns found in + all but the simplest QR Codes.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Determines if this alignment pattern "about equals" an alignment pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing an average of the two. + + The i. + The j. + New size of the module. + + + +

This class attempts to find alignment patterns in a QR Code. Alignment patterns look like finder + patterns but are smaller and appear at regular intervals throughout the image.

+ +

At the moment this only looks for the bottom-right alignment pattern.

+ +

This is mostly a simplified copy of {@link FinderPatternFinder}. It is copied, + pasted and stripped down here for maximum performance but does unfortunately duplicate + some code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Creates a finder that will look in a portion of the whole image.

+ +
+ image to search + + left column from which to start searching + + top row from which to start searching + + width of region to search + + height of region to search + + estimated module size so far + + callback function which is called, when a result point is found +
+ +

This method attempts to find the bottom-right alignment pattern in the image. It is a bit messy since + it's pretty performance-critical and so is written to be fast foremost.

+ +
+ if found +
+ + Given a count of black/white/black pixels just seen and an end position, + figures the location of the center of this black/white/black run. + + + + count of black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/1 ratios + used by alignment patterns to be considered a match + + + + +

After a horizontal scan finds a potential alignment pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + alignment pattern to see if the same proportion is detected.

+
+ row where an alignment pattern was detected + center of the section that appears to cross an alignment pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of alignment pattern, or null if not found + +
+ +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will see if this pattern had been + found on a previous horizontal scan. If so, we consider it confirmed and conclude we have + found the alignment pattern.

+ +
+ reading state module counts from horizontal scan + + row where alignment pattern may be found + + end of possible alignment pattern in row + + {@link AlignmentPattern} if we have found the same pattern twice, or null if not + +
+ + +

Encapsulates logic that can detect a QR Code in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + + Gets the image. + + + + + Gets the result point callback. + + + + +

Detects a QR Code in an image.

+
+ + encapsulating results of detecting a QR Code + +
+ + +

Detects a QR Code in an image.

+
+ optional hints to detector + + encapsulating results of detecting a QR Code + +
+ + + Processes the finder pattern info. + + The info. + + + +

Computes the dimension (number of modules on a size) of the QR Code based on the position + of the finder patterns and estimated module size.

+
+
+ + +

Computes an average estimated module size based on estimated derived from the positions + of the three finder patterns.

+
+ detected top-left finder pattern center + detected top-right finder pattern center + detected bottom-left finder pattern center + estimated module size +
+ +

Estimates module size based on two finder patterns -- it uses + {@link #sizeOfBlackWhiteBlackRunBothWays(int, int, int, int)} to figure the + width of each, measuring along the axis between their centers.

+
+
+ + See {@link #sizeOfBlackWhiteBlackRun(int, int, int, int)}; computes the total width of + a finder pattern by looking for a black-white-black run from the center in the direction + of another point (another finder pattern center), and in the opposite direction too. + + + +

This method traces a line from a point in the image, in the direction towards another point. + It begins in a black region, and keeps going until it finds white, then black, then white again. + It reports the distance from the start to this point.

+ +

This is used when figuring out how wide a finder pattern is, when the finder pattern + may be skewed or rotated.

+
+
+ + +

Attempts to locate an alignment pattern in a limited region of the image, which is + guessed to contain it. This method uses {@link AlignmentPattern}.

+
+ estimated module size so far + x coordinate of center of area probably containing alignment pattern + y coordinate of above + number of pixels in all directions to search from the center + + if found, or null otherwise + +
+ + +

Encapsulates a finder pattern, which are the three square patterns found in + the corners of QR Codes. It also encapsulates a count of similar finder patterns, + as a convenience to the finder's bookkeeping.

+
+ Sean Owen +
+ + + Gets the size of the estimated module. + + + The size of the estimated module. + + + +

Determines if this finder pattern "about equals" a finder pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing a weighted average + based on count. + + The i. + The j. + New size of the module. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+
+ Sean Owen +
+ + + 1 pixel/module times 3 modules/center + + + + + support up to version 20 for mobile clients + + + + +

Creates a finder that will search the image for three finder patterns.

+
+ image to search +
+ + + Initializes a new instance of the class. + + The image. + The result point callback. + + + + Gets the image. + + + + + Gets the possible centers. + + + + Given a count of black/white/black/white/black pixels just seen and an end position, + figures the location of the center of this run. + + + + count of black/white/black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/3/1/1 ratios + used by finder patterns to be considered a match + + + + + + count of black/white/black/white/black pixels just read + true if the proportions of the counts is close enough to the 1/1/3/1/1 ratios + by finder patterns to be considered a match + + + + After a vertical and horizontal scan finds a potential finder pattern, this method + "cross-cross-cross-checks" by scanning down diagonally through the center of the possible + finder pattern to see if the same proportion is detected. + @param maxCount maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + @param originalStateCountTotal The original state count total. + + row where a finder pattern was detected + center of the section that appears to cross a finder pattern + true if proportions are withing expected limits + + + +

After a horizontal scan finds a potential finder pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + finder pattern to see if the same proportion is detected.

+
+ row where a finder pattern was detected + center of the section that appears to cross a finder pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of finder pattern, or null if not found + +
+ +

Like {@link #crossCheckVertical(int, int, int, int)}, and in fact is basically identical, + except it reads horizontally instead of vertically. This is used to cross-cross + check a vertical cross check and locate the real center of the alignment pattern.

+
+
+ + + @see #handlePossibleCenter(int[], int, int) + + reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + ignored + true if a finder pattern candidate was found this time + + + +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will, ah, cross-cross-check + with another horizontal scan. This is needed primarily to locate the real horizontal + center of the pattern in cases of extreme skew. + And then we cross-cross-cross check with another diagonal scan.

+ If that succeeds the finder pattern location is added to a list that tracks + the number of times each location has been nearly-matched as a finder pattern. + Each additional find is more evidence that the location is in fact a finder + pattern center +
+ reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + + true if a finder pattern candidate was found this time + +
+ + number of rows we could safely skip during scanning, based on the first + two finder patterns that have been located. In some cases their position will + allow us to infer that the third pattern must lie below a certain point farther + down in the image. + + + + true iff we have found at least 3 finder patterns that have been detected + at least {@link #CENTER_QUORUM} times each, and, the estimated module size of the + candidates is "pretty similar" + + + + the 3 best {@link FinderPattern}s from our list of candidates. The "best" are + those that have been detected at least {@link #CENTER_QUORUM} times, and whose module + size differs from the average among those patterns the least + + + + + Orders by furthest from average + + + +

Orders by {@link FinderPattern#getCount()}, descending.

+
+ + +

Encapsulates information about finder patterns in an image, including the location of + the three finder patterns, and their estimated module size.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The pattern centers. + + + + Gets the bottom left. + + + + + Gets the top left. + + + + + Gets the top right. + + + + + JAVAPORT: The original code was a 2D array of ints, but since it only ever gets assigned + 0, 1 and 2 I'm going to use less memory and go with bytes. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Gets the height. + + + + + Gets the width. + + + + + Gets or sets the with the specified x. + + + + + an internal representation as bytes, in row-major order. array[y][x] represents point (x,y) + + + + + Sets the specified x. + + The x. + The y. + The value. + + + + Sets the specified x. + + The x. + The y. + if set to true [value]. + + + + Clears the specified value. + + The value. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + Encode "bytes" with the error correction level "ecLevel". The encoding mode will be chosen + internally by chooseMode(). On success, store the result in "qrCode". + We recommend you to use QRCode.EC_LEVEL_L (the lowest level) for + "getECLevel" since our primary use is to show QR code on desktop screens. We don't need very + strong error correction for this purpose. + Note that there is no way to encode bytes in MODE_KANJI. We might want to add EncodeWithMode() + with which clients can specify the encoding mode. For now, we don't need the functionality. + + text to encode + error correction level to use + representing the encoded QR code + + + + Encodes the specified content. + + The content. + The ec level. + The hints. + + + + + Decides the smallest version of QR code that will contain all of the provided data. + + if the data cannot fit in any version + + + + Gets the alphanumeric code. + + The code. + the code point of the table used in alphanumeric mode or + -1 if there is no corresponding code in the table. + + + + Chooses the mode. + + The content. + + + + + Choose the best mode by examining the content. Note that 'encoding' is used as a hint; + if it is Shift_JIS, and the input is only double-byte Kanji, then we return {@link Mode#KANJI}. + + The content. + The encoding. + + + + + true if the number of input bits will fit in a code with the specified version and error correction level. + + + + Terminate bits as described in 8.4.8 and 8.4.9 of JISX0510:2004 (p.24). + + The num data bytes. + The bits. + + + + Get number of data bytes and number of error correction bytes for block id "blockID". Store + the result in "numDataBytesInBlock", and "numECBytesInBlock". See table 12 in 8.5.1 of + JISX0510:2004 (p.30) + + The num total bytes. + The num data bytes. + The num RS blocks. + The block ID. + The num data bytes in block. + The num EC bytes in block. + + + + Interleave "bits" with corresponding error correction bytes. On success, store the result in + "result". The interleave rule is complicated. See 8.6 of JISX0510:2004 (p.37) for details. + + The bits. + The num total bytes. + The num data bytes. + The num RS blocks. + + + + + Append mode info. On success, store the result in "bits". + + The mode. + The bits. + + + + Append length info. On success, store the result in "bits". + + The num letters. + The version. + The mode. + The bits. + + + + Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits". + + The content. + The mode. + The bits. + The encoding. + + + + + + Satoru Takabayashi + Daniel Switkin + Sean Owen + + + + Apply mask penalty rule 1 and return the penalty. Find repetitive cells with the same color and + give penalty to them. Example: 00000 or 11111. + + The matrix. + + + + + Apply mask penalty rule 2 and return the penalty. Find 2x2 blocks with the same color and give + penalty to them. This is actually equivalent to the spec's rule, which is to find MxN blocks and give a + penalty proportional to (M-1)x(N-1), because this is the number of 2x2 blocks inside such a block. + + The matrix. + + + + + Apply mask penalty rule 3 and return the penalty. Find consecutive cells of 00001011101 or + 10111010000, and give penalty to them. If we find patterns like 000010111010000, we give + penalties twice (i.e. 40 * 2). + + The matrix. + + + + + Apply mask penalty rule 4 and return the penalty. Calculate the ratio of dark cells and give + penalty if the ratio is far from 50%. It gives 10 penalty for 5% distance. + + The matrix. + + + + + Return the mask bit for "getMaskPattern" at "x" and "y". See 8.8 of JISX0510:2004 for mask + pattern conditions. + + The mask pattern. + The x. + The y. + + + + + Helper function for applyMaskPenaltyRule1. We need this for doing this calculation in both + vertical and horizontal orders respectively. + + The matrix. + if set to true [is horizontal]. + + + + + + + + satorux@google.com (Satoru Takabayashi) - creator + + + + + Set all cells to 2. 2 means that the cell is empty (not set yet). + + JAVAPORT: We shouldn't need to do this at all. The code should be rewritten to begin encoding + with the ByteMatrix initialized all to zero. + + The matrix. + + + + Build 2D matrix of QR Code from "dataBits" with "ecLevel", "version" and "getMaskPattern". On + success, store the result in "matrix" and return true. + + The data bits. + The ec level. + The version. + The mask pattern. + The matrix. + + + + Embed basic patterns. On success, modify the matrix and return true. + The basic patterns are: + - Position detection patterns + - Timing patterns + - Dark dot at the left bottom corner + - Position adjustment patterns, if need be + + The version. + The matrix. + + + + Embed type information. On success, modify the matrix. + + The ec level. + The mask pattern. + The matrix. + + + + Embed version information if need be. On success, modify the matrix and return true. + See 8.10 of JISX0510:2004 (p.47) for how to embed version information. + + The version. + The matrix. + + + + Embed "dataBits" using "getMaskPattern". On success, modify the matrix and return true. + For debugging purposes, it skips masking process if "getMaskPattern" is -1. + See 8.7 of JISX0510:2004 (p.38) for how to embed data bits. + + The data bits. + The mask pattern. + The matrix. + + + + Return the position of the most significant bit set (to one) in the "value". The most + significant bit is position 32. If there is no bit set, return 0. Examples: + - findMSBSet(0) => 0 + - findMSBSet(1) => 1 + - findMSBSet(255) => 8 + + The value_ renamed. + + + + + Calculate BCH (Bose-Chaudhuri-Hocquenghem) code for "value" using polynomial "poly". The BCH + code is used for encoding type information and version information. + Example: Calculation of version information of 7. + f(x) is created from 7. + - 7 = 000111 in 6 bits + - f(x) = x^2 + x^2 + x^1 + g(x) is given by the standard (p. 67) + - g(x) = x^12 + x^11 + x^10 + x^9 + x^8 + x^5 + x^2 + 1 + Multiply f(x) by x^(18 - 6) + - f'(x) = f(x) * x^(18 - 6) + - f'(x) = x^14 + x^13 + x^12 + Calculate the remainder of f'(x) / g(x) + x^2 + __________________________________________________ + g(x) )x^14 + x^13 + x^12 + x^14 + x^13 + x^12 + x^11 + x^10 + x^7 + x^4 + x^2 + -------------------------------------------------- + x^11 + x^10 + x^7 + x^4 + x^2 + + The remainder is x^11 + x^10 + x^7 + x^4 + x^2 + Encode it in binary: 110010010100 + The return value is 0xc94 (1100 1001 0100) + + Since all coefficients in the polynomials are 1 or 0, we can do the calculation by bit + operations. We don't care if coefficients are positive or negative. + + The value. + The poly. + + + + + Make bit vector of type information. On success, store the result in "bits" and return true. + Encode error correction level and mask pattern. See 8.9 of + JISX0510:2004 (p.45) for details. + + The ec level. + The mask pattern. + The bits. + + + + Make bit vector of version information. On success, store the result in "bits" and return true. + See 8.10 of JISX0510:2004 (p.45) for details. + + The version. + The bits. + + + + Check if "value" is empty. + + The value. + + true if the specified value is empty; otherwise, false. + + + + + Embed the lonely dark dot at left bottom corner. JISX0510:2004 (p.46) + + The matrix. + + + + + + The x start. + The y start. + The matrix. + + + + Embed position detection patterns and surrounding vertical/horizontal separators. + + The matrix. + + + + Embed position adjustment patterns if need be. + + The version. + The matrix. + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + + + + + + Initializes a new instance of the class. + + + + + Gets or sets the mode. + + + The mode. + + + + + Gets or sets the EC level. + + + The EC level. + + + + + Gets or sets the version. + + + The version. + + + + + Gets or sets the mask pattern. + + + The mask pattern. + + + + + Gets or sets the matrix. + + + The matrix. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Check if "mask_pattern" is valid. + + The mask pattern. + + true if [is valid mask pattern] [the specified mask pattern]; otherwise, false. + + + + + The class holds the available options for the QrCodeWriter + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + . + + + + + Specifies what character encoding to use where applicable (type ) + + + + + Explicitly disables ECI segment when generating QR Code + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + + + + + Specifies the exact version of QR code to be encoded. An integer, range 1 to 40. If the data specified + cannot fit within the required version, a WriterException will be thrown. + + + + + This implementation can detect and decode QR Codes in an image. + Sean Owen + + + + + Gets the decoder. + + + + + + Locates and decodes a QR code in an image. + + a String representing the content encoded by the QR code + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a QR Code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Implementations of this interface can decode an image of a barcode in some format into + the String it encodes. For example, can + decode a QR code. The decoder may optionally receive hints from the caller which may help + it decode more quickly or accurately. + + See , which attempts to determine what barcode + format is present within the image as well, and then decodes it accordingly. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + String which the barcode encodes + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + The general exception class throw when something goes wrong during decoding of a barcode. + This includes, but is not limited to, failing checksums / error correction algorithms, being + unable to locate finder timing patterns, and so on. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class. + + The inner exception. + + + + Initializes a new instance of the class. + + The inner exception. + + + + + Interface for a class to convert a BitMatrix to an output image format + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + The options. + + + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + + + the generated code as byte array of BGRA pixels + + + + + the width of the image + + + + + the height of the image + + + + + converts the pixel data to a bitmap object + + + + + + Renders a to an byte array with pixel data (4 byte per pixel, BGRA) + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Renders a barcode into a Svg image + + + + + Gets or sets the foreground color. + + The foreground color. + + + + Gets or sets the background color. + + The background color. + + + + Gets or sets the font family name + + The font family name. + + + + Gets or sets the font size in pixel + + The font size in pixel. + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Represents a barcode as a Svg image + + + + + Gets or sets the content. + + + The content. + + + + + The original height of the bitmatrix for the barcode + + + + + The original width of the bitmatrix for the barcode + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The content. + + + + Gives the XML representation of the SVG image + + + + + Renders a to a image + + + + + Gets or sets the foreground color. + + The foreground color. + + + + Gets or sets the background color. + + The background color. + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Encapsulates the result of decoding a barcode within an image. + + + + raw text encoded by the barcode, if applicable, otherwise null + + + raw bytes encoded by the barcode, if applicable, otherwise null + + + + points related to the barcode in the image. These are typically points + identifying finder patterns or the corners of the barcode. The exact meaning is + specific to the type of barcode that was decoded. + + + + {@link BarcodeFormat} representing the format of the barcode that was decoded + + + + {@link Hashtable} mapping {@link ResultMetadataType} keys to values. May be + null. This contains optional metadata about what was detected about the barcode, + like orientation. + + + + + Gets the timestamp. + + + + + how many bits of are valid; typically 8 times its length + + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + The timestamp. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + The timestamp. + + + + Adds one metadata to the result + + The type. + The value. + + + + Adds a list of metadata to the result + + The metadata. + + + + Adds the result points. + + The new points. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Represents some type of metadata about the result of the decoding that the decoder + wishes to communicate back to the caller. + + Sean Owen + + + + Unspecified, application-specific metadata. Maps to an unspecified {@link Object}. + + + + + Denotes the likely approximate orientation of the barcode in the image. This value + is given as degrees rotated clockwise from the normal, upright orientation. + For example a 1D barcode which was found by reading top-to-bottom would be + said to have orientation "90". This key maps to an {@link Integer} whose + value is in the range [0,360). + + + + +

2D barcode formats typically encode text, but allow for a sort of 'byte mode' + which is sometimes used to encode binary data. While {@link Result} makes available + the complete raw bytes in the barcode for these formats, it does not offer the bytes + from the byte segments alone.

+

This maps to a {@link java.util.List} of byte arrays corresponding to the + raw bytes in the byte segments in the barcode, in order.

+
+
+ + + Error correction level used, if applicable. The value type depends on the + format, but is typically a String. + + + + + For some periodicals, indicates the issue number as an {@link Integer}. + + + + + For some products, indicates the suggested retail price in the barcode as a + formatted {@link String}. + + + + + For some products, the possible country of manufacture as a {@link String} denoting the + ISO country code. Some map to multiple possible countries, like "US/CA". + + + + + For some products, the extension text + + + + + If the code format supports structured append and + the current scanned code is part of one then the + sequence number is given with it. + + + + + If the code format supports structured append and + the current scanned code is part of one then the + parity is given with it. + + + + + PDF417-specific metadata + + + + + Aztec-specific metadata + + + + + Encapsulates a point of interest in an image containing a barcode. Typically, this + would be the location of a finder pattern or the corner of the barcode, for example. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The x. + The y. + + + + Gets the X. + + + + + Gets the Y. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC and + BC is less than AC and the angle between BC and BA is less than 180 degrees. + + array of three to order + + + + calculates the distance between two points + + first pattern + second pattern + + distance between two points + + + + + Returns the z component of the cross product between vectors BC and BA. + + + + Callback which is invoked when a possible result point (significant + point in the barcode image such as a corner) is found. + + + + + + + + Luminance source class which support different formats of images. + + + + + enumeration of supported bitmap format which the RGBLuminanceSource can process + + + + + format of the byte[] isn't known. RGBLuminanceSource tries to determine the best possible value + + + + + grayscale array, the byte array is a luminance array with 1 byte per pixel + + + + + grayscale array, the byte array is a luminance array with 2 bytes per pixel + + + + + 3 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels alpha, red, green and blue + + + + + 3 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green, red and alpha + + + + + 2 bytes per pixel, 5 bit red, 6 bits green and 5 bits blue + + + + + 4 bytes per pixel with the channels red, green, blue and alpha + + + + + 4 bytes for two pixels, UYVY formatted + + + + + 4 bytes for two pixels, YUYV formatted + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 1 byte per pixel (Gray8). + That means the whole array consists of the luminance values (grayscale). + + The luminance array. + The width. + The height. + if set to true [is8 bit]. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + The bitmap format. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + calculates the luminance values for the given byte array and bitmap format + + + + + + + Contains conversion support elements such as classes, interfaces and static methods. + + + + + Copies an array of chars obtained from a String into a specified array of chars + + The String to get the chars from + Position of the String to start getting the chars + Position of the String to end getting the chars + Array to return the chars + Position of the destination array of chars to start storing the chars + An array of chars + + + + Sets the capacity for the specified List + + The List which capacity will be set + The new capacity value + + + + Converts a string-Collection to an array + + The strings. + + + + + Joins all elements to one string. + + + The separator. + The values. + + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The value. + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The start index. + The end index. + The value. + + + + + + + + + + + + + + + + + + Savely gets the value of a decoding hint + if hints is null the default is returned + + + The hints. + Type of the hint. + The @default. + + + + The base class for all objects which encode/generate a barcode image. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + A base class which covers the range of exceptions which may occur when encoding a barcode using + the Writer framework. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner exc. + + + + A class which calculates the luminance values of an android bitmap object + + + + + Initializes a new instance of the class. + + The bitmap. + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + Integer inefficiently represented internally using base-10 digits, in order to allow a + visual representation as a base-10 string. Only for internal use. + + + + + 10 numeration base for string representation, very inefficient for computations. + + + + + Maximum size for numbers is up to 10240 binary digits or approximately (safe to use) 3000 decimal digits. + The maximum size is, in fact, double the previously specified amount, in order to accommodate operations' + overflow. + + + + Integer constants + + + + The array of digits of the number. + + + + + The actual number of digits of the number. + + + + + The number sign. + + + + + Sets the number sign. + + + + + Default constructor, intializing the Base10BigInteger with zero. + + + + + Constructor creating a new Base10BigInteger as a conversion of a regular base-10 long. + + The base-10 long to be converted + + + + Constructor creating a new Base10BigInteger as a copy of an existing Base10BigInteger. + + The Base10BigInteger to be copied + + + + Determines whether the specified Base10BigInteger is equal to the current Base10BigInteger. + + The Base10BigInteger to compare with the current Base10BigInteger + True if the specified Base10BigInteger is equal to the current Base10BigInteger, + false otherwise + + + + Determines whether the specified System.Object is equal to the current Base10BigInteger. + + The System.Object to compare with the current Base10BigInteger + True if the specified System.Object is equal to the current Base10BigInteger, + false otherwise + + + + Serves as a hash function for the Base10BigInteger type. + + A hash code for the current Base10BigInteger + + + + String representation of the current Base10BigInteger, converted to its base-10 representation. + + The string representation of the current Base10BigInteger + + + + Base10BigInteger inverse with respect to addition. + + The Base10BigInteger whose opposite is to be computed + The Base10BigInteger inverse with respect to addition + + + + Greater test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a > b, false otherwise + + + + Greater or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a >= b, false otherwise + + + + Smaller test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a < b, false otherwise + + + + Smaller or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a <= b, false otherwise + + + + Computes the absolute value of a Base10BigInteger. + + The Base10BigInteger whose absolute value is to be computed + The absolute value of the given BigInteger + + + + Addition operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the addition + + + + Subtraction operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the subtraction + + + + Multiplication operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the multiplication + + + + Implicit conversion operator from long to Base10BigInteger. + + The long to be converted to a Base10BigInteger + The Base10BigInteger converted from the given long + + + + Equality test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a == b, false otherwise + + + + Inequality test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a != b, false otherwise + + + + Greater test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a > b, false otherwise + + + + Smaller test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a < b, false otherwise + + + + Greater or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a >= b, false otherwise + + + + Smaller or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a <= b, false otherwise + + + + Base10BigInteger inverse with respect to addition. + + The Base10BigInteger whose opposite is to be computed + The Base10BigInteger inverse with respect to addition + + + + Addition operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the addition + + + + Subtraction operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the subtraction + + + + Multiplication operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the multiplication + + + + Incremetation by one operation of a Base10BigInteger. + + The Base10BigInteger to be incremented by one + The Base10BigInteger result of incrementing by one + + + + Decremetation by one operation of a Base10BigInteger. + + The Base10BigInteger to be decremented by one + The Base10BigInteger result of decrementing by one + + + + Adds two BigNumbers a and b, where a >= b, a, b non-negative. + + + + + Subtracts the Base10BigInteger b from the Base10BigInteger a, where a >= b, a, b non-negative. + + + + + Multiplies two Base10BigIntegers. + + + + + .NET 2.0 class for handling of very large integers, up to 10240 binary digits or + approximately (safe to use) 3000 decimal digits. + + + + + 2^16 numeration base for internal computations, in order to benefit the most from the + 32 bit (or 64 bit) integer processor registers. + + + + + Maximum size for numbers is up to 10240 binary digits or approximately (safe to use) 3000 decimal digits. + The maximum size is, in fact, double the previously specified amount, in order to accommodate operations's + overflow. + + + + + Ratio for the convertion of a BigInteger's size to a binary digits size. + + + + Integer constants + + + + The array of digits of the number. + + + + + The actual number of digits of the number. + + + + + The number sign. + + + + + Default constructor, intializing the BigInteger with zero. + + + + + Constructor creating a new BigInteger as a conversion of a regular base-10 long. + + The base-10 long to be converted + + + + Constructor creating a new BigInteger as a copy of an existing BigInteger. + + The BigInteger to be copied + + + + Constructor creating a BigInteger instance out of a base-10 formatted string. + + The base-10 formatted string. + Invalid numeric string exception + + + + Constructor creating a positive BigInteger by extracting it's digits from a given byte array. + + The byte array + The byte array's content exceeds the maximum size of a BigInteger + exception + + + + Constructor deserializing a BigInteger. + + + + + Determines whether the specified BigInteger is equal to the current BigInteger. + + The BigInteger to compare with the current BigInteger + True if the specified BigInteger is equal to the current BigInteger, + false otherwise + + + + Determines whether the specified System.Object is equal to the current BigInteger. + + The System.Object to compare with the current BigInteger + True if the specified System.Object is equal to the current BigInteger, + false otherwise + + + + Serves as a hash function for the BigInteger type. + + A hash code for the current BigInteger + + + + String representation of the current BigInteger, converted to its base-10 representation. + + The string representation of the current BigInteger + + + + Parses the number given by a string + + the number as a string + + + + + Compares this instance to a specified BigInteger. + + The BigInteger to compare this instance with + -1 if the current instance is smaller than the given BigInteger, + 0 if the two are equal, 1 otherwise + + + + Compares this instance to a specified object. + + The object to compare this instance with + -1 if the current instance is smaller than the given object, + 0 if the two are equal, 1 otherwise + obj is not a BigInteger exception + + + + Returns a BigInteger's size in binary digits. + + The BigInteger whose size in binary digits is to be determined + The BigInteger's size in binary digits + + + + BigInteger inverse with respect to addition. + + The BigInteger whose opposite is to be computed + The BigInteger inverse with respect to addition + + + + Greater test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a > b, false otherwise + + + + Greater or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a >= b, false otherwise + + + + Smaller test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a < b, false otherwise + + + + Smaller or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a <= b, false otherwise + + + + Computes the absolute value of a BigInteger. + + The BigInteger whose absolute value is to be computed + The absolute value of the given BigInteger + + + + Addition operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the addition + + + + Subtraction operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the subtraction + + + + Multiplication operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the multiplication + + + + Division operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the division + Cannot divide by zero exception + + + + Modulo operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the modulo + Cannot divide by zero exception + + + + Returns the power of a BigInteger base to a non-negative exponent by using the + fast exponentiation algorithm (right to left binary exponentiation). + + The BigInteger base + The non-negative exponent + The power of the BigInteger base to the non-negative exponent + Cannot raise a BigInteger to a negative power exception. + + + + Integer square root of the given BigInteger using Newton's numeric method. + + The BigInteger whose integer square root is to be computed + The integer square root of the given BigInteger + Cannot compute the integer square root of a negative number exception + + + + Euclidean algorithm for computing the greatest common divisor of two non-negative BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The greatest common divisor of the two given BigIntegers + Cannot compute the Gcd of negative BigIntegers exception + + + + Extended Euclidian Gcd algorithm, returning the greatest common divisor of two non-negative BigIntegers, + while also providing u and v, where: a*u + b*v = gcd(a,b). + + The 1st BigInteger + The 2nd BigInteger + Output BigInteger parameter, where a*u + b*v = gcd(a,b) + Output BigInteger parameter, where a*u + b*v = gcd(a,b) + The greatest common divisor of the two given BigIntegers + Cannot compute the Gcd of negative BigIntegers exception + + + + Computes the modular inverse of a given BigInteger. + + The non-zero BigInteger whose inverse is to be computed + The BigInteger modulus, which must be greater than or equal to 2 + The BigInteger equal to a^(-1) mod n + Invalid number or modulus exception + + + + Returns the power of a BigInteger to a non-negative exponent modulo n, by using the + fast exponentiation algorithm (right to left binary exponentiation) and modulo optimizations. + + The BigInteger base + The non-negative exponent + The modulus, which must be greater than or equal to 2 + The power of the BigInteger to the non-negative exponent + Invalid exponent or modulus exception + + + + Implicit conversion operator from long to BigInteger. + + The long to be converted to a BigInteger + The BigInteger converted from the given long + + + + Implicit conversion operator from int to BigInteger. + + The int to be converted to a BigInteger + The BigInteger converted from the given int + + + + Equality test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a == b, false otherwise + + + + Inequality test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a != b, false otherwise + + + + Greater test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a > b, false otherwise + + + + Smaller test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a < b, false otherwise + + + + Greater or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a >= b, false otherwise + + + + Smaller or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a <= b, false otherwise + + + + BigInteger inverse with respect to addition. + + The BigInteger whose opposite is to be computed + The BigInteger inverse with respect to addition + + + + Addition operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the addition + + + + Subtraction operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the subtraction + + + + Multiplication operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the multiplication + + + + Division operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the division + Cannot divide by zero exception + + + + Modulo operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the modulo + Cannot divide by zero exception + + + + Incremetation by one operation of a BigInteger. + + The BigInteger to be incremented by one + The BigInteger result of incrementing by one + + + + Decremetation by one operation of a BigInteger. + + The BigInteger to be decremented by one + The BigInteger result of decrementing by one + + + + Adds two BigNumbers a and b, where a >= b, a, b non-negative. + + + + + Subtracts the BigInteger b from the BigInteger a, where a >= b, a, b non-negative. + + + + + Multiplies two BigIntegers. + + + + + Divides a BigInteger by a one-digit int. + + + + + Divides a BigInteger by another BigInteger. + + + + + DivideByBigNumber auxiliary method. + + + + + DivideByBigNumber auxilary method. + + + + + DivideByBigNumber auxilary method. + + + + + BigInteger-related exception class. + + + + + BigIntegerException constructor. + + The exception message + The inner exception + + + + The number's sign, where Positive also stands for the number zero. + + +
+
diff --git a/packages/ZXing.Net.0.16.4/lib/native/zxing.XML b/packages/ZXing.Net.0.16.4/lib/native/zxing.XML new file mode 100644 index 0000000..f6ecc41 --- /dev/null +++ b/packages/ZXing.Net.0.16.4/lib/native/zxing.XML @@ -0,0 +1,11098 @@ + + + + ZXing + + + + + Extends with more information specific to the Aztec format, + like the number of layers and whether it's compact. + + + + +

Encapsulates the result of detecting a barcode in an image. This includes the raw + matrix of black/white pixels corresponding to the barcode, and possibly points of interest + in the image, like the location of finder patterns or corners of the barcode in the image.

+
+ Sean Owen +
+ + + initializing constructor + + + + + + + the detected bits + + + + + the pixel points where the result is found + + + + + Initializes a new instance of the class. + + The bits. + The points. + if set to true [compact]. + The nb datablocks. + The nb layers. + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + This implementation can detect and decode Aztec codes in an image. + + David Olivier + + + + Implementations of this interface can decode an image of a barcode in some format into + the String it encodes. For example, can + decode a QR code. The decoder may optionally receive hints from the caller which may help + it decode more quickly or accurately. + + See , which attempts to determine what barcode + format is present within the image as well, and then decodes it accordingly. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + String which the barcode encodes + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + a String representing the content encoded by the Data Matrix code + + + + + Locates and decodes a Data Matrix code in an image. + + image of barcode to decode + passed as a {@link java.util.Hashtable} from {@link com.google.zxing.DecodeHintType} + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Aztec result meta data. + + + + + + + + + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + Renders an Aztec code as a + + + + The base class for all objects which encode/generate a barcode image. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + The main class which implements Aztec Code decoding -- as opposed to locating and extracting + the Aztec Code from an image. + + David Olivier + + + + Decodes the specified detector result. + + The detector result. + + + + + This method is used for testing the high-level encoder + + + + + + + Gets the string encoded in the aztec code bits + + The corrected bits. + the decoded string + + + + gets the table corresponding to the char passed + + The t. + + + + + Gets the character (or string) corresponding to the passed code in the given table + + the table used + the code of the character + + + + + Performs RS error correction on an array of bits. + + The rawbits. + the corrected array + + + + Gets the array of bits from an Aztec Code matrix + + The matrix. + the array of bits + + + + Reads a code of given length and at given index in an array of bits + + The rawbits. + The start index. + The length. + + + + + Reads a code of length 8 in an array of bits, padding with zeros + + + + + + + + Packs a bit array into bytes, most significant bit first + + + + + + + Encapsulates logic that can detect an Aztec Code in an image, even if the Aztec Code + is rotated or skewed, or partially obscured. + + David Olivier + + + + Initializes a new instance of the class. + + The image. + + + + Detects an Aztec Code in an image. + + + + + Detects an Aztec Code in an image. + + if true, image is a mirror-image of original. + + encapsulating results of detecting an Aztec Code + + + + + Extracts the number of data layers and data blocks from the layer around the bull's eye + + bullEyeCornerPoints the array of bull's eye corners + + + + + Corrects the parameter bits using Reed-Solomon algorithm + + paremeter bits + compact true if this is a compact Aztec code + + + + + Finds the corners of a bull-eye centered on the passed point + This returns the centers of the diagonal points just outside the bull's eye + Returns [topRight, bottomRight, bottomLeft, topLeft] + + Center point + The corners of the bull-eye + + + + Finds a candidate center point of an Aztec code from an image + + the center point + + + + Gets the Aztec code corners from the bull's eye corners and the parameters. + + the array of bull's eye corners + the array of aztec code corners + + + + Creates a BitMatrix by sampling the provided image. + topLeft, topRight, bottomRight, and bottomLeft are the centers of the squares on the + diagonal just outside the bull's eye. + + The image. + The top left. + The bottom left. + The bottom right. + The top right. + + + + + Samples a line + + start point (inclusive) + end point (exclusive) + number of bits + the array of bits as an int (first bit is high-order bit of result) + + + + Determines whether [is white or black rectangle] [the specified p1]. + + The p1. + The p2. + The p3. + The p4. + true if the border of the rectangle passed in parameter is compound of white points only + or black points only + + + + Gets the color of a segment + + The p1. + The p2. + 1 if segment more than 90% black, -1 if segment is more than 90% white, 0 else + + + + Gets the coordinate of the first point with a different color in the given direction + + The init. + if set to true [color]. + The dx. + The dy. + + + + + Expand the square represented by the corner points by pushing out equally in all directions + + the corners of the square, which has the bull's eye at its center + the original length of the side of the square in the target bit matrix + the new length of the size of the square in the target bit matrix + the corners of the expanded square + + + + Aztec 2D code representation + + Rustam Abdullaev + + + + Compact or full symbol indicator + + + + + Size in pixels (width and height) + + + + + Number of levels + + + + + Number of data codewords + + + + + The symbol image + + + + + The class holds the available options for the + + + + + Initializes a new instance of the class. + + + + + Representing the minimal percentage of error correction words. + Note: an Aztec symbol should have a minimum of 25% EC words. + + + + + Specifies the required number of layers for an Aztec code: + a negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + a positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + + + + + Gets the data container for all options + + + + + Specifies the height of the barcode image + + + + + Specifies the width of the barcode image + + + + + Don't put the content string into the output image. + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + + + + + represents a token for a binary shift + + + + + initializing constructor + + + + + + + + appends the byte array to the BitArray + + + + + + + string representation + + + + + + Generates Aztec 2D barcodes. + + Rustam Abdullaev + + + + Encodes the given binary content as an Aztec symbol + + input data string + Aztec symbol matrix with metadata + + + + Encodes the given binary content as an Aztec symbol + + input data string + minimal percentage of error check words (According to ISO/IEC 24778:2008, + a minimum of 23% + 3 words is recommended) + if non-zero, a user-specified value for the number of layers + + Aztec symbol matrix with metadata + + + + + This produces nearly optimal encodings of text into the first-level of + encoding used by Aztec code. + It uses a dynamic algorithm. For each prefix of the string, it determines + a set of encodings that could lead to this prefix. We repeatedly add a + character and generate a new set of optimal encodings until we have read + through the entire input. + @author Frank Yellin + @author Rustam Abdullaev + + + + + + + + + + + Convert the text represented by this High Level Encoder into a BitArray. + + text represented by this encoder encoded as a + + + + State represents all information about a sequence necessary to generate the current output. + Note that a state is immutable. + + + + + Create a new state representing this state with a latch to a (not + necessary different) mode, and then a code. + + + + + Create a new state representing this state, with a temporary shift + to a different mode to output a single value. + + + + + Create a new state representing this state, but an additional character + output in Binary Shift mode. + + + + + Create the state identical to this one, but we are no longer in + Binary Shift mode. + + + + + Returns true if "this" state is better (or equal) to be in than "that" + state under all possible circumstances. + + + + + Enumerates barcode formats known to this package. + + Sean Owen + + + Aztec 2D barcode format. + + + CODABAR 1D format. + + + Code 39 1D format. + + + Code 93 1D format. + + + Code 128 1D format. + + + Data Matrix 2D barcode format. + + + EAN-8 1D format. + + + EAN-13 1D format. + + + ITF (Interleaved Two of Five) 1D format. + + + MaxiCode 2D barcode format. + + + PDF417 format. + + + QR Code 2D barcode format. + + + RSS 14 + + + RSS EXPANDED + + + UPC-A 1D format. + + + UPC-E 1D format. + + + UPC/EAN extension format. Not a stand-alone format. + + + MSI + + + Plessey + + + Intelligent Mail barcode + + + + UPC_A | UPC_E | EAN_13 | EAN_8 | CODABAR | CODE_39 | CODE_93 | CODE_128 | ITF | RSS_14 | RSS_EXPANDED + without MSI (to many false-positives) and IMB (not enough tested, and it looks more like a 2D) + + + + + A smart class to decode the barcode inside a bitmap object + + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode the barcode inside a bitmap object + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + represents the default function which is called to get a instance from a raw byte array + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb array. + If null the RGBLuminanceSource is used. The handler is only called when Decode with a byte[] array is called. + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + raises the ResultFound event + + + + + + raises the ResultFound event + + + + + + calls the explicitResultPointFound action + + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + Gets or sets the options. + + + The options. + + + + + Gets the reader which should be used to find and decode the barcode. + + + The reader. + + + + + Gets or sets a method which is called if an important point is found + + + The result point callback. + + + + + event is executed if a result was found via decode + + + + + Gets or sets a value indicating whether the image should be automatically rotated. + Rotation is supported for 90, 180 and 270 degrees + + + true if image should be rotated; otherwise, false. + + + + + Gets or sets a value indicating whether the image should be automatically inverted + if no result is found in the original image. + ATTENTION: Please be carefully because it slows down the decoding process if it is used + + + true if image should be inverted; otherwise, false. + + + + + Optional: Gets or sets the function to create a luminance source object for a bitmap. + If null a platform specific default LuminanceSource is used + + + The function to create a luminance source object. + + + + + Optional: Gets or sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + The function to create a binarizer object. + + + + + A base class for specific barcode writers with specific formats of barcode images. + The result is a byte[] array with 4 bytes per pixel, BGRA + + + + + Interface for a smart class to encode some content into a barcode + + + Interface for a smart class to encode some content into a barcode + + + + + Encodes the specified contents. + + The contents. + + + + + Creates a visual representation of the contents + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Initializes a new instance of the class. + + + + + Encodes the specified contents and returns a BitMatrix array. + That array has to be rendered manually or with a IBarcodeRenderer. + + The contents. + + + + + Encodes the specified contents and returns a rendered instance of the barcode. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The matrix. + + + + + Gets or sets the barcode format. + The value is only suitable if the MultiFormatWriter is used. + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Gets or sets the renderer which should be used to render the encoded BitMatrix. + + + + + A base class for specific barcode writers with specific formats of barcode images. + The result is a WriteableBitmap Image object + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Initializes a new instance of the class. + + + + + Encodes the specified contents and returns a BitMatrix array. + That array has to be rendered manually or with a IBarcodeRenderer. + + The contents. + + + + + Encodes the specified contents and returns a rendered instance of the barcode. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The matrix. + + + + + Gets or sets the barcode format. + The value is only suitable if the MultiFormatWriter is used. + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Gets or sets the renderer which should be used to render the encoded BitMatrix. + + + + + The base class for luminance sources which supports + cropping and rotating based upon the luminance values. + + + + + The purpose of this class hierarchy is to abstract different bitmap implementations across + platforms into a standard interface for requesting greyscale luminance values. The interface + only provides immutable methods; therefore crop and rotation create copies. This is to ensure + that one Reader does not modify the original luminance source and leave it in an unknown state + for other Readers in the chain. + + dswitkin@google.com (Daniel Switkin) + + + + initializing constructor + + + + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + inverts the luminance values, not supported here. has to implemented in sub classes + + + + + + + + + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff + + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + The width of the bitmap. + + + The height of the bitmap. + + + Whether this subclass supports cropping. + + + Whether this subclass supports counter-clockwise rotation. + + + + + Whether this subclass supports invertion. + + + + weight of the red channel for calculating a gray scale image + + + + + weight of the green channel for calculating a gray scale image + + + + + weight of the blue channel for calculating a gray scale image + + + + + numbers of bits which for right shifting + + + + + + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + + The luminance array. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + TODO: not implemented yet + + + A rotated version of this object. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Inverts the luminance values (newValue = 255 - oldValue) + + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + gets the luminance matrix + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + + Whether this subclass supports cropping. + + + + + Whether this subclass supports invertion. + + + This class hierarchy provides a set of methods to convert luminance data to 1 bit data. + It allows the algorithm to vary polymorphically, for example allowing a very expensive + thresholding technique for servers and a fast one for mobile. It also permits the implementation + to vary, e.g. a JNI version for Android and a Java fallback version for other platforms. + + dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The source. + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + For callers which only examine one row of pixels at a time, the same BitArray should be reused + and passed in with each call for performance. However it is legal to keep more than one row + at a time if needed. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + A new concrete Binarizer implementation object. + + + + Gets the luminance source object. + + + + Converts a 2D array of luminance data to 1 bit data. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + + Gets the width of the luminance source object. + + + + + Gets the height of the luminance source object. + + + + + This class is the core bitmap class used by ZXing to represent 1 bit data. Reader objects + accept a BinaryBitmap and attempt to decode it. + + dswitkin@google.com (Daniel Switkin) + + + + + + + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + + The row to fetch, which must be in [0, bitmap height). + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if isCropSupported() is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + The width of the bitmap. + + + + + The height of the bitmap. + + + + + Converts a 2D array of luminance data to 1 bit. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + + Whether this bitmap can be cropped. + + + + + Whether this bitmap supports counter-clockwise rotation. + + + + + class which represents the luminance values for a bitmap object of a WriteableBitmap class + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + initializing constructor + + + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + +

See + + DoCoMo's documentation about the result types represented by subclasses of this class.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link #parseResult(com.google.zxing.Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Attempts to parse the raw {@link Result}'s contents as a particular type + of information (email, URL, etc.) and return a {@link ParsedResult} encapsulating + the result of parsing. + + the raw to parse + encapsulating the parsing result + + + + Parses the result. + + The result. + + + + Implements KDDI AU's address book format. See + + http://www.au.kddi.com/ezfactory/tec/two_dimensions/index.html. + (Thanks to Yuzo for translating!) + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Implements the "MECARD" address book entry format. + + Supported keys: N, SOUND, TEL, EMAIL, NOTE, ADR, BDAY, URL, plus ORG + Unsupported keys: TEL-AV, NICKNAME + + Except for TEL, multiple values for keys are also not supported; + the first one found takes precedence. + + Our understanding of the MECARD format is based on this document: + + http://www.mobicode.org.tw/files/OMIA%20Mobile%20Bar%20Code%20Standard%20v3.2.1.doc + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes contact information, like that in an address book entry. + + Sean Owen + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link ResultParser#parseResult(Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + initializing constructor + + + + + + + + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + the names + + + + + the nicknames + + + + + In Japanese, the name is written in kanji, which can have multiple readings. Therefore a hint + is often provided, called furigana, which spells the name phonetically. + + The pronunciation of the getNames() field, often in hiragana or katakana. + + + + the phone numbers + + + + optional descriptions of the type of each phone number. It could be like "HOME", but, + there is no guaranteed or standard format. + + + + the e-mail addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the instant messenger addresses + + + + + the note field + + + + + the addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the title + + + + + the urls + + + + birthday formatted as yyyyMMdd (e.g. 19780917) + + + a location as a latitude/longitude pair + + + Implements the "BIZCARD" address book entry format, though this has been + largely reverse-engineered from examples observed in the wild -- still + looking for a definitive reference. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a calendar event at a certain time, optionally with attendees and a location. + + Sean Owen + + + + Determines whether [is start all day]. + + if start time was specified as a whole day + + + + Parses a string as a date. RFC 2445 allows the start and end fields to be of type DATE (e.g. 20081021) + or DATE-TIME (e.g. 20081021T123000 for local time, or 20081021T123000Z for UTC). + + The string to parse + + if not a date formatted string + + + + Gets the start. + + + + + event end , or null if event has no duration + + + + + Gets a value indicating whether this instance is end all day. + + true if end time was specified as a whole day + + + + Represents a parsed result that encodes an email message including recipients, subject and body text. + + Sean Owen + + + + the email address + + + + + the TOs + + + + + the CCs + + + + + the BCCs + + + + + the subject + + + + + the body + + + + + the mailto: uri + + + + + Represents a result that encodes an e-mail address, either as a plain address + like "joe@example.org" or a mailto: URL like "mailto:joe@example.org". + + Sean Owen + + + + Implements the "MATMSG" email message entry format. + + Supported keys: TO, SUB, BODY + + Sean Owen + + + + This implements only the most basic checking for an email address's validity -- that it contains + an '@' and contains no characters disallowed by RFC 2822. This is an overly lenient definition of + validity. We want to generally be lenient here since this class is only intended to encapsulate what's + in a barcode, not "judge" it. + + The email. + + true if it is basically a valid email address; otherwise, false. + + + + + Represents a parsed result that encodes extended product information as encoded by the RSS format, like weight, price, dates, etc. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + extension for kilogram weight type + + + + + extension for pounds weight type + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the raw text + + + + + the product id + + + + + the sscc + + + + + the lot number + + + + + the production date + + + + + the packaging date + + + + + the best before date + + + + + the expiration date + + + + + the weight + + + + + the weight type + + + + + the weight increment + + + + + the price + + + + + the price increment + + + + + the price currency + + + + + the uncommon AIs + + + + + the display representation (raw text) + + + + + Parses strings of digits that represent a RSS Extended code. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + tries to parse a text representation to a specific result object + + + + + + + Represents a parsed result that encodes a geographic coordinate, with latitude, longitude and altitude. + + Sean Owen + + + latitude in degrees + + + + longitude in degrees + + + + altitude in meters. If not specified, in the geo URI, returns 0.0 + + + + query string associated with geo URI or null if none exists + + + + the geo URI + + + + a URI link to Google Maps which display the point on the Earth described + by this instance, and sets the zoom level in a way that roughly reflects the + altitude, if specified + + + + Parses a "geo:" URI result, which specifies a location on the surface of + the Earth as well as an optional altitude above the surface. See + + http://tools.ietf.org/html/draft-mayrhofer-geo-uri-00. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a product ISBN number. + + jbreiden@google.com (Jeff Breidenbach) + + + + the ISBN number + + + + Parses strings of digits that represent a ISBN. + + + jbreiden@google.com (Jeff Breidenbach) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + See ISBN-13 For Dummies + + The result. + + + + + Represents the type of data encoded by a barcode -- from plain text, to a + URI, to an e-mail address, etc. + + Sean Owen + + + + Represents a parsed result that encodes a product by an identifier of some kind. + + dswitkin@google.com (Daniel Switkin) + + + + Parses strings of digits that represent a UPC code. + + dswitkin@google.com (Daniel Switkin) + + +

Parses an "sms:" URI result, which specifies a number to SMS and optional + "via" number. See + the IETF draft on this.

+ +

This actually also parses URIs starting with "mms:", "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + + Represents a parsed result that encodes an SMS message, including recipients, subject and body text. + + Sean Owen + + + +

Parses an "smsto:" URI result, whose format is not standardized but appears to be like: + {@code smsto:number(:body)}.

+

This actually also parses URIs starting with "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+
+ Sean Owen +
+ + +

Parses an "smtp:" URI result, whose format is not standardized but appears to be like: + smtp[:subject[:body]]}.

+

See http://code.google.com/p/zxing/issues/detail?id=536

+
+ Sean Owen +
+ + + Represents a parsed result that encodes a telephone number. + + Sean Owen + + + + Parses a "tel:" URI result, which specifies a phone number. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + A simple result type encapsulating a string that has no further interpretation. + + Sean Owen + + + + A simple result type encapsulating a URI that has no further interpretation. + + Sean Owen + + + Transforms a string that represents a URI into something more proper, by adding or canonicalizing + the protocol. + + + + true if the URI contains suspicious patterns that may suggest it intends to + mislead the user about its true nature. At the moment this looks for the presence + of user/password syntax in the host/authority portion of a URI which may be used + in attempts to make the URI's host appear to be other than it is. Example: + http://yourbank.com@phisher.com This URI connects to phisher.com but may appear + to connect to yourbank.com at first glance. + + + + + Tries to parse results that are a URI of some kind. + + Sean Owen + + + Parses the "URLTO" result format, which is of the form "URLTO:[title]:[url]". + This seems to be used sometimes, but I am not able to find documentation + on its origin or official format? + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Parses contact information formatted according to the VCard (2.1) format. This is not a complete + implementation but should parse information as commonly encoded in 2D barcodes. + + Sean Owen + + + Formats name fields of the form "Public;John;Q.;Reverend;III" into a form like + "Reverend John Q. Public III". + + @param names name values to format, in place + + + + Partially implements the iCalendar format's "VEVENT" format for specifying a + calendar event. See RFC 2445. This supports SUMMARY, DTSTART and DTEND fields. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a Vehicle Identification Number (VIN). + + + + + Detects a result that is likely a vehicle identification number. + @author Sean Owen + + + + + Represents a parsed result that encodes wifi network information, like SSID and password. + + Vikram Aggarwal + + + + + A simple, fast array of bits, represented compactly by an array of ints internally. + + Sean Owen + + + + default constructor + + + + + initializing constructor + + desired size of the array + + + + Flips bit i. + + bit to set + + + + + Gets the next set. + + first bit to check + index of first bit that is set, starting from the given index, or size if none are set + at or beyond this given index + + + + see getNextSet(int) + + index to start looking for unset bit + index of next unset bit, or if none are unset until the end + + + Sets a block of 32 bits, starting at bit i. + + + first bit to set + + the new value of the next 32 bits. Note again that the least-significant bit + corresponds to bit i, the next-least-significant to i+1, and so on. + + + + + Sets a range of bits. + + start of range, inclusive. + end of range, exclusive + + + Clears all bits (sets to false). + + + Efficient method to check if a range of bits is set, or not set. + + + start of range, inclusive. + + end of range, exclusive + + if true, checks that bits in range are set, otherwise checks that they are not set + + true iff all bits are set or not set in range, according to value argument + if end is less than start or the range is not contained in the array + + + + Appends the bit. + + The bit. + + + + Appends the least-significant bits, from value, in order from most-significant to + least-significant. For example, appending 6 bits from 0x000001E will append the bits + 0, 1, 1, 1, 1, 0 in that order. + + containing bits to append + bits from value to append + + + + adds the array to the end + + + + + + XOR operation + + + + + + converts to bytes. + + first bit to start writing + array to write into. Bytes are written most-significant byte first. This is the opposite + of the internal representation, which is exposed by BitArray + position in array to start writing + how many bytes to write + + + Reverses all bits in the array. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Erstellt ein neues Objekt, das eine Kopie der aktuellen Instanz darstellt. + + + Ein neues Objekt, das eine Kopie dieser Instanz darstellt. + + + + + index accessor + + + + + + + size of the array, number of elements + + + + + size of the array in bytes + + + + + index accessor + + + + + + underlying array of ints. The first element holds the first 32 bits, and the least + significant bit is bit 0. + + + + +

Represents a 2D matrix of bits. In function arguments below, and throughout the common + module, x is the column position, and y is the row position. The ordering is always x, y. + The origin is at the top-left.

+

Internally the bits are represented in a 1-D array of 32-bit ints. However, each row begins + with a new int. This is done intentionally so that we can copy out a row into a BitArray very + efficiently.

+

The ordering of bits is row-major. Within each int, the least significant bits are used first, + meaning they represent lower x values. This is compatible with BitArray's implementation.

+
+ Sean Owen + dswitkin@google.com (Daniel Switkin) +
+ + + Creates an empty square . + + height and width + + + + Creates an empty square . + + bit matrix width + bit matrix height + + + + Interprets a 2D array of booleans as a , where "true" means an "on" bit. + + bits of the image, as a row-major 2D array. Elements are arrays representing rows + representation of image + + + +

Flips the given bit.

+
+ The horizontal component (i.e. which column) + The vertical component (i.e. which row) +
+ + + flip all of the bits, if shouldBeFlipped is true for the coordinates + + should return true, if the bit at a given coordinate should be flipped + + + + Exclusive-or (XOR): Flip the bit in this {@code BitMatrix} if the corresponding + mask bit is set. + + The mask. + + + Clears all bits (sets to false). + + +

Sets a square region of the bit matrix to true.

+ +
+ The horizontal position to begin at (inclusive) + + The vertical position to begin at (inclusive) + + The width of the region + + The height of the region + +
+ + A fast method to retrieve one row of data from the matrix as a BitArray. + + + The row to retrieve + + An optional caller-allocated BitArray, will be allocated if null or too small + + The resulting BitArray - this reference should always be used even when passing + your own row + + + + + Sets the row. + + row to set + {@link BitArray} to copy from + + + + Modifies this {@code BitMatrix} to represent the same but rotated 180 degrees + + + + + This is useful in detecting the enclosing rectangle of a 'pure' barcode. + + {left,top,width,height} enclosing rectangle of all 1 bits, or null if it is all white + + + + This is useful in detecting a corner of a 'pure' barcode. + + {x,y} coordinate of top-left-most 1 bit, or null if it is all white + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + The line separator. + + A that represents this instance. + + + + + Clones this instance. + + + + + + Converts this ByteMatrix to a black and white bitmap. + + A black and white bitmap converted from this ByteMatrix. + + + The width of the matrix + + + + The height of the matrix + + + + This method is for compatibility with older code. It's only logical to call if the matrix + is square, so I'm throwing if that's not the case. + + + row/column dimension of this matrix + + + + + The rowsize of the matrix + + + +

Gets the requested bit, where true means black.

+ +
+ The horizontal component (i.e. which column) + + The vertical component (i.e. which row) + + value of given bit in matrix + +
+ +

This provides an easy abstraction to read bits at a time from a sequence of bytes, where the + number of bits read is not often a multiple of 8.

+ +

This class is thread-safe but not reentrant. Unless the caller modifies the bytes array + it passed in, in which case all bets are off.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + bytes from which this will read bits. Bits will be read from the first byte first. + Bits are read within a byte from most-significant to least-significant bit. + + + + number of bits to read + + int representing the bits read. The bits will appear as the least-significant + bits of the int + + if numBits isn't in [1,32] or more than is available + + + number of bits that can be read successfully + + + + + index of next bit in current byte which would be read by the next call to {@link #readBits(int)}. + + + + + index of next byte in input byte array which would be read by the next call to {@link #readBits(int)}. + + + + Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1 + of ISO 18004. + + + Sean Owen + + + + Superclass of classes encapsulating types ECIs, according to "Extended Channel Interpretations" + 5.3 of ISO 18004. + + Sean Owen + + + ECI value + representing ECI of given value, or null if it is legal but unsupported + ArgumentException if ECI value is invalid + + + + the ECI value + + + + character set ECI value + representing ECI of given value, or null if it is legal but unsupported + + + character set ECI encoding name + representing ECI for character encoding, or null if it is legalbut unsupported + + + + Encapsulates the result of decoding a matrix of bits. This typically + applies to 2D barcode formats. For now it contains the raw bytes obtained, + as well as a String interpretation of those bytes, if applicable. + Sean Owen + + + + + initializing constructor + + + + + + + + + initializing constructor + + + + + + + + + + + initializing constructor + + + + + + + + + + initializing constructor + + + + + + + + + + + + raw bytes representing the result, or null if not applicable + + + + + how many bits of are valid; typically 8 times its length + + + + + text representation of the result + + + + + list of byte segments in the result, or null if not applicable + + + + + name of error correction level used, or null if not applicable + + + + + gets a value which describe if structure append data was found + + + + + number of errors corrected, or null if not applicable + + + + + gives the sequence number of the result if structured append was found + + + + + number of erasures corrected, or null if not applicable + + + + + gives the parity information if structured append was found + + + + + Miscellanseous data value for the various decoders + + The other. + + + + Defines an container for encoder options + + + + + Initializes a new instance of the class. + + + + + Gets the data container for all options + + + + + event is raised when a value is changed + + + + + Gets or sets a flag which cause a deeper look into the bitmap + + + true if [try harder]; otherwise, false. + + + + + Image is a pure monochrome image of a barcode. + + + true if monochrome image of a barcode; otherwise, false. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + The character set. + + + + + Image is known to be of one of a few possible formats. + Maps to a {@link java.util.List} of {@link BarcodeFormat}s. + + + The possible formats. + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + true if it should assume a Code 39 check digit; otherwise, false. + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). + + + true if it should assume GS1; otherwise, false. + + + + + Assume MSI codes employ a check digit. Maps to . + + + true if it should assume a MSI check digit; otherwise, false. + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Implementations of this class can, given locations of finder patterns for a QR code in an + image, sample the right points in the image to reconstruct the QR code, accounting for + perspective distortion. It is abstracted since it is relatively expensive and should be allowed + to take advantage of platform-specific optimized implementations, like Sun's Java Advanced + Imaging library, but which may not be available in other environments such as J2ME, and vice + versa. + + The implementation used can be controlled by calling {@link #setGridSampler(GridSampler)} + with an instance of a class which implements this interface. + + Sean Owen + + + Sets the implementation of used by the library. One global + instance is stored, which may sound problematic. But, the implementation provided + ought to be appropriate for the entire platform, and all uses of this library + in the whole lifetime of the JVM. For instance, an Android activity can swap in + an implementation that takes advantage of native platform libraries. + + The platform-specific object to install. + + + +

Samples an image for a square matrix of bits of the given dimension. This is used to extract + the black/white modules of a 2D barcode like a QR Code found in an image. Because this barcode + may be rotated or perspective-distorted, the caller supplies four points in the source image + that define known points in the barcode, so that the image may be sampled appropriately.

+

The last eight "from" parameters are four X/Y coordinate pairs of locations of points in + the image that define some significant points in the image to be sample. For example, + these may be the location of finder pattern in a QR Code.

+

The first eight "to" parameters are four X/Y coordinate pairs measured in the destination + , from the top left, where the known points in the image given by the "from" + parameters map to.

+

These 16 parameters define the transformation needed to sample the image.

+
+ image to sample + The dimension X. + The dimension Y. + The p1 preimage X. + The p1 preimage Y. + The p2 preimage X. + The p2 preimage Y. + The p3 preimage X. + The p3 preimage Y. + The p4 preimage X. + The p4 preimage Y. + The p1 image X. + The p1 image Y. + The p2 image X. + The p2 image Y. + The p3 image X. + The p3 image Y. + The p4 image X. + The p4 image Y. + + representing a grid of points sampled from the image within a region + defined by the "from" parameters + + ReaderException if image can't be sampled, for example, if the transformation defined +
+ + + + + + + + + + + +

Checks a set of points that have been transformed to sample points on an image against + the image's dimensions to see if the point are even within the image.

+ +

This method will actually "nudge" the endpoints back onto the image if they are found to be + barely (less than 1 pixel) off the image. This accounts for imperfect detection of finder + patterns in an image where the QR Code runs all the way to the image border.

+ +

For efficiency, the method will check points from either end of the line until one is found + to be within the image. Because the set of points are assumed to be linear, this is valid.

+ +
+ image into which the points should map + + actual points in x1,y1,...,xn,yn form + +
+ + the current implementation of + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + General math-related and numeric utility functions. + + + + + Ends up being a bit faster than {@link Math#round(float)}. This merely rounds its + argument to the nearest int, where x.5 rounds up to x+1. Semantics of this shortcut + differ slightly from {@link Math#round(float)} in that half rounds down for negative + values. -2.5 rounds to -3, not -2. For purposes here it makes no difference. + + real value to round + nearest int + + + + + + + + + + Euclidean distance between points A and B + + + + + + + + + + Euclidean distance between points A and B + + + + + values to sum + sum of values in array + + +

A somewhat generic detector that looks for a barcode-like rectangular region within an image. + It looks within a mostly white region of an image for a region of black and white, but mostly + black. It returns the four corners of the region, as best it can determine.

+ +
+ Sean Owen +
+ + + initializing constructor + + + + + +

Detects a rectangular region of black and white -- mostly black -- with a region of mostly + white, in an image.

+
+ [] describing the corners of the rectangular region. The first and + last points are opposed on the diagonal, as are the second and third. The first point will be + the topmost point and the last, the bottommost. The second point will be leftmost and the + third, the rightmost + +
+ + Attempts to locate a corner of the barcode by scanning up, down, left or right from a center + point which should be within the barcode. + + + center's x component (horizontal) + + same as deltaY but change in x per step instead + + minimum value of x + + maximum value of x + + center's y component (vertical) + + change in y per step. If scanning up this is negative; down, positive; + left or right, 0 + + minimum value of y to search through (meaningless when di == 0) + + maximum value of y + + maximum run of white pixels that can still be considered to be within + the barcode + + a encapsulating the corner that was found + + + + Computes the start and end of a region of pixels, either horizontally or vertically, that could + be part of a Data Matrix barcode. + + + if scanning horizontally, this is the row (the fixed vertical location) + where we are scanning. If scanning vertically it's the column, the fixed horizontal location + + largest run of white pixels that can still be considered part of the + barcode region + + minimum pixel location, horizontally or vertically, to consider + + maximum pixel location, horizontally or vertically, to consider + + if true, we're scanning left-right, instead of up-down + + int[] with start and end of found range, or null if no such range is found + (e.g. only white was found) + + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. By keeping track of the + last black points it encountered, it determines the corners of the barcode. + + David Olivier + + + + Creates a WhiteRectangleDetector instance + + The image. + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + Creates a WhiteRectangleDetector instance + + barcode image to find a rectangle in + initial size of search area around center + x position of search center + y position of search center + + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + + Initializes a new instance of the class. + + The image. + if image is too small + + + + Initializes a new instance of the class. + + The image. + Size of the init. + The x. + The y. + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. + + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + recenters the points of a constant distance towards the center + + bottom most point + left most point + right most point + top most point + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + Determines whether a segment contains a black point + + min value of the scanned coordinate + max value of the scanned coordinate + value of fixed coordinate + set to true if scan must be horizontal, false if vertical + + true if a black point has been found, else false. + + + + + Defines an container for encoder options + + + + + Initializes a new instance of the class. + + + + + Gets the data container for all options + + + + + Specifies the height of the barcode image + + + + + Specifies the width of the barcode image + + + + + Don't put the content string into the output image. + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + + + + + Specifies whether the data should be encoded to the GS1 standard; + FNC1 character is added in front of the data + + + + This Binarizer implementation uses the old ZXing global histogram approach. It is suitable + for low-end mobile devices which don't have enough CPU or memory to use a local thresholding + algorithm. However, because it picks a global black point, it cannot handle difficult shadows + and gradients. + + Faster mobile devices and all desktop applications should probably use HybridBinarizer instead. + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The source. + + + + Applies simple sharpening to the row data to improve performance of the 1D Readers. + + + + + + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + + A new concrete Binarizer implementation object. + + + + + Does not sharpen the data, as this call is intended to only be used by 2D Readers. + + + + This class implements a local thresholding algorithm, which while slower than the + GlobalHistogramBinarizer, is fairly efficient for what it does. It is designed for + high frequency images of barcodes with black data on white backgrounds. For this application, + it does a much better job than a global blackpoint with severe shadows and gradients. + However it tends to produce artifacts on lower frequency images and is therefore not + a good general purpose binarizer for uses outside ZXing. + + This class extends GlobalHistogramBinarizer, using the older histogram approach for 1D readers, + and the newer local approach for 2D readers. 1D decoding using a per-row histogram is already + inherently local, and only fails for horizontal gradients. We can revisit that problem later, + but for now it was not a win to use local blocks for 1D. + + This Binarizer is the default for the unit tests and the recommended class for library users. + dswitkin@google.com (Daniel Switkin) + + + + + initializing constructor + + + + + + creates a new instance + + + + + + + Calculates the final BitMatrix once for all requests. This could be called once from the + constructor instead, but there are some advantages to doing it lazily, such as making + profiling easier, and not doing heavy lifting when callers don't expect it. + + + + + For each 8x8 block in the image, calculate the average black point using a 5x5 grid + of the blocks around it. Also handles the corner cases (fractional blocks are computed based + on the last 8 pixels in the row/column which are also used in the previous block). + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + The black points. + The matrix. + + + + Applies a single threshold to an 8x8 block of pixels. + + The luminances. + The xoffset. + The yoffset. + The threshold. + The stride. + The matrix. + + + + Calculates a single black point for each 8x8 block of pixels and saves it away. + See the following thread for a discussion of this algorithm: + http://groups.google.com/group/zxing/browse_thread/thread/d06efa2c35a7ddc0 + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + + + + + gives the black matrix + + + +

This class implements a perspective transform in two dimensions. Given four source and four + destination points, it will compute the transformation implied between them. The code is based + directly upon section 3.4.2 of George Wolberg's "Digital Image Warping"; see pages 54-56.

+
+ Sean Owen +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Convenience method, not optimized for performance. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

This class contains utility methods for performing mathematical operations over + the Galois Fields. Operations use a given primitive polynomial in calculations.

+

Throughout this package, elements of the GF are represented as an {@code int} + for convenience and speed (but at the cost of memory). +

+
+ Sean Owen +
+ + + Create a representation of GF(size) using the given primitive polynomial. + + irreducible polynomial whose coefficients are represented by + * the bits of an int, where the least-significant bit represents the constant + * coefficient + the size of the field + the factor b in the generator polynomial can be 0- or 1-based + * (g(x) = (x+a^b)(x+a^(b+1))...(x+a^(b+2t-1))). + * In most cases it should be 1, but for QR code it is 0. + + + + Builds the monomial. + + The degree. + The coefficient. + the monomial representing coefficient * x^degree + + + + Implements both addition and subtraction -- they are the same in GF(size). + + sum/difference of a and b + + + + Exps the specified a. + + 2 to the power of a in GF(size) + + + + Logs the specified a. + + A. + base 2 log of a in GF(size) + + + + Inverses the specified a. + + multiplicative inverse of a + + + + Multiplies the specified a with b. + + A. + The b. + product of a and b in GF(size) + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Gets the size. + + + + + Gets the generator base. + + + + +

Represents a polynomial whose coefficients are elements of a GF. + Instances of this class are immutable.

+

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + the {@link GenericGF} instance representing the field to use + to perform computations + coefficients as ints representing elements of GF(size), arranged + from most significant (highest-power term) coefficient to least significant + if argument is null or empty, + or if leading coefficient is 0 and this is not a + constant polynomial (that is, it is not the monomial "0") + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + + + degree of this polynomial + + + + + Gets a value indicating whether this is zero. + + true iff this polynomial is the monomial "0" + + +

Implements Reed-Solomon decoding, as the name implies.

+ +

The algorithm will not be explained here, but the following references were helpful + in creating this implementation:

+ + + +

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+ +
+ Sean Owen + William Rucklidge + sanfordsquires +
+ + +

Decodes given set of received codewords, which include both data and error-correction + codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place, + in the input.

+
+ data and error-correction codewords + number of error-correction codewords available + false: decoding fails +
+ + + Implements Reed-Solomon encoding, as the name implies. + + Sean Owen + William Rucklidge + + + + Common string-related functions. + + Sean Owen + Alex Dupre + + + + SJIS + + + + + GB2312 + + + + + Guesses the encoding. + + bytes encoding a string, whose encoding should be guessed + decode hints if applicable + name of guessed encoding; at the moment will only guess one of: + {@link #SHIFT_JIS}, {@link #UTF8}, {@link #ISO88591}, or the platform + default encoding if none of these can possibly be correct + + + + This implementation can detect and decode Data Matrix codes in an image. + + bbrown@google.com (Brian Brown) + + + + + Locates and decodes a Data Matrix code in an image. + + + a String representing the content encoded by the Data Matrix code + + + + Locates and decodes a Data Matrix code in an image. + + + + a String representing the content encoded by the Data Matrix code + + + + does nothing here + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a Data Matrix code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + Guillaume Le Biller Added to zxing lib. + + + + encodes the content to a BitMatrix + + + + + + + + + + encodes the content to a BitMatrix + + + + + + + + + + + Encode the given symbol info to a bit matrix. + + The DataMatrix placement. + The symbol info to encode. + + + The bit matrix generated. + + + + Convert the ByteMatrix to BitMatrix. + + The input matrix. + The requested width of the image (in pixels) with the Datamatrix code + The requested height of the image (in pixels) with the Datamatrix code + The output matrix. + + + + bbrown@google.com (Brian Brown) + + + + + to parse + if dimension is < 8 or > 144 or not 0 mod 2 + + + + +

Creates the version object based on the dimension of the original bit matrix from + the datamatrix code.

+ +

See ISO 16022:2006 Table 7 - ECC 200 symbol attributes

+ + Original including alignment patterns + encapsulating the Data Matrix Code's "version" + if the dimensions of the mapping matrix are not valid + Data Matrix dimensions. +
+
+ + +

Reads the bits in the representing the mapping matrix (No alignment patterns) + in the correct order in order to reconstitute the codewords bytes contained within the + Data Matrix Code.

+ + bytes encoded within the Data Matrix Code + if the exact number of bytes expected is not read +
+
+ + +

Reads a bit of the mapping matrix accounting for boundary wrapping.

+ + Row to read in the mapping matrix + Column to read in the mapping matrix + Number of rows in the mapping matrix + Number of columns in the mapping matrix + value of the given bit in the mapping matrix +
+
+ + +

Reads the 8 bits of the standard Utah-shaped pattern.

+ +

See ISO 16022:2006, 5.8.1 Figure 6

+ + Current row in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Current column in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the utah shape +
+
+ + +

Reads the 8 bits of the special corner condition 1.

+ +

See ISO 16022:2006, Figure F.3

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 1 +
+
+ + +

Reads the 8 bits of the special corner condition 2.

+ +

See ISO 16022:2006, Figure F.4

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 2 +
+
+ + +

Reads the 8 bits of the special corner condition 3.

+ +

See ISO 16022:2006, Figure F.5

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 3 +
+
+ + +

Reads the 8 bits of the special corner condition 4.

+ +

See ISO 16022:2006, Figure F.6

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 4 +
+
+ + +

Extracts the data region from a that contains + alignment patterns.

+ + Original with alignment patterns + BitMatrix that has the alignment patterns removed +
+
+ + +

Encapsulates a block of data within a Data Matrix Code. Data Matrix Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ + bbrown@google.com (Brian Brown) +
+
+ + +

When Data Matrix Codes use multiple data blocks, they actually interleave the bytes of each of them. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ + bytes as read directly from the Data Matrix Code + version of the Data Matrix Code + DataBlocks containing original bytes, "de-interleaved" from representation in the + Data Matrix Code +
+
+ + +

Data Matrix Codes can encode text as bits in one of several modes, and can use multiple modes + in one Data Matrix Code. This class decodes the bits back into text.

+ +

See ISO 16022:2006, 5.2.1 - 5.2.9.2

+ + bbrown@google.com (Brian Brown) + Sean Owen +
+
+ + + See ISO 16022:2006, Annex C Table C.1 + The C40 Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, Annex C Table C.2 + The Text Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, 5.2.3 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.5 and Annex C, Table C.1 + + + + + See ISO 16022:2006, 5.2.6 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.7 + + + + + See ISO 16022:2006, 5.2.8 and Annex C Table C.3 + + + + + See ISO 16022:2006, 5.2.9 and Annex B, B.2 + + + + + See ISO 16022:2006, Annex B, B.2 + + + + +

The main class which implements Data Matrix Code decoding -- as opposed to locating and extracting + the Data Matrix Code from an image.

+ + bbrown@google.com (Brian Brown) +
+
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a Data Matrix Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+ + booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code + if the Data Matrix Code cannot be decoded +
+
+ + +

Decodes a Data Matrix Code represented as a . A 1 or "true" is taken + to mean a black module.

+
+ booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+ + data and error correction codewords + number of codewords that are data bytes +
+
+ + + The Version object encapsulates attributes about a particular + size Data Matrix Code. + + bbrown@google.com (Brian Brown) + + + + + returns the version numer + + + + + + returns the symbol size rows + + + + + + returns the symbols size columns + + + + + + retursn the data region size rows + + + + + + returns the data region size columns + + + + + + returns the total codewords count + + + + + +

Deduces version information from Data Matrix dimensions.

+ + Number of rows in modules + Number of columns in modules + Version for a Data Matrix Code of those dimensions + if dimensions do correspond to a valid Data Matrix size +
+
+ + + returns the version number as string + + + + + + See ISO 16022:2006 5.5.1 Table 7 + + + + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the Data Matrix code version's format.

+
+
+ + +

Encapsulates logic that can detect a Data Matrix Code in an image, even if the Data Matrix Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + +

Detects a Data Matrix Code in an image.

+
+ encapsulating results of detecting a Data Matrix Code or null +
+ + + Calculates the position of the white top right module using the output of the rectangle detector + for a rectangular matrix + + + + + Calculates the position of the white top right module using the output of the rectangle detector + for a square matrix + + + + + Increments the Integer associated with a key by one. + + + + + Counts the number of black/white transitions between two points, using something like Bresenham's algorithm. + + + + + Simply encapsulates two points and a number of transitions between them. + + + + + Orders ResultPointsAndTransitions by number of transitions, ascending. + + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + The class holds the available options for the DatamatrixWriter + + + + + Initializes a new instance of the class. + + + + + Specifies the matrix shape for Data Matrix + + + + + Specifies a minimum barcode size + + + + + Specifies a maximum barcode size + + + + + Specifies the default encodation + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Gets the data container for all options + + + + + Specifies the height of the barcode image + + + + + Specifies the width of the barcode image + + + + + Don't put the content string into the output image. + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + + + + + Symbol info table for DataMatrix. + + + + Overrides the symbol info set used by this class. Used for testing purposes. + + @param override the symbol info set to use + + + + Symbol Character Placement Program. Adapted from Annex M.1 in ISO/IEC 16022:2000(E). + + + + + Main constructor + + the codewords to place + the number of columns + the number of rows + + + + Places the 8 bits of a utah-shaped symbol character in ECC200. + + The row. + The col. + character position + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Enumeration for encodation types + + + + + Error Correction Code for ECC200. + + + + + Lookup table which factors to use for which number of error correction codewords. + See FACTORS. + + + + + Precomputed polynomial factors for ECC 200. + + + + + Creates the ECC200 error correction for an encoded message. + + The codewords. + information about the symbol to be encoded + the codewords with interleaved error correction. + + + + DataMatrix ECC 200 data encoder following the algorithm described in ISO/IEC 16022:200(E) in + annex S. + + + + + Padding character + + + + + mode latch to C40 encodation mode + + + + + mode latch to Base 256 encodation mode + + + + + FNC1 Codeword + + + + + Structured Append Codeword + + + + + Reader Programming + + + + + Upper Shift + + + + + 05 Macro + + + + + 06 Macro + + + + + mode latch to ANSI X.12 encodation mode + + + + + mode latch to Text encodation mode + + + + + mode latch to EDIFACT encodation mode + + + + + ECI character (Extended Channel Interpretation) + + + + + Unlatch from C40 encodation + + + + + Unlatch from X12 encodation + + + + + 05 Macro header + + + + + 06 Macro header + + + + + Macro trailer + + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + the encoded message (the char values range from 0 to 255) + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + requested shape. May be {@code SymbolShapeHint.FORCE_NONE},{@code SymbolShapeHint.FORCE_SQUARE} or {@code SymbolShapeHint.FORCE_RECTANGLE}. + the minimum symbol size constraint or null for no constraint + the maximum symbol size constraint or null for no constraint + encoding mode to start with + the encoded message (the char values range from 0 to 255) + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + Enumeration for DataMatrix symbol shape hint. It can be used to force square or rectangular + symbols. + + + + + Encapsulates a type of hint that a caller may pass to a barcode reader to help it + more quickly or accurately decode it. It is up to implementations to decide what, + if anything, to do with the information that is supplied. + + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Unspecified, application-specific hint. Maps to an unspecified . + + + + + Image is a pure monochrome image of a barcode. Doesn't matter what it maps to; + use = true. + + + + + Image is known to be of one of a few possible formats. + Maps to a of s. + + + + + Spend more time to try to find a barcode; optimize for accuracy, not speed. + Doesn't matter what it maps to; use = true. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + + + The caller needs to be notified via callback when a possible + is found. Maps to a . + + + + + Assume MSI codes employ a check digit. Maps to . + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + Maps to . + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + 1D readers supporting rotation with TRY_HARDER enabled. + But BarcodeReader class can do auto-rotating for 1D and 2D codes. + Enabling that option prevents 1D readers doing double rotation. + BarcodeReader enables that option automatically if "global" auto-rotation is enabled. + Maps to . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to; + use . + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Simply encapsulates a width and height. + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + + + + + + the width + + + + + the height + + + + + These are a set of hints that you may pass to Writers to specify their behavior. + + dswitkin@google.com (Daniel Switkin) + + + + Specifies the width of the barcode image + type: + + + + + Specifies the height of the barcode image + type: + + + + + Don't put the content string into the output image. + type: + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + + For Aztec it is of type , representing the minimal percentage of error correction words. + In all cases, it can also be a representation of the desired value as well. + Note: an Aztec symbol should have a minimum of 25% EC words. + For PDF417 it is of type or (between 0 and 8), + + + + + Specifies what character encoding to use where applicable. + type: + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + type: , or representation of the integer value + + + + + Specifies the aspect ratio to use. Default is 4. + type: , or 1-4. + + + + + Specifies whether to use compact mode for PDF417 + type: , or "true" or "false" + value + + + + + Specifies what compaction mode to use for PDF417. + type: or value of one of its + enum values + + + + + Specifies the minimum and maximum number of rows and columns for PDF417. + type: + + + + + Don't append ECI segment. + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + type: + + + + + Specifies the matrix shape for Data Matrix (type ) + + + + + Specifies a minimum barcode size (type ). Only applicable to Data Matrix now. + + + + + Specifies a maximum barcode size (type ). Only applicable to Data Matrix now. + + + + + if true, don't switch to codeset C for numbers + + + + + Specifies the default encodation for Data Matrix (type ) + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Specifies the required number of layers for an Aztec code. + A negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + type: , or representation of the integer value + + + + + Specifies the exact version of QR code to be encoded. + (Type , or representation of the integer value). + + + + + Specifies whether the data should be encoded to the GS1 standard + type: , or "true" or "false" + value + + + + + Thrown when a barcode was successfully detected, but some aspect of + the content did not conform to the barcode's format rules. This could have + been due to a mis-detection. + Sean Owen + + + + + The general exception class throw when something goes wrong during decoding of a barcode. + This includes, but is not limited to, failing checksums / error correction algorithms, being + unable to locate finder timing patterns, and so on. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class. + + The inner exception. + + + + Initializes a new instance of the class. + + The inner exception. + + + + + + + + + + + + + + + + + + + + + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + implements an Intelligent Mail barcode + Rishabh Hatgadkar + + + + + Encapsulates functionality and implementation that is common to all families + of one-dimensional barcodes. + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + + + + + + + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + Note that we don't try rotation without the try harder flag, even if rotation was supported. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + We're going to examine rows from the middle outward, searching alternately above and below the + middle, and farther out each time. rowStep is the number of rows between each successive + attempt above and below the middle. So we'd scan row middle, then middle - rowStep, then + middle + rowStep, then middle - (2 * rowStep), etc. + rowStep is bigger as the image is taller, but is always at least 1. We've somewhat arbitrarily + decided that moving up and down by about 1/16 of the image is pretty good; we try more of the + image if "trying harder". + + The image to decode + Any hints that were requested + The contents of the decoded barcode + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the pattern in reverse. + + The row. + The start. + The counters. + + + + + Determines how closely a set of observed counts of runs of black/white values matches a given + target pattern. This is reported as the ratio of the total variance from the expected pattern + proportions across all pattern elements, to the length of the pattern. + + observed counters + expected pattern + The most any counter can differ before we give up + ratio of total variance between counters and pattern compared to total pattern size, + where the ratio has been multiplied by 256. So, 0 means no variance (perfect match); 256 means + the total variance between counters and patterns equals the pattern length, higher values mean + even more variance + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + A wrapper implementation of {@link LuminanceSource} which inverts the luminances it returns -- black becomes + white and vice versa, and each value becomes (255-value). + + Sean Owen + + + + Initializes a new instance of the class. + + The @delegate. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Inverts this instance. + + original delegate {@link LuminanceSource} since invert undoes itself + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff; + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + + + Whether this subclass supports cropping. + + + + + Whether this subclass supports counter-clockwise rotation. + + + + A base class for specific barcode writers with specific formats of barcode images. + The result is a Svg Image object + + + + + Initializes a new instance of the class. + + + + + Encodes the specified contents and returns a BitMatrix array. + That array has to be rendered manually or with a IBarcodeRenderer. + + The contents. + + + + + Encodes the specified contents and returns a rendered instance of the barcode. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The matrix. + + + + + Gets or sets the barcode format. + The value is only suitable if the MultiFormatWriter is used. + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Gets or sets the renderer which should be used to render the encoded BitMatrix. + + + + + mike32767 + Manuel Kasten + + + + + to parse + + + + +

MaxiCodes can encode text or structured information as bits in one of several modes, + with multiple character sets in one code. This class decodes the bits back into text.

+ + mike32767 + Manuel Kasten +
+
+ + +

The main class which implements MaxiCode decoding -- as opposed to locating and extracting + the MaxiCode from an image.

+ + Manuel Kasten +
+
+ + + This implementation can detect and decode a MaxiCode in an image. + + + + + Locates and decodes a MaxiCode in an image. + + a String representing the content encoded by the MaxiCode + if a MaxiCode cannot be decoded + + + + + Locates and decodes a MaxiCode within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + + MultiFormatReader is a convenience class and the main entry point into the library for most uses. + By default it attempts to decode all barcode formats that the library supports. Optionally, you + can provide a hints object to request different behavior, for example only decoding QR codes. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + This version of decode honors the intent of Reader.decode(BinaryBitmap) in that it + passes null as a hint to the decoders. However, that makes it inefficient to call repeatedly. + Use setHints() followed by decodeWithState() for continuous scan applications. + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the hints provided. Does not honor existing state. + + + The pixel data to decode + + The hints to use, clearing the previous state. + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the state set up by calling setHints() previously. Continuous scan + clients will get a large speed increase by using this instead of decode(). + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + + resets all specific readers + + + + This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls + to decodeWithState(image) can reuse the same set of readers without reallocating memory. This + is important for performance in continuous scan clients. + + + + + This is a factory class which finds the appropriate Writer subclass for the BarcodeFormat + requested and encodes the barcode with the supplied contents. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + encode the given data + + + + + + + + + + encode the given data + + + + + + + + + + + Gets the collection of supported writers. + + + + + This class attempts to decode a barcode from an image, not by scanning the whole image, + but by scanning subsets of the image. This is important when there may be multiple barcodes in + an image, and detecting a barcode may find parts of multiple barcode and fail to decode + (e.g. QR Codes). Instead this scans the four quadrants of the image -- and also the center + 'quadrant' to cover the case where a barcode is found in the center. + + + + + + Initializes a new instance of the class. + + The @delegate. + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Attempts to locate multiple barcodes in an image by repeatedly decoding portion of the image. + After one barcode is found, the areas left, above, right and below the barcode's + {@link com.google.zxing.ResultPoint}s are scanned, recursively.

+

A caller may want to also employ {@link ByQuadrantReader} when attempting to find multiple + 2D barcodes, like QR Codes, in an image, where the presence of multiple barcodes might prevent + detecting any one of them.

+

That is, instead of passing a {@link Reader} a caller might pass + new ByQuadrantReader(reader).

+ Sean Owen +
+
+ + + Implementation of this interface attempt to read several barcodes from one image. + Sean Owen + + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Initializes a new instance of the class. + + The @delegate. + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Encapsulates logic that can detect one or more QR Codes in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+ + Sean Owen + Hannes Erven +
+
+ + +

Encapsulates logic that can detect a QR Code in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + +

Detects a QR Code in an image.

+
+ + encapsulating results of detecting a QR Code + +
+ + +

Detects a QR Code in an image.

+
+ optional hints to detector + + encapsulating results of detecting a QR Code + +
+ + + Processes the finder pattern info. + + The info. + + + +

Computes the dimension (number of modules on a size) of the QR Code based on the position + of the finder patterns and estimated module size.

+
+
+ + +

Computes an average estimated module size based on estimated derived from the positions + of the three finder patterns.

+
+ detected top-left finder pattern center + detected top-right finder pattern center + detected bottom-left finder pattern center + estimated module size +
+ +

Estimates module size based on two finder patterns -- it uses + {@link #sizeOfBlackWhiteBlackRunBothWays(int, int, int, int)} to figure the + width of each, measuring along the axis between their centers.

+
+
+ + See {@link #sizeOfBlackWhiteBlackRun(int, int, int, int)}; computes the total width of + a finder pattern by looking for a black-white-black run from the center in the direction + of another point (another finder pattern center), and in the opposite direction too. + + + +

This method traces a line from a point in the image, in the direction towards another point. + It begins in a black region, and keeps going until it finds white, then black, then white again. + It reports the distance from the start to this point.

+ +

This is used when figuring out how wide a finder pattern is, when the finder pattern + may be skewed or rotated.

+
+
+ + +

Attempts to locate an alignment pattern in a limited region of the image, which is + guessed to contain it. This method uses {@link AlignmentPattern}.

+
+ estimated module size so far + x coordinate of center of area probably containing alignment pattern + y coordinate of above + number of pixels in all directions to search from the center + + if found, or null otherwise + +
+ + + Gets the image. + + + + + Gets the result point callback. + + + + + Initializes a new instance of the class. + + The image. + + + + Detects the multi. + + The hints. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +

In contrast to , this class will return an array of all possible + QR code locations in the image.

+ +

Use the TRY_HARDER hint to ask for a more thorough detection.

+ + Sean Owen + Hannes Erven +
+
+ + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+
+ Sean Owen +
+ + + 1 pixel/module times 3 modules/center + + + + + support up to version 20 for mobile clients + + + + +

Creates a finder that will search the image for three finder patterns.

+
+ image to search +
+ + + Initializes a new instance of the class. + + The image. + The result point callback. + + + Given a count of black/white/black/white/black pixels just seen and an end position, + figures the location of the center of this run. + + + + count of black/white/black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/3/1/1 ratios + used by finder patterns to be considered a match + + + + + + count of black/white/black/white/black pixels just read + true if the proportions of the counts is close enough to the 1/1/3/1/1 ratios + by finder patterns to be considered a match + + + + After a vertical and horizontal scan finds a potential finder pattern, this method + "cross-cross-cross-checks" by scanning down diagonally through the center of the possible + finder pattern to see if the same proportion is detected. + @param maxCount maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + @param originalStateCountTotal The original state count total. + + row where a finder pattern was detected + center of the section that appears to cross a finder pattern + true if proportions are withing expected limits + + + +

After a horizontal scan finds a potential finder pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + finder pattern to see if the same proportion is detected.

+
+ row where a finder pattern was detected + center of the section that appears to cross a finder pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of finder pattern, or null if not found + +
+ +

Like {@link #crossCheckVertical(int, int, int, int)}, and in fact is basically identical, + except it reads horizontally instead of vertically. This is used to cross-cross + check a vertical cross check and locate the real center of the alignment pattern.

+
+
+ + + @see #handlePossibleCenter(int[], int, int) + + reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + ignored + true if a finder pattern candidate was found this time + + + +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will, ah, cross-cross-check + with another horizontal scan. This is needed primarily to locate the real horizontal + center of the pattern in cases of extreme skew. + And then we cross-cross-cross check with another diagonal scan.

+ If that succeeds the finder pattern location is added to a list that tracks + the number of times each location has been nearly-matched as a finder pattern. + Each additional find is more evidence that the location is in fact a finder + pattern center +
+ reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + + true if a finder pattern candidate was found this time + +
+ + number of rows we could safely skip during scanning, based on the first + two finder patterns that have been located. In some cases their position will + allow us to infer that the third pattern must lie below a certain point farther + down in the image. + + + + true iff we have found at least 3 finder patterns that have been detected + at least {@link #CENTER_QUORUM} times each, and, the estimated module size of the + candidates is "pretty similar" + + + + the 3 best {@link FinderPattern}s from our list of candidates. The "best" are + those that have been detected at least {@link #CENTER_QUORUM} times, and whose module + size differs from the average among those patterns the least + + + + + Gets the image. + + + + + Gets the possible centers. + + + + + Orders by furthest from average + + + +

Orders by {@link FinderPattern#getCount()}, descending.

+
+ + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF pixels/module in their + estimated modules sizes. + + + + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF_PERCENT percent in their + estimated modules sizes. + + + + +

Creates a finder that will search the image for three finder patterns.

+ + image to search +
+
+ + + + the 3 best s from our list of candidates. The "best" are + those that have been detected at least CENTER_QUORUM times, and whose module + size differs from the average among those patterns the least + + + + + A comparator that orders FinderPatterns by their estimated module size. + + + + + This implementation can detect and decode multiple QR Codes in an image. + + + + + This implementation can detect and decode QR Codes in an image. + Sean Owen + + + + + Gets the decoder. + + + + + + Locates and decodes a QR code in an image. + + a String representing the content encoded by the QR code + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + +

Decodes Codabar barcodes.

+ + Bas Vijfwinkel +
+
+ + These represent the encodings of characters, as patterns of wide and narrow bars. The 7 least-significant bits of + each int correspond to the pattern of wide and narrow, with 1s representing "wide" and 0s representing narrow. + + + + Records the size of all runs of white and black pixels, starting with white. + This is just like recordPattern, except it records all the counters, and + uses our builtin "counters" member for storage. + + row to count from + + + + This class renders CodaBar as []. + + dsbnatut@gmail.com (Kazuki Nishiura) + + + +

Encapsulates functionality and implementation that is common to one-dimensional barcodes.

+ dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + a byte array of horizontal pixels (0 = white, 1 = black) + + + + Appends the given pattern to the target array starting at pos. + + encode black/white pattern into this array + position to start encoding at in target + lengths of black/white runs to encode + starting color - false for white, true for black + the number of elements added to target. + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + + barcode contents to encode + a bool[] of horizontal pixels (false = white, true = black) + + + + Calculates the checksum digit modulo10. + + The contents. + + + + + Gets the default margin. + + + + + The class holds the available options for the QrCodeWriter + + + + + Initializes a new instance of the class. + + + + + if true, don't switch to codeset C for numbers + + + + + Gets the data container for all options + + + + + Specifies the height of the barcode image + + + + + Specifies the width of the barcode image + + + + + Don't put the content string into the output image. + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + + + + +

Decodes Code 128 barcodes.

+ + Sean Owen +
+
+ + + This object renders a CODE128 code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + +

Decodes Code 39 barcodes. Supports "Full ASCII Code 39" if USE_CODE_39_EXTENDED_MODE is set.

+ Sean Owen + @see Code93Reader +
+
+ + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. It will not decoded "extended Code 39" sequences. + + + + + Creates a reader that can be configured to check the last character as a check digit. + It will not decoded "extended Code 39" sequences. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + + Creates a reader that can be configured to check the last character as a check digit, + or optionally attempt to decode "extended Code 39" sequences that are used to encode + the full ASCII character set. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + if true, will attempt to decode extended Code 39 sequences in the text. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + Returns a string with all possible characters + + + + + This object renders a CODE39 code as a . + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Decodes Code 93 barcodes.

+ Sean Owen + +
+
+ + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a CODE93 code as a BitMatrix + + + + + + output to append to + start position + pattern to append + unused + 9 + + + +

Implements decoding of the EAN-13 format.

+ + dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Start/end guard pattern. + + + + + Pattern marking the middle of a UPC/EAN pattern, separating the two halves. + + + + + end guard pattern. + + + + + "Odd", or "L" patterns used to encode UPC/EAN digits. + + + + + As above but also including the "even", or "G" patterns used to encode UPC/EAN digits. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + +

Like , but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ row index into the image + encoding of the row of the barcode image + start/end column where the opening start pattern was found + optional hints that influence decoding + encapsulating the result of decoding a barcode in the row +
+ + + + string of digits to check + see + + + + Computes the UPC/EAN checksum on a string of digits, and reports + whether the checksum is correct or not. + + string of digits to check + true iff string of digits passes the UPC/EAN checksum algorithm + + + + Decodes the end. + + The row. + The end start. + + + + + + row of black/white values to search + position to start search + if true, indicates that the pattern specifies white/black/white/... + pixel counts, otherwise, it is interpreted as black/white/black/... + pattern of counts of number of black and white pixels that are being + searched for as a pattern + array of counters, as long as pattern, to re-use + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a single UPC/EAN-encoded digit. + + row of black/white values to decode + the counts of runs of observed black/white/black/... values + horizontal offset to start decoding from + the set of patterns to use to decode -- sometimes different encodings + for the digits 0-9 are used, and this indicates the encodings for 0 to 9 that should + be used + horizontal offset of first pixel beyond the decoded digit + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + Get the format of this decoder. + + The 1D format. + + + + Initializes a new instance of the class. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + Based on pattern of odd-even ('L' and 'G') patterns used to encoded the explicitly-encoded + digits in a barcode, determines the implicitly encoded first digit and adds it to the + result string. + + string to insert decoded first digit into + int whose bits indicates the pattern of odd/even L/G patterns used to + encode digits + -1 if first digit cannot be determined + + + + Get the format of this decoder. + The 1D format. + + + + + This object renders an EAN13 code as a . + aripollak@gmail.com (Ari Pollak) + + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ aripollak@gmail.com (Ari Pollak) + dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Gets the default margin. + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Implements decoding of the EAN-8 format.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Get the format of this decoder. + The 1D format. + + + + + This object renders an EAN8 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + + + a byte array of horizontal pixels (false = white, true = black) + + + + + Records EAN prefix to GS1 Member Organization, where the member organization + correlates strongly with a country. This is an imperfect means of identifying + a country of origin by EAN-13 barcode value. See + + http://en.wikipedia.org/wiki/List_of_GS1_country_codes. + + Sean Owen + + + + +

Implements decoding of the ITF format, or Interleaved Two of Five.

+ +

This Reader will scan ITF barcodes of certain lengths only. + At the moment it reads length 6, 8, 10, 12, 14, 16, 18, 20, 24, 44 and 48 as these have appeared "in the wild". Not all + lengths are scanned, especially shorter ones, to avoid false positives. This in turn is due to a lack of + required checksum function.

+ +

The checksum is optional and is not applied by this Reader. The consumer of the decoded + value will have to apply a checksum if required.

+ +

http://en.wikipedia.org/wiki/Interleaved_2_of_5 + is a great reference for Interleaved 2 of 5 information.

+ + kevin.osullivan@sita.aero, SITA Lab. +
+
+ + + Valid ITF lengths. Anything longer than the largest value is also allowed. + + + + + Start/end guard pattern. + + Note: The end pattern is reversed because the row is reversed before + searching for the END_PATTERN + + + + + Patterns of Wide / Narrow lines to indicate each digit + + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + + row of black/white values to search + offset of start pattern + The payload end. + to append decoded chars to + + false, if decoding could not complete successfully + + + + + Identify where the start of the middle / payload section starts. + + row of black/white values to search + Array, containing index of start of 'start block' and end of 'start block' + + + + The start & end patterns must be pre/post fixed by a quiet zone. This + zone must be at least 10 times the width of a narrow line. Scan back until + we either get to the start of the barcode or match the necessary number of + quiet zone pixels. + + Note: Its assumed the row is reversed when using this method to find + quiet zone after the end pattern. + + ref: http://www.barcode-1.net/i25code.html + + bit array representing the scanned barcode. + index into row of the start or end pattern. + false, if the quiet zone cannot be found + + + + Skip all whitespace until we get to the first black line. + + row of black/white values to search + index of the first black line or -1 if no black lines are found in the row. + + + + Identify where the end of the middle / payload section ends. + + row of black/white values to search + Array, containing index of start of 'end block' and end of 'end + block' or null, if nothing found + + + + + row of black/white values to search + position to start search + pattern of counts of number of black and white pixels that are being searched for as a pattern + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a sequence of ITF black/white lines into single + digit. + + the counts of runs of observed black/white/black/... values + The decoded digit + + false, if digit cannot be decoded + + + + + This object renders a ITF code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code bool[]} of horizontal pixels (false = white, true = black) + + + + + + + Decodes MSI barcodes. + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. + + + + + Creates a reader that can be configured to check the last character as a check digit, + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a MSI code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

A reader that can read all available UPC/EAN formats. If a caller wants to try to + read all such formats, it is most efficient to use this implementation rather than invoke + individual readers.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + This object renders a Plessey code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + Superclass of implementations that read barcodes in the RSS family of formats. + + + + + Initializes a new instance of the class. + + + + + Gets the decode finder counters. + + + + + + Gets the data character counters. + + + + + + Gets the odd rounding errors. + + + + + + Gets the even rounding errors. + + + + + + Gets the odd counts. + + + + + + Gets the even counts. + + + + + + Parses the finder value. + + The counters. + The finder patterns. + The value. + + + + + Counts the specified array. + + The array. + + + + + Increments the specified array. + + The array. + The errors. + + + + Decrements the specified array. + + The array. + The errors. + + + + Determines whether [is finder pattern] [the specified counters]. + + The counters. + + true if [is finder pattern] [the specified counters]; otherwise, false. + + + + + Encapsulates a since character value in an RSS barcode, including its checksum information. + + + + + Initializes a new instance of the class. + + The value. + The checksum portion. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Gets the value. + + + + + Gets the checksum portion. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Gets the information. + + + + + + Parses the information. + + + + + + Creates the decoder. + + The information. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + One row of an RSS Expanded Stacked symbol, consisting of 1+ expanded pairs. + + + + + Two rows are equal if they contain the same pairs in the same order. + + + + + Did this row of the image have to be reversed (mirrored) to recognize the pairs? + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Encapsulates an RSS barcode finder pattern, including its start/end position and row. + + + + + Initializes a new instance of the class. + + The value. + The start end. + The start. + The end. + The row number. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Gets the value. + + + + + Gets the start end. + + + + + Gets the result points. + + + + + Decodes RSS-14, including truncated and stacked variants. See ISO/IEC 24724:2006. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Adapted from listings in ISO/IEC 24724 Appendix B and Appendix G. + + + + + Gets the RS svalue. + + The widths. + Width of the max. + if set to true [no narrow]. + + + + +

Implements decoding of the UPC-A format.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen +
+
+ + +

Like decodeRow(int, BitArray, java.util.Map), but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ + + + + +
+ + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Decodes the specified image. + + The image. + The hints. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + Get the format of this decoder. + The 1D format. + + + + + This object renders a UPC-A code as a . + qwandor@google.com (Andrew Walbran) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + @see UPCEANExtension5Support + + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + + + @see UPCEANExtension2Support + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + one {@link ResultMetadataType} to appropriate value, or {@code null} if not known + + + +

Implements decoding of the UPC-E format.

+

Thisis a great reference for + UPC-E information.

+ Sean Owen +
+
+ + + The pattern that marks the middle, and end, of a UPC-E pattern. + There is no "second half" to a UPC-E barcode. + + + + + See L_AND_G_PATTERNS these values similarly represent patterns of + even-odd parity encodings of digits that imply both the number system (0 or 1) + used, and the check digit. + + + + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Decodes the end. + + The row. + The end start. + + + + + see checkStandardUPCEANChecksum(String) + + + + + + + Determines the num sys and check digit. + + The result string. + The lg pattern found. + + + + + Expands a UPC-E value back into its full, equivalent UPC-A code value. + + UPC-E code as string of digits + equivalent UPC-A code as string of digits + + + + + Get the format of this decoder. + The 1D format. + + + + + This object renders an UPC-E code as a {@link BitMatrix}. + @author 0979097955s@gmail.com (RX) + + + + + Metadata about a PDF417 Barcode + + Guenther Grau + + + + A Barcode Value for the PDF417 barcode. + The scanner will iterate through the bitmatrix, + and given the different methods or iterations + will increment a given barcode value's confidence. + + When done, this will return the values of highest confidence. + + Guenther Grau + + + + Incremenets the Confidence for a given value. (Adds an occurance of a value) + + + Value. + + + + Determines the maximum occurrence of a set value and returns all values which were set with this occurrence. + + an array of int, containing the values with the highest occurrence, or null, if no value was set. + + + + Returns the confience value for a given barcode value + + Barcode value. + + + + A Bounding Box helper class + + Guenther Grau + + + + Initializes a new instance of the class. + returns null if the corner points don't match up correctly + + The image. + The top left. + The bottom left. + The top right. + The bottom right. + + + + + Creates the specified box. + + The box. + + + + + Initializes a new instance of the class. + Will throw an exception if the corner points don't match up correctly + + Image. + Top left. + Top right. + Bottom left. + Bottom right. + + + + Merge two Bounding Boxes, getting the left corners of left, and the right corners of right + (Images should be the same) + + Left. + Right. + + + + Adds the missing rows. + + The missing rows. + Missing start rows. + Missing end rows. + If set to true is left. + + + + Calculates the minimum and maximum X & Y values based on the corner points. + + + + + If we adjust the width, set a new right corner coordinate and recalculate + + Bottom right. + + + + A Codeword in the PDF417 barcode + + Guenther Grau + + + + Default value for the RowNumber (-1 being an invalid real number) + + + + + Initializes a new instance of the class. + + Start x. + End x. + Bucket. + Value. + + + + Determines whether this instance is valid row number the specified rowNumber. + + true if this instance is valid row number the specified rowNumber; otherwise, false. + Row number. + + + + Sets the row number as the row's indicator column. + + + + + Returns a that represents the current . + + A that represents the current . + + + + Gets the width. + + The width. + + + + Gets a value indicating whether this instance has valid row number. + + true if this instance has valid row number; otherwise, false. + + + +

This class contains the methods for decoding the PDF417 codewords.

+ + SITA Lab (kevin.osullivan@sita.aero) +
+
+ + + Table containing values for the exponent of 900. + This is used in the numeric compaction decode algorithm. + + + + + Text Compaction mode (see 5.4.1.5) permits all printable ASCII characters to be + encoded, i.e. values 32 - 126 inclusive in accordance with ISO/IEC 646 (IRV), as + well as selected control characters. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + The Text Compaction mode includes all the printable ASCII characters + (i.e. values from 32 to 126) and three ASCII control characters: HT or tab + (ASCII value 9), LF or line feed (ASCII value 10), and CR or carriage + return (ASCII value 13). The Text Compaction mode also includes various latch + and shift characters which are used exclusively within the mode. The Text + Compaction mode encodes up to 2 characters per codeword. The compaction rules + for converting data into PDF417 codewords are defined in 5.4.2.2. The sub-mode + switches are defined in 5.4.2.3. + + The text compaction data. + The byte compaction data if there + was a mode shift. + The size of the text compaction and byte compaction data. + The decoded data is appended to the result. + + + + + Byte Compaction mode (see 5.4.3) permits all 256 possible 8-bit byte values to be encoded. + This includes all ASCII characters value 0 to 127 inclusive and provides for international + character set support. + + The byte compaction mode i.e. 901 or 924 + The array of codewords (data + error) + Currently active character encoding + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Numeric Compaction mode (see 5.4.4) permits efficient encoding of numeric data strings. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Convert a list of Numeric Compacted codewords from Base 900 to Base 10. + EXAMPLE + Encode the fifteen digit numeric string 000213298174000 + Prefix the numeric string with a 1 and set the initial value of + t = 1 000 213 298 174 000 + Calculate codeword 0 + d0 = 1 000 213 298 174 000 mod 900 = 200 + + t = 1 000 213 298 174 000 div 900 = 1 111 348 109 082 + Calculate codeword 1 + d1 = 1 111 348 109 082 mod 900 = 282 + + t = 1 111 348 109 082 div 900 = 1 234 831 232 + Calculate codeword 2 + d2 = 1 234 831 232 mod 900 = 632 + + t = 1 234 831 232 div 900 = 1 372 034 + Calculate codeword 3 + d3 = 1 372 034 mod 900 = 434 + + t = 1 372 034 div 900 = 1 524 + Calculate codeword 4 + d4 = 1 524 mod 900 = 624 + + t = 1 524 div 900 = 1 + Calculate codeword 5 + d5 = 1 mod 900 = 1 + t = 1 div 900 = 0 + Codeword sequence is: 1, 624, 434, 632, 282, 200 + + Decode the above codewords involves + 1 x 900 power of 5 + 624 x 900 power of 4 + 434 x 900 power of 3 + + 632 x 900 power of 2 + 282 x 900 power of 1 + 200 x 900 power of 0 = 1000213298174000 + + Remove leading 1 => Result is 000213298174000 + The array of codewords + The number of codewords + The decoded string representing the Numeric data. + + + + + + + Guenther Grau + + + + Returns the DetectionResult Columns. This does a fair bit of calculation, so call it sparingly. + + The detection result columns. + + + + Adjusts the indicator column row numbers. + + Detection result column. + + + + return number of codewords which don't have a valid row number. Note that the count is not accurate as codewords . + will be counted several times. It just serves as an indicator to see when we can stop adjusting row numbers + + The row numbers. + + + + Adjusts the row numbers by row. + + The row numbers by row. + + + + Adjusts the row numbers from both Row Indicators + + zero + + + + Adjusts the row numbers from Right Row Indicator. + + The unadjusted row count. + + + + Adjusts the row numbers from Left Row Indicator. + + Unadjusted row Count. + + + + Adjusts the row number if valid. + + The invalid rows + Row indicator row number. + Invalid row counts. + Codeword. + + + + Adjusts the row numbers. + + Barcode column. + Codewords row. + Codewords. + + + + Adjusts the row number. + + true, if row number was adjusted, false otherwise. + Codeword. + Other codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + The maximum distance to search in the codeword array in both the positive and negative directions + + + + + Initializes a new instance of the class. + + The Bounding Box around the column (in the BitMatrix) + + + + Converts the Image's Row to the index in the Codewords array + + The Codeword Index. + Image row. + + + + Converts the Codeword array index into a Row in the Image (BitMatrix) + + The Image Row. + Codeword index. + + + + Gets the codeword for a given row + + The codeword. + Image row. + + + + Gets the codeword closest to the specified row in the image + + Image row. + + + + Sets the codeword for an image row + + Image row. + Codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + The Bounding Box around the column (in the BitMatrix) + + The box. + + + + The Codewords the Box encodes for, offset by the Box minY. + Remember to Access this ONLY through GetCodeword(imageRow) if you're accessing it in that manner. + + The codewords. + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + Initializes a new instance of the class. + + Box. + If set to true is left. + + + + Sets the Row Numbers as Inidicator Columns + + + + + TODO implement properly + TODO maybe we should add missing codewords to store the correct row number to make + finding row numbers for other columns easier + use row height count to make detection of invalid row numbers more reliable + + The indicator column row numbers. + Metadata. + + + + Gets the row heights. + + The row heights. + + + + Adjusts the in omplete indicator column row numbers. + + Metadata. + + + + Gets the barcode metadata. + + The barcode metadata. + + + + Prune the codewords which do not match the metadata + TODO Maybe we should keep the incorrect codewords for the start and end positions? + + Codewords. + Metadata. + + + + Returns a that represents the current . + + A that represents the current . + + + + Gets or sets a value indicating whether this instance is the left indicator + + true if this instance is left; otherwise, false. + + + +

PDF417 error correction implementation.

+

This example + is quite useful in understanding the algorithm.

+ Sean Owen + +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the specified received. + + received codewords + number of those codewords used for EC + location of erasures + The error locations count. + + + + + Runs the euclidean algorithm (Greatest Common Divisor) until r's degree is less than R/2 + + The euclidean algorithm. + + + + Finds the error locations as a direct application of Chien's search + + The error locations. + Error locator. + + + + Finds the error magnitudes by directly applying Forney's Formula + + The error magnitudes. + Error evaluator. + Error locator. + Error locations. + + + +

A field based on powers of a generator integer, modulo some modulus.

+ +
+ Sean Owen +
+ + + + + Sean Owen + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + + + Adds another Modulus + + Other. + + + + Subtract another Modulus + + Other. + + + + Multiply by another Modulus + + Other. + + + + Returns a Negative version of this instance + + + + + Multiply by a Scalar. + + Scalar. + + + + Multiplies by a Monomial + + The by monomial. + Degree. + Coefficient. + + + + Returns a that represents the current . + + A that represents the current . + + + + Gets the coefficients. + + The coefficients. + + + + degree of this polynomial + + + + + Gets a value indicating whether this instance is zero. + + true if this polynomial is the monomial "0" + + + + + + + Guenther Grau + creatale GmbH (christoph.schulz@creatale.de) + + + + The ratios table + + + + + Initializes the class & Pre-computes the symbol ratio table. + + + + + Gets the decoded value. + + The decoded value. + Module bit count. + + + + Samples the bit counts. + + The bit counts. + Module bit count. + + + + Gets the decoded codeword value. + + The decoded codeword value. + Module bit count. + + + + Gets the bit value. + + The bit value. + Module bit count. + + + + Gets the closest decoded value. + + The closest decoded value. + Module bit count. + + + + + + Guenther Grau + + + + Decode the specified image, imageTopLeft, imageBottomLeft, imageTopRight, imageBottomRight, minCodewordWidth + and maxCodewordWidth. + TODO: don't pass in minCodewordWidth and maxCodewordWidth, pass in barcode columns for start and stop pattern + columns. That way width can be deducted from the pattern column. + This approach also allows to detect more details about the barcode, e.g. if a bar type (white or black) is wider + than it should be. This can happen if the scanner used a bad blackpoint. + + Image. + Image top left. + Image bottom left. + Image top right. + Image bottom right. + Minimum codeword width. + Max codeword width. + + + + Merge the specified leftRowIndicatorColumn and rightRowIndicatorColumn. + + Left row indicator column. + Right row indicator column. + + + + Adjusts the bounding box. + + The bounding box. + Row indicator column. + + + + Gets the barcode metadata. + + The barcode metadata. + Left row indicator column. + Right row indicator column. + + + + Gets the row indicator column. + + The row indicator column. + Image. + Bounding box. + Start point. + If set to true left to right. + Minimum codeword width. + Max codeword width. + + + + Adjusts the codeword count. + + Detection result. + Barcode matrix. + + + + Creates the decoder result. + + The decoder result. + Detection result. + + + + This method deals with the fact, that the decoding process doesn't always yield a single most likely value. The + current error correction implementation doesn't deal with erasures very well, so it's better to provide a value + for these ambiguous codewords instead of treating it as an erasure. The problem is that we don't know which of + the ambiguous values to choose. We try decode using the first value, and if that fails, we use another of the + ambiguous values and try to decode again. This usually only happens on very hard to read and decode barcodes, + so decoding the normal barcodes is not affected by this. + + The decoder result from ambiguous values. + Ec level. + Codewords. + contains the indexes of erasures. + array with the indexes that have more than one most likely value. + two dimensional array that contains the ambiguous values. The first dimension must + be the same Length as the ambiguousIndexes array. + + + + Creates the barcode matrix. + + The barcode matrix. + Detection result. + + + + Tests to see if the Barcode Column is Valid + + true, if barcode column is valid, false otherwise. + Detection result. + Barcode column. + + + + Gets the start column. + + The start column. + Detection result. + Barcode column. + Image row. + If set to true left to right. + + + + Detects the codeword. + + The codeword. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + Minimum codeword width. + Max codeword width. + + + + Gets the module bit count. + + The module bit count. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + + + + Gets the number of EC code words. + + The number of EC code words. + Barcode EC level. + + + + Adjusts the codeword start column. + + The codeword start column. + Image. + Minimum column. + Max column. + If set to true left to right. + Codeword start column. + Image row. + + + + Checks the codeword for any skew. + + true, if codeword is within the skew, false otherwise. + Codeword size. + Minimum codeword width. + Max codeword width. + + + + Decodes the codewords. + + The codewords. + Codewords. + Ec level. + Erasures. + + + + Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place. + + The errors. + data and error correction codewords. + positions of any known erasures. + number of error correction codewords that are available in codewords. + + + + Verifies that all is well with the the codeword array. + + Codewords. + Number EC codewords. + + + + Gets the bit count for codeword. + + The bit count for codeword. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Module bit count. + + + + Returns a that represents the jagged array. + + A that represents the jagged array. + Barcode matrix as a jagged array. + + + +

Encapsulates logic that can detect a PDF417 Code in an image, even if the + PDF417 Code is rotated or skewed, or partially obscured.

+ + SITA Lab (kevin.osullivan@sita.aero) + dswitkin@google.com (Daniel Switkin) + Guenther Grau +
+
+ + + if we set the value too low, then we don't detect the correct height of the bar if the start patterns are damaged. + if we set the value too high, then we might detect the start pattern from a neighbor barcode. + + + + + A PDF471 barcode should have at least 3 rows, with each row being >= 3 times the module width. Therefore it should be at least + 9 pixels tall. To be conservative, we use about half the size to ensure we don't miss it. + + + + + B S B S B S B S Bar/Space pattern + 11111111 0 1 0 1 0 1 000. + + + + + 1111111 0 1 000 1 0 1 00 1 + + + + +

Detects a PDF417 Code in an image. Only checks 0 and 180 degree rotations.

+
+ barcode image to decode + optional hints to detector + if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned + + encapsulating results of detecting a PDF417 code + +
+ + + Detects PDF417 codes in an image. Only checks 0 degree rotation (so rotate the matrix and check again outside of this method) + + multiple if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned. + bit matrix to detect barcodes in. + List of ResultPoint arrays containing the coordinates of found barcodes + + + + Locate the vertices and the codewords area of a black blob using the Start and Stop patterns as locators. + + Matrix. + Start row. + Start column. + an array containing the vertices: + vertices[0] x, y top left barcode + vertices[1] x, y bottom left barcode + vertices[2] x, y top right barcode + vertices[3] x, y bottom right barcode + vertices[4] x, y top left codeword area + vertices[5] x, y bottom left codeword area + vertices[6] x, y top right codeword area + vertices[7] x, y bottom right codeword area + + + + + Copies the temp data to the final result + + Result. + Temp result. + Destination indexes. + + + + Finds the rows with the given pattern. + + The rows with pattern. + Matrix. + Height. + Width. + Start row. + Start column. + Pattern. + + + + Finds the guard pattern. Uses System.Linq.Enumerable.Repeat to fill in counters. This might be a performance issue? + + start/end horizontal offset of guard pattern, as an array of two ints. + matrix row of black/white values to search + column x position to start search. + row y position to start search. + width the number of pixels to search on this row. + If set to true search the white patterns first. + pattern of counts of number of black and white pixels that are being searched for as a pattern. + counters array of counters, as long as pattern, to re-use . + + + + Determines how closely a set of observed counts of runs of black/white. + values matches a given target pattern. This is reported as the ratio of + the total variance from the expected pattern proportions across all + pattern elements, to the length of the pattern. + + + ratio of total variance between counters and pattern compared to + total pattern size, where the ratio has been multiplied by 256. + So, 0 means no variance (perfect match); 256 means the total + variance between counters and patterns equals the pattern length, + higher values mean even more variance + + observed counters. + expected pattern. + The most any counter can differ before we give up. + + + + PDF 417 Detector Result class. Skipped private backing stores. + Guenther Grau + + + + + Initializes a new instance of the class. + + Bits. + Points. + + + + Holds all of the information for a barcode in a format where it can be easily accessible + + Jacob Haynes + + + + + the height of the matrix (Rows) + the width of the matrix (Cols) + + + + + Jacob Haynes + + + + + Creates a Barcode row of the width + + The width. + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + A boolean which is true if the bar black false if it is white + How many spots wide the bar is. + + + + + This function scales the row + + How much you want the image to be scaled, must be greater than or equal to 1. + the scaled row + + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + Represents possible PDF417 barcode compaction types. + + + + + + + + + + + + + + + + + + + + + + + + + Data object to specify the minimum and maximum number of rows and columns for a PDF417 barcode. + @author qwandor@google.com (Andrew Walbran) + + + + + Initializes a new instance of the class. + + The min cols. + The max cols. + The min rows. + The max rows. + + + + Gets the min cols. + + + + + Gets the max cols. + + + + + Gets the min rows. + + + + + Gets the max rows. + + + + + Top-level class for the logic part of the PDF417 implementation. + + + + + The start pattern (17 bits) + + + + + The stop pattern (18 bits) + + + + + The codeword table from the Annex A of ISO/IEC 15438:2001(E). + + + + + Calculates the necessary number of rows as described in annex Q of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol (r) + + + + Calculates the number of pad codewords as described in 4.9.2 of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol + the number of pad codewords + + + + Generates the barcode logic. + + the message to encode + PDF417 error correction level to use + + + + Determine optimal nr of columns and rows for the specified number of + codewords. + + number of code words + number of error correction code words + The longest dimension of the barcode, used for columns + The short dimension of the barcode, used for rows + The height of a row, will alter this parameter if aspectRatio>4 (aspectRatio==AUTO) + dimension object containing cols as width and rows as height + + + + Sets max/min row/col values + + maximum allowed columns + minimum allowed columns + maximum allowed rows + minimum allowed rows + + + + Sets compaction to values stored in enum + + compaction mode to use + + + + Sets compact to be true or false + + if true, enables compaction + + + + Sets output encoding. + + sets character encoding to use + + + + Sets the disable eci. + + if set to true don't add an ECI segment for different encodings than default. + + + + defines the level of the error correction / count of error correction codewords + + + + + The class holds the available options for the + + + + + Initializes a new instance of the class. + + + + + Specifies whether to use compact mode for PDF417 (type ). + + + + + Specifies what compaction mode to use for PDF417 (type + ). + + + + + Specifies the minimum and maximum number of rows and columns for PDF417 (type + ). + + + + + Specifies what degree of error correction to use + + + + + Specifies what degree of error correction to use + + + + + Specifies what character encoding to use where applicable (type {@link String}) + + + + + Explicitly disables ECI segment when generating PDF417 Code + That is against the specification but some + readers have problems if the charset is switched from + CP437 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use different encodings + and the ECI segment is omitted. + + + + + Gets the data container for all options + + + + + Specifies the height of the barcode image + + + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + + + + + PDF417 error correction code following the algorithm described in ISO/IEC 15438:2001(E) in + chapter 4.10. + + + + + Tables of coefficients for calculating error correction words + (see annex F, ISO/IEC 15438:2001(E)) + + + + + Determines the number of error correction codewords for a specified error correction + level. + + the error correction level (0-8) + the number of codewords generated for error correction + + + + Determines the error correction level for AUTO + + The error correction level (0-9) + The number of codewords for AUTO errorCorrectionLevel + the number of codewords generated for error correction + + + + Returns the recommended minimum error correction level as described in annex E of + ISO/IEC 15438:2001(E). + + the number of data codewords + the recommended minimum error correction level + + + + Generates the error correction codewords according to 4.10 in ISO/IEC 15438:2001(E). + + the data codewords + the error correction level (0-8) + the String representing the error correction codewords + + + + defines the level of the error correction / count of error correction codewords + + + + + PDF417 high-level encoder following the algorithm described in ISO/IEC 15438:2001(E) in + annex P. + + + + + code for Text compaction + + + + + code for Byte compaction + + + + + code for Numeric compaction + + + + + Text compaction submode Alpha + + + + + Text compaction submode Lower + + + + + Text compaction submode Mixed + + + + + Text compaction submode Punctuation + + + + + mode latch to Text Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters NOT a multiple of 6) + + + + + mode latch to Numeric Compaction mode + + + + + mode shift to Byte Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters a multiple of 6) + + + + + identifier for a user defined Extended Channel Interpretation (ECI) + + + + + identifier for a general purpose ECO format + + + + + identifier for an ECI of a character set of code page + + + + + Raw code table for text compaction Mixed sub-mode + + + + + Raw code table for text compaction: Punctuation sub-mode + + + + + Performs high-level encoding of a PDF417 message using the algorithm described in annex P + of ISO/IEC 15438:2001(E). If byte compaction has been selected, then only byte compaction + is used. + + the message + compaction mode to use + character encoding used to encode in default or byte compaction + or null for default / not applicable + if true, don't add an ECI segment for different encodings than default + the encoded message (the char values range from 0 to 928) + + + + Encode parts of the message using Text Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.2. + + the message + the start position within the message + the number of characters to encode + receives the encoded codewords + should normally be SUBMODE_ALPHA + the text submode in which this method ends + + + + + Encode parts of the message using Byte Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.3. The Unicode characters will be converted to binary using the cp437 + codepage. + + the message converted to a byte array + the start position within the message + the number of bytes to encode + the mode from which this method starts + receives the encoded codewords + + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using text compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using binary compaction. + + the message + the message converted to a byte array + the start position within the message + + the requested character count + + + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Maximum Codewords (Data + Error). + + + + + Gets the bit count sum. + + The bit count sum. + Module bit count. + + + + Converts an ICollection<int> to an int[] + Carry-over from Java. Will likely remove and replace with the Generic .ToArray() method. + + The int array. + List. + + + + Translate the symbol into a codeword + + the codeword corresponding to the symbol. + encoded symbol to translate to a codeword + + + + The sorted table of all possible symbols. Extracted from the PDF417 + specification. The index of a symbol in this table corresponds to the + index into the codeword table. + + + + + This table contains to codewords for all symbols. + + + + + This implementation can detect and decode PDF417 codes in an image. + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Locates and decodes a PDF417 code in an image. + + a String representing the content encoded by the PDF417 code + if a PDF417 cannot be decoded + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + **Note** this will return the FIRST barcode discovered if there are many. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Locates and decodes Multiple PDF417 codes in an image. + + an array of Strings representing the content encoded by the PDF417 codes + + + + + Locates and decodes multiple barcodes in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcodes encode + + + + + Decode the specified image, with the hints and optionally multiple barcodes. + Based on Owen's Comments in , this method has been modified to continue silently + if a barcode was not decoded where it was detected instead of throwing a new exception object. + + Image. + Hints. + If set to true multiple. + + + + Gets the maximum width of the barcode + + The max width. + P1. + P2. + + + + Gets the minimum width of the barcode + + The minimum width. + P1. + P2. + + + + Gets the maximum width of the codeword. + + The max codeword width. + P. + + + + Gets the minimum width of the codeword. + + The minimum codeword width. + P. + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + PDF 417 result meta data. + Guenther Grau + + + + + The Segment ID represents the segment of the whole file distributed over different symbols. + + + + + Is the same for each related PDF417 symbol + + + + + always null + + + + + true if it is the last segment + + + + + count of segments, -1 if not set + + + + + Filename of the encoded file + + + + + filesize in bytes of the encoded file + returns filesize in bytes, -1 if not set + + + + + 16-bit CRC checksum using CCITT-16 + returns crc checksum, -1 if not set + + + + + unix epock timestamp, elapsed seconds since 1970-01-01 + returns elapsed seconds, -1 if not set + + + + + Jacob Haynes + qwandor@google.com (Andrew Walbran) + + + + + default white space (margin) around the code + + + + + default error correction level + + + + + default aspect ratio + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The height of a row in the barcode + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Takes encoder, accounts for width/height, and retrieves bit matrix + + + + + This takes an array holding the values of the PDF 417 + + a byte array of information with 0 is black, and 1 is white + border around the barcode + BitMatrix of the input + + + + Takes and rotates the it 90 degrees + + + + + This object extends LuminanceSource around an array of YUV data returned from the camera driver, + with the option to crop to a rectangle within the full data. This can be used to exclude + superfluous pixels around the perimeter and speed up decoding. + It works for any pixel format where the Y channel is planar and appears first, including + YCbCr_420_SP and YCbCr_422_SP. + @author dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The yuv data. + Width of the data. + Height of the data. + The left. + The top. + The width. + The height. + if set to true [reverse horiz]. + + + + Initializes a new instance of the class. + + The luminances. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Renders the cropped greyscale bitmap. + + + + + + creates a new instance + + + + + + + + + + + + + + + Whether this subclass supports cropping. + + + + width of image from {@link #renderThumbnail()} + + + + + height of image from {@link #renderThumbnail()} + + + + Sean Owen + + + {@link BitMatrix} to parse + ReaderException if dimension is not >= 21 and 1 mod 4 + + +

Reads format information from one of its two locations within the QR Code.

+ +
+ {@link FormatInformation} encapsulating the QR Code's format info + + ReaderException if both format information locations cannot be parsed as + the valid encoding of format information + +
+ +

Reads version information from one of its two locations within the QR Code.

+ +
+ {@link Version} encapsulating the QR Code's version + + ReaderException if both version information locations cannot be parsed as + the valid encoding of version information + +
+ +

Reads the bits in the {@link BitMatrix} representing the finder pattern in the + correct order in order to reconstruct the codewords bytes contained within the + QR Code.

+ +
+ bytes encoded within the QR Code + + ReaderException if the exact number of bytes expected is not read +
+ + Revert the mask removal done while reading the code words. The bit matrix should revert to its original state. + + + Prepare the parser for a mirrored operation. + This flag has effect only on the {@link #readFormatInformation()} and the + {@link #readVersion()}. Before proceeding with {@link #readCodewords()} the + {@link #mirror()} method should be called. + + @param mirror Whether to read version and format information mirrored. + + + Mirror the bit matrix in order to attempt a second reading. + + +

Encapsulates a block of data within a QR Code. QR Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

When QR Codes use multiple data blocks, they are actually interleaved. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ +
+ bytes as read directly from the QR Code + + version of the QR Code + + error-correction level of the QR Code + + {@link DataBlock}s containing original bytes, "de-interleaved" from representation in the + QR Code + +
+ +

Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations + of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix, + including areas used for finder patterns, timing patterns, etc. These areas should be unused + after the point they are unmasked anyway.

+ +

Note that the diagram in section 6.8.1 is misleading since it indicates that i is column position + and j is row position. In fact, as the text says, i is row position and j is column position.

+ +
+ Sean Owen +
+ + See ISO 18004:2006 6.8.1 + + +

Implementations of this method reverse the data masking process applied to a QR Code and + make its bits ready to read.

+
+ + representation of QR Code bits + dimension of QR Code, represented by bits, being unmasked +
+ +

QR Codes can encode text as bits in one of several modes, and can use multiple modes + in one QR Code. This class decodes the bits back into text.

+ +

See ISO 18004:2006, 6.4.3 - 6.4.7

+ Sean Owen +
+
+ + + See ISO 18004:2006, 6.4.4 Table 5 + + + + + See specification GBT 18284-2000 + + The bits. + The result. + The count. + + + + +

The main class which implements QR Code decoding -- as opposed to locating and extracting + the QR Code from an image.

+
+ + Sean Owen + +
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a QR Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Decodes a QR Code represented as a {@link BitMatrix}. A 1 or "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+
+ data and error correction codewords + number of codewords that are data bytes + +
+ + +

See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels + defined by the QR code standard.

+
+ Sean Owen +
+ + L = ~7% correction + + + M = ~15% correction + + + Q = ~25% correction + + + H = ~30% correction + + + + Ordinals this instance. + + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Fors the bits. + + int containing the two bits encoding a QR Code's error correction level + + representing the encoded error correction level + + + + L = ~7% correction + + + M = ~15% correction + + + Q = ~25% correction + + + H = ~30% correction + + + + Gets the bits. + + + + + Gets the name. + + + +

Encapsulates a QR Code's format information, including the data mask used and + error correction level.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + +
+ + See ISO 18004:2006, Annex C, Table C.1 + + + Offset i holds the number of 1 bits in the binary representation of i + + + + Decodes the format information. + + format info indicator, with mask still applied + The masked format info2. + + information about the format it specifies, or null + if doesn't seem to match any known pattern + + + + +

See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which + data can be encoded to bits in the QR code standard.

+
+ Sean Owen +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See GBT 18284-2000; "Hanzi" is a transliteration of this mode name. + + + + Fors the bits. + + four bits encoding a QR Code data mode + + encoded by these bits + + if bits do not correspond to a known mode + + + version in question + + number of bits used, in this QR Code symbol {@link Version}, to encode the + count of characters that will follow encoded in this {@link Mode} + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Gets the name. + + + + + Gets the bits. + + + + + enumeration for encoding modes + + + + + + + + + + numeric encoding + + + + + alpha-numeric encoding + + + + + structured append + + + + + byte mode encoding + + + + + ECI segment + + + + + Kanji mode + + + + + FNC1 char, first position + + + + + FNC1 char, second position + + + + + Hanzi mode + + + + + Meta-data container for QR Code decoding. Instances of this class may be used to convey information back to the + decoding caller. Callers are expected to process this. + + + + + Initializes a new instance of the class. + + if set to true [mirrored]. + + + + Apply the result points' order correction due to mirroring. + + Array of points to apply mirror correction to. + + + + true if the QR Code was mirrored. + + + + + See ISO 18004:2006 Annex D + + Sean Owen + + + See ISO 18004:2006 Annex D. + Element i represents the raw version bits that specify version i + 7 + + + + + Gets the EC blocks for level. + + The ec level. + + + +

Deduces version information purely from QR Code dimensions.

+ +
+ dimension in modules + + for a QR Code of that dimension or null +
+ + + Gets the version for number. + + The version number. + + + + See ISO 18004:2006 Annex E + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + See ISO 18004:2006 6.5.1 Table 9 + + + + Gets the version number. + + + + + Gets the alignment pattern centers. + + + + + Gets the total codewords. + + + + + Gets the dimension for version. + + + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + + Gets the EC blocks. + + + + + + Gets the EC codewords per block. + + + + + Gets the num blocks. + + + + + Gets the total EC codewords. + + + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the QR code version's format.

+
+
+ + + Gets the count. + + + + + Gets the data codewords. + + + +

Encapsulates an alignment pattern, which are the smaller square patterns found in + all but the simplest QR Codes.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + +

Determines if this alignment pattern "about equals" an alignment pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing an average of the two. + + The i. + The j. + New size of the module. + + + + + Gets the X. + + + + + Gets the Y. + + + +

This class attempts to find alignment patterns in a QR Code. Alignment patterns look like finder + patterns but are smaller and appear at regular intervals throughout the image.

+ +

At the moment this only looks for the bottom-right alignment pattern.

+ +

This is mostly a simplified copy of {@link FinderPatternFinder}. It is copied, + pasted and stripped down here for maximum performance but does unfortunately duplicate + some code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Creates a finder that will look in a portion of the whole image.

+ +
+ image to search + + left column from which to start searching + + top row from which to start searching + + width of region to search + + height of region to search + + estimated module size so far + + callback function which is called, when a result point is found +
+ +

This method attempts to find the bottom-right alignment pattern in the image. It is a bit messy since + it's pretty performance-critical and so is written to be fast foremost.

+ +
+ if found +
+ + Given a count of black/white/black pixels just seen and an end position, + figures the location of the center of this black/white/black run. + + + + count of black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/1 ratios + used by alignment patterns to be considered a match + + + + +

After a horizontal scan finds a potential alignment pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + alignment pattern to see if the same proportion is detected.

+
+ row where an alignment pattern was detected + center of the section that appears to cross an alignment pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of alignment pattern, or null if not found + +
+ +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will see if this pattern had been + found on a previous horizontal scan. If so, we consider it confirmed and conclude we have + found the alignment pattern.

+ +
+ reading state module counts from horizontal scan + + row where alignment pattern may be found + + end of possible alignment pattern in row + + {@link AlignmentPattern} if we have found the same pattern twice, or null if not + +
+ + +

Encapsulates a finder pattern, which are the three square patterns found in + the corners of QR Codes. It also encapsulates a count of similar finder patterns, + as a convenience to the finder's bookkeeping.

+
+ Sean Owen +
+ + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + +

Determines if this finder pattern "about equals" a finder pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing a weighted average + based on count. + + The i. + The j. + New size of the module. + + + + + distance between two points + + + + + Orders an array of three ResultPoints in an order [A,B,C] such that AB < AC and + BC < AC and the angle between BC and BA is less than 180 degrees. + + + + + Returns the z component of the cross product between vectors BC and BA. + + + + + Gets the X. + + + + + Gets the Y. + + + + + Gets the size of the estimated module. + + + The size of the estimated module. + + + + +

Encapsulates information about finder patterns in an image, including the location of + the three finder patterns, and their estimated module size.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The pattern centers. + + + + Gets the bottom left. + + + + + Gets the top left. + + + + + Gets the top right. + + + + + JAVAPORT: The original code was a 2D array of ints, but since it only ever gets assigned + 0, 1 and 2 I'm going to use less memory and go with bytes. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Sets the specified x. + + The x. + The y. + The value. + + + + Sets the specified x. + + The x. + The y. + if set to true [value]. + + + + Clears the specified value. + + The value. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Gets the height. + + + + + Gets the width. + + + + + Gets or sets the with the specified x. + + + + + an internal representation as bytes, in row-major order. array[y][x] represents point (x,y) + + + + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + Encode "bytes" with the error correction level "ecLevel". The encoding mode will be chosen + internally by chooseMode(). On success, store the result in "qrCode". + We recommend you to use QRCode.EC_LEVEL_L (the lowest level) for + "getECLevel" since our primary use is to show QR code on desktop screens. We don't need very + strong error correction for this purpose. + Note that there is no way to encode bytes in MODE_KANJI. We might want to add EncodeWithMode() + with which clients can specify the encoding mode. For now, we don't need the functionality. + + text to encode + error correction level to use + representing the encoded QR code + + + + Encodes the specified content. + + The content. + The ec level. + The hints. + + + + + Decides the smallest version of QR code that will contain all of the provided data. + + if the data cannot fit in any version + + + + Gets the alphanumeric code. + + The code. + the code point of the table used in alphanumeric mode or + -1 if there is no corresponding code in the table. + + + + Chooses the mode. + + The content. + + + + + Choose the best mode by examining the content. Note that 'encoding' is used as a hint; + if it is Shift_JIS, and the input is only double-byte Kanji, then we return {@link Mode#KANJI}. + + The content. + The encoding. + + + + + true if the number of input bits will fit in a code with the specified version and error correction level. + + + + Terminate bits as described in 8.4.8 and 8.4.9 of JISX0510:2004 (p.24). + + The num data bytes. + The bits. + + + + Get number of data bytes and number of error correction bytes for block id "blockID". Store + the result in "numDataBytesInBlock", and "numECBytesInBlock". See table 12 in 8.5.1 of + JISX0510:2004 (p.30) + + The num total bytes. + The num data bytes. + The num RS blocks. + The block ID. + The num data bytes in block. + The num EC bytes in block. + + + + Interleave "bits" with corresponding error correction bytes. On success, store the result in + "result". The interleave rule is complicated. See 8.6 of JISX0510:2004 (p.37) for details. + + The bits. + The num total bytes. + The num data bytes. + The num RS blocks. + + + + + Append mode info. On success, store the result in "bits". + + The mode. + The bits. + + + + Append length info. On success, store the result in "bits". + + The num letters. + The version. + The mode. + The bits. + + + + Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits". + + The content. + The mode. + The bits. + The encoding. + + + + + + Satoru Takabayashi + Daniel Switkin + Sean Owen + + + + Apply mask penalty rule 1 and return the penalty. Find repetitive cells with the same color and + give penalty to them. Example: 00000 or 11111. + + The matrix. + + + + + Apply mask penalty rule 2 and return the penalty. Find 2x2 blocks with the same color and give + penalty to them. This is actually equivalent to the spec's rule, which is to find MxN blocks and give a + penalty proportional to (M-1)x(N-1), because this is the number of 2x2 blocks inside such a block. + + The matrix. + + + + + Apply mask penalty rule 3 and return the penalty. Find consecutive cells of 00001011101 or + 10111010000, and give penalty to them. If we find patterns like 000010111010000, we give + penalties twice (i.e. 40 * 2). + + The matrix. + + + + + Apply mask penalty rule 4 and return the penalty. Calculate the ratio of dark cells and give + penalty if the ratio is far from 50%. It gives 10 penalty for 5% distance. + + The matrix. + + + + + Return the mask bit for "getMaskPattern" at "x" and "y". See 8.8 of JISX0510:2004 for mask + pattern conditions. + + The mask pattern. + The x. + The y. + + + + + Helper function for applyMaskPenaltyRule1. We need this for doing this calculation in both + vertical and horizontal orders respectively. + + The matrix. + if set to true [is horizontal]. + + + + + + + + satorux@google.com (Satoru Takabayashi) - creator + + + + + Set all cells to 2. 2 means that the cell is empty (not set yet). + + JAVAPORT: We shouldn't need to do this at all. The code should be rewritten to begin encoding + with the ByteMatrix initialized all to zero. + + The matrix. + + + + Build 2D matrix of QR Code from "dataBits" with "ecLevel", "version" and "getMaskPattern". On + success, store the result in "matrix" and return true. + + The data bits. + The ec level. + The version. + The mask pattern. + The matrix. + + + + Embed basic patterns. On success, modify the matrix and return true. + The basic patterns are: + - Position detection patterns + - Timing patterns + - Dark dot at the left bottom corner + - Position adjustment patterns, if need be + + The version. + The matrix. + + + + Embed type information. On success, modify the matrix. + + The ec level. + The mask pattern. + The matrix. + + + + Embed version information if need be. On success, modify the matrix and return true. + See 8.10 of JISX0510:2004 (p.47) for how to embed version information. + + The version. + The matrix. + + + + Embed "dataBits" using "getMaskPattern". On success, modify the matrix and return true. + For debugging purposes, it skips masking process if "getMaskPattern" is -1. + See 8.7 of JISX0510:2004 (p.38) for how to embed data bits. + + The data bits. + The mask pattern. + The matrix. + + + + Return the position of the most significant bit set (to one) in the "value". The most + significant bit is position 32. If there is no bit set, return 0. Examples: + - findMSBSet(0) => 0 + - findMSBSet(1) => 1 + - findMSBSet(255) => 8 + + The value_ renamed. + + + + + Calculate BCH (Bose-Chaudhuri-Hocquenghem) code for "value" using polynomial "poly". The BCH + code is used for encoding type information and version information. + Example: Calculation of version information of 7. + f(x) is created from 7. + - 7 = 000111 in 6 bits + - f(x) = x^2 + x^2 + x^1 + g(x) is given by the standard (p. 67) + - g(x) = x^12 + x^11 + x^10 + x^9 + x^8 + x^5 + x^2 + 1 + Multiply f(x) by x^(18 - 6) + - f'(x) = f(x) * x^(18 - 6) + - f'(x) = x^14 + x^13 + x^12 + Calculate the remainder of f'(x) / g(x) + x^2 + __________________________________________________ + g(x) )x^14 + x^13 + x^12 + x^14 + x^13 + x^12 + x^11 + x^10 + x^7 + x^4 + x^2 + -------------------------------------------------- + x^11 + x^10 + x^7 + x^4 + x^2 + + The remainder is x^11 + x^10 + x^7 + x^4 + x^2 + Encode it in binary: 110010010100 + The return value is 0xc94 (1100 1001 0100) + + Since all coefficients in the polynomials are 1 or 0, we can do the calculation by bit + operations. We don't care if coefficients are positive or negative. + + The value. + The poly. + + + + + Make bit vector of type information. On success, store the result in "bits" and return true. + Encode error correction level and mask pattern. See 8.9 of + JISX0510:2004 (p.45) for details. + + The ec level. + The mask pattern. + The bits. + + + + Make bit vector of version information. On success, store the result in "bits" and return true. + See 8.10 of JISX0510:2004 (p.45) for details. + + The version. + The bits. + + + + Check if "value" is empty. + + The value. + + true if the specified value is empty; otherwise, false. + + + + + Embed the lonely dark dot at left bottom corner. JISX0510:2004 (p.46) + + The matrix. + + + + + + The x start. + The y start. + The matrix. + + + + Embed position detection patterns and surrounding vertical/horizontal separators. + + The matrix. + + + + Embed position adjustment patterns if need be. + + The version. + The matrix. + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + + + + + + Initializes a new instance of the class. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Check if "mask_pattern" is valid. + + The mask pattern. + + true if [is valid mask pattern] [the specified mask pattern]; otherwise, false. + + + + + Gets or sets the mode. + + + The mode. + + + + + Gets or sets the EC level. + + + The EC level. + + + + + Gets or sets the version. + + + The version. + + + + + Gets or sets the mask pattern. + + + The mask pattern. + + + + + Gets or sets the matrix. + + + The matrix. + + + + + The class holds the available options for the QrCodeWriter + + + + + Initializes a new instance of the class. + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + . + + + + + Specifies what character encoding to use where applicable (type ) + + + + + Explicitly disables ECI segment when generating QR Code + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + + + + + Specifies the exact version of QR code to be encoded. An integer, range 1 to 40. If the data specified + cannot fit within the required version, a WriterException will be thrown. + + + + + Gets the data container for all options + + + + + Specifies the height of the barcode image + + + + + Specifies the width of the barcode image + + + + + Don't put the content string into the output image. + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + + + + + This object renders a QR Code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Interface for a class to convert a BitMatrix to an output image format + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + The options. + + + + + Interface for a class to convert a BitMatrix to an output image format + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + The options. + + + + + Represents a barcode as a Svg image + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The content. + + + + Gives the XML representation of the SVG image + + + + + Gets or sets the content. + + + The content. + + + + + The original height of the bitmatrix for the barcode + + + + + The original width of the bitmatrix for the barcode + + + + + Interface for a class to convert a BitMatrix to an output image format + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + The options. + + + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + + + converts the pixel data to a bitmap object + + + + + + the generated code as byte array of BGRA pixels + + + + + the width of the image + + + + + the height of the image + + + + + Renders a to an byte array with pixel data (4 byte per pixel, BGRA) + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + + Renders a barcode into a Svg image + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Gets or sets the foreground color. + + The foreground color. + + + + Gets or sets the background color. + + The background color. + + + + Gets or sets the font family name + + The font family name. + + + + Gets or sets the font size in pixel + + The font size in pixel. + + + + Renders a to a + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + + Gets or sets the font family. + + + The font family. + + + + + Gets or sets the size of the font. + + + The size of the font. + + + + + Encapsulates the result of decoding a barcode within an image. + + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + The timestamp. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + The timestamp. + + + + Adds one metadata to the result + + The type. + The value. + + + + Adds a list of metadata to the result + + The metadata. + + + + Adds the result points. + + The new points. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + raw text encoded by the barcode, if applicable, otherwise null + + + raw bytes encoded by the barcode, if applicable, otherwise null + + + + points related to the barcode in the image. These are typically points + identifying finder patterns or the corners of the barcode. The exact meaning is + specific to the type of barcode that was decoded. + + + + {@link BarcodeFormat} representing the format of the barcode that was decoded + + + + {@link Hashtable} mapping {@link ResultMetadataType} keys to values. May be + null. This contains optional metadata about what was detected about the barcode, + like orientation. + + + + + Gets the timestamp. + + + + + how many bits of are valid; typically 8 times its length + + + + + Represents some type of metadata about the result of the decoding that the decoder + wishes to communicate back to the caller. + + Sean Owen + + + + Unspecified, application-specific metadata. Maps to an unspecified {@link Object}. + + + + + Denotes the likely approximate orientation of the barcode in the image. This value + is given as degrees rotated clockwise from the normal, upright orientation. + For example a 1D barcode which was found by reading top-to-bottom would be + said to have orientation "90". This key maps to an {@link Integer} whose + value is in the range [0,360). + + + + +

2D barcode formats typically encode text, but allow for a sort of 'byte mode' + which is sometimes used to encode binary data. While {@link Result} makes available + the complete raw bytes in the barcode for these formats, it does not offer the bytes + from the byte segments alone.

+

This maps to a {@link java.util.List} of byte arrays corresponding to the + raw bytes in the byte segments in the barcode, in order.

+
+
+ + + Error correction level used, if applicable. The value type depends on the + format, but is typically a String. + + + + + For some periodicals, indicates the issue number as an {@link Integer}. + + + + + For some products, indicates the suggested retail price in the barcode as a + formatted {@link String}. + + + + + For some products, the possible country of manufacture as a {@link String} denoting the + ISO country code. Some map to multiple possible countries, like "US/CA". + + + + + For some products, the extension text + + + + + If the code format supports structured append and + the current scanned code is part of one then the + sequence number is given with it. + + + + + If the code format supports structured append and + the current scanned code is part of one then the + parity is given with it. + + + + + PDF417-specific metadata + + + + + Aztec-specific metadata + + + + + Encapsulates a point of interest in an image containing a barcode. Typically, this + would be the location of a finder pattern or the corner of the barcode, for example. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The x. + The y. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC and + BC is less than AC and the angle between BC and BA is less than 180 degrees. + + array of three to order + + + + calculates the distance between two points + + first pattern + second pattern + + distance between two points + + + + + Returns the z component of the cross product between vectors BC and BA. + + + + + Gets the X. + + + + + Gets the Y. + + + + Callback which is invoked when a possible result point (significant + point in the barcode image such as a corner) is found. + + + + + + + + enumeration of supported bitmap format which the RGBLuminanceSource can process + + + + + format of the byte[] isn't known. RGBLuminanceSource tries to determine the best possible value + + + + + grayscale array, the byte array is a luminance array with 1 byte per pixel + + + + + grayscale array, the byte array is a luminance array with 2 bytes per pixel + + + + + 3 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels alpha, red, green and blue + + + + + 3 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green, red and alpha + + + + + 2 bytes per pixel, 5 bit red, 6 bits green and 5 bits blue + + + + + 4 bytes per pixel with the channels red, green, blue and alpha + + + + + 4 bytes for two pixels, UYVY formatted + + + + + 4 bytes for two pixels, YUYV formatted + + + + + Luminance source class which support different formats of images. + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 1 byte per pixel (Gray8). + That means the whole array consists of the luminance values (grayscale). + + The luminance array. + The width. + The height. + if set to true [is8 bit]. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + The bitmap format. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + calculates the luminance values for the given byte array and bitmap format + + + + + + + Attribute is only for compatibility issues + + + + + Attribute is only for source code compatibility issues + + + + + Attribute is only for compatibility issues + + + + + Contains conversion support elements such as classes, interfaces and static methods. + + + + + Copies an array of chars obtained from a String into a specified array of chars + + The String to get the chars from + Position of the String to start getting the chars + Position of the String to end getting the chars + Array to return the chars + Position of the destination array of chars to start storing the chars + An array of chars + + + + Sets the capacity for the specified List + + The List which capacity will be set + The new capacity value + + + + Converts a string-Collection to an array + + The strings. + + + + + Joins all elements to one string. + + + The separator. + The values. + + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The value. + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The start index. + The end index. + The value. + + + + + + + + + + + + + + + + + + Savely gets the value of a decoding hint + if hints is null the default is returned + + + The hints. + Type of the hint. + The @default. + + + + + A base class which covers the range of exceptions which may occur when encoding a barcode using + the Writer framework. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner exc. + +
+
diff --git a/packages/ZXing.Net.0.16.4/lib/native/zxing.pri b/packages/ZXing.Net.0.16.4/lib/native/zxing.pri new file mode 100644 index 0000000..7d187a1 Binary files /dev/null and b/packages/ZXing.Net.0.16.4/lib/native/zxing.pri differ diff --git a/packages/ZXing.Net.0.16.4/lib/native/zxing.winmd b/packages/ZXing.Net.0.16.4/lib/native/zxing.winmd new file mode 100644 index 0000000..e701968 Binary files /dev/null and b/packages/ZXing.Net.0.16.4/lib/native/zxing.winmd differ diff --git a/packages/ZXing.Net.0.16.4/lib/net20-cf/zxing.ce2.0.dll b/packages/ZXing.Net.0.16.4/lib/net20-cf/zxing.ce2.0.dll new file mode 100644 index 0000000..010fe32 Binary files /dev/null and b/packages/ZXing.Net.0.16.4/lib/net20-cf/zxing.ce2.0.dll differ diff --git a/packages/ZXing.Net.0.16.4/lib/net20-cf/zxing.ce2.0.xml b/packages/ZXing.Net.0.16.4/lib/net20-cf/zxing.ce2.0.xml new file mode 100644 index 0000000..4f28224 --- /dev/null +++ b/packages/ZXing.Net.0.16.4/lib/net20-cf/zxing.ce2.0.xml @@ -0,0 +1,11773 @@ + + + + zxing.ce2.0 + + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + + + + + + Initializes a new instance of the class. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Check if "mask_pattern" is valid. + + The mask pattern. + + true if [is valid mask pattern] [the specified mask pattern]; otherwise, false. + + + + + Gets or sets the mode. + + + The mode. + + + + + Gets or sets the EC level. + + + The EC level. + + + + + Gets or sets the version. + + + The version. + + + + + Gets or sets the mask pattern. + + + The mask pattern. + + + + + Gets or sets the matrix. + + + The matrix. + + + + + Holds all of the information for a barcode in a format where it can be easily accessible + + Jacob Haynes + + + + + the height of the matrix (Rows) + the width of the matrix (Cols) + + + + +

Encapsulates logic that can detect a PDF417 Code in an image, even if the + PDF417 Code is rotated or skewed, or partially obscured.

+ + SITA Lab (kevin.osullivan@sita.aero) + dswitkin@google.com (Daniel Switkin) + Guenther Grau +
+
+ + + if we set the value too low, then we don't detect the correct height of the bar if the start patterns are damaged. + if we set the value too high, then we might detect the start pattern from a neighbor barcode. + + + + + A PDF471 barcode should have at least 3 rows, with each row being >= 3 times the module width. Therefore it should be at least + 9 pixels tall. To be conservative, we use about half the size to ensure we don't miss it. + + + + + B S B S B S B S Bar/Space pattern + 11111111 0 1 0 1 0 1 000. + + + + + 1111111 0 1 000 1 0 1 00 1 + + + + +

Detects a PDF417 Code in an image. Only checks 0 and 180 degree rotations.

+
+ barcode image to decode + optional hints to detector + if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned + + encapsulating results of detecting a PDF417 code + +
+ + + Detects PDF417 codes in an image. Only checks 0 degree rotation (so rotate the matrix and check again outside of this method) + + multiple if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned. + bit matrix to detect barcodes in. + List of ResultPoint arrays containing the coordinates of found barcodes + + + + Locate the vertices and the codewords area of a black blob using the Start and Stop patterns as locators. + + Matrix. + Start row. + Start column. + an array containing the vertices: + vertices[0] x, y top left barcode + vertices[1] x, y bottom left barcode + vertices[2] x, y top right barcode + vertices[3] x, y bottom right barcode + vertices[4] x, y top left codeword area + vertices[5] x, y bottom left codeword area + vertices[6] x, y top right codeword area + vertices[7] x, y bottom right codeword area + + + + + Copies the temp data to the final result + + Result. + Temp result. + Destination indexes. + + + + Finds the rows with the given pattern. + + The rows with pattern. + Matrix. + Height. + Width. + Start row. + Start column. + Pattern. + + + + Finds the guard pattern. Uses System.Linq.Enumerable.Repeat to fill in counters. This might be a performance issue? + + start/end horizontal offset of guard pattern, as an array of two ints. + matrix row of black/white values to search + column x position to start search. + row y position to start search. + width the number of pixels to search on this row. + If set to true search the white patterns first. + pattern of counts of number of black and white pixels that are being searched for as a pattern. + counters array of counters, as long as pattern, to re-use . + + + + Determines how closely a set of observed counts of runs of black/white. + values matches a given target pattern. This is reported as the ratio of + the total variance from the expected pattern proportions across all + pattern elements, to the length of the pattern. + + + ratio of total variance between counters and pattern compared to + total pattern size, where the ratio has been multiplied by 256. + So, 0 means no variance (perfect match); 256 means the total + variance between counters and patterns equals the pattern length, + higher values mean even more variance + + observed counters. + expected pattern. + The most any counter can differ before we give up. + + + + Encapsulates an RSS barcode finder pattern, including its start/end position and row. + + + + + Initializes a new instance of the class. + + The value. + The start end. + The start. + The end. + The row number. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Gets the value. + + + + + Gets the start end. + + + + + Gets the result points. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Gets the information. + + + + + + Parses the information. + + + + + + Creates the decoder. + + The information. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + This object renders a ITF code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + +

Encapsulates functionality and implementation that is common to one-dimensional barcodes.

+ dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + The base class for all objects which encode/generate a barcode image. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + a byte array of horizontal pixels (0 = white, 1 = black) + + + + Appends the given pattern to the target array starting at pos. + + encode black/white pattern into this array + position to start encoding at in target + lengths of black/white runs to encode + starting color - false for white, true for black + the number of elements added to target. + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + + barcode contents to encode + a bool[] of horizontal pixels (false = white, true = black) + + + + Calculates the checksum digit modulo10. + + The contents. + + + + + Gets the default margin. + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code bool[]} of horizontal pixels (false = white, true = black) + + + + + + +

Implements decoding of the ITF format, or Interleaved Two of Five.

+ +

This Reader will scan ITF barcodes of certain lengths only. + At the moment it reads length 6, 8, 10, 12, 14, 16, 18, 20, 24, 44 and 48 as these have appeared "in the wild". Not all + lengths are scanned, especially shorter ones, to avoid false positives. This in turn is due to a lack of + required checksum function.

+ +

The checksum is optional and is not applied by this Reader. The consumer of the decoded + value will have to apply a checksum if required.

+ +

http://en.wikipedia.org/wiki/Interleaved_2_of_5 + is a great reference for Interleaved 2 of 5 information.

+ + kevin.osullivan@sita.aero, SITA Lab. +
+
+ + + Encapsulates functionality and implementation that is common to all families + of one-dimensional barcodes. + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Implementations of this interface can decode an image of a barcode in some format into + the String it encodes. For example, can + decode a QR code. The decoder may optionally receive hints from the caller which may help + it decode more quickly or accurately. + + See , which attempts to determine what barcode + format is present within the image as well, and then decodes it accordingly. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + String which the barcode encodes + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + + + + + + + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + Note that we don't try rotation without the try harder flag, even if rotation was supported. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + We're going to examine rows from the middle outward, searching alternately above and below the + middle, and farther out each time. rowStep is the number of rows between each successive + attempt above and below the middle. So we'd scan row middle, then middle - rowStep, then + middle + rowStep, then middle - (2 * rowStep), etc. + rowStep is bigger as the image is taller, but is always at least 1. We've somewhat arbitrarily + decided that moving up and down by about 1/16 of the image is pretty good; we try more of the + image if "trying harder". + + The image to decode + Any hints that were requested + The contents of the decoded barcode + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the pattern in reverse. + + The row. + The start. + The counters. + + + + + Determines how closely a set of observed counts of runs of black/white values matches a given + target pattern. This is reported as the ratio of the total variance from the expected pattern + proportions across all pattern elements, to the length of the pattern. + + observed counters + expected pattern + The most any counter can differ before we give up + ratio of total variance between counters and pattern compared to total pattern size, + where the ratio has been multiplied by 256. So, 0 means no variance (perfect match); 256 means + the total variance between counters and patterns equals the pattern length, higher values mean + even more variance + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + Valid ITF lengths. Anything longer than the largest value is also allowed. + + + + + Start/end guard pattern. + + Note: The end pattern is reversed because the row is reversed before + searching for the END_PATTERN + + + + + Patterns of Wide / Narrow lines to indicate each digit + + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + + row of black/white values to search + offset of start pattern + The payload end. + to append decoded chars to + + false, if decoding could not complete successfully + + + + + Identify where the start of the middle / payload section starts. + + row of black/white values to search + Array, containing index of start of 'start block' and end of 'start block' + + + + The start & end patterns must be pre/post fixed by a quiet zone. This + zone must be at least 10 times the width of a narrow line. Scan back until + we either get to the start of the barcode or match the necessary number of + quiet zone pixels. + + Note: Its assumed the row is reversed when using this method to find + quiet zone after the end pattern. + + ref: http://www.barcode-1.net/i25code.html + + bit array representing the scanned barcode. + index into row of the start or end pattern. + false, if the quiet zone cannot be found + + + + Skip all whitespace until we get to the first black line. + + row of black/white values to search + index of the first black line or -1 if no black lines are found in the row. + + + + Identify where the end of the middle / payload section ends. + + row of black/white values to search + Array, containing index of start of 'end block' and end of 'end + block' or null, if nothing found + + + + + row of black/white values to search + position to start search + pattern of counts of number of black and white pixels that are being searched for as a pattern + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a sequence of ITF black/white lines into single + digit. + + the counts of runs of observed black/white/black/... values + The decoded digit + + false, if digit cannot be decoded + + + + + for compatibility with .net 4.0 + + The type of the result. + + + + + for compatibility with .net 4.0 + + The type of the 1. + The type of the result. + The param1. + + + + + for compatibility with .net 4.0 + + The type of the 1. + The type of the 2. + The type of the result. + The param1. + The param2. + + + + + for compatibility with .net 4.0 + + The type of the 1. + The type of the 2. + The type of the 3. + The type of the result. + The param1. + The param2. + The param3. + + + + + for compatibility with .net 4.0 + + The type of the 1. + The type of the 2. + The type of the 3. + The type of the 4. + The type of the result. + The param1. + The param2. + The param3. + The param4. + + + + + mike32767 + Manuel Kasten + + + + + to parse + + + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode the barcode inside a bitmap object + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Common string-related functions. + + Sean Owen + Alex Dupre + + + + SJIS + + + + + GB2312 + + + + + Guesses the encoding. + + bytes encoding a string, whose encoding should be guessed + decode hints if applicable + name of guessed encoding; at the moment will only guess one of: + {@link #SHIFT_JIS}, {@link #UTF8}, {@link #ISO88591}, or the platform + default encoding if none of these can possibly be correct + + + Implementations of this class can, given locations of finder patterns for a QR code in an + image, sample the right points in the image to reconstruct the QR code, accounting for + perspective distortion. It is abstracted since it is relatively expensive and should be allowed + to take advantage of platform-specific optimized implementations, like Sun's Java Advanced + Imaging library, but which may not be available in other environments such as J2ME, and vice + versa. + + The implementation used can be controlled by calling {@link #setGridSampler(GridSampler)} + with an instance of a class which implements this interface. + + Sean Owen + + + Sets the implementation of used by the library. One global + instance is stored, which may sound problematic. But, the implementation provided + ought to be appropriate for the entire platform, and all uses of this library + in the whole lifetime of the JVM. For instance, an Android activity can swap in + an implementation that takes advantage of native platform libraries. + + The platform-specific object to install. + + + +

Samples an image for a square matrix of bits of the given dimension. This is used to extract + the black/white modules of a 2D barcode like a QR Code found in an image. Because this barcode + may be rotated or perspective-distorted, the caller supplies four points in the source image + that define known points in the barcode, so that the image may be sampled appropriately.

+

The last eight "from" parameters are four X/Y coordinate pairs of locations of points in + the image that define some significant points in the image to be sample. For example, + these may be the location of finder pattern in a QR Code.

+

The first eight "to" parameters are four X/Y coordinate pairs measured in the destination + , from the top left, where the known points in the image given by the "from" + parameters map to.

+

These 16 parameters define the transformation needed to sample the image.

+
+ image to sample + The dimension X. + The dimension Y. + The p1 preimage X. + The p1 preimage Y. + The p2 preimage X. + The p2 preimage Y. + The p3 preimage X. + The p3 preimage Y. + The p4 preimage X. + The p4 preimage Y. + The p1 image X. + The p1 image Y. + The p2 image X. + The p2 image Y. + The p3 image X. + The p3 image Y. + The p4 image X. + The p4 image Y. + + representing a grid of points sampled from the image within a region + defined by the "from" parameters + + ReaderException if image can't be sampled, for example, if the transformation defined +
+ + + + + + + + + + + +

Checks a set of points that have been transformed to sample points on an image against + the image's dimensions to see if the point are even within the image.

+ +

This method will actually "nudge" the endpoints back onto the image if they are found to be + barely (less than 1 pixel) off the image. This accounts for imperfect detection of finder + patterns in an image where the QR Code runs all the way to the image border.

+ +

For efficiency, the method will check points from either end of the line until one is found + to be within the image. Because the set of points are assumed to be linear, this is valid.

+ +
+ image into which the points should map + + actual points in x1,y1,...,xn,yn form + +
+ + the current implementation of + + + + + Represents a parsed result that encodes a product by an identifier of some kind. + + dswitkin@google.com (Daniel Switkin) + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link ResultParser#parseResult(Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + The base class for luminance sources which supports + cropping and rotating based upon the luminance values. + + + + + The purpose of this class hierarchy is to abstract different bitmap implementations across + platforms into a standard interface for requesting greyscale luminance values. The interface + only provides immutable methods; therefore crop and rotation create copies. This is to ensure + that one Reader does not modify the original luminance source and leave it in an unknown state + for other Readers in the chain. + + dswitkin@google.com (Daniel Switkin) + + + + initializing constructor + + + + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + inverts the luminance values, not supported here. has to implemented in sub classes + + + + + + + + + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff + + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + The width of the bitmap. + + + The height of the bitmap. + + + Whether this subclass supports cropping. + + + Whether this subclass supports counter-clockwise rotation. + + + + + Whether this subclass supports invertion. + + + + weight of the red channel for calculating a gray scale image + + + + + weight of the green channel for calculating a gray scale image + + + + + weight of the blue channel for calculating a gray scale image + + + + + numbers of bits which for right shifting + + + + + + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + + The luminance array. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + TODO: not implemented yet + + + A rotated version of this object. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Inverts the luminance values (newValue = 255 - oldValue) + + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + gets the luminance matrix + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + + Whether this subclass supports cropping. + + + + + Whether this subclass supports invertion. + + + + A smart class to decode the barcode inside a bitmap object + + + + + A smart class to decode the barcode inside a bitmap object + + + + + A smart class to decode the barcode inside a bitmap object + + + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode the barcode inside a bitmap object + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap which is given by a generic byte array. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + represents the default function which is called to get a instance from a raw byte array + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb array. + If null the RGBLuminanceSource is used. The handler is only called when Decode with a byte[] array is called. + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + raises the ResultFound event + + + + + + raises the ResultFound event + + + + + + calls the explicitResultPointFound action + + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + Gets or sets the options. + + + The options. + + + + + Gets the reader which should be used to find and decode the barcode. + + + The reader. + + + + + Gets or sets a method which is called if an important point is found + + + The result point callback. + + + + + event is executed if a result was found via decode + + + + + Gets or sets a value indicating whether the image should be automatically rotated. + Rotation is supported for 90, 180 and 270 degrees + + + true if image should be rotated; otherwise, false. + + + + + Gets or sets a value indicating whether the image should be automatically inverted + if no result is found in the original image. + ATTENTION: Please be carefully because it slows down the decoding process if it is used + + + true if image should be inverted; otherwise, false. + + + + + Optional: Gets or sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + The function to create a binarizer object. + + + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode the barcode inside a bitmap object + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Constructor for additional image formats for one BarcodeReader class + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Optional: Gets or sets the function to create a luminance source object for a bitmap. + If null a platform specific default LuminanceSource is used + + + The function to create a luminance source object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + represents a token for a binary shift + + + + + initializing constructor + + + + + + + + appends the byte array to the BitArray + + + + + + + string representation + + + + + + The class holds the available options for the QrCodeWriter + + + + + Defines an container for encoder options + + + + + Initializes a new instance of the class. + + + + + Gets the data container for all options + + + + + Specifies the height of the barcode image + + + + + Specifies the width of the barcode image + + + + + Don't put the content string into the output image. + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + + + + + Specifies whether the data should be encoded to the GS1 standard; + FNC1 character is added in front of the data + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + . + + + + + Specifies what character encoding to use where applicable (type ) + + + + + Explicitly disables ECI segment when generating QR Code + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + + + + + Specifies the exact version of QR code to be encoded. An integer, range 1 to 40. If the data specified + cannot fit within the required version, a WriterException will be thrown. + + + + + Jacob Haynes + qwandor@google.com (Andrew Walbran) + + + + + default white space (margin) around the code + + + + + default error correction level + + + + + default aspect ratio + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The height of a row in the barcode + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Takes encoder, accounts for width/height, and retrieves bit matrix + + + + + This takes an array holding the values of the PDF 417 + + a byte array of information with 0 is black, and 1 is white + border around the barcode + BitMatrix of the input + + + + Takes and rotates the it 90 degrees + + + + + This implementation can detect and decode PDF417 codes in an image. + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Implementation of this interface attempt to read several barcodes from one image. + Sean Owen + + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Locates and decodes a PDF417 code in an image. + + a String representing the content encoded by the PDF417 code + if a PDF417 cannot be decoded + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + **Note** this will return the FIRST barcode discovered if there are many. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Locates and decodes Multiple PDF417 codes in an image. + + an array of Strings representing the content encoded by the PDF417 codes + + + + + Locates and decodes multiple barcodes in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcodes encode + + + + + Decode the specified image, with the hints and optionally multiple barcodes. + Based on Owen's Comments in , this method has been modified to continue silently + if a barcode was not decoded where it was detected instead of throwing a new exception object. + + Image. + Hints. + If set to true multiple. + + + + Gets the maximum width of the barcode + + The max width. + P1. + P2. + + + + Gets the minimum width of the barcode + + The minimum width. + P1. + P2. + + + + Gets the maximum width of the codeword. + + The max codeword width. + P. + + + + Gets the minimum width of the codeword. + + The minimum codeword width. + P. + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + + + Guenther Grau + + + + Decode the specified image, imageTopLeft, imageBottomLeft, imageTopRight, imageBottomRight, minCodewordWidth + and maxCodewordWidth. + TODO: don't pass in minCodewordWidth and maxCodewordWidth, pass in barcode columns for start and stop pattern + columns. That way width can be deducted from the pattern column. + This approach also allows to detect more details about the barcode, e.g. if a bar type (white or black) is wider + than it should be. This can happen if the scanner used a bad blackpoint. + + Image. + Image top left. + Image bottom left. + Image top right. + Image bottom right. + Minimum codeword width. + Max codeword width. + + + + Merge the specified leftRowIndicatorColumn and rightRowIndicatorColumn. + + Left row indicator column. + Right row indicator column. + + + + Adjusts the bounding box. + + The bounding box. + Row indicator column. + + + + Gets the barcode metadata. + + The barcode metadata. + Left row indicator column. + Right row indicator column. + + + + Gets the row indicator column. + + The row indicator column. + Image. + Bounding box. + Start point. + If set to true left to right. + Minimum codeword width. + Max codeword width. + + + + Adjusts the codeword count. + + Detection result. + Barcode matrix. + + + + Creates the decoder result. + + The decoder result. + Detection result. + + + + This method deals with the fact, that the decoding process doesn't always yield a single most likely value. The + current error correction implementation doesn't deal with erasures very well, so it's better to provide a value + for these ambiguous codewords instead of treating it as an erasure. The problem is that we don't know which of + the ambiguous values to choose. We try decode using the first value, and if that fails, we use another of the + ambiguous values and try to decode again. This usually only happens on very hard to read and decode barcodes, + so decoding the normal barcodes is not affected by this. + + The decoder result from ambiguous values. + Ec level. + Codewords. + contains the indexes of erasures. + array with the indexes that have more than one most likely value. + two dimensional array that contains the ambiguous values. The first dimension must + be the same Length as the ambiguousIndexes array. + + + + Creates the barcode matrix. + + The barcode matrix. + Detection result. + + + + Tests to see if the Barcode Column is Valid + + true, if barcode column is valid, false otherwise. + Detection result. + Barcode column. + + + + Gets the start column. + + The start column. + Detection result. + Barcode column. + Image row. + If set to true left to right. + + + + Detects the codeword. + + The codeword. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + Minimum codeword width. + Max codeword width. + + + + Gets the module bit count. + + The module bit count. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + + + + Gets the number of EC code words. + + The number of EC code words. + Barcode EC level. + + + + Adjusts the codeword start column. + + The codeword start column. + Image. + Minimum column. + Max column. + If set to true left to right. + Codeword start column. + Image row. + + + + Checks the codeword for any skew. + + true, if codeword is within the skew, false otherwise. + Codeword size. + Minimum codeword width. + Max codeword width. + + + + Decodes the codewords. + + The codewords. + Codewords. + Ec level. + Erasures. + + + + Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place. + + The errors. + data and error correction codewords. + positions of any known erasures. + number of error correction codewords that are available in codewords. + + + + Verifies that all is well with the the codeword array. + + Codewords. + Number EC codewords. + + + + Gets the bit count for codeword. + + The bit count for codeword. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Module bit count. + + + + Returns a that represents the jagged array. + + A that represents the jagged array. + Barcode matrix as a jagged array. + + + + + + Guenther Grau + creatale GmbH (christoph.schulz@creatale.de) + + + + The ratios table + + + + + Initializes the class & Pre-computes the symbol ratio table. + + + + + Gets the decoded value. + + The decoded value. + Module bit count. + + + + Samples the bit counts. + + The bit counts. + Module bit count. + + + + Gets the decoded codeword value. + + The decoded codeword value. + Module bit count. + + + + Gets the bit value. + + The bit value. + Module bit count. + + + + Gets the closest decoded value. + + The closest decoded value. + Module bit count. + + + +

This class contains the methods for decoding the PDF417 codewords.

+ + SITA Lab (kevin.osullivan@sita.aero) +
+
+ + + Table containing values for the exponent of 900. + This is used in the numeric compaction decode algorithm. + + + + + Text Compaction mode (see 5.4.1.5) permits all printable ASCII characters to be + encoded, i.e. values 32 - 126 inclusive in accordance with ISO/IEC 646 (IRV), as + well as selected control characters. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + The Text Compaction mode includes all the printable ASCII characters + (i.e. values from 32 to 126) and three ASCII control characters: HT or tab + (ASCII value 9), LF or line feed (ASCII value 10), and CR or carriage + return (ASCII value 13). The Text Compaction mode also includes various latch + and shift characters which are used exclusively within the mode. The Text + Compaction mode encodes up to 2 characters per codeword. The compaction rules + for converting data into PDF417 codewords are defined in 5.4.2.2. The sub-mode + switches are defined in 5.4.2.3. + + The text compaction data. + The byte compaction data if there + was a mode shift. + The size of the text compaction and byte compaction data. + The decoded data is appended to the result. + + + + + Byte Compaction mode (see 5.4.3) permits all 256 possible 8-bit byte values to be encoded. + This includes all ASCII characters value 0 to 127 inclusive and provides for international + character set support. + + The byte compaction mode i.e. 901 or 924 + The array of codewords (data + error) + Currently active character encoding + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Numeric Compaction mode (see 5.4.4) permits efficient encoding of numeric data strings. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Convert a list of Numeric Compacted codewords from Base 900 to Base 10. + EXAMPLE + Encode the fifteen digit numeric string 000213298174000 + Prefix the numeric string with a 1 and set the initial value of + t = 1 000 213 298 174 000 + Calculate codeword 0 + d0 = 1 000 213 298 174 000 mod 900 = 200 + + t = 1 000 213 298 174 000 div 900 = 1 111 348 109 082 + Calculate codeword 1 + d1 = 1 111 348 109 082 mod 900 = 282 + + t = 1 111 348 109 082 div 900 = 1 234 831 232 + Calculate codeword 2 + d2 = 1 234 831 232 mod 900 = 632 + + t = 1 234 831 232 div 900 = 1 372 034 + Calculate codeword 3 + d3 = 1 372 034 mod 900 = 434 + + t = 1 372 034 div 900 = 1 524 + Calculate codeword 4 + d4 = 1 524 mod 900 = 624 + + t = 1 524 div 900 = 1 + Calculate codeword 5 + d5 = 1 mod 900 = 1 + t = 1 div 900 = 0 + Codeword sequence is: 1, 624, 434, 632, 282, 200 + + Decode the above codewords involves + 1 x 900 power of 5 + 624 x 900 power of 4 + 434 x 900 power of 3 + + 632 x 900 power of 2 + 282 x 900 power of 1 + 200 x 900 power of 0 = 1000213298174000 + + Remove leading 1 => Result is 000213298174000 + The array of codewords + The number of codewords + The decoded string representing the Numeric data. + + + + + This object renders an UPC-E code as a {@link BitMatrix}. + @author 0979097955s@gmail.com (RX) + + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ aripollak@gmail.com (Ari Pollak) + dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Gets the default margin. + + + + +

Implements decoding of the UPC-E format.

+

Thisis a great reference for + UPC-E information.

+ Sean Owen +
+
+ + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Start/end guard pattern. + + + + + Pattern marking the middle of a UPC/EAN pattern, separating the two halves. + + + + + end guard pattern. + + + + + "Odd", or "L" patterns used to encode UPC/EAN digits. + + + + + As above but also including the "even", or "G" patterns used to encode UPC/EAN digits. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + +

Like , but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ row index into the image + encoding of the row of the barcode image + start/end column where the opening start pattern was found + optional hints that influence decoding + encapsulating the result of decoding a barcode in the row +
+ + + + string of digits to check + see + + + + Computes the UPC/EAN checksum on a string of digits, and reports + whether the checksum is correct or not. + + string of digits to check + true iff string of digits passes the UPC/EAN checksum algorithm + + + + Decodes the end. + + The row. + The end start. + + + + + + row of black/white values to search + position to start search + if true, indicates that the pattern specifies white/black/white/... + pixel counts, otherwise, it is interpreted as black/white/black/... + pattern of counts of number of black and white pixels that are being + searched for as a pattern + array of counters, as long as pattern, to re-use + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a single UPC/EAN-encoded digit. + + row of black/white values to decode + the counts of runs of observed black/white/black/... values + horizontal offset to start decoding from + the set of patterns to use to decode -- sometimes different encodings + for the digits 0-9 are used, and this indicates the encodings for 0 to 9 that should + be used + horizontal offset of first pixel beyond the decoded digit + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + Get the format of this decoder. + + The 1D format. + + + + The pattern that marks the middle, and end, of a UPC-E pattern. + There is no "second half" to a UPC-E barcode. + + + + + See L_AND_G_PATTERNS these values similarly represent patterns of + even-odd parity encodings of digits that imply both the number system (0 or 1) + used, and the check digit. + + + + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Decodes the end. + + The row. + The end start. + + + + + see checkStandardUPCEANChecksum(String) + + + + + + + Determines the num sys and check digit. + + The result string. + The lg pattern found. + + + + + Expands a UPC-E value back into its full, equivalent UPC-A code value. + + UPC-E code as string of digits + equivalent UPC-A code as string of digits + + + + + Get the format of this decoder. + The 1D format. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Symbol Character Placement Program. Adapted from Annex M.1 in ISO/IEC 16022:2000(E). + + + + + Main constructor + + the codewords to place + the number of columns + the number of rows + + + + Places the 8 bits of a utah-shaped symbol character in ECC200. + + The row. + The col. + character position + + +

This provides an easy abstraction to read bits at a time from a sequence of bytes, where the + number of bits read is not often a multiple of 8.

+ +

This class is thread-safe but not reentrant. Unless the caller modifies the bytes array + it passed in, in which case all bets are off.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + bytes from which this will read bits. Bits will be read from the first byte first. + Bits are read within a byte from most-significant to least-significant bit. + + + + number of bits to read + + int representing the bits read. The bits will appear as the least-significant + bits of the int + + if numBits isn't in [1,32] or more than is available + + + number of bits that can be read successfully + + + + + index of next bit in current byte which would be read by the next call to {@link #readBits(int)}. + + + + + index of next byte in input byte array which would be read by the next call to {@link #readBits(int)}. + + + + + This class is the core bitmap class used by ZXing to represent 1 bit data. Reader objects + accept a BinaryBitmap and attempt to decode it. + + dswitkin@google.com (Daniel Switkin) + + + + + + + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + + The row to fetch, which must be in [0, bitmap height). + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if isCropSupported() is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + The width of the bitmap. + + + + + The height of the bitmap. + + + + + Converts a 2D array of luminance data to 1 bit. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + + Whether this bitmap can be cropped. + + + + + Whether this bitmap supports counter-clockwise rotation. + + + + + This produces nearly optimal encodings of text into the first-level of + encoding used by Aztec code. + It uses a dynamic algorithm. For each prefix of the string, it determines + a set of encodings that could lead to this prefix. We repeatedly add a + character and generate a new set of optimal encodings until we have read + through the entire input. + @author Frank Yellin + @author Rustam Abdullaev + + + + + + + + + + + Convert the text represented by this High Level Encoder into a BitArray. + + text represented by this encoder encoded as a + + + Callback which is invoked when a possible result point (significant + point in the barcode image such as a corner) is found. + + + + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+
+ Sean Owen +
+ + + 1 pixel/module times 3 modules/center + + + + + support up to version 20 for mobile clients + + + + +

Creates a finder that will search the image for three finder patterns.

+
+ image to search +
+ + + Initializes a new instance of the class. + + The image. + The result point callback. + + + Given a count of black/white/black/white/black pixels just seen and an end position, + figures the location of the center of this run. + + + + count of black/white/black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/3/1/1 ratios + used by finder patterns to be considered a match + + + + + + count of black/white/black/white/black pixels just read + true if the proportions of the counts is close enough to the 1/1/3/1/1 ratios + by finder patterns to be considered a match + + + + After a vertical and horizontal scan finds a potential finder pattern, this method + "cross-cross-cross-checks" by scanning down diagonally through the center of the possible + finder pattern to see if the same proportion is detected. + @param maxCount maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + @param originalStateCountTotal The original state count total. + + row where a finder pattern was detected + center of the section that appears to cross a finder pattern + true if proportions are withing expected limits + + + +

After a horizontal scan finds a potential finder pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + finder pattern to see if the same proportion is detected.

+
+ row where a finder pattern was detected + center of the section that appears to cross a finder pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of finder pattern, or null if not found + +
+ +

Like {@link #crossCheckVertical(int, int, int, int)}, and in fact is basically identical, + except it reads horizontally instead of vertically. This is used to cross-cross + check a vertical cross check and locate the real center of the alignment pattern.

+
+
+ + + @see #handlePossibleCenter(int[], int, int) + + reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + ignored + true if a finder pattern candidate was found this time + + + +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will, ah, cross-cross-check + with another horizontal scan. This is needed primarily to locate the real horizontal + center of the pattern in cases of extreme skew. + And then we cross-cross-cross check with another diagonal scan.

+ If that succeeds the finder pattern location is added to a list that tracks + the number of times each location has been nearly-matched as a finder pattern. + Each additional find is more evidence that the location is in fact a finder + pattern center +
+ reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + + true if a finder pattern candidate was found this time + +
+ + number of rows we could safely skip during scanning, based on the first + two finder patterns that have been located. In some cases their position will + allow us to infer that the third pattern must lie below a certain point farther + down in the image. + + + + true iff we have found at least 3 finder patterns that have been detected + at least {@link #CENTER_QUORUM} times each, and, the estimated module size of the + candidates is "pretty similar" + + + + the 3 best {@link FinderPattern}s from our list of candidates. The "best" are + those that have been detected at least {@link #CENTER_QUORUM} times, and whose module + size differs from the average among those patterns the least + + + + + Gets the image. + + + + + Gets the possible centers. + + + + + Orders by furthest from average + + + +

Orders by {@link FinderPattern#getCount()}, descending.

+
+ + +

Encapsulates a finder pattern, which are the three square patterns found in + the corners of QR Codes. It also encapsulates a count of similar finder patterns, + as a convenience to the finder's bookkeeping.

+
+ Sean Owen +
+ + + Encapsulates a point of interest in an image containing a barcode. Typically, this + would be the location of a finder pattern or the corner of the barcode, for example. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The x. + The y. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC and + BC is less than AC and the angle between BC and BA is less than 180 degrees. + + array of three to order + + + + calculates the distance between two points + + first pattern + second pattern + + distance between two points + + + + + Returns the z component of the cross product between vectors BC and BA. + + + + + Gets the X. + + + + + Gets the Y. + + + +

Determines if this finder pattern "about equals" a finder pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing a weighted average + based on count. + + The i. + The j. + New size of the module. + + + + + Gets the size of the estimated module. + + + The size of the estimated module. + + + + +

A field based on powers of a generator integer, modulo some modulus.

+ +
+ Sean Owen +
+ + + Interface for a smart class to encode some content into a barcode + + + + + Encodes the specified contents. + + The contents. + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + +

Data Matrix Codes can encode text as bits in one of several modes, and can use multiple modes + in one Data Matrix Code. This class decodes the bits back into text.

+ +

See ISO 16022:2006, 5.2.1 - 5.2.9.2

+ + bbrown@google.com (Brian Brown) + Sean Owen +
+
+ + + See ISO 16022:2006, Annex C Table C.1 + The C40 Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, Annex C Table C.2 + The Text Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, 5.2.3 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.5 and Annex C, Table C.1 + + + + + See ISO 16022:2006, 5.2.6 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.7 + + + + + See ISO 16022:2006, 5.2.8 and Annex C Table C.3 + + + + + See ISO 16022:2006, 5.2.9 and Annex B, B.2 + + + + + See ISO 16022:2006, Annex B, B.2 + + + + + bbrown@google.com (Brian Brown) + + + + + to parse + if dimension is < 8 or > 144 or not 0 mod 2 + + + + +

Creates the version object based on the dimension of the original bit matrix from + the datamatrix code.

+ +

See ISO 16022:2006 Table 7 - ECC 200 symbol attributes

+ + Original including alignment patterns + encapsulating the Data Matrix Code's "version" + if the dimensions of the mapping matrix are not valid + Data Matrix dimensions. +
+
+ + +

Reads the bits in the representing the mapping matrix (No alignment patterns) + in the correct order in order to reconstitute the codewords bytes contained within the + Data Matrix Code.

+ + bytes encoded within the Data Matrix Code + if the exact number of bytes expected is not read +
+
+ + +

Reads a bit of the mapping matrix accounting for boundary wrapping.

+ + Row to read in the mapping matrix + Column to read in the mapping matrix + Number of rows in the mapping matrix + Number of columns in the mapping matrix + value of the given bit in the mapping matrix +
+
+ + +

Reads the 8 bits of the standard Utah-shaped pattern.

+ +

See ISO 16022:2006, 5.8.1 Figure 6

+ + Current row in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Current column in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the utah shape +
+
+ + +

Reads the 8 bits of the special corner condition 1.

+ +

See ISO 16022:2006, Figure F.3

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 1 +
+
+ + +

Reads the 8 bits of the special corner condition 2.

+ +

See ISO 16022:2006, Figure F.4

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 2 +
+
+ + +

Reads the 8 bits of the special corner condition 3.

+ +

See ISO 16022:2006, Figure F.5

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 3 +
+
+ + +

Reads the 8 bits of the special corner condition 4.

+ +

See ISO 16022:2006, Figure F.6

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 4 +
+
+ + +

Extracts the data region from a that contains + alignment patterns.

+ + Original with alignment patterns + BitMatrix that has the alignment patterns removed +
+
+ +

This class implements a perspective transform in two dimensions. Given four source and four + destination points, it will compute the transformation implied between them. The code is based + directly upon section 3.4.2 of George Wolberg's "Digital Image Warping"; see pages 54-56.

+
+ Sean Owen +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Convenience method, not optimized for performance. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Represents a parsed result that encodes a product ISBN number. + + jbreiden@google.com (Jeff Breidenbach) + + + + the ISBN number + + + +

This class attempts to find alignment patterns in a QR Code. Alignment patterns look like finder + patterns but are smaller and appear at regular intervals throughout the image.

+ +

At the moment this only looks for the bottom-right alignment pattern.

+ +

This is mostly a simplified copy of {@link FinderPatternFinder}. It is copied, + pasted and stripped down here for maximum performance but does unfortunately duplicate + some code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Creates a finder that will look in a portion of the whole image.

+ +
+ image to search + + left column from which to start searching + + top row from which to start searching + + width of region to search + + height of region to search + + estimated module size so far + + callback function which is called, when a result point is found +
+ +

This method attempts to find the bottom-right alignment pattern in the image. It is a bit messy since + it's pretty performance-critical and so is written to be fast foremost.

+ +
+ if found +
+ + Given a count of black/white/black pixels just seen and an end position, + figures the location of the center of this black/white/black run. + + + + count of black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/1 ratios + used by alignment patterns to be considered a match + + + + +

After a horizontal scan finds a potential alignment pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + alignment pattern to see if the same proportion is detected.

+
+ row where an alignment pattern was detected + center of the section that appears to cross an alignment pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of alignment pattern, or null if not found + +
+ +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will see if this pattern had been + found on a previous horizontal scan. If so, we consider it confirmed and conclude we have + found the alignment pattern.

+ +
+ reading state module counts from horizontal scan + + row where alignment pattern may be found + + end of possible alignment pattern in row + + {@link AlignmentPattern} if we have found the same pattern twice, or null if not + +
+ + + PDF 417 result meta data. + Guenther Grau + + + + + The Segment ID represents the segment of the whole file distributed over different symbols. + + + + + Is the same for each related PDF417 symbol + + + + + always null + + + + + true if it is the last segment + + + + + count of segments, -1 if not set + + + + + Filename of the encoded file + + + + + filesize in bytes of the encoded file + returns filesize in bytes, -1 if not set + + + + + 16-bit CRC checksum using CCITT-16 + returns crc checksum, -1 if not set + + + + + unix epock timestamp, elapsed seconds since 1970-01-01 + returns elapsed seconds, -1 if not set + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + This object renders a CODE128 code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + +

Decodes Code 128 barcodes.

+ + Sean Owen +
+
+ + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + +

A somewhat generic detector that looks for a barcode-like rectangular region within an image. + It looks within a mostly white region of an image for a region of black and white, but mostly + black. It returns the four corners of the region, as best it can determine.

+ +
+ Sean Owen +
+ + + initializing constructor + + + + + +

Detects a rectangular region of black and white -- mostly black -- with a region of mostly + white, in an image.

+
+ [] describing the corners of the rectangular region. The first and + last points are opposed on the diagonal, as are the second and third. The first point will be + the topmost point and the last, the bottommost. The second point will be leftmost and the + third, the rightmost + +
+ + Attempts to locate a corner of the barcode by scanning up, down, left or right from a center + point which should be within the barcode. + + + center's x component (horizontal) + + same as deltaY but change in x per step instead + + minimum value of x + + maximum value of x + + center's y component (vertical) + + change in y per step. If scanning up this is negative; down, positive; + left or right, 0 + + minimum value of y to search through (meaningless when di == 0) + + maximum value of y + + maximum run of white pixels that can still be considered to be within + the barcode + + a encapsulating the corner that was found + + + + Computes the start and end of a region of pixels, either horizontally or vertically, that could + be part of a Data Matrix barcode. + + + if scanning horizontally, this is the row (the fixed vertical location) + where we are scanning. If scanning vertically it's the column, the fixed horizontal location + + largest run of white pixels that can still be considered part of the + barcode region + + minimum pixel location, horizontally or vertically, to consider + + maximum pixel location, horizontally or vertically, to consider + + if true, we're scanning left-right, instead of up-down + + int[] with start and end of found range, or null if no such range is found + (e.g. only white was found) + + + + + A simple result type encapsulating a URI that has no further interpretation. + + Sean Owen + + + Transforms a string that represents a URI into something more proper, by adding or canonicalizing + the protocol. + + + + true if the URI contains suspicious patterns that may suggest it intends to + mislead the user about its true nature. At the moment this looks for the presence + of user/password syntax in the host/authority portion of a URI which may be used + in attempts to make the URI's host appear to be other than it is. Example: + http://yourbank.com@phisher.com This URI connects to phisher.com but may appear + to connect to yourbank.com at first glance. + + + + + Parses a "tel:" URI result, which specifies a phone number. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link #parseResult(com.google.zxing.Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Attempts to parse the raw {@link Result}'s contents as a particular type + of information (email, URL, etc.) and return a {@link ParsedResult} encapsulating + the result of parsing. + + the raw to parse + encapsulating the parsing result + + + + Parses the result. + + The result. + + + + + Attribute is only for compatibility issues + + + + + Luminance source class which support different formats of images. + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 1 byte per pixel (Gray8). + That means the whole array consists of the luminance values (grayscale). + + The luminance array. + The width. + The height. + if set to true [is8 bit]. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + The bitmap format. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + calculates the luminance values for the given byte array and bitmap format + + + + + + + enumeration of supported bitmap format which the RGBLuminanceSource can process + + + + + format of the byte[] isn't known. RGBLuminanceSource tries to determine the best possible value + + + + + grayscale array, the byte array is a luminance array with 1 byte per pixel + + + + + grayscale array, the byte array is a luminance array with 2 bytes per pixel + + + + + 3 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels alpha, red, green and blue + + + + + 3 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green, red and alpha + + + + + 2 bytes per pixel, 5 bit red, 6 bits green and 5 bits blue + + + + + 4 bytes per pixel with the channels red, green, blue and alpha + + + + + 4 bytes for two pixels, UYVY formatted + + + + + 4 bytes for two pixels, YUYV formatted + + + + + Represents some type of metadata about the result of the decoding that the decoder + wishes to communicate back to the caller. + + Sean Owen + + + + Unspecified, application-specific metadata. Maps to an unspecified {@link Object}. + + + + + Denotes the likely approximate orientation of the barcode in the image. This value + is given as degrees rotated clockwise from the normal, upright orientation. + For example a 1D barcode which was found by reading top-to-bottom would be + said to have orientation "90". This key maps to an {@link Integer} whose + value is in the range [0,360). + + + + +

2D barcode formats typically encode text, but allow for a sort of 'byte mode' + which is sometimes used to encode binary data. While {@link Result} makes available + the complete raw bytes in the barcode for these formats, it does not offer the bytes + from the byte segments alone.

+

This maps to a {@link java.util.List} of byte arrays corresponding to the + raw bytes in the byte segments in the barcode, in order.

+
+
+ + + Error correction level used, if applicable. The value type depends on the + format, but is typically a String. + + + + + For some periodicals, indicates the issue number as an {@link Integer}. + + + + + For some products, indicates the suggested retail price in the barcode as a + formatted {@link String}. + + + + + For some products, the possible country of manufacture as a {@link String} denoting the + ISO country code. Some map to multiple possible countries, like "US/CA". + + + + + For some products, the extension text + + + + + If the code format supports structured append and + the current scanned code is part of one then the + sequence number is given with it. + + + + + If the code format supports structured append and + the current scanned code is part of one then the + parity is given with it. + + + + + PDF417-specific metadata + + + + + Aztec-specific metadata + + + + +

See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels + defined by the QR code standard.

+
+ Sean Owen +
+ + L = ~7% correction + + + M = ~15% correction + + + Q = ~25% correction + + + H = ~30% correction + + + + Ordinals this instance. + + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Fors the bits. + + int containing the two bits encoding a QR Code's error correction level + + representing the encoded error correction level + + + + + Gets the bits. + + + + + Gets the name. + + + + + PDF417 high-level encoder following the algorithm described in ISO/IEC 15438:2001(E) in + annex P. + + + + + code for Text compaction + + + + + code for Byte compaction + + + + + code for Numeric compaction + + + + + Text compaction submode Alpha + + + + + Text compaction submode Lower + + + + + Text compaction submode Mixed + + + + + Text compaction submode Punctuation + + + + + mode latch to Text Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters NOT a multiple of 6) + + + + + mode latch to Numeric Compaction mode + + + + + mode shift to Byte Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters a multiple of 6) + + + + + identifier for a user defined Extended Channel Interpretation (ECI) + + + + + identifier for a general purpose ECO format + + + + + identifier for an ECI of a character set of code page + + + + + Raw code table for text compaction Mixed sub-mode + + + + + Raw code table for text compaction: Punctuation sub-mode + + + + + Performs high-level encoding of a PDF417 message using the algorithm described in annex P + of ISO/IEC 15438:2001(E). If byte compaction has been selected, then only byte compaction + is used. + + the message + compaction mode to use + character encoding used to encode in default or byte compaction + or null for default / not applicable + if true, don't add an ECI segment for different encodings than default + the encoded message (the char values range from 0 to 928) + + + + Encode parts of the message using Text Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.2. + + the message + the start position within the message + the number of characters to encode + receives the encoded codewords + should normally be SUBMODE_ALPHA + the text submode in which this method ends + + + + + Encode parts of the message using Byte Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.3. The Unicode characters will be converted to binary using the cp437 + codepage. + + the message converted to a byte array + the start position within the message + the number of bytes to encode + the mode from which this method starts + receives the encoded codewords + + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using text compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using binary compaction. + + the message + the message converted to a byte array + the start position within the message + + the requested character count + + + + Represents possible PDF417 barcode compaction types. + + + + + + + + + + + + + + + + + + + + + + + + + defines the level of the error correction / count of error correction codewords + + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + The maximum distance to search in the codeword array in both the positive and negative directions + + + + + Initializes a new instance of the class. + + The Bounding Box around the column (in the BitMatrix) + + + + Converts the Image's Row to the index in the Codewords array + + The Codeword Index. + Image row. + + + + Converts the Codeword array index into a Row in the Image (BitMatrix) + + The Image Row. + Codeword index. + + + + Gets the codeword for a given row + + The codeword. + Image row. + + + + Gets the codeword closest to the specified row in the image + + Image row. + + + + Sets the codeword for an image row + + Image row. + Codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + The Bounding Box around the column (in the BitMatrix) + + The box. + + + + The Codewords the Box encodes for, offset by the Box minY. + Remember to Access this ONLY through GetCodeword(imageRow) if you're accessing it in that manner. + + The codewords. + + + + Initializes a new instance of the class. + + Box. + If set to true is left. + + + + Sets the Row Numbers as Inidicator Columns + + + + + TODO implement properly + TODO maybe we should add missing codewords to store the correct row number to make + finding row numbers for other columns easier + use row height count to make detection of invalid row numbers more reliable + + The indicator column row numbers. + Metadata. + + + + Gets the row heights. + + The row heights. + + + + Adjusts the in omplete indicator column row numbers. + + Metadata. + + + + Gets the barcode metadata. + + The barcode metadata. + + + + Prune the codewords which do not match the metadata + TODO Maybe we should keep the incorrect codewords for the start and end positions? + + Codewords. + Metadata. + + + + Returns a that represents the current . + + A that represents the current . + + + + Gets or sets a value indicating whether this instance is the left indicator + + true if this instance is left; otherwise, false. + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + These are a set of hints that you may pass to Writers to specify their behavior. + + dswitkin@google.com (Daniel Switkin) + + + + Specifies the width of the barcode image + type: + + + + + Specifies the height of the barcode image + type: + + + + + Don't put the content string into the output image. + type: + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + + For Aztec it is of type , representing the minimal percentage of error correction words. + In all cases, it can also be a representation of the desired value as well. + Note: an Aztec symbol should have a minimum of 25% EC words. + For PDF417 it is of type or (between 0 and 8), + + + + + Specifies what character encoding to use where applicable. + type: + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + type: , or representation of the integer value + + + + + Specifies the aspect ratio to use. Default is 4. + type: , or 1-4. + + + + + Specifies whether to use compact mode for PDF417 + type: , or "true" or "false" + value + + + + + Specifies what compaction mode to use for PDF417. + type: or value of one of its + enum values + + + + + Specifies the minimum and maximum number of rows and columns for PDF417. + type: + + + + + Don't append ECI segment. + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + type: + + + + + Specifies the matrix shape for Data Matrix (type ) + + + + + Specifies a minimum barcode size (type ). Only applicable to Data Matrix now. + + + + + Specifies a maximum barcode size (type ). Only applicable to Data Matrix now. + + + + + if true, don't switch to codeset C for numbers + + + + + Specifies the default encodation for Data Matrix (type ) + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Specifies the required number of layers for an Aztec code. + A negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + type: , or representation of the integer value + + + + + Specifies the exact version of QR code to be encoded. + (Type , or representation of the integer value). + + + + + Specifies whether the data should be encoded to the GS1 standard + type: , or "true" or "false" + value + + + + + Parses strings of digits that represent a UPC code. + + dswitkin@google.com (Daniel Switkin) + + + + Represents the type of data encoded by a barcode -- from plain text, to a + URI, to an e-mail address, etc. + + Sean Owen + + + This class hierarchy provides a set of methods to convert luminance data to 1 bit data. + It allows the algorithm to vary polymorphically, for example allowing a very expensive + thresholding technique for servers and a fast one for mobile. It also permits the implementation + to vary, e.g. a JNI version for Android and a Java fallback version for other platforms. + + dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The source. + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + For callers which only examine one row of pixels at a time, the same BitArray should be reused + and passed in with each call for performance. However it is legal to keep more than one row + at a time if needed. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + A new concrete Binarizer implementation object. + + + + Gets the luminance source object. + + + + Converts a 2D array of luminance data to 1 bit data. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + + Gets the width of the luminance source object. + + + + + Gets the height of the luminance source object. + + + + + A smart class to encode some content to a barcode image + + + + + A base class for specific barcode writers with specific formats of barcode images. + + The type of the output. + + + + A base class for specific barcode writers with specific formats of barcode images. + + + + + + + + + + + + + + + + Encodes the specified contents and returns a BitMatrix array. + That array has to be rendered manually or with a IBarcodeRenderer. + + The contents. + + + + + Gets or sets the barcode format. + The value is only suitable if the MultiFormatWriter is used. + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + The matrix. + + + + + Encodes the specified contents and returns a rendered instance of the barcode. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The matrix. + + + + + Gets or sets the renderer which should be used to render the encoded BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + Interface for a smart class to encode some content into a barcode + + + + + Encodes the specified contents. + + The contents. + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Initializes a new instance of the class. + + + + + Contains conversion support elements such as classes, interfaces and static methods. + + + + + Copies an array of chars obtained from a String into a specified array of chars + + The String to get the chars from + Position of the String to start getting the chars + Position of the String to end getting the chars + Array to return the chars + Position of the destination array of chars to start storing the chars + An array of chars + + + + Sets the capacity for the specified List + + The List which capacity will be set + The new capacity value + + + + Converts a string-Collection to an array + + The strings. + + + + + Joins all elements to one string. + + + The separator. + The values. + + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The value. + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The start index. + The end index. + The value. + + + + + + + + + + + + + + + + + + Savely gets the value of a decoding hint + if hints is null the default is returned + + + The hints. + Type of the hint. + The @default. + + + + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + Encode "bytes" with the error correction level "ecLevel". The encoding mode will be chosen + internally by chooseMode(). On success, store the result in "qrCode". + We recommend you to use QRCode.EC_LEVEL_L (the lowest level) for + "getECLevel" since our primary use is to show QR code on desktop screens. We don't need very + strong error correction for this purpose. + Note that there is no way to encode bytes in MODE_KANJI. We might want to add EncodeWithMode() + with which clients can specify the encoding mode. For now, we don't need the functionality. + + text to encode + error correction level to use + representing the encoded QR code + + + + Encodes the specified content. + + The content. + The ec level. + The hints. + + + + + Decides the smallest version of QR code that will contain all of the provided data. + + if the data cannot fit in any version + + + + Gets the alphanumeric code. + + The code. + the code point of the table used in alphanumeric mode or + -1 if there is no corresponding code in the table. + + + + Chooses the mode. + + The content. + + + + + Choose the best mode by examining the content. Note that 'encoding' is used as a hint; + if it is Shift_JIS, and the input is only double-byte Kanji, then we return {@link Mode#KANJI}. + + The content. + The encoding. + + + + + true if the number of input bits will fit in a code with the specified version and error correction level. + + + + Terminate bits as described in 8.4.8 and 8.4.9 of JISX0510:2004 (p.24). + + The num data bytes. + The bits. + + + + Get number of data bytes and number of error correction bytes for block id "blockID". Store + the result in "numDataBytesInBlock", and "numECBytesInBlock". See table 12 in 8.5.1 of + JISX0510:2004 (p.30) + + The num total bytes. + The num data bytes. + The num RS blocks. + The block ID. + The num data bytes in block. + The num EC bytes in block. + + + + Interleave "bits" with corresponding error correction bytes. On success, store the result in + "result". The interleave rule is complicated. See 8.6 of JISX0510:2004 (p.37) for details. + + The bits. + The num total bytes. + The num data bytes. + The num RS blocks. + + + + + Append mode info. On success, store the result in "bits". + + The mode. + The bits. + + + + Append length info. On success, store the result in "bits". + + The num letters. + The version. + The mode. + The bits. + + + + Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits". + + The content. + The mode. + The bits. + The encoding. + + +

Encapsulates an alignment pattern, which are the smaller square patterns found in + all but the simplest QR Codes.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Determines if this alignment pattern "about equals" an alignment pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing an average of the two. + + The i. + The j. + New size of the module. + + + + + PDF417 error correction code following the algorithm described in ISO/IEC 15438:2001(E) in + chapter 4.10. + + + + + Tables of coefficients for calculating error correction words + (see annex F, ISO/IEC 15438:2001(E)) + + + + + Determines the number of error correction codewords for a specified error correction + level. + + the error correction level (0-8) + the number of codewords generated for error correction + + + + Determines the error correction level for AUTO + + The error correction level (0-9) + The number of codewords for AUTO errorCorrectionLevel + the number of codewords generated for error correction + + + + Returns the recommended minimum error correction level as described in annex E of + ISO/IEC 15438:2001(E). + + the number of data codewords + the recommended minimum error correction level + + + + Generates the error correction codewords according to 4.10 in ISO/IEC 15438:2001(E). + + the data codewords + the error correction level (0-8) + the String representing the error correction codewords + + + + defines the level of the error correction / count of error correction codewords + + + + + A Bounding Box helper class + + Guenther Grau + + + + Initializes a new instance of the class. + returns null if the corner points don't match up correctly + + The image. + The top left. + The bottom left. + The top right. + The bottom right. + + + + + Creates the specified box. + + The box. + + + + + Initializes a new instance of the class. + Will throw an exception if the corner points don't match up correctly + + Image. + Top left. + Top right. + Bottom left. + Bottom right. + + + + Merge two Bounding Boxes, getting the left corners of left, and the right corners of right + (Images should be the same) + + Left. + Right. + + + + Adds the missing rows. + + The missing rows. + Missing start rows. + Missing end rows. + If set to true is left. + + + + Calculates the minimum and maximum X & Y values based on the corner points. + + + + + If we adjust the width, set a new right corner coordinate and recalculate + + Bottom right. + + + + Adapted from listings in ISO/IEC 24724 Appendix B and Appendix G. + + + + + Gets the RS svalue. + + The widths. + Width of the max. + if set to true [no narrow]. + + + + + Encapsulates a since character value in an RSS barcode, including its checksum information. + + + + + Initializes a new instance of the class. + + The value. + The checksum portion. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Gets the value. + + + + + Gets the checksum portion. + + + + + Decodes MSI barcodes. + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. + + + + + Creates a reader that can be configured to check the last character as a check digit, + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + +

Encapsulates logic that can detect a Data Matrix Code in an image, even if the Data Matrix Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + +

Detects a Data Matrix Code in an image.

+
+ encapsulating results of detecting a Data Matrix Code or null +
+ + + Calculates the position of the white top right module using the output of the rectangle detector + for a rectangular matrix + + + + + Calculates the position of the white top right module using the output of the rectangle detector + for a square matrix + + + + + Increments the Integer associated with a key by one. + + + + + Counts the number of black/white transitions between two points, using something like Bresenham's algorithm. + + + + + Simply encapsulates two points and a number of transitions between them. + + + + + Orders ResultPointsAndTransitions by number of transitions, ascending. + + + + +

This class contains utility methods for performing mathematical operations over + the Galois Fields. Operations use a given primitive polynomial in calculations.

+

Throughout this package, elements of the GF are represented as an {@code int} + for convenience and speed (but at the cost of memory). +

+
+ Sean Owen +
+ + + Create a representation of GF(size) using the given primitive polynomial. + + irreducible polynomial whose coefficients are represented by + * the bits of an int, where the least-significant bit represents the constant + * coefficient + the size of the field + the factor b in the generator polynomial can be 0- or 1-based + * (g(x) = (x+a^b)(x+a^(b+1))...(x+a^(b+2t-1))). + * In most cases it should be 1, but for QR code it is 0. + + + + Builds the monomial. + + The degree. + The coefficient. + the monomial representing coefficient * x^degree + + + + Implements both addition and subtraction -- they are the same in GF(size). + + sum/difference of a and b + + + + Exps the specified a. + + 2 to the power of a in GF(size) + + + + Logs the specified a. + + A. + base 2 log of a in GF(size) + + + + Inverses the specified a. + + multiplicative inverse of a + + + + Multiplies the specified a with b. + + A. + The b. + product of a and b in GF(size) + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Gets the size. + + + + + Gets the generator base. + + + + + Represents a parsed result that encodes wifi network information, like SSID and password. + + Vikram Aggarwal + + + + Represents a parsed result that encodes a geographic coordinate, with latitude, longitude and altitude. + + Sean Owen + + + latitude in degrees + + + + longitude in degrees + + + + altitude in meters. If not specified, in the geo URI, returns 0.0 + + + + query string associated with geo URI or null if none exists + + + + the geo URI + + + + a URI link to Google Maps which display the point on the Earth described + by this instance, and sets the zoom level in a way that roughly reflects the + altitude, if specified + + + + + Enumerates barcode formats known to this package. + + Sean Owen + + + Aztec 2D barcode format. + + + CODABAR 1D format. + + + Code 39 1D format. + + + Code 93 1D format. + + + Code 128 1D format. + + + Data Matrix 2D barcode format. + + + EAN-8 1D format. + + + EAN-13 1D format. + + + ITF (Interleaved Two of Five) 1D format. + + + MaxiCode 2D barcode format. + + + PDF417 format. + + + QR Code 2D barcode format. + + + RSS 14 + + + RSS EXPANDED + + + UPC-A 1D format. + + + UPC-E 1D format. + + + UPC/EAN extension format. Not a stand-alone format. + + + MSI + + + Plessey + + + Intelligent Mail barcode + + + + UPC_A | UPC_E | EAN_13 | EAN_8 | CODABAR | CODE_39 | CODE_93 | CODE_128 | ITF | RSS_14 | RSS_EXPANDED + without MSI (to many false-positives) and IMB (not enough tested, and it looks more like a 2D) + + + + + Renders an Aztec code as a + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + This implementation can detect and decode Aztec codes in an image. + + David Olivier + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + a String representing the content encoded by the Data Matrix code + + + + + Locates and decodes a Data Matrix code in an image. + + image of barcode to decode + passed as a {@link java.util.Hashtable} from {@link com.google.zxing.DecodeHintType} + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + The general exception class throw when something goes wrong during decoding of a barcode. + This includes, but is not limited to, failing checksums / error correction algorithms, being + unable to locate finder timing patterns, and so on. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class. + + The inner exception. + + + + Initializes a new instance of the class. + + The inner exception. + + + + + JAVAPORT: The original code was a 2D array of ints, but since it only ever gets assigned + 0, 1 and 2 I'm going to use less memory and go with bytes. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Sets the specified x. + + The x. + The y. + The value. + + + + Sets the specified x. + + The x. + The y. + if set to true [value]. + + + + Clears the specified value. + + The value. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Gets the height. + + + + + Gets the width. + + + + + Gets or sets the with the specified x. + + + + + an internal representation as bytes, in row-major order. array[y][x] represents point (x,y) + + + + + Jacob Haynes + + + + + Creates a Barcode row of the width + + The width. + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + A boolean which is true if the bar black false if it is white + How many spots wide the bar is. + + + + + This function scales the row + + How much you want the image to be scaled, must be greater than or equal to 1. + the scaled row + + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Superclass of implementations that read barcodes in the RSS family of formats. + + + + + Initializes a new instance of the class. + + + + + Gets the decode finder counters. + + + + + + Gets the data character counters. + + + + + + Gets the odd rounding errors. + + + + + + Gets the even rounding errors. + + + + + + Gets the odd counts. + + + + + + Gets the even counts. + + + + + + Parses the finder value. + + The counters. + The finder patterns. + The value. + + + + + Counts the specified array. + + The array. + + + + + Increments the specified array. + + The array. + The errors. + + + + Decrements the specified array. + + The array. + The errors. + + + + Determines whether [is finder pattern] [the specified counters]. + + The counters. + + true if [is finder pattern] [the specified counters]; otherwise, false. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + This object renders a MSI code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Implements decoding of the EAN-13 format.

+ + dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Initializes a new instance of the class. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + Based on pattern of odd-even ('L' and 'G') patterns used to encoded the explicitly-encoded + digits in a barcode, determines the implicitly encoded first digit and adds it to the + result string. + + string to insert decoded first digit into + int whose bits indicates the pattern of odd/even L/G patterns used to + encode digits + -1 if first digit cannot be determined + + + + Get the format of this decoder. + The 1D format. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Error Correction Code for ECC200. + + + + + Lookup table which factors to use for which number of error correction codewords. + See FACTORS. + + + + + Precomputed polynomial factors for ECC 200. + + + + + Creates the ECC200 error correction for an encoded message. + + The codewords. + information about the symbol to be encoded + the codewords with interleaved error correction. + + + +

Encapsulates a block of data within a Data Matrix Code. Data Matrix Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ + bbrown@google.com (Brian Brown) +
+
+ + +

When Data Matrix Codes use multiple data blocks, they actually interleave the bytes of each of them. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ + bytes as read directly from the Data Matrix Code + version of the Data Matrix Code + DataBlocks containing original bytes, "de-interleaved" from representation in the + Data Matrix Code +
+
+ + + Implements Reed-Solomon encoding, as the name implies. + + Sean Owen + William Rucklidge + + + This Binarizer implementation uses the old ZXing global histogram approach. It is suitable + for low-end mobile devices which don't have enough CPU or memory to use a local thresholding + algorithm. However, because it picks a global black point, it cannot handle difficult shadows + and gradients. + + Faster mobile devices and all desktop applications should probably use HybridBinarizer instead. + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The source. + + + + Applies simple sharpening to the row data to improve performance of the 1D Readers. + + + + + + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + + A new concrete Binarizer implementation object. + + + + + Does not sharpen the data, as this call is intended to only be used by 2D Readers. + + + + +

Encapsulates the result of detecting a barcode in an image. This includes the raw + matrix of black/white pixels corresponding to the barcode, and possibly points of interest + in the image, like the location of finder patterns or corners of the barcode in the image.

+
+ Sean Owen +
+ + + initializing constructor + + + + + + + the detected bits + + + + + the pixel points where the result is found + + + + +

Represents a 2D matrix of bits. In function arguments below, and throughout the common + module, x is the column position, and y is the row position. The ordering is always x, y. + The origin is at the top-left.

+

Internally the bits are represented in a 1-D array of 32-bit ints. However, each row begins + with a new int. This is done intentionally so that we can copy out a row into a BitArray very + efficiently.

+

The ordering of bits is row-major. Within each int, the least significant bits are used first, + meaning they represent lower x values. This is compatible with BitArray's implementation.

+
+ Sean Owen + dswitkin@google.com (Daniel Switkin) +
+ + + Converts this ByteMatrix to a black and white bitmap. + + A black and white bitmap converted from this ByteMatrix. + + + + Creates an empty square . + + height and width + + + + Creates an empty square . + + bit matrix width + bit matrix height + + + + Interprets a 2D array of booleans as a , where "true" means an "on" bit. + + bits of the image, as a row-major 2D array. Elements are arrays representing rows + representation of image + + + +

Flips the given bit.

+
+ The horizontal component (i.e. which column) + The vertical component (i.e. which row) +
+ + + flip all of the bits, if shouldBeFlipped is true for the coordinates + + should return true, if the bit at a given coordinate should be flipped + + + + Exclusive-or (XOR): Flip the bit in this {@code BitMatrix} if the corresponding + mask bit is set. + + The mask. + + + Clears all bits (sets to false). + + +

Sets a square region of the bit matrix to true.

+ +
+ The horizontal position to begin at (inclusive) + + The vertical position to begin at (inclusive) + + The width of the region + + The height of the region + +
+ + A fast method to retrieve one row of data from the matrix as a BitArray. + + + The row to retrieve + + An optional caller-allocated BitArray, will be allocated if null or too small + + The resulting BitArray - this reference should always be used even when passing + your own row + + + + + Sets the row. + + row to set + {@link BitArray} to copy from + + + + Modifies this {@code BitMatrix} to represent the same but rotated 180 degrees + + + + + This is useful in detecting the enclosing rectangle of a 'pure' barcode. + + {left,top,width,height} enclosing rectangle of all 1 bits, or null if it is all white + + + + This is useful in detecting a corner of a 'pure' barcode. + + {x,y} coordinate of top-left-most 1 bit, or null if it is all white + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + The line separator. + + A that represents this instance. + + + + + Clones this instance. + + + + + The width of the matrix + + + + The height of the matrix + + + + This method is for compatibility with older code. It's only logical to call if the matrix + is square, so I'm throwing if that's not the case. + + + row/column dimension of this matrix + + + + + The rowsize of the matrix + + + +

Gets the requested bit, where true means black.

+ +
+ The horizontal component (i.e. which column) + + The vertical component (i.e. which row) + + value of given bit in matrix + +
+ + + The number's sign, where Positive also stands for the number zero. + + + + + A simple result type encapsulating a string that has no further interpretation. + + Sean Owen + + + Parses strings of digits that represent a ISBN. + + + jbreiden@google.com (Jeff Breidenbach) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + See ISBN-13 For Dummies + + The result. + + + + + Represents a parsed result that encodes extended product information as encoded by the RSS format, like weight, price, dates, etc. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + extension for kilogram weight type + + + + + extension for pounds weight type + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the raw text + + + + + the product id + + + + + the sscc + + + + + the lot number + + + + + the production date + + + + + the packaging date + + + + + the best before date + + + + + the expiration date + + + + + the weight + + + + + the weight type + + + + + the weight increment + + + + + the price + + + + + the price increment + + + + + the price currency + + + + + the uncommon AIs + + + + + the display representation (raw text) + + + + + A smart class to encode some content to raw pixel data + + + + + Initializes a new instance of the class. + + + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + + + converts the pixel data to a bitmap object + + + + + + the generated code as byte array of BGRA pixels + + + + + the width of the image + + + + + the height of the image + + + + + + + Satoru Takabayashi + Daniel Switkin + Sean Owen + + + + Apply mask penalty rule 1 and return the penalty. Find repetitive cells with the same color and + give penalty to them. Example: 00000 or 11111. + + The matrix. + + + + + Apply mask penalty rule 2 and return the penalty. Find 2x2 blocks with the same color and give + penalty to them. This is actually equivalent to the spec's rule, which is to find MxN blocks and give a + penalty proportional to (M-1)x(N-1), because this is the number of 2x2 blocks inside such a block. + + The matrix. + + + + + Apply mask penalty rule 3 and return the penalty. Find consecutive cells of 00001011101 or + 10111010000, and give penalty to them. If we find patterns like 000010111010000, we give + penalties twice (i.e. 40 * 2). + + The matrix. + + + + + Apply mask penalty rule 4 and return the penalty. Calculate the ratio of dark cells and give + penalty if the ratio is far from 50%. It gives 10 penalty for 5% distance. + + The matrix. + + + + + Return the mask bit for "getMaskPattern" at "x" and "y". See 8.8 of JISX0510:2004 for mask + pattern conditions. + + The mask pattern. + The x. + The y. + + + + + Helper function for applyMaskPenaltyRule1. We need this for doing this calculation in both + vertical and horizontal orders respectively. + + The matrix. + if set to true [is horizontal]. + + + +

Encapsulates a QR Code's format information, including the data mask used and + error correction level.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + +
+ + See ISO 18004:2006, Annex C, Table C.1 + + + Offset i holds the number of 1 bits in the binary representation of i + + + + Decodes the format information. + + format info indicator, with mask still applied + The masked format info2. + + information about the format it specifies, or null + if doesn't seem to match any known pattern + + + +

Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations + of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix, + including areas used for finder patterns, timing patterns, etc. These areas should be unused + after the point they are unmasked anyway.

+ +

Note that the diagram in section 6.8.1 is misleading since it indicates that i is column position + and j is row position. In fact, as the text says, i is row position and j is column position.

+ +
+ Sean Owen +
+ + See ISO 18004:2006 6.8.1 + + +

Implementations of this method reverse the data masking process applied to a QR Code and + make its bits ready to read.

+
+ + representation of QR Code bits + dimension of QR Code, represented by bits, being unmasked +
+ + + A Barcode Value for the PDF417 barcode. + The scanner will iterate through the bitmatrix, + and given the different methods or iterations + will increment a given barcode value's confidence. + + When done, this will return the values of highest confidence. + + Guenther Grau + + + + Incremenets the Confidence for a given value. (Adds an occurance of a value) + + + Value. + + + + Determines the maximum occurrence of a set value and returns all values which were set with this occurrence. + + an array of int, containing the values with the highest occurrence, or null, if no value was set. + + + + Returns the confience value for a given barcode value + + Barcode value. + + + @see UPCEANExtension2Support + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + one {@link ResultMetadataType} to appropriate value, or {@code null} if not known + + + + @see UPCEANExtension5Support + + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + + + + One row of an RSS Expanded Stacked symbol, consisting of 1+ expanded pairs. + + + + + Two rows are equal if they contain the same pairs in the same order. + + + + + Did this row of the image have to be reversed (mirrored) to recognize the pairs? + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + This object renders an EAN13 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + This object renders a CODE39 code as a . + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Decodes Code 39 barcodes. Supports "Full ASCII Code 39" if USE_CODE_39_EXTENDED_MODE is set.

+ Sean Owen + @see Code93Reader +
+
+ + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. It will not decoded "extended Code 39" sequences. + + + + + Creates a reader that can be configured to check the last character as a check digit. + It will not decoded "extended Code 39" sequences. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + + Creates a reader that can be configured to check the last character as a check digit, + or optionally attempt to decode "extended Code 39" sequences that are used to encode + the full ASCII character set. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + if true, will attempt to decode extended Code 39 sequences in the text. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + Returns a string with all possible characters + + + + + implements an Intelligent Mail barcode + Rishabh Hatgadkar + + + + + Encapsulates the result of decoding a matrix of bits. This typically + applies to 2D barcode formats. For now it contains the raw bytes obtained, + as well as a String interpretation of those bytes, if applicable. + Sean Owen + + + + + initializing constructor + + + + + + + + + initializing constructor + + + + + + + + + + + initializing constructor + + + + + + + + + + initializing constructor + + + + + + + + + + + + raw bytes representing the result, or null if not applicable + + + + + how many bits of are valid; typically 8 times its length + + + + + text representation of the result + + + + + list of byte segments in the result, or null if not applicable + + + + + name of error correction level used, or null if not applicable + + + + + gets a value which describe if structure append data was found + + + + + number of errors corrected, or null if not applicable + + + + + gives the sequence number of the result if structured append was found + + + + + number of erasures corrected, or null if not applicable + + + + + gives the parity information if structured append was found + + + + + Miscellanseous data value for the various decoders + + The other. + + + + Integer inefficiently represented internally using base-10 digits, in order to allow a + visual representation as a base-10 string. Only for internal use. + + + + + 10 numeration base for string representation, very inefficient for computations. + + + + + Maximum size for numbers is up to 10240 binary digits or approximately (safe to use) 3000 decimal digits. + The maximum size is, in fact, double the previously specified amount, in order to accommodate operations' + overflow. + + + + Integer constants + + + + The array of digits of the number. + + + + + The actual number of digits of the number. + + + + + The number sign. + + + + + Default constructor, intializing the Base10BigInteger with zero. + + + + + Constructor creating a new Base10BigInteger as a conversion of a regular base-10 long. + + The base-10 long to be converted + + + + Constructor creating a new Base10BigInteger as a copy of an existing Base10BigInteger. + + The Base10BigInteger to be copied + + + + Determines whether the specified Base10BigInteger is equal to the current Base10BigInteger. + + The Base10BigInteger to compare with the current Base10BigInteger + True if the specified Base10BigInteger is equal to the current Base10BigInteger, + false otherwise + + + + Determines whether the specified System.Object is equal to the current Base10BigInteger. + + The System.Object to compare with the current Base10BigInteger + True if the specified System.Object is equal to the current Base10BigInteger, + false otherwise + + + + Serves as a hash function for the Base10BigInteger type. + + A hash code for the current Base10BigInteger + + + + String representation of the current Base10BigInteger, converted to its base-10 representation. + + The string representation of the current Base10BigInteger + + + + Base10BigInteger inverse with respect to addition. + + The Base10BigInteger whose opposite is to be computed + The Base10BigInteger inverse with respect to addition + + + + Greater test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a > b, false otherwise + + + + Greater or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a >= b, false otherwise + + + + Smaller test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a < b, false otherwise + + + + Smaller or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a <= b, false otherwise + + + + Computes the absolute value of a Base10BigInteger. + + The Base10BigInteger whose absolute value is to be computed + The absolute value of the given BigInteger + + + + Addition operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the addition + + + + Subtraction operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the subtraction + + + + Multiplication operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the multiplication + + + + Implicit conversion operator from long to Base10BigInteger. + + The long to be converted to a Base10BigInteger + The Base10BigInteger converted from the given long + + + + Equality test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a == b, false otherwise + + + + Inequality test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a != b, false otherwise + + + + Greater test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a > b, false otherwise + + + + Smaller test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a < b, false otherwise + + + + Greater or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a >= b, false otherwise + + + + Smaller or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a <= b, false otherwise + + + + Base10BigInteger inverse with respect to addition. + + The Base10BigInteger whose opposite is to be computed + The Base10BigInteger inverse with respect to addition + + + + Addition operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the addition + + + + Subtraction operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the subtraction + + + + Multiplication operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the multiplication + + + + Incremetation by one operation of a Base10BigInteger. + + The Base10BigInteger to be incremented by one + The Base10BigInteger result of incrementing by one + + + + Decremetation by one operation of a Base10BigInteger. + + The Base10BigInteger to be decremented by one + The Base10BigInteger result of decrementing by one + + + + Adds two BigNumbers a and b, where a >= b, a, b non-negative. + + + + + Subtracts the Base10BigInteger b from the Base10BigInteger a, where a >= b, a, b non-negative. + + + + + Multiplies two Base10BigIntegers. + + + + + Sets the number sign. + + + + + Tries to parse results that are a URI of some kind. + + Sean Owen + + + +

Parses an "smtp:" URI result, whose format is not standardized but appears to be like: + smtp[:subject[:body]]}.

+

See http://code.google.com/p/zxing/issues/detail?id=536

+
+ Sean Owen +
+ + Implements the "MECARD" address book entry format. + + Supported keys: N, SOUND, TEL, EMAIL, NOTE, ADR, BDAY, URL, plus ORG + Unsupported keys: TEL-AV, NICKNAME + + Except for TEL, multiple values for keys are also not supported; + the first one found takes precedence. + + Our understanding of the MECARD format is based on this document: + + http://www.mobicode.org.tw/files/OMIA%20Mobile%20Bar%20Code%20Standard%20v3.2.1.doc + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + +

See + + DoCoMo's documentation about the result types represented by subclasses of this class.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + Implements KDDI AU's address book format. See + + http://www.au.kddi.com/ezfactory/tec/two_dimensions/index.html. + (Thanks to Yuzo for translating!) + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + class which represents the luminance values for a bitmap object + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class + with the image of a Bitmap instance + + The bitmap. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + Aztec result meta data. + + + + + + + + + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + This object extends LuminanceSource around an array of YUV data returned from the camera driver, + with the option to crop to a rectangle within the full data. This can be used to exclude + superfluous pixels around the perimeter and speed up decoding. + It works for any pixel format where the Y channel is planar and appears first, including + YCbCr_420_SP and YCbCr_422_SP. + @author dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The yuv data. + Width of the data. + Height of the data. + The left. + The top. + The width. + The height. + if set to true [reverse horiz]. + + + + Initializes a new instance of the class. + + The luminances. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Renders the cropped greyscale bitmap. + + + + + + creates a new instance + + + + + + + + + + + + + + + Whether this subclass supports cropping. + + + + width of image from {@link #renderThumbnail()} + + + + + height of image from {@link #renderThumbnail()} + + + + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Maximum Codewords (Data + Error). + + + + + Gets the bit count sum. + + The bit count sum. + Module bit count. + + + + Converts an ICollection<int> to an int[] + Carry-over from Java. Will likely remove and replace with the Generic .ToArray() method. + + The int array. + List. + + + + Translate the symbol into a codeword + + the codeword corresponding to the symbol. + encoded symbol to translate to a codeword + + + + The sorted table of all possible symbols. Extracted from the PDF417 + specification. The index of a symbol in this table corresponds to the + index into the codeword table. + + + + + This table contains to codewords for all symbols. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + The class holds the available options for the QrCodeWriter + + + + + if true, don't switch to codeset C for numbers + + + + + This class renders CodaBar as []. + + dsbnatut@gmail.com (Kazuki Nishiura) + + + +

Decodes Codabar barcodes.

+ + Bas Vijfwinkel +
+
+ + These represent the encodings of characters, as patterns of wide and narrow bars. The 7 least-significant bits of + each int correspond to the pattern of wide and narrow, with 1s representing "wide" and 0s representing narrow. + + + + Records the size of all runs of white and black pixels, starting with white. + This is just like recordPattern, except it records all the counters, and + uses our builtin "counters" member for storage. + + row to count from + + + + Encapsulates a type of hint that a caller may pass to a barcode reader to help it + more quickly or accurately decode it. It is up to implementations to decide what, + if anything, to do with the information that is supplied. + + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Unspecified, application-specific hint. Maps to an unspecified . + + + + + Image is a pure monochrome image of a barcode. Doesn't matter what it maps to; + use = true. + + + + + Image is known to be of one of a few possible formats. + Maps to a of s. + + + + + Spend more time to try to find a barcode; optimize for accuracy, not speed. + Doesn't matter what it maps to; use = true. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + + + The caller needs to be notified via callback when a possible + is found. Maps to a . + + + + + Assume MSI codes employ a check digit. Maps to . + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + Maps to . + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + 1D readers supporting rotation with TRY_HARDER enabled. + But BarcodeReader class can do auto-rotating for 1D and 2D codes. + Enabling that option prevents 1D readers doing double rotation. + BarcodeReader enables that option automatically if "global" auto-rotation is enabled. + Maps to . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to; + use . + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + The class holds the available options for the DatamatrixWriter + + + + + Specifies the matrix shape for Data Matrix + + + + + Specifies a minimum barcode size + + + + + Specifies a maximum barcode size + + + + + Specifies the default encodation + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + +

Represents a polynomial whose coefficients are elements of a GF. + Instances of this class are immutable.

+

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + the {@link GenericGF} instance representing the field to use + to perform computations + coefficients as ints representing elements of GF(size), arranged + from most significant (highest-power term) coefficient to least significant + if argument is null or empty, + or if leading coefficient is 0 and this is not a + constant polynomial (that is, it is not the monomial "0") + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + + + degree of this polynomial + + + + + Gets a value indicating whether this is zero. + + true iff this polynomial is the monomial "0" + + + + Represents a parsed result that encodes a Vehicle Identification Number (VIN). + + + + + State represents all information about a sequence necessary to generate the current output. + Note that a state is immutable. + + + + + Create a new state representing this state with a latch to a (not + necessary different) mode, and then a code. + + + + + Create a new state representing this state, with a temporary shift + to a different mode to output a single value. + + + + + Create a new state representing this state, but an additional character + output in Binary Shift mode. + + + + + Create the state identical to this one, but we are no longer in + Binary Shift mode. + + + + + Returns true if "this" state is better (or equal) to be in than "that" + state under all possible circumstances. + + + + + Generates Aztec 2D barcodes. + + Rustam Abdullaev + + + + Encodes the given binary content as an Aztec symbol + + input data string + Aztec symbol matrix with metadata + + + + Encodes the given binary content as an Aztec symbol + + input data string + minimal percentage of error check words (According to ISO/IEC 24778:2008, + a minimum of 23% + 3 words is recommended) + if non-zero, a user-specified value for the number of layers + + Aztec symbol matrix with metadata + + + + + A Codeword in the PDF417 barcode + + Guenther Grau + + + + Default value for the RowNumber (-1 being an invalid real number) + + + + + Initializes a new instance of the class. + + Start x. + End x. + Bucket. + Value. + + + + Determines whether this instance is valid row number the specified rowNumber. + + true if this instance is valid row number the specified rowNumber; otherwise, false. + Row number. + + + + Sets the row number as the row's indicator column. + + + + + Returns a that represents the current . + + A that represents the current . + + + + Gets the width. + + The width. + + + + Gets a value indicating whether this instance has valid row number. + + true if this instance has valid row number; otherwise, false. + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + This implementation can detect and decode multiple QR Codes in an image. + + + + + This implementation can detect and decode QR Codes in an image. + Sean Owen + + + + + Gets the decoder. + + + + + + Locates and decodes a QR code in an image. + + a String representing the content encoded by the QR code + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Simply encapsulates a width and height. + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + + + + + + the width + + + + + the height + + + + + Enumeration for encodation types + + + + +

The main class which implements Data Matrix Code decoding -- as opposed to locating and extracting + the Data Matrix Code from an image.

+ + bbrown@google.com (Brian Brown) +
+
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a Data Matrix Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+ + booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code + if the Data Matrix Code cannot be decoded +
+
+ + +

Decodes a Data Matrix Code represented as a . A 1 or "true" is taken + to mean a black module.

+
+ booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+ + data and error correction codewords + number of codewords that are data bytes +
+
+ + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. By keeping track of the + last black points it encountered, it determines the corners of the barcode. + + David Olivier + + + + Creates a WhiteRectangleDetector instance + + The image. + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + Creates a WhiteRectangleDetector instance + + barcode image to find a rectangle in + initial size of search area around center + x position of search center + y position of search center + + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + + Initializes a new instance of the class. + + The image. + if image is too small + + + + Initializes a new instance of the class. + + The image. + Size of the init. + The x. + The y. + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. + + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + recenters the points of a constant distance towards the center + + bottom most point + left most point + right most point + top most point + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + Determines whether a segment contains a black point + + min value of the scanned coordinate + max value of the scanned coordinate + value of fixed coordinate + set to true if scan must be horizontal, false if vertical + + true if a black point has been found, else false. + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Parses the "URLTO" result format, which is of the form "URLTO:[title]:[url]". + This seems to be used sometimes, but I am not able to find documentation + on its origin or official format? + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Parses a "geo:" URI result, which specifies a location on the surface of + the Earth as well as an optional altitude above the surface. See + + http://tools.ietf.org/html/draft-mayrhofer-geo-uri-00. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a calendar event at a certain time, optionally with attendees and a location. + + Sean Owen + + + + Determines whether [is start all day]. + + if start time was specified as a whole day + + + + Parses a string as a date. RFC 2445 allows the start and end fields to be of type DATE (e.g. 20081021) + or DATE-TIME (e.g. 20081021T123000 for local time, or 20081021T123000Z for UTC). + + The string to parse + + if not a date formatted string + + + + Gets the start. + + + + + event end , or null if event has no duration + + + + + Gets a value indicating whether this instance is end all day. + + true if end time was specified as a whole day + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Aztec 2D code representation + + Rustam Abdullaev + + + + Compact or full symbol indicator + + + + + Size in pixels (width and height) + + + + + Number of levels + + + + + Number of data codewords + + + + + The symbol image + + + + + Encapsulates logic that can detect an Aztec Code in an image, even if the Aztec Code + is rotated or skewed, or partially obscured. + + David Olivier + + + + Initializes a new instance of the class. + + The image. + + + + Detects an Aztec Code in an image. + + + + + Detects an Aztec Code in an image. + + if true, image is a mirror-image of original. + + encapsulating results of detecting an Aztec Code + + + + + Extracts the number of data layers and data blocks from the layer around the bull's eye + + bullEyeCornerPoints the array of bull's eye corners + + + + + Corrects the parameter bits using Reed-Solomon algorithm + + paremeter bits + compact true if this is a compact Aztec code + + + + + Finds the corners of a bull-eye centered on the passed point + This returns the centers of the diagonal points just outside the bull's eye + Returns [topRight, bottomRight, bottomLeft, topLeft] + + Center point + The corners of the bull-eye + + + + Finds a candidate center point of an Aztec code from an image + + the center point + + + + Gets the Aztec code corners from the bull's eye corners and the parameters. + + the array of bull's eye corners + the array of aztec code corners + + + + Creates a BitMatrix by sampling the provided image. + topLeft, topRight, bottomRight, and bottomLeft are the centers of the squares on the + diagonal just outside the bull's eye. + + The image. + The top left. + The bottom left. + The bottom right. + The top right. + + + + + Samples a line + + start point (inclusive) + end point (exclusive) + number of bits + the array of bits as an int (first bit is high-order bit of result) + + + + Determines whether [is white or black rectangle] [the specified p1]. + + The p1. + The p2. + The p3. + The p4. + true if the border of the rectangle passed in parameter is compound of white points only + or black points only + + + + Gets the color of a segment + + The p1. + The p2. + 1 if segment more than 90% black, -1 if segment is more than 90% white, 0 else + + + + Gets the coordinate of the first point with a different color in the given direction + + The init. + if set to true [color]. + The dx. + The dy. + + + + + Expand the square represented by the corner points by pushing out equally in all directions + + the corners of the square, which has the bull's eye at its center + the original length of the side of the square in the target bit matrix + the new length of the size of the square in the target bit matrix + the corners of the expanded square + + + +

The main class which implements QR Code decoding -- as opposed to locating and extracting + the QR Code from an image.

+
+ + Sean Owen + +
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a QR Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Decodes a QR Code represented as a {@link BitMatrix}. A 1 or "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+
+ data and error correction codewords + number of codewords that are data bytes + +
+ + Sean Owen + + + {@link BitMatrix} to parse + ReaderException if dimension is not >= 21 and 1 mod 4 + + +

Reads format information from one of its two locations within the QR Code.

+ +
+ {@link FormatInformation} encapsulating the QR Code's format info + + ReaderException if both format information locations cannot be parsed as + the valid encoding of format information + +
+ +

Reads version information from one of its two locations within the QR Code.

+ +
+ {@link Version} encapsulating the QR Code's version + + ReaderException if both version information locations cannot be parsed as + the valid encoding of version information + +
+ +

Reads the bits in the {@link BitMatrix} representing the finder pattern in the + correct order in order to reconstruct the codewords bytes contained within the + QR Code.

+ +
+ bytes encoded within the QR Code + + ReaderException if the exact number of bytes expected is not read +
+ + Revert the mask removal done while reading the code words. The bit matrix should revert to its original state. + + + Prepare the parser for a mirrored operation. + This flag has effect only on the {@link #readFormatInformation()} and the + {@link #readVersion()}. Before proceeding with {@link #readCodewords()} the + {@link #mirror()} method should be called. + + @param mirror Whether to read version and format information mirrored. + + + Mirror the bit matrix in order to attempt a second reading. + + + + The class holds the available options for the + + + + + Specifies whether to use compact mode for PDF417 (type ). + + + + + Specifies what compaction mode to use for PDF417 (type + ). + + + + + Specifies the minimum and maximum number of rows and columns for PDF417 (type + ). + + + + + Specifies what degree of error correction to use + + + + + Specifies what degree of error correction to use + + + + + Specifies what character encoding to use where applicable (type {@link String}) + + + + + Explicitly disables ECI segment when generating PDF417 Code + That is against the specification but some + readers have problems if the charset is switched from + CP437 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use different encodings + and the ECI segment is omitted. + + + + + Data object to specify the minimum and maximum number of rows and columns for a PDF417 barcode. + @author qwandor@google.com (Andrew Walbran) + + + + + Initializes a new instance of the class. + + The min cols. + The max cols. + The min rows. + The max rows. + + + + Gets the min cols. + + + + + Gets the max cols. + + + + + Gets the min rows. + + + + + Gets the max rows. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + MultiFormatReader is a convenience class and the main entry point into the library for most uses. + By default it attempts to decode all barcode formats that the library supports. Optionally, you + can provide a hints object to request different behavior, for example only decoding QR codes. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + This version of decode honors the intent of Reader.decode(BinaryBitmap) in that it + passes null as a hint to the decoders. However, that makes it inefficient to call repeatedly. + Use setHints() followed by decodeWithState() for continuous scan applications. + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the hints provided. Does not honor existing state. + + + The pixel data to decode + + The hints to use, clearing the previous state. + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the state set up by calling setHints() previously. Continuous scan + clients will get a large speed increase by using this instead of decode(). + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + + resets all specific readers + + + + This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls + to decodeWithState(image) can reuse the same set of readers without reallocating memory. This + is important for performance in continuous scan clients. + + + + + + A wrapper implementation of {@link LuminanceSource} which inverts the luminances it returns -- black becomes + white and vice versa, and each value becomes (255-value). + + Sean Owen + + + + Initializes a new instance of the class. + + The @delegate. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Inverts this instance. + + original delegate {@link LuminanceSource} since invert undoes itself + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff; + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + + + Whether this subclass supports cropping. + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + This object renders a Data Matrix code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + Guillaume Le Biller Added to zxing lib. + + + + encodes the content to a BitMatrix + + + + + + + + + + encodes the content to a BitMatrix + + + + + + + + + + + Encode the given symbol info to a bit matrix. + + The DataMatrix placement. + The symbol info to encode. + + + The bit matrix generated. + + + + Convert the ByteMatrix to BitMatrix. + + The input matrix. + The requested width of the image (in pixels) with the Datamatrix code + The requested height of the image (in pixels) with the Datamatrix code + The output matrix. + + + + This implementation can detect and decode Data Matrix codes in an image. + + bbrown@google.com (Brian Brown) + + + + + Locates and decodes a Data Matrix code in an image. + + + a String representing the content encoded by the Data Matrix code + + + + Locates and decodes a Data Matrix code in an image. + + + + a String representing the content encoded by the Data Matrix code + + + + does nothing here + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + This class implements a local thresholding algorithm, which while slower than the + GlobalHistogramBinarizer, is fairly efficient for what it does. It is designed for + high frequency images of barcodes with black data on white backgrounds. For this application, + it does a much better job than a global blackpoint with severe shadows and gradients. + However it tends to produce artifacts on lower frequency images and is therefore not + a good general purpose binarizer for uses outside ZXing. + + This class extends GlobalHistogramBinarizer, using the older histogram approach for 1D readers, + and the newer local approach for 2D readers. 1D decoding using a per-row histogram is already + inherently local, and only fails for horizontal gradients. We can revisit that problem later, + but for now it was not a win to use local blocks for 1D. + + This Binarizer is the default for the unit tests and the recommended class for library users. + dswitkin@google.com (Daniel Switkin) + + + + + initializing constructor + + + + + + creates a new instance + + + + + + + Calculates the final BitMatrix once for all requests. This could be called once from the + constructor instead, but there are some advantages to doing it lazily, such as making + profiling easier, and not doing heavy lifting when callers don't expect it. + + + + + For each 8x8 block in the image, calculate the average black point using a 5x5 grid + of the blocks around it. Also handles the corner cases (fractional blocks are computed based + on the last 8 pixels in the row/column which are also used in the previous block). + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + The black points. + The matrix. + + + + Applies a single threshold to an 8x8 block of pixels. + + The luminances. + The xoffset. + The yoffset. + The threshold. + The stride. + The matrix. + + + + Calculates a single black point for each 8x8 block of pixels and saves it away. + See the following thread for a discussion of this algorithm: + http://groups.google.com/group/zxing/browse_thread/thread/d06efa2c35a7ddc0 + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + + + + + gives the black matrix + + + + + Superclass of classes encapsulating types ECIs, according to "Extended Channel Interpretations" + 5.3 of ISO 18004. + + Sean Owen + + + ECI value + representing ECI of given value, or null if it is legal but unsupported + ArgumentException if ECI value is invalid + + + + the ECI value + + + + + A simple, fast array of bits, represented compactly by an array of ints internally. + + Sean Owen + + + + default constructor + + + + + initializing constructor + + desired size of the array + + + + Flips bit i. + + bit to set + + + + + Gets the next set. + + first bit to check + index of first bit that is set, starting from the given index, or size if none are set + at or beyond this given index + + + + see getNextSet(int) + + index to start looking for unset bit + index of next unset bit, or if none are unset until the end + + + Sets a block of 32 bits, starting at bit i. + + + first bit to set + + the new value of the next 32 bits. Note again that the least-significant bit + corresponds to bit i, the next-least-significant to i+1, and so on. + + + + + Sets a range of bits. + + start of range, inclusive. + end of range, exclusive + + + Clears all bits (sets to false). + + + Efficient method to check if a range of bits is set, or not set. + + + start of range, inclusive. + + end of range, exclusive + + if true, checks that bits in range are set, otherwise checks that they are not set + + true iff all bits are set or not set in range, according to value argument + if end is less than start or the range is not contained in the array + + + + Appends the bit. + + The bit. + + + + Appends the least-significant bits, from value, in order from most-significant to + least-significant. For example, appending 6 bits from 0x000001E will append the bits + 0, 1, 1, 1, 1, 0 in that order. + + containing bits to append + bits from value to append + + + + adds the array to the end + + + + + + XOR operation + + + + + + converts to bytes. + + first bit to start writing + array to write into. Bytes are written most-significant byte first. This is the opposite + of the internal representation, which is exposed by BitArray + position in array to start writing + how many bytes to write + + + Reverses all bits in the array. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Erstellt ein neues Objekt, das eine Kopie der aktuellen Instanz darstellt. + + + Ein neues Objekt, das eine Kopie dieser Instanz darstellt. + + + + + size of the array, number of elements + + + + + size of the array in bytes + + + + + index accessor + + + + + + underlying array of ints. The first element holds the first 32 bits, and the least + significant bit is bit 0. + + + +

Parses an "sms:" URI result, which specifies a number to SMS and optional + "via" number. See + the IETF draft on this.

+ +

This actually also parses URIs starting with "mms:", "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + + Parses strings of digits that represent a RSS Extended code. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + tries to parse a text representation to a specific result object + + + + + + + Extends with more information specific to the Aztec format, + like the number of layers and whether it's compact. + + + + + Initializes a new instance of the class. + + The bits. + The points. + if set to true [compact]. + The nb datablocks. + The nb layers. + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + Encapsulates the result of decoding a barcode within an image. + + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + The timestamp. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + The timestamp. + + + + Adds one metadata to the result + + The type. + The value. + + + + Adds a list of metadata to the result + + The metadata. + + + + Adds the result points. + + The new points. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + raw text encoded by the barcode, if applicable, otherwise null + + + raw bytes encoded by the barcode, if applicable, otherwise null + + + + points related to the barcode in the image. These are typically points + identifying finder patterns or the corners of the barcode. The exact meaning is + specific to the type of barcode that was decoded. + + + + {@link BarcodeFormat} representing the format of the barcode that was decoded + + + + {@link Hashtable} mapping {@link ResultMetadataType} keys to values. May be + null. This contains optional metadata about what was detected about the barcode, + like orientation. + + + + + Gets the timestamp. + + + + + how many bits of are valid; typically 8 times its length + + + + + This object renders a QR Code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + PDF 417 Detector Result class. Skipped private backing stores. + Guenther Grau + + + + + Initializes a new instance of the class. + + Bits. + Points. + + + + + + Sean Owen + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + + + Adds another Modulus + + Other. + + + + Subtract another Modulus + + Other. + + + + Multiply by another Modulus + + Other. + + + + Returns a Negative version of this instance + + + + + Multiply by a Scalar. + + Scalar. + + + + Multiplies by a Monomial + + The by monomial. + Degree. + Coefficient. + + + + Returns a that represents the current . + + A that represents the current . + + + + Gets the coefficients. + + The coefficients. + + + + degree of this polynomial + + + + + Gets a value indicating whether this instance is zero. + + true if this polynomial is the monomial "0" + + + + + Metadata about a PDF417 Barcode + + Guenther Grau + + + + Decodes RSS-14, including truncated and stacked variants. See ISO/IEC 24724:2006. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + This object renders a Plessey code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + This object renders an EAN8 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + + + a byte array of horizontal pixels (false = white, true = black) + + + + +

Implements decoding of the EAN-8 format.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Get the format of this decoder. + The 1D format. + + + + This is a factory class which finds the appropriate Writer subclass for the BarcodeFormat + requested and encodes the barcode with the supplied contents. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + encode the given data + + + + + + + + + + encode the given data + + + + + + + + + + + Gets the collection of supported writers. + + + + + This implementation can detect and decode a MaxiCode in an image. + + + + + Locates and decodes a MaxiCode in an image. + + a String representing the content encoded by the MaxiCode + if a MaxiCode cannot be decoded + + + + + Locates and decodes a MaxiCode within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + + Symbol info table for DataMatrix. + + + + Overrides the symbol info set used by this class. Used for testing purposes. + + @param override the symbol info set to use + + + + DataMatrix ECC 200 data encoder following the algorithm described in ISO/IEC 16022:200(E) in + annex S. + + + + + Padding character + + + + + mode latch to C40 encodation mode + + + + + mode latch to Base 256 encodation mode + + + + + FNC1 Codeword + + + + + Structured Append Codeword + + + + + Reader Programming + + + + + Upper Shift + + + + + 05 Macro + + + + + 06 Macro + + + + + mode latch to ANSI X.12 encodation mode + + + + + mode latch to Text encodation mode + + + + + mode latch to EDIFACT encodation mode + + + + + ECI character (Extended Channel Interpretation) + + + + + Unlatch from C40 encodation + + + + + Unlatch from X12 encodation + + + + + 05 Macro header + + + + + 06 Macro header + + + + + Macro trailer + + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + the encoded message (the char values range from 0 to 255) + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + requested shape. May be {@code SymbolShapeHint.FORCE_NONE},{@code SymbolShapeHint.FORCE_SQUARE} or {@code SymbolShapeHint.FORCE_RECTANGLE}. + the minimum symbol size constraint or null for no constraint + the maximum symbol size constraint or null for no constraint + encoding mode to start with + the encoded message (the char values range from 0 to 255) + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + General math-related and numeric utility functions. + + + + + Ends up being a bit faster than {@link Math#round(float)}. This merely rounds its + argument to the nearest int, where x.5 rounds up to x+1. Semantics of this shortcut + differ slightly from {@link Math#round(float)} in that half rounds down for negative + values. -2.5 rounds to -3, not -2. For purposes here it makes no difference. + + real value to round + nearest int + + + + + + + + + + Euclidean distance between points A and B + + + + + + + + + + Euclidean distance between points A and B + + + + + values to sum + sum of values in array + + + Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1 + of ISO 18004. + + + Sean Owen + + + character set ECI value + representing ECI of given value, or null if it is legal but unsupported + + + character set ECI encoding name + representing ECI for character encoding, or null if it is legalbut unsupported + + + + Represents a parsed result that encodes an email message including recipients, subject and body text. + + Sean Owen + + + + the email address + + + + + the TOs + + + + + the CCs + + + + + the BCCs + + + + + the subject + + + + + the body + + + + + the mailto: uri + + + + + A smart class to encode some content to a svg barcode image + + + + + Initializes a new instance of the class. + + + + + A base class which covers the range of exceptions which may occur when encoding a barcode using + the Writer framework. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner exc. + + + + Renders a to a image + + + + + Interface for a class to convert a BitMatrix to an output image format + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + The options. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Gets or sets the foreground color. + + The foreground color. + + + + Gets or sets the background color. + + The background color. + + + + Gets or sets the text font. + + + The text font. + + + + + + + + satorux@google.com (Satoru Takabayashi) - creator + + + + + Set all cells to 2. 2 means that the cell is empty (not set yet). + + JAVAPORT: We shouldn't need to do this at all. The code should be rewritten to begin encoding + with the ByteMatrix initialized all to zero. + + The matrix. + + + + Build 2D matrix of QR Code from "dataBits" with "ecLevel", "version" and "getMaskPattern". On + success, store the result in "matrix" and return true. + + The data bits. + The ec level. + The version. + The mask pattern. + The matrix. + + + + Embed basic patterns. On success, modify the matrix and return true. + The basic patterns are: + - Position detection patterns + - Timing patterns + - Dark dot at the left bottom corner + - Position adjustment patterns, if need be + + The version. + The matrix. + + + + Embed type information. On success, modify the matrix. + + The ec level. + The mask pattern. + The matrix. + + + + Embed version information if need be. On success, modify the matrix and return true. + See 8.10 of JISX0510:2004 (p.47) for how to embed version information. + + The version. + The matrix. + + + + Embed "dataBits" using "getMaskPattern". On success, modify the matrix and return true. + For debugging purposes, it skips masking process if "getMaskPattern" is -1. + See 8.7 of JISX0510:2004 (p.38) for how to embed data bits. + + The data bits. + The mask pattern. + The matrix. + + + + Return the position of the most significant bit set (to one) in the "value". The most + significant bit is position 32. If there is no bit set, return 0. Examples: + - findMSBSet(0) => 0 + - findMSBSet(1) => 1 + - findMSBSet(255) => 8 + + The value_ renamed. + + + + + Calculate BCH (Bose-Chaudhuri-Hocquenghem) code for "value" using polynomial "poly". The BCH + code is used for encoding type information and version information. + Example: Calculation of version information of 7. + f(x) is created from 7. + - 7 = 000111 in 6 bits + - f(x) = x^2 + x^2 + x^1 + g(x) is given by the standard (p. 67) + - g(x) = x^12 + x^11 + x^10 + x^9 + x^8 + x^5 + x^2 + 1 + Multiply f(x) by x^(18 - 6) + - f'(x) = f(x) * x^(18 - 6) + - f'(x) = x^14 + x^13 + x^12 + Calculate the remainder of f'(x) / g(x) + x^2 + __________________________________________________ + g(x) )x^14 + x^13 + x^12 + x^14 + x^13 + x^12 + x^11 + x^10 + x^7 + x^4 + x^2 + -------------------------------------------------- + x^11 + x^10 + x^7 + x^4 + x^2 + + The remainder is x^11 + x^10 + x^7 + x^4 + x^2 + Encode it in binary: 110010010100 + The return value is 0xc94 (1100 1001 0100) + + Since all coefficients in the polynomials are 1 or 0, we can do the calculation by bit + operations. We don't care if coefficients are positive or negative. + + The value. + The poly. + + + + + Make bit vector of type information. On success, store the result in "bits" and return true. + Encode error correction level and mask pattern. See 8.9 of + JISX0510:2004 (p.45) for details. + + The ec level. + The mask pattern. + The bits. + + + + Make bit vector of version information. On success, store the result in "bits" and return true. + See 8.10 of JISX0510:2004 (p.45) for details. + + The version. + The bits. + + + + Check if "value" is empty. + + The value. + + true if the specified value is empty; otherwise, false. + + + + + Embed the lonely dark dot at left bottom corner. JISX0510:2004 (p.46) + + The matrix. + + + + + + The x start. + The y start. + The matrix. + + + + Embed position detection patterns and surrounding vertical/horizontal separators. + + The matrix. + + + + Embed position adjustment patterns if need be. + + The version. + The matrix. + + + +

Encapsulates logic that can detect a QR Code in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + +

Detects a QR Code in an image.

+
+ + encapsulating results of detecting a QR Code + +
+ + +

Detects a QR Code in an image.

+
+ optional hints to detector + + encapsulating results of detecting a QR Code + +
+ + + Processes the finder pattern info. + + The info. + + + +

Computes the dimension (number of modules on a size) of the QR Code based on the position + of the finder patterns and estimated module size.

+
+
+ + +

Computes an average estimated module size based on estimated derived from the positions + of the three finder patterns.

+
+ detected top-left finder pattern center + detected top-right finder pattern center + detected bottom-left finder pattern center + estimated module size +
+ +

Estimates module size based on two finder patterns -- it uses + {@link #sizeOfBlackWhiteBlackRunBothWays(int, int, int, int)} to figure the + width of each, measuring along the axis between their centers.

+
+
+ + See {@link #sizeOfBlackWhiteBlackRun(int, int, int, int)}; computes the total width of + a finder pattern by looking for a black-white-black run from the center in the direction + of another point (another finder pattern center), and in the opposite direction too. + + + +

This method traces a line from a point in the image, in the direction towards another point. + It begins in a black region, and keeps going until it finds white, then black, then white again. + It reports the distance from the start to this point.

+ +

This is used when figuring out how wide a finder pattern is, when the finder pattern + may be skewed or rotated.

+
+
+ + +

Attempts to locate an alignment pattern in a limited region of the image, which is + guessed to contain it. This method uses {@link AlignmentPattern}.

+
+ estimated module size so far + x coordinate of center of area probably containing alignment pattern + y coordinate of above + number of pixels in all directions to search from the center + + if found, or null otherwise + +
+ + + Gets the image. + + + + + Gets the result point callback. + + + + + Meta-data container for QR Code decoding. Instances of this class may be used to convey information back to the + decoding caller. Callers are expected to process this. + + + + + Initializes a new instance of the class. + + if set to true [mirrored]. + + + + Apply the result points' order correction due to mirroring. + + Array of points to apply mirror correction to. + + + + true if the QR Code was mirrored. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + This object renders a CODE93 code as a BitMatrix + + + + + + output to append to + start position + pattern to append + unused + 9 + + + +

Decodes Code 93 barcodes.

+ Sean Owen + +
+
+ + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +

In contrast to , this class will return an array of all possible + QR code locations in the image.

+ +

Use the TRY_HARDER hint to ask for a more thorough detection.

+ + Sean Owen + Hannes Erven +
+
+ + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF pixels/module in their + estimated modules sizes. + + + + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF_PERCENT percent in their + estimated modules sizes. + + + + +

Creates a finder that will search the image for three finder patterns.

+ + image to search +
+
+ + + + the 3 best s from our list of candidates. The "best" are + those that have been detected at least CENTER_QUORUM times, and whose module + size differs from the average among those patterns the least + + + + + A comparator that orders FinderPatterns by their estimated module size. + + + + +

MaxiCodes can encode text or structured information as bits in one of several modes, + with multiple character sets in one code. This class decodes the bits back into text.

+ + mike32767 + Manuel Kasten +
+
+ + + Defines an container for encoder options + + + + + Initializes a new instance of the class. + + + + + Gets the data container for all options + + + + + event is raised when a value is changed + + + + + Gets or sets a flag which cause a deeper look into the bitmap + + + true if [try harder]; otherwise, false. + + + + + Image is a pure monochrome image of a barcode. + + + true if monochrome image of a barcode; otherwise, false. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + The character set. + + + + + Image is known to be of one of a few possible formats. + Maps to a {@link java.util.List} of {@link BarcodeFormat}s. + + + The possible formats. + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + true if it should assume a Code 39 check digit; otherwise, false. + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). + + + true if it should assume GS1; otherwise, false. + + + + + Assume MSI codes employ a check digit. Maps to . + + + true if it should assume a MSI check digit; otherwise, false. + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + .NET 2.0 class for handling of very large integers, up to 10240 binary digits or + approximately (safe to use) 3000 decimal digits. + + + + + 2^16 numeration base for internal computations, in order to benefit the most from the + 32 bit (or 64 bit) integer processor registers. + + + + + Maximum size for numbers is up to 10240 binary digits or approximately (safe to use) 3000 decimal digits. + The maximum size is, in fact, double the previously specified amount, in order to accommodate operations's + overflow. + + + + + Ratio for the convertion of a BigInteger's size to a binary digits size. + + + + Integer constants + + + + The array of digits of the number. + + + + + The actual number of digits of the number. + + + + + The number sign. + + + + + Default constructor, intializing the BigInteger with zero. + + + + + Constructor creating a new BigInteger as a conversion of a regular base-10 long. + + The base-10 long to be converted + + + + Constructor creating a new BigInteger as a copy of an existing BigInteger. + + The BigInteger to be copied + + + + Constructor creating a BigInteger instance out of a base-10 formatted string. + + The base-10 formatted string. + Invalid numeric string exception + + + + Constructor creating a positive BigInteger by extracting it's digits from a given byte array. + + The byte array + The byte array's content exceeds the maximum size of a BigInteger + exception + + + + Determines whether the specified BigInteger is equal to the current BigInteger. + + The BigInteger to compare with the current BigInteger + True if the specified BigInteger is equal to the current BigInteger, + false otherwise + + + + Determines whether the specified System.Object is equal to the current BigInteger. + + The System.Object to compare with the current BigInteger + True if the specified System.Object is equal to the current BigInteger, + false otherwise + + + + Serves as a hash function for the BigInteger type. + + A hash code for the current BigInteger + + + + String representation of the current BigInteger, converted to its base-10 representation. + + The string representation of the current BigInteger + + + + Parses the number given by a string + + the number as a string + + + + + Compares this instance to a specified BigInteger. + + The BigInteger to compare this instance with + -1 if the current instance is smaller than the given BigInteger, + 0 if the two are equal, 1 otherwise + + + + Compares this instance to a specified object. + + The object to compare this instance with + -1 if the current instance is smaller than the given object, + 0 if the two are equal, 1 otherwise + obj is not a BigInteger exception + + + + Returns a BigInteger's size in binary digits. + + The BigInteger whose size in binary digits is to be determined + The BigInteger's size in binary digits + + + + BigInteger inverse with respect to addition. + + The BigInteger whose opposite is to be computed + The BigInteger inverse with respect to addition + + + + Greater test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a > b, false otherwise + + + + Greater or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a >= b, false otherwise + + + + Smaller test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a < b, false otherwise + + + + Smaller or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a <= b, false otherwise + + + + Computes the absolute value of a BigInteger. + + The BigInteger whose absolute value is to be computed + The absolute value of the given BigInteger + + + + Addition operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the addition + + + + Subtraction operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the subtraction + + + + Multiplication operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the multiplication + + + + Division operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the division + Cannot divide by zero exception + + + + Modulo operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the modulo + Cannot divide by zero exception + + + + Returns the power of a BigInteger base to a non-negative exponent by using the + fast exponentiation algorithm (right to left binary exponentiation). + + The BigInteger base + The non-negative exponent + The power of the BigInteger base to the non-negative exponent + Cannot raise a BigInteger to a negative power exception. + + + + Integer square root of the given BigInteger using Newton's numeric method. + + The BigInteger whose integer square root is to be computed + The integer square root of the given BigInteger + Cannot compute the integer square root of a negative number exception + + + + Euclidean algorithm for computing the greatest common divisor of two non-negative BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The greatest common divisor of the two given BigIntegers + Cannot compute the Gcd of negative BigIntegers exception + + + + Extended Euclidian Gcd algorithm, returning the greatest common divisor of two non-negative BigIntegers, + while also providing u and v, where: a*u + b*v = gcd(a,b). + + The 1st BigInteger + The 2nd BigInteger + Output BigInteger parameter, where a*u + b*v = gcd(a,b) + Output BigInteger parameter, where a*u + b*v = gcd(a,b) + The greatest common divisor of the two given BigIntegers + Cannot compute the Gcd of negative BigIntegers exception + + + + Computes the modular inverse of a given BigInteger. + + The non-zero BigInteger whose inverse is to be computed + The BigInteger modulus, which must be greater than or equal to 2 + The BigInteger equal to a^(-1) mod n + Invalid number or modulus exception + + + + Returns the power of a BigInteger to a non-negative exponent modulo n, by using the + fast exponentiation algorithm (right to left binary exponentiation) and modulo optimizations. + + The BigInteger base + The non-negative exponent + The modulus, which must be greater than or equal to 2 + The power of the BigInteger to the non-negative exponent + Invalid exponent or modulus exception + + + + Implicit conversion operator from long to BigInteger. + + The long to be converted to a BigInteger + The BigInteger converted from the given long + + + + Implicit conversion operator from int to BigInteger. + + The int to be converted to a BigInteger + The BigInteger converted from the given int + + + + Equality test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a == b, false otherwise + + + + Inequality test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a != b, false otherwise + + + + Greater test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a > b, false otherwise + + + + Smaller test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a < b, false otherwise + + + + Greater or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a >= b, false otherwise + + + + Smaller or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a <= b, false otherwise + + + + BigInteger inverse with respect to addition. + + The BigInteger whose opposite is to be computed + The BigInteger inverse with respect to addition + + + + Addition operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the addition + + + + Subtraction operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the subtraction + + + + Multiplication operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the multiplication + + + + Division operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the division + Cannot divide by zero exception + + + + Modulo operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the modulo + Cannot divide by zero exception + + + + Incremetation by one operation of a BigInteger. + + The BigInteger to be incremented by one + The BigInteger result of incrementing by one + + + + Decremetation by one operation of a BigInteger. + + The BigInteger to be decremented by one + The BigInteger result of decrementing by one + + + + Adds two BigNumbers a and b, where a >= b, a, b non-negative. + + + + + Subtracts the BigInteger b from the BigInteger a, where a >= b, a, b non-negative. + + + + + Multiplies two BigIntegers. + + + + + Divides a BigInteger by a one-digit int. + + + + + Divides a BigInteger by another BigInteger. + + + + + DivideByBigNumber auxiliary method. + + + + + DivideByBigNumber auxilary method. + + + + + DivideByBigNumber auxilary method. + + + + + Detects a result that is likely a vehicle identification number. + @author Sean Owen + + + +

QR Codes can encode text as bits in one of several modes, and can use multiple modes + in one QR Code. This class decodes the bits back into text.

+ +

See ISO 18004:2006, 6.4.3 - 6.4.7

+ Sean Owen +
+
+ + + See ISO 18004:2006, 6.4.4 Table 5 + + + + + See specification GBT 18284-2000 + + The bits. + The result. + The count. + + + +

Encapsulates a block of data within a QR Code. QR Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

When QR Codes use multiple data blocks, they are actually interleaved. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ +
+ bytes as read directly from the QR Code + + version of the QR Code + + error-correction level of the QR Code + + {@link DataBlock}s containing original bytes, "de-interleaved" from representation in the + QR Code + +
+ + + + + Guenther Grau + + + + Returns the DetectionResult Columns. This does a fair bit of calculation, so call it sparingly. + + The detection result columns. + + + + Adjusts the indicator column row numbers. + + Detection result column. + + + + return number of codewords which don't have a valid row number. Note that the count is not accurate as codewords . + will be counted several times. It just serves as an indicator to see when we can stop adjusting row numbers + + The row numbers. + + + + Adjusts the row numbers by row. + + The row numbers by row. + + + + Adjusts the row numbers from both Row Indicators + + zero + + + + Adjusts the row numbers from Right Row Indicator. + + The unadjusted row count. + + + + Adjusts the row numbers from Left Row Indicator. + + Unadjusted row Count. + + + + Adjusts the row number if valid. + + The invalid rows + Row indicator row number. + Invalid row counts. + Codeword. + + + + Adjusts the row numbers. + + Barcode column. + Codewords row. + Codewords. + + + + Adjusts the row number. + + true, if row number was adjusted, false otherwise. + Codeword. + Other codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + +

Attempts to locate multiple barcodes in an image by repeatedly decoding portion of the image. + After one barcode is found, the areas left, above, right and below the barcode's + {@link com.google.zxing.ResultPoint}s are scanned, recursively.

+

A caller may want to also employ {@link ByQuadrantReader} when attempting to find multiple + 2D barcodes, like QR Codes, in an image, where the presence of multiple barcodes might prevent + detecting any one of them.

+

That is, instead of passing a {@link Reader} a caller might pass + new ByQuadrantReader(reader).

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The @delegate. + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Thrown when a barcode was successfully detected, but some aspect of + the content did not conform to the barcode's format rules. This could have + been due to a mis-detection. + Sean Owen + + + + + + + + + + + + + + + + + + + + + + + + +

Parses an "smsto:" URI result, whose format is not standardized but appears to be like: + {@code smsto:number(:body)}.

+

This actually also parses URIs starting with "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+
+ Sean Owen +
+ + + Represents a parsed result that encodes an SMS message, including recipients, subject and body text. + + Sean Owen + + + + The class holds the available options for the + + + + + Representing the minimal percentage of error correction words. + Note: an Aztec symbol should have a minimum of 25% EC words. + + + + + Specifies the required number of layers for an Aztec code: + a negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + a positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + + + + + The main class which implements Aztec Code decoding -- as opposed to locating and extracting + the Aztec Code from an image. + + David Olivier + + + + Decodes the specified detector result. + + The detector result. + + + + + This method is used for testing the high-level encoder + + + + + + + Gets the string encoded in the aztec code bits + + The corrected bits. + the decoded string + + + + gets the table corresponding to the char passed + + The t. + + + + + Gets the character (or string) corresponding to the passed code in the given table + + the table used + the code of the character + + + + + Performs RS error correction on an array of bits. + + The rawbits. + the corrected array + + + + Gets the array of bits from an Aztec Code matrix + + The matrix. + the array of bits + + + + Reads a code of given length and at given index in an array of bits + + The rawbits. + The start index. + The length. + + + + + Reads a code of length 8 in an array of bits, padding with zeros + + + + + + + + Packs a bit array into bytes, most significant bit first + + + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + for compatibility with .net 4.0 + + + + + for compatibility with .net 4.0 + + The type of the 1. + The param1. + + + + for compatibility with .net 4.0 + + The type of the 1. + The type of the 2. + The param1. + The param2. + + + + for compatibility with .net 4.0 + + The type of the 1. + The type of the 2. + The type of the 3. + The param1. + The param2. + The param3. + + + + for compatibility with .net 4.0 + + The type of the 1. + The type of the 2. + The type of the 3. + The type of the 4. + The param1. + The param2. + The param3. + The param4. + + + + This class attempts to decode a barcode from an image, not by scanning the whole image, + but by scanning subsets of the image. This is important when there may be multiple barcodes in + an image, and detecting a barcode may find parts of multiple barcode and fail to decode + (e.g. QR Codes). Instead this scans the four quadrants of the image -- and also the center + 'quadrant' to cover the case where a barcode is found in the center. + + + + + + Initializes a new instance of the class. + + The @delegate. + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

The main class which implements MaxiCode decoding -- as opposed to locating and extracting + the MaxiCode from an image.

+ + Manuel Kasten +
+
+ + + Implements the "MATMSG" email message entry format. + + Supported keys: TO, SUB, BODY + + Sean Owen + + + + This implements only the most basic checking for an email address's validity -- that it contains + an '@' and contains no characters disallowed by RFC 2822. This is an overly lenient definition of + validity. We want to generally be lenient here since this class is only intended to encapsulate what's + in a barcode, not "judge" it. + + The email. + + true if it is basically a valid email address; otherwise, false. + + + + + Renders a barcode into a Svg image + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Gets or sets the foreground color. + + The foreground color. + + + + Gets or sets the background color. + + The background color. + + + + Gets or sets the font family name + + The font family name. + + + + Gets or sets the font size in pixel + + The font size in pixel. + + + + Represents a barcode as a Svg image + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The content. + + + + Gives the XML representation of the SVG image + + + + + Gets or sets the content. + + + The content. + + + + + The original height of the bitmatrix for the barcode + + + + + The original width of the bitmatrix for the barcode + + + + + Renders a to an byte array with pixel data (4 byte per pixel, BGRA) + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + +

PDF417 error correction implementation.

+

This example + is quite useful in understanding the algorithm.

+ Sean Owen + +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the specified received. + + received codewords + number of those codewords used for EC + location of erasures + The error locations count. + + + + + Runs the euclidean algorithm (Greatest Common Divisor) until r's degree is less than R/2 + + The euclidean algorithm. + + + + Finds the error locations as a direct application of Chien's search + + The error locations. + Error locator. + + + + Finds the error magnitudes by directly applying Forney's Formula + + The error magnitudes. + Error evaluator. + Error locator. + Error locations. + + + + This object renders a UPC-A code as a . + qwandor@google.com (Andrew Walbran) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + +

Implements decoding of the UPC-A format.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen +
+
+ + +

Like decodeRow(int, BitArray, java.util.Map), but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ + + + + +
+ + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Decodes the specified image. + + The image. + The hints. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + Get the format of this decoder. + The 1D format. + + + + + Enumeration for DataMatrix symbol shape hint. It can be used to force square or rectangular + symbols. + + + + + The Version object encapsulates attributes about a particular + size Data Matrix Code. + + bbrown@google.com (Brian Brown) + + + + + returns the version numer + + + + + + returns the symbol size rows + + + + + + returns the symbols size columns + + + + + + retursn the data region size rows + + + + + + returns the data region size columns + + + + + + returns the total codewords count + + + + + +

Deduces version information from Data Matrix dimensions.

+ + Number of rows in modules + Number of columns in modules + Version for a Data Matrix Code of those dimensions + if dimensions do correspond to a valid Data Matrix size +
+
+ + + returns the version number as string + + + + + + See ISO 16022:2006 5.5.1 Table 7 + + + + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the Data Matrix code version's format.

+
+
+ +

Implements Reed-Solomon decoding, as the name implies.

+ +

The algorithm will not be explained here, but the following references were helpful + in creating this implementation:

+ + + +

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+ +
+ Sean Owen + William Rucklidge + sanfordsquires +
+ + +

Decodes given set of received codewords, which include both data and error-correction + codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place, + in the input.

+
+ data and error-correction codewords + number of error-correction codewords available + false: decoding fails +
+ + + Partially implements the iCalendar format's "VEVENT" format for specifying a + calendar event. See RFC 2445. This supports SUMMARY, DTSTART and DTEND fields. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Parses contact information formatted according to the VCard (2.1) format. This is not a complete + implementation but should parse information as commonly encoded in 2D barcodes. + + Sean Owen + + + Formats name fields of the form "Public;John;Q.;Reverend;III" into a form like + "Reverend John Q. Public III". + + @param names name values to format, in place + + + + Represents a result that encodes an e-mail address, either as a plain address + like "joe@example.org" or a mailto: URL like "mailto:joe@example.org". + + Sean Owen + + + Implements the "BIZCARD" address book entry format, though this has been + largely reverse-engineered from examples observed in the wild -- still + looking for a definitive reference. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + +

Encapsulates information about finder patterns in an image, including the location of + the three finder patterns, and their estimated module size.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The pattern centers. + + + + Gets the bottom left. + + + + + Gets the top left. + + + + + Gets the top right. + + + + + See ISO 18004:2006 Annex D + + Sean Owen + + + See ISO 18004:2006 Annex D. + Element i represents the raw version bits that specify version i + 7 + + + + + Gets the EC blocks for level. + + The ec level. + + + +

Deduces version information purely from QR Code dimensions.

+ +
+ dimension in modules + + for a QR Code of that dimension or null +
+ + + Gets the version for number. + + The version number. + + + + See ISO 18004:2006 Annex E + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + See ISO 18004:2006 6.5.1 Table 9 + + + + Gets the version number. + + + + + Gets the alignment pattern centers. + + + + + Gets the total codewords. + + + + + Gets the dimension for version. + + + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + + Gets the EC blocks. + + + + + + Gets the EC codewords per block. + + + + + Gets the num blocks. + + + + + Gets the total EC codewords. + + + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the QR code version's format.

+
+
+ + + Gets the count. + + + + + Gets the data codewords. + + + + +

See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which + data can be encoded to bits in the QR code standard.

+
+ Sean Owen +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See GBT 18284-2000; "Hanzi" is a transliteration of this mode name. + + + + Fors the bits. + + four bits encoding a QR Code data mode + + encoded by these bits + + if bits do not correspond to a known mode + + + version in question + + number of bits used, in this QR Code symbol {@link Version}, to encode the + count of characters that will follow encoded in this {@link Mode} + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Gets the name. + + + + + Gets the bits. + + + + + enumeration for encoding modes + + + + + + + + + + numeric encoding + + + + + alpha-numeric encoding + + + + + structured append + + + + + byte mode encoding + + + + + ECI segment + + + + + Kanji mode + + + + + FNC1 char, first position + + + + + FNC1 char, second position + + + + + Hanzi mode + + + + + Top-level class for the logic part of the PDF417 implementation. + + + + + The start pattern (17 bits) + + + + + The stop pattern (18 bits) + + + + + The codeword table from the Annex A of ISO/IEC 15438:2001(E). + + + + + Calculates the necessary number of rows as described in annex Q of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol (r) + + + + Calculates the number of pad codewords as described in 4.9.2 of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol + the number of pad codewords + + + + Generates the barcode logic. + + the message to encode + PDF417 error correction level to use + + + + Determine optimal nr of columns and rows for the specified number of + codewords. + + number of code words + number of error correction code words + The longest dimension of the barcode, used for columns + The short dimension of the barcode, used for rows + The height of a row, will alter this parameter if aspectRatio>4 (aspectRatio==AUTO) + dimension object containing cols as width and rows as height + + + + Sets max/min row/col values + + maximum allowed columns + minimum allowed columns + maximum allowed rows + minimum allowed rows + + + + Sets compaction to values stored in enum + + compaction mode to use + + + + Sets compact to be true or false + + if true, enables compaction + + + + Sets output encoding. + + sets character encoding to use + + + + Sets the disable eci. + + if set to true don't add an ECI segment for different encodings than default. + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + +

A reader that can read all available UPC/EAN formats. If a caller wants to try to + read all such formats, it is most efficient to use this implementation rather than invoke + individual readers.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Records EAN prefix to GS1 Member Organization, where the member organization + correlates strongly with a country. This is an imperfect means of identifying + a country of origin by EAN-13 barcode value. See + + http://en.wikipedia.org/wiki/List_of_GS1_country_codes. + + Sean Owen + + + + +

Encapsulates logic that can detect one or more QR Codes in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+ + Sean Owen + Hannes Erven +
+
+ + + Initializes a new instance of the class. + + The image. + + + + Detects the multi. + + The hints. + + + + + BigInteger-related exception class. + + + + + BigIntegerException constructor. + + The exception message + The inner exception + + + + Represents a parsed result that encodes a telephone number. + + Sean Owen + + + + Represents a parsed result that encodes contact information, like that in an address book entry. + + Sean Owen + + + + initializing constructor + + + + + + + + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + the names + + + + + the nicknames + + + + + In Japanese, the name is written in kanji, which can have multiple readings. Therefore a hint + is often provided, called furigana, which spells the name phonetically. + + The pronunciation of the getNames() field, often in hiragana or katakana. + + + + the phone numbers + + + + optional descriptions of the type of each phone number. It could be like "HOME", but, + there is no guaranteed or standard format. + + + + the e-mail addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the instant messenger addresses + + + + + the note field + + + + + the addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the title + + + + + the urls + + + + birthday formatted as yyyyMMdd (e.g. 19780917) + + + a location as a latitude/longitude pair + +
+
diff --git a/packages/ZXing.Net.0.16.4/lib/net20/zxing.XML b/packages/ZXing.Net.0.16.4/lib/net20/zxing.XML new file mode 100644 index 0000000..25cd1de --- /dev/null +++ b/packages/ZXing.Net.0.16.4/lib/net20/zxing.XML @@ -0,0 +1,11793 @@ + + + + zxing + + + + + Extends with more information specific to the Aztec format, + like the number of layers and whether it's compact. + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + Initializes a new instance of the class. + + The bits. + The points. + if set to true [compact]. + The nb datablocks. + The nb layers. + + + + The main class which implements Aztec Code decoding -- as opposed to locating and extracting + the Aztec Code from an image. + + David Olivier + + + + Decodes the specified detector result. + + The detector result. + + + + + This method is used for testing the high-level encoder + + + + + + + Gets the string encoded in the aztec code bits + + The corrected bits. + the decoded string + + + + gets the table corresponding to the char passed + + The t. + + + + + Gets the character (or string) corresponding to the passed code in the given table + + the table used + the code of the character + + + + + Performs RS error correction on an array of bits. + + The rawbits. + the corrected array + + + + Gets the array of bits from an Aztec Code matrix + + The matrix. + the array of bits + + + + Reads a code of given length and at given index in an array of bits + + The rawbits. + The start index. + The length. + + + + + Reads a code of length 8 in an array of bits, padding with zeros + + + + + + + + Packs a bit array into bytes, most significant bit first + + + + + + + Encapsulates logic that can detect an Aztec Code in an image, even if the Aztec Code + is rotated or skewed, or partially obscured. + + David Olivier + + + + Initializes a new instance of the class. + + The image. + + + + Detects an Aztec Code in an image. + + + + + Detects an Aztec Code in an image. + + if true, image is a mirror-image of original. + + encapsulating results of detecting an Aztec Code + + + + + Extracts the number of data layers and data blocks from the layer around the bull's eye + + bullEyeCornerPoints the array of bull's eye corners + + + + + Corrects the parameter bits using Reed-Solomon algorithm + + paremeter bits + compact true if this is a compact Aztec code + + + + + Finds the corners of a bull-eye centered on the passed point + This returns the centers of the diagonal points just outside the bull's eye + Returns [topRight, bottomRight, bottomLeft, topLeft] + + Center point + The corners of the bull-eye + + + + Finds a candidate center point of an Aztec code from an image + + the center point + + + + Gets the Aztec code corners from the bull's eye corners and the parameters. + + the array of bull's eye corners + the array of aztec code corners + + + + Creates a BitMatrix by sampling the provided image. + topLeft, topRight, bottomRight, and bottomLeft are the centers of the squares on the + diagonal just outside the bull's eye. + + The image. + The top left. + The bottom left. + The bottom right. + The top right. + + + + + Samples a line + + start point (inclusive) + end point (exclusive) + number of bits + the array of bits as an int (first bit is high-order bit of result) + + + + Determines whether [is white or black rectangle] [the specified p1]. + + The p1. + The p2. + The p3. + The p4. + true if the border of the rectangle passed in parameter is compound of white points only + or black points only + + + + Gets the color of a segment + + The p1. + The p2. + 1 if segment more than 90% black, -1 if segment is more than 90% white, 0 else + + + + Gets the coordinate of the first point with a different color in the given direction + + The init. + if set to true [color]. + The dx. + The dy. + + + + + Expand the square represented by the corner points by pushing out equally in all directions + + the corners of the square, which has the bull's eye at its center + the original length of the side of the square in the target bit matrix + the new length of the size of the square in the target bit matrix + the corners of the expanded square + + + + Aztec 2D code representation + + Rustam Abdullaev + + + + Compact or full symbol indicator + + + + + Size in pixels (width and height) + + + + + Number of levels + + + + + Number of data codewords + + + + + The symbol image + + + + + represents a token for a binary shift + + + + + initializing constructor + + + + + + + + appends the byte array to the BitArray + + + + + + + string representation + + + + + + Generates Aztec 2D barcodes. + + Rustam Abdullaev + + + + Encodes the given binary content as an Aztec symbol + + input data string + Aztec symbol matrix with metadata + + + + Encodes the given binary content as an Aztec symbol + + input data string + minimal percentage of error check words (According to ISO/IEC 24778:2008, + a minimum of 23% + 3 words is recommended) + if non-zero, a user-specified value for the number of layers + + Aztec symbol matrix with metadata + + + + + This produces nearly optimal encodings of text into the first-level of + encoding used by Aztec code. + It uses a dynamic algorithm. For each prefix of the string, it determines + a set of encodings that could lead to this prefix. We repeatedly add a + character and generate a new set of optimal encodings until we have read + through the entire input. + @author Frank Yellin + @author Rustam Abdullaev + + + + + + + + + + + Convert the text represented by this High Level Encoder into a BitArray. + + text represented by this encoder encoded as a + + + + State represents all information about a sequence necessary to generate the current output. + Note that a state is immutable. + + + + + Create a new state representing this state with a latch to a (not + necessary different) mode, and then a code. + + + + + Create a new state representing this state, with a temporary shift + to a different mode to output a single value. + + + + + Create a new state representing this state, but an additional character + output in Binary Shift mode. + + + + + Create the state identical to this one, but we are no longer in + Binary Shift mode. + + + + + Returns true if "this" state is better (or equal) to be in than "that" + state under all possible circumstances. + + + + + This implementation can detect and decode Aztec codes in an image. + + David Olivier + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + a String representing the content encoded by the Data Matrix code + + + + + Locates and decodes a Data Matrix code in an image. + + image of barcode to decode + passed as a {@link java.util.Hashtable} from {@link com.google.zxing.DecodeHintType} + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Aztec result meta data. + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + + + + + + + + + Renders an Aztec code as a + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + The class holds the available options for the + + + + + Representing the minimal percentage of error correction words. + Note: an Aztec symbol should have a minimum of 25% EC words. + + + + + Specifies the required number of layers for an Aztec code: + a negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + a positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + + + + + Enumerates barcode formats known to this package. + + Sean Owen + + + Aztec 2D barcode format. + + + CODABAR 1D format. + + + Code 39 1D format. + + + Code 93 1D format. + + + Code 128 1D format. + + + Data Matrix 2D barcode format. + + + EAN-8 1D format. + + + EAN-13 1D format. + + + ITF (Interleaved Two of Five) 1D format. + + + MaxiCode 2D barcode format. + + + PDF417 format. + + + QR Code 2D barcode format. + + + RSS 14 + + + RSS EXPANDED + + + UPC-A 1D format. + + + UPC-E 1D format. + + + UPC/EAN extension format. Not a stand-alone format. + + + MSI + + + Plessey + + + Intelligent Mail barcode + + + + UPC_A | UPC_E | EAN_13 | EAN_8 | CODABAR | CODE_39 | CODE_93 | CODE_128 | ITF | RSS_14 | RSS_EXPANDED + without MSI (to many false-positives) and IMB (not enough tested, and it looks more like a 2D) + + + + + A smart class to decode the barcode inside a bitmap object + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + A smart class to decode the barcode inside a bitmap object + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Constructor for additional image formats for one BarcodeReader class + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Optional: Gets or sets the function to create a luminance source object for a bitmap. + If null a platform specific default LuminanceSource is used + + + The function to create a luminance source object. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + A smart class to decode the barcode inside a bitmap object + + + + + represents the default function which is called to get a instance from a raw byte array + + + + + Gets or sets the options. + + + The options. + + + + + Gets the reader which should be used to find and decode the barcode. + + + The reader. + + + + + Gets or sets a method which is called if an important point is found + + + The result point callback. + + + + + event is executed if a result was found via decode + + + + + Gets or sets a value indicating whether the image should be automatically rotated. + Rotation is supported for 90, 180 and 270 degrees + + + true if image should be rotated; otherwise, false. + + + + + Gets or sets a value indicating whether the image should be automatically inverted + if no result is found in the original image. + ATTENTION: Please be carefully because it slows down the decoding process if it is used + + + true if image should be inverted; otherwise, false. + + + + + Optional: Gets or sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + The function to create a binarizer object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb array. + If null the RGBLuminanceSource is used. The handler is only called when Decode with a byte[] array is called. + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + raises the ResultFound event + + + + + + raises the ResultFound event + + + + + + calls the explicitResultPointFound action + + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + A smart class to encode some content to a barcode image + + + + + Initializes a new instance of the class. + + + + + A smart class to encode some content to raw pixel data + + + + + Initializes a new instance of the class. + + + + + A smart class to encode some content to a svg barcode image + + + + + Initializes a new instance of the class. + + + + + A base class for specific barcode writers with specific formats of barcode images. + + The type of the output. + + + + Gets or sets the renderer which should be used to render the encoded BitMatrix. + + + + + Encodes the specified contents and returns a rendered instance of the barcode. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The matrix. + + + + + A base class for specific barcode writers with specific formats of barcode images. + + + + + Gets or sets the barcode format. + The value is only suitable if the MultiFormatWriter is used. + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + + + + + + + + + + + + Encodes the specified contents and returns a BitMatrix array. + That array has to be rendered manually or with a IBarcodeRenderer. + + The contents. + + + + + The base class for luminance sources which supports + cropping and rotating based upon the luminance values. + + + + + weight of the red channel for calculating a gray scale image + + + + + weight of the green channel for calculating a gray scale image + + + + + weight of the blue channel for calculating a gray scale image + + + + + numbers of bits which for right shifting + + + + + + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + + The luminance array. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + gets the luminance matrix + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + TODO: not implemented yet + + + A rotated version of this object. + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + + Whether this subclass supports cropping. + + + + + Whether this subclass supports invertion. + + + + Inverts the luminance values (newValue = 255 - oldValue) + + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + This class hierarchy provides a set of methods to convert luminance data to 1 bit data. + It allows the algorithm to vary polymorphically, for example allowing a very expensive + thresholding technique for servers and a fast one for mobile. It also permits the implementation + to vary, e.g. a JNI version for Android and a Java fallback version for other platforms. + + dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The source. + + + + Gets the luminance source object. + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + For callers which only examine one row of pixels at a time, the same BitArray should be reused + and passed in with each call for performance. However it is legal to keep more than one row + at a time if needed. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + Converts a 2D array of luminance data to 1 bit data. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + A new concrete Binarizer implementation object. + + + + Gets the width of the luminance source object. + + + + + Gets the height of the luminance source object. + + + + + This class is the core bitmap class used by ZXing to represent 1 bit data. Reader objects + accept a BinaryBitmap and attempt to decode it. + + dswitkin@google.com (Daniel Switkin) + + + + + + + + + + The width of the bitmap. + + + + + The height of the bitmap. + + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + + The row to fetch, which must be in [0, bitmap height). + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + + Converts a 2D array of luminance data to 1 bit. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + + Whether this bitmap can be cropped. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if isCropSupported() is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + + Whether this bitmap supports counter-clockwise rotation. + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + class which represents the luminance values for a bitmap object + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class + with the image of a Bitmap instance + + The bitmap. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + +

See + + DoCoMo's documentation about the result types represented by subclasses of this class.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + Implements KDDI AU's address book format. See + + http://www.au.kddi.com/ezfactory/tec/two_dimensions/index.html. + (Thanks to Yuzo for translating!) + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Implements the "MECARD" address book entry format. + + Supported keys: N, SOUND, TEL, EMAIL, NOTE, ADR, BDAY, URL, plus ORG + Unsupported keys: TEL-AV, NICKNAME + + Except for TEL, multiple values for keys are also not supported; + the first one found takes precedence. + + Our understanding of the MECARD format is based on this document: + + http://www.mobicode.org.tw/files/OMIA%20Mobile%20Bar%20Code%20Standard%20v3.2.1.doc + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes contact information, like that in an address book entry. + + Sean Owen + + + + initializing constructor + + + + + + + + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + the names + + + + + the nicknames + + + + + In Japanese, the name is written in kanji, which can have multiple readings. Therefore a hint + is often provided, called furigana, which spells the name phonetically. + + The pronunciation of the getNames() field, often in hiragana or katakana. + + + + the phone numbers + + + + optional descriptions of the type of each phone number. It could be like "HOME", but, + there is no guaranteed or standard format. + + + + the e-mail addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the instant messenger addresses + + + + + the note field + + + + + the addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the title + + + + + the urls + + + + birthday formatted as yyyyMMdd (e.g. 19780917) + + + a location as a latitude/longitude pair + + + Implements the "BIZCARD" address book entry format, though this has been + largely reverse-engineered from examples observed in the wild -- still + looking for a definitive reference. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a calendar event at a certain time, optionally with attendees and a location. + + Sean Owen + + + + Gets the start. + + + + + Determines whether [is start all day]. + + if start time was specified as a whole day + + + + event end , or null if event has no duration + + + + + Gets a value indicating whether this instance is end all day. + + true if end time was specified as a whole day + + + + Parses a string as a date. RFC 2445 allows the start and end fields to be of type DATE (e.g. 20081021) + or DATE-TIME (e.g. 20081021T123000 for local time, or 20081021T123000Z for UTC). + + The string to parse + + if not a date formatted string + + + + Represents a parsed result that encodes an email message including recipients, subject and body text. + + Sean Owen + + + + the email address + + + + + the TOs + + + + + the CCs + + + + + the BCCs + + + + + the subject + + + + + the body + + + + + the mailto: uri + + + + + Represents a result that encodes an e-mail address, either as a plain address + like "joe@example.org" or a mailto: URL like "mailto:joe@example.org". + + Sean Owen + + + + Implements the "MATMSG" email message entry format. + + Supported keys: TO, SUB, BODY + + Sean Owen + + + + This implements only the most basic checking for an email address's validity -- that it contains + an '@' and contains no characters disallowed by RFC 2822. This is an overly lenient definition of + validity. We want to generally be lenient here since this class is only intended to encapsulate what's + in a barcode, not "judge" it. + + The email. + + true if it is basically a valid email address; otherwise, false. + + + + + Represents a parsed result that encodes extended product information as encoded by the RSS format, like weight, price, dates, etc. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + extension for kilogram weight type + + + + + extension for pounds weight type + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the raw text + + + + + the product id + + + + + the sscc + + + + + the lot number + + + + + the production date + + + + + the packaging date + + + + + the best before date + + + + + the expiration date + + + + + the weight + + + + + the weight type + + + + + the weight increment + + + + + the price + + + + + the price increment + + + + + the price currency + + + + + the uncommon AIs + + + + + the display representation (raw text) + + + + + Parses strings of digits that represent a RSS Extended code. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + tries to parse a text representation to a specific result object + + + + + + + Represents a parsed result that encodes a geographic coordinate, with latitude, longitude and altitude. + + Sean Owen + + + latitude in degrees + + + + longitude in degrees + + + + altitude in meters. If not specified, in the geo URI, returns 0.0 + + + + query string associated with geo URI or null if none exists + + + + the geo URI + + + + a URI link to Google Maps which display the point on the Earth described + by this instance, and sets the zoom level in a way that roughly reflects the + altitude, if specified + + + + Parses a "geo:" URI result, which specifies a location on the surface of + the Earth as well as an optional altitude above the surface. See + + http://tools.ietf.org/html/draft-mayrhofer-geo-uri-00. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a product ISBN number. + + jbreiden@google.com (Jeff Breidenbach) + + + + the ISBN number + + + + Parses strings of digits that represent a ISBN. + + + jbreiden@google.com (Jeff Breidenbach) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + See ISBN-13 For Dummies + + The result. + + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link ResultParser#parseResult(Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Represents the type of data encoded by a barcode -- from plain text, to a + URI, to an e-mail address, etc. + + Sean Owen + + + + Represents a parsed result that encodes a product by an identifier of some kind. + + dswitkin@google.com (Daniel Switkin) + + + + Parses strings of digits that represent a UPC code. + + dswitkin@google.com (Daniel Switkin) + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link #parseResult(com.google.zxing.Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Attempts to parse the raw {@link Result}'s contents as a particular type + of information (email, URL, etc.) and return a {@link ParsedResult} encapsulating + the result of parsing. + + the raw to parse + encapsulating the parsing result + + + + Parses the result. + + The result. + + + +

Parses an "sms:" URI result, which specifies a number to SMS and optional + "via" number. See + the IETF draft on this.

+ +

This actually also parses URIs starting with "mms:", "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + + Represents a parsed result that encodes an SMS message, including recipients, subject and body text. + + Sean Owen + + + +

Parses an "smsto:" URI result, whose format is not standardized but appears to be like: + {@code smsto:number(:body)}.

+

This actually also parses URIs starting with "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+
+ Sean Owen +
+ + +

Parses an "smtp:" URI result, whose format is not standardized but appears to be like: + smtp[:subject[:body]]}.

+

See http://code.google.com/p/zxing/issues/detail?id=536

+
+ Sean Owen +
+ + + Represents a parsed result that encodes a telephone number. + + Sean Owen + + + + Parses a "tel:" URI result, which specifies a phone number. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + A simple result type encapsulating a string that has no further interpretation. + + Sean Owen + + + + A simple result type encapsulating a URI that has no further interpretation. + + Sean Owen + + + true if the URI contains suspicious patterns that may suggest it intends to + mislead the user about its true nature. At the moment this looks for the presence + of user/password syntax in the host/authority portion of a URI which may be used + in attempts to make the URI's host appear to be other than it is. Example: + http://yourbank.com@phisher.com This URI connects to phisher.com but may appear + to connect to yourbank.com at first glance. + + + + Transforms a string that represents a URI into something more proper, by adding or canonicalizing + the protocol. + + + + + Tries to parse results that are a URI of some kind. + + Sean Owen + + + Parses the "URLTO" result format, which is of the form "URLTO:[title]:[url]". + This seems to be used sometimes, but I am not able to find documentation + on its origin or official format? + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Parses contact information formatted according to the VCard (2.1) format. This is not a complete + implementation but should parse information as commonly encoded in 2D barcodes. + + Sean Owen + + + Formats name fields of the form "Public;John;Q.;Reverend;III" into a form like + "Reverend John Q. Public III". + + @param names name values to format, in place + + + + Partially implements the iCalendar format's "VEVENT" format for specifying a + calendar event. See RFC 2445. This supports SUMMARY, DTSTART and DTEND fields. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a Vehicle Identification Number (VIN). + + + + + Detects a result that is likely a vehicle identification number. + @author Sean Owen + + + + + Represents a parsed result that encodes wifi network information, like SSID and password. + + Vikram Aggarwal + + + + + A simple, fast array of bits, represented compactly by an array of ints internally. + + Sean Owen + + + + size of the array, number of elements + + + + + size of the array in bytes + + + + + index accessor + + + + + + + default constructor + + + + + initializing constructor + + desired size of the array + + + + Flips bit i. + + bit to set + + + + + Gets the next set. + + first bit to check + index of first bit that is set, starting from the given index, or size if none are set + at or beyond this given index + + + + see getNextSet(int) + + index to start looking for unset bit + index of next unset bit, or if none are unset until the end + + + Sets a block of 32 bits, starting at bit i. + + + first bit to set + + the new value of the next 32 bits. Note again that the least-significant bit + corresponds to bit i, the next-least-significant to i+1, and so on. + + + + + Sets a range of bits. + + start of range, inclusive. + end of range, exclusive + + + Clears all bits (sets to false). + + + Efficient method to check if a range of bits is set, or not set. + + + start of range, inclusive. + + end of range, exclusive + + if true, checks that bits in range are set, otherwise checks that they are not set + + true iff all bits are set or not set in range, according to value argument + if end is less than start or the range is not contained in the array + + + + Appends the bit. + + The bit. + + + underlying array of ints. The first element holds the first 32 bits, and the least + significant bit is bit 0. + + + + + Appends the least-significant bits, from value, in order from most-significant to + least-significant. For example, appending 6 bits from 0x000001E will append the bits + 0, 1, 1, 1, 1, 0 in that order. + + containing bits to append + bits from value to append + + + + adds the array to the end + + + + + + XOR operation + + + + + + converts to bytes. + + first bit to start writing + array to write into. Bytes are written most-significant byte first. This is the opposite + of the internal representation, which is exposed by BitArray + position in array to start writing + how many bytes to write + + + Reverses all bits in the array. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Erstellt ein neues Objekt, das eine Kopie der aktuellen Instanz darstellt. + + + Ein neues Objekt, das eine Kopie dieser Instanz darstellt. + + + + +

Represents a 2D matrix of bits. In function arguments below, and throughout the common + module, x is the column position, and y is the row position. The ordering is always x, y. + The origin is at the top-left.

+

Internally the bits are represented in a 1-D array of 32-bit ints. However, each row begins + with a new int. This is done intentionally so that we can copy out a row into a BitArray very + efficiently.

+

The ordering of bits is row-major. Within each int, the least significant bits are used first, + meaning they represent lower x values. This is compatible with BitArray's implementation.

+
+ Sean Owen + dswitkin@google.com (Daniel Switkin) +
+ + The width of the matrix + + + + The height of the matrix + + + + This method is for compatibility with older code. It's only logical to call if the matrix + is square, so I'm throwing if that's not the case. + + + row/column dimension of this matrix + + + + + The rowsize of the matrix + + + + + Creates an empty square . + + height and width + + + + Creates an empty square . + + bit matrix width + bit matrix height + + + + Interprets a 2D array of booleans as a , where "true" means an "on" bit. + + bits of the image, as a row-major 2D array. Elements are arrays representing rows + representation of image + + +

Gets the requested bit, where true means black.

+ +
+ The horizontal component (i.e. which column) + + The vertical component (i.e. which row) + + value of given bit in matrix + +
+ + +

Flips the given bit.

+
+ The horizontal component (i.e. which column) + The vertical component (i.e. which row) +
+ + + flip all of the bits, if shouldBeFlipped is true for the coordinates + + should return true, if the bit at a given coordinate should be flipped + + + + Exclusive-or (XOR): Flip the bit in this {@code BitMatrix} if the corresponding + mask bit is set. + + The mask. + + + Clears all bits (sets to false). + + +

Sets a square region of the bit matrix to true.

+ +
+ The horizontal position to begin at (inclusive) + + The vertical position to begin at (inclusive) + + The width of the region + + The height of the region + +
+ + A fast method to retrieve one row of data from the matrix as a BitArray. + + + The row to retrieve + + An optional caller-allocated BitArray, will be allocated if null or too small + + The resulting BitArray - this reference should always be used even when passing + your own row + + + + + Sets the row. + + row to set + {@link BitArray} to copy from + + + + Modifies this {@code BitMatrix} to represent the same but rotated 180 degrees + + + + + This is useful in detecting the enclosing rectangle of a 'pure' barcode. + + {left,top,width,height} enclosing rectangle of all 1 bits, or null if it is all white + + + + This is useful in detecting a corner of a 'pure' barcode. + + {x,y} coordinate of top-left-most 1 bit, or null if it is all white + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + The line separator. + + A that represents this instance. + + + + + Clones this instance. + + + + + + Converts this ByteMatrix to a black and white bitmap. + + A black and white bitmap converted from this ByteMatrix. + + +

This provides an easy abstraction to read bits at a time from a sequence of bytes, where the + number of bits read is not often a multiple of 8.

+ +

This class is thread-safe but not reentrant. Unless the caller modifies the bytes array + it passed in, in which case all bets are off.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + bytes from which this will read bits. Bits will be read from the first byte first. + Bits are read within a byte from most-significant to least-significant bit. + + + + + index of next bit in current byte which would be read by the next call to {@link #readBits(int)}. + + + + + index of next byte in input byte array which would be read by the next call to {@link #readBits(int)}. + + + + number of bits to read + + int representing the bits read. The bits will appear as the least-significant + bits of the int + + if numBits isn't in [1,32] or more than is available + + + number of bits that can be read successfully + + + + Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1 + of ISO 18004. + + + Sean Owen + + + character set ECI value + representing ECI of given value, or null if it is legal but unsupported + + + character set ECI encoding name + representing ECI for character encoding, or null if it is legalbut unsupported + + + + Encapsulates the result of decoding a matrix of bits. This typically + applies to 2D barcode formats. For now it contains the raw bytes obtained, + as well as a String interpretation of those bytes, if applicable. + Sean Owen + + + + + raw bytes representing the result, or null if not applicable + + + + + how many bits of are valid; typically 8 times its length + + + + + text representation of the result + + + + + list of byte segments in the result, or null if not applicable + + + + + name of error correction level used, or null if not applicable + + + + + gets a value which describe if structure append data was found + + + + + number of errors corrected, or null if not applicable + + + + + gives the sequence number of the result if structured append was found + + + + + number of erasures corrected, or null if not applicable + + + + + gives the parity information if structured append was found + + + + + Miscellanseous data value for the various decoders + + The other. + + + + initializing constructor + + + + + + + + + initializing constructor + + + + + + + + + + + initializing constructor + + + + + + + + + + initializing constructor + + + + + + + + + + + + Defines an container for encoder options + + + + + Gets the data container for all options + + + + + event is raised when a value is changed + + + + + Gets or sets a flag which cause a deeper look into the bitmap + + + true if [try harder]; otherwise, false. + + + + + Image is a pure monochrome image of a barcode. + + + true if monochrome image of a barcode; otherwise, false. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + The character set. + + + + + Image is known to be of one of a few possible formats. + Maps to a {@link java.util.List} of {@link BarcodeFormat}s. + + + The possible formats. + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + true if it should assume a Code 39 check digit; otherwise, false. + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). + + + true if it should assume GS1; otherwise, false. + + + + + Assume MSI codes employ a check digit. Maps to . + + + true if it should assume a MSI check digit; otherwise, false. + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Initializes a new instance of the class. + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Encapsulates the result of detecting a barcode in an image. This includes the raw + matrix of black/white pixels corresponding to the barcode, and possibly points of interest + in the image, like the location of finder patterns or corners of the barcode in the image.

+
+ Sean Owen +
+ + + the detected bits + + + + + the pixel points where the result is found + + + + + initializing constructor + + + + + + + General math-related and numeric utility functions. + + + + + Ends up being a bit faster than {@link Math#round(float)}. This merely rounds its + argument to the nearest int, where x.5 rounds up to x+1. Semantics of this shortcut + differ slightly from {@link Math#round(float)} in that half rounds down for negative + values. -2.5 rounds to -3, not -2. For purposes here it makes no difference. + + real value to round + nearest int + + + + + + + + + + Euclidean distance between points A and B + + + + + + + + + + Euclidean distance between points A and B + + + + + values to sum + sum of values in array + + +

A somewhat generic detector that looks for a barcode-like rectangular region within an image. + It looks within a mostly white region of an image for a region of black and white, but mostly + black. It returns the four corners of the region, as best it can determine.

+ +
+ Sean Owen +
+ + + initializing constructor + + + + + +

Detects a rectangular region of black and white -- mostly black -- with a region of mostly + white, in an image.

+
+ [] describing the corners of the rectangular region. The first and + last points are opposed on the diagonal, as are the second and third. The first point will be + the topmost point and the last, the bottommost. The second point will be leftmost and the + third, the rightmost + +
+ + Attempts to locate a corner of the barcode by scanning up, down, left or right from a center + point which should be within the barcode. + + + center's x component (horizontal) + + same as deltaY but change in x per step instead + + minimum value of x + + maximum value of x + + center's y component (vertical) + + change in y per step. If scanning up this is negative; down, positive; + left or right, 0 + + minimum value of y to search through (meaningless when di == 0) + + maximum value of y + + maximum run of white pixels that can still be considered to be within + the barcode + + a encapsulating the corner that was found + + + + Computes the start and end of a region of pixels, either horizontally or vertically, that could + be part of a Data Matrix barcode. + + + if scanning horizontally, this is the row (the fixed vertical location) + where we are scanning. If scanning vertically it's the column, the fixed horizontal location + + largest run of white pixels that can still be considered part of the + barcode region + + minimum pixel location, horizontally or vertically, to consider + + maximum pixel location, horizontally or vertically, to consider + + if true, we're scanning left-right, instead of up-down + + int[] with start and end of found range, or null if no such range is found + (e.g. only white was found) + + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. By keeping track of the + last black points it encountered, it determines the corners of the barcode. + + David Olivier + + + + Creates a WhiteRectangleDetector instance + + The image. + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + Creates a WhiteRectangleDetector instance + + barcode image to find a rectangle in + initial size of search area around center + x position of search center + y position of search center + + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + + Initializes a new instance of the class. + + The image. + if image is too small + + + + Initializes a new instance of the class. + + The image. + Size of the init. + The x. + The y. + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. + + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + recenters the points of a constant distance towards the center + + bottom most point + left most point + right most point + top most point + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + Determines whether a segment contains a black point + + min value of the scanned coordinate + max value of the scanned coordinate + value of fixed coordinate + set to true if scan must be horizontal, false if vertical + + true if a black point has been found, else false. + + + + + Superclass of classes encapsulating types ECIs, according to "Extended Channel Interpretations" + 5.3 of ISO 18004. + + Sean Owen + + + + the ECI value + + + + ECI value + representing ECI of given value, or null if it is legal but unsupported + ArgumentException if ECI value is invalid + + + + Defines an container for encoder options + + + + + Gets the data container for all options + + + + + Specifies the height of the barcode image + + + + + Specifies the width of the barcode image + + + + + Don't put the content string into the output image. + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + + + + + Specifies whether the data should be encoded to the GS1 standard; + FNC1 character is added in front of the data + + + + + Initializes a new instance of the class. + + + + This Binarizer implementation uses the old ZXing global histogram approach. It is suitable + for low-end mobile devices which don't have enough CPU or memory to use a local thresholding + algorithm. However, because it picks a global black point, it cannot handle difficult shadows + and gradients. + + Faster mobile devices and all desktop applications should probably use HybridBinarizer instead. + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The source. + + + + Applies simple sharpening to the row data to improve performance of the 1D Readers. + + + + + + + + Does not sharpen the data, as this call is intended to only be used by 2D Readers. + + + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + + A new concrete Binarizer implementation object. + + + + Implementations of this class can, given locations of finder patterns for a QR code in an + image, sample the right points in the image to reconstruct the QR code, accounting for + perspective distortion. It is abstracted since it is relatively expensive and should be allowed + to take advantage of platform-specific optimized implementations, like Sun's Java Advanced + Imaging library, but which may not be available in other environments such as J2ME, and vice + versa. + + The implementation used can be controlled by calling {@link #setGridSampler(GridSampler)} + with an instance of a class which implements this interface. + + Sean Owen + + + the current implementation of + + + + Sets the implementation of used by the library. One global + instance is stored, which may sound problematic. But, the implementation provided + ought to be appropriate for the entire platform, and all uses of this library + in the whole lifetime of the JVM. For instance, an Android activity can swap in + an implementation that takes advantage of native platform libraries. + + The platform-specific object to install. + + + +

Samples an image for a square matrix of bits of the given dimension. This is used to extract + the black/white modules of a 2D barcode like a QR Code found in an image. Because this barcode + may be rotated or perspective-distorted, the caller supplies four points in the source image + that define known points in the barcode, so that the image may be sampled appropriately.

+

The last eight "from" parameters are four X/Y coordinate pairs of locations of points in + the image that define some significant points in the image to be sample. For example, + these may be the location of finder pattern in a QR Code.

+

The first eight "to" parameters are four X/Y coordinate pairs measured in the destination + , from the top left, where the known points in the image given by the "from" + parameters map to.

+

These 16 parameters define the transformation needed to sample the image.

+
+ image to sample + The dimension X. + The dimension Y. + The p1 preimage X. + The p1 preimage Y. + The p2 preimage X. + The p2 preimage Y. + The p3 preimage X. + The p3 preimage Y. + The p4 preimage X. + The p4 preimage Y. + The p1 image X. + The p1 image Y. + The p2 image X. + The p2 image Y. + The p3 image X. + The p3 image Y. + The p4 image X. + The p4 image Y. + + representing a grid of points sampled from the image within a region + defined by the "from" parameters + + ReaderException if image can't be sampled, for example, if the transformation defined +
+ + + + + + + + + + + +

Checks a set of points that have been transformed to sample points on an image against + the image's dimensions to see if the point are even within the image.

+ +

This method will actually "nudge" the endpoints back onto the image if they are found to be + barely (less than 1 pixel) off the image. This accounts for imperfect detection of finder + patterns in an image where the QR Code runs all the way to the image border.

+ +

For efficiency, the method will check points from either end of the line until one is found + to be within the image. Because the set of points are assumed to be linear, this is valid.

+ +
+ image into which the points should map + + actual points in x1,y1,...,xn,yn form + +
+ + This class implements a local thresholding algorithm, which while slower than the + GlobalHistogramBinarizer, is fairly efficient for what it does. It is designed for + high frequency images of barcodes with black data on white backgrounds. For this application, + it does a much better job than a global blackpoint with severe shadows and gradients. + However it tends to produce artifacts on lower frequency images and is therefore not + a good general purpose binarizer for uses outside ZXing. + + This class extends GlobalHistogramBinarizer, using the older histogram approach for 1D readers, + and the newer local approach for 2D readers. 1D decoding using a per-row histogram is already + inherently local, and only fails for horizontal gradients. We can revisit that problem later, + but for now it was not a win to use local blocks for 1D. + + This Binarizer is the default for the unit tests and the recommended class for library users. + dswitkin@google.com (Daniel Switkin) + + + + + gives the black matrix + + + + + initializing constructor + + + + + + creates a new instance + + + + + + + Calculates the final BitMatrix once for all requests. This could be called once from the + constructor instead, but there are some advantages to doing it lazily, such as making + profiling easier, and not doing heavy lifting when callers don't expect it. + + + + + For each 8x8 block in the image, calculate the average black point using a 5x5 grid + of the blocks around it. Also handles the corner cases (fractional blocks are computed based + on the last 8 pixels in the row/column which are also used in the previous block). + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + The black points. + The matrix. + + + + Applies a single threshold to an 8x8 block of pixels. + + The luminances. + The xoffset. + The yoffset. + The threshold. + The stride. + The matrix. + + + + Calculates a single black point for each 8x8 block of pixels and saves it away. + See the following thread for a discussion of this algorithm: + http://groups.google.com/group/zxing/browse_thread/thread/d06efa2c35a7ddc0 + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + + + +

This class implements a perspective transform in two dimensions. Given four source and four + destination points, it will compute the transformation implied between them. The code is based + directly upon section 3.4.2 of George Wolberg's "Digital Image Warping"; see pages 54-56.

+
+ Sean Owen +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Convenience method, not optimized for performance. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

This class contains utility methods for performing mathematical operations over + the Galois Fields. Operations use a given primitive polynomial in calculations.

+

Throughout this package, elements of the GF are represented as an {@code int} + for convenience and speed (but at the cost of memory). +

+
+ Sean Owen +
+ + + Create a representation of GF(size) using the given primitive polynomial. + + irreducible polynomial whose coefficients are represented by + * the bits of an int, where the least-significant bit represents the constant + * coefficient + the size of the field + the factor b in the generator polynomial can be 0- or 1-based + * (g(x) = (x+a^b)(x+a^(b+1))...(x+a^(b+2t-1))). + * In most cases it should be 1, but for QR code it is 0. + + + + Builds the monomial. + + The degree. + The coefficient. + the monomial representing coefficient * x^degree + + + + Implements both addition and subtraction -- they are the same in GF(size). + + sum/difference of a and b + + + + Exps the specified a. + + 2 to the power of a in GF(size) + + + + Logs the specified a. + + A. + base 2 log of a in GF(size) + + + + Inverses the specified a. + + multiplicative inverse of a + + + + Multiplies the specified a with b. + + A. + The b. + product of a and b in GF(size) + + + + Gets the size. + + + + + Gets the generator base. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + +

Represents a polynomial whose coefficients are elements of a GF. + Instances of this class are immutable.

+

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + the {@link GenericGF} instance representing the field to use + to perform computations + coefficients as ints representing elements of GF(size), arranged + from most significant (highest-power term) coefficient to least significant + if argument is null or empty, + or if leading coefficient is 0 and this is not a + constant polynomial (that is, it is not the monomial "0") + + + + degree of this polynomial + + + + + Gets a value indicating whether this is zero. + + true iff this polynomial is the monomial "0" + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + +

Implements Reed-Solomon decoding, as the name implies.

+ +

The algorithm will not be explained here, but the following references were helpful + in creating this implementation:

+ + + +

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+ +
+ Sean Owen + William Rucklidge + sanfordsquires +
+ + +

Decodes given set of received codewords, which include both data and error-correction + codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place, + in the input.

+
+ data and error-correction codewords + number of error-correction codewords available + false: decoding fails +
+ + + Implements Reed-Solomon encoding, as the name implies. + + Sean Owen + William Rucklidge + + + + Common string-related functions. + + Sean Owen + Alex Dupre + + + + SJIS + + + + + GB2312 + + + + + Guesses the encoding. + + bytes encoding a string, whose encoding should be guessed + decode hints if applicable + name of guessed encoding; at the moment will only guess one of: + {@link #SHIFT_JIS}, {@link #UTF8}, {@link #ISO88591}, or the platform + default encoding if none of these can possibly be correct + + + + This implementation can detect and decode Data Matrix codes in an image. + + bbrown@google.com (Brian Brown) + + + + + Locates and decodes a Data Matrix code in an image. + + + a String representing the content encoded by the Data Matrix code + + + + Locates and decodes a Data Matrix code in an image. + + + + a String representing the content encoded by the Data Matrix code + + + + does nothing here + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a Data Matrix code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + Guillaume Le Biller Added to zxing lib. + + + + encodes the content to a BitMatrix + + + + + + + + + + encodes the content to a BitMatrix + + + + + + + + + + + Encode the given symbol info to a bit matrix. + + The DataMatrix placement. + The symbol info to encode. + + + The bit matrix generated. + + + + Convert the ByteMatrix to BitMatrix. + + The input matrix. + The requested width of the image (in pixels) with the Datamatrix code + The requested height of the image (in pixels) with the Datamatrix code + The output matrix. + + + + bbrown@google.com (Brian Brown) + + + + + to parse + if dimension is < 8 or > 144 or not 0 mod 2 + + + + +

Creates the version object based on the dimension of the original bit matrix from + the datamatrix code.

+ +

See ISO 16022:2006 Table 7 - ECC 200 symbol attributes

+ + Original including alignment patterns + encapsulating the Data Matrix Code's "version" + if the dimensions of the mapping matrix are not valid + Data Matrix dimensions. +
+
+ + +

Reads the bits in the representing the mapping matrix (No alignment patterns) + in the correct order in order to reconstitute the codewords bytes contained within the + Data Matrix Code.

+ + bytes encoded within the Data Matrix Code + if the exact number of bytes expected is not read +
+
+ + +

Reads a bit of the mapping matrix accounting for boundary wrapping.

+ + Row to read in the mapping matrix + Column to read in the mapping matrix + Number of rows in the mapping matrix + Number of columns in the mapping matrix + value of the given bit in the mapping matrix +
+
+ + +

Reads the 8 bits of the standard Utah-shaped pattern.

+ +

See ISO 16022:2006, 5.8.1 Figure 6

+ + Current row in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Current column in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the utah shape +
+
+ + +

Reads the 8 bits of the special corner condition 1.

+ +

See ISO 16022:2006, Figure F.3

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 1 +
+
+ + +

Reads the 8 bits of the special corner condition 2.

+ +

See ISO 16022:2006, Figure F.4

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 2 +
+
+ + +

Reads the 8 bits of the special corner condition 3.

+ +

See ISO 16022:2006, Figure F.5

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 3 +
+
+ + +

Reads the 8 bits of the special corner condition 4.

+ +

See ISO 16022:2006, Figure F.6

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 4 +
+
+ + +

Extracts the data region from a that contains + alignment patterns.

+ + Original with alignment patterns + BitMatrix that has the alignment patterns removed +
+
+ + +

Encapsulates a block of data within a Data Matrix Code. Data Matrix Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ + bbrown@google.com (Brian Brown) +
+
+ + +

When Data Matrix Codes use multiple data blocks, they actually interleave the bytes of each of them. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ + bytes as read directly from the Data Matrix Code + version of the Data Matrix Code + DataBlocks containing original bytes, "de-interleaved" from representation in the + Data Matrix Code +
+
+ + +

Data Matrix Codes can encode text as bits in one of several modes, and can use multiple modes + in one Data Matrix Code. This class decodes the bits back into text.

+ +

See ISO 16022:2006, 5.2.1 - 5.2.9.2

+ + bbrown@google.com (Brian Brown) + Sean Owen +
+
+ + + See ISO 16022:2006, Annex C Table C.1 + The C40 Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, Annex C Table C.2 + The Text Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, 5.2.3 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.5 and Annex C, Table C.1 + + + + + See ISO 16022:2006, 5.2.6 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.7 + + + + + See ISO 16022:2006, 5.2.8 and Annex C Table C.3 + + + + + See ISO 16022:2006, 5.2.9 and Annex B, B.2 + + + + + See ISO 16022:2006, Annex B, B.2 + + + + +

The main class which implements Data Matrix Code decoding -- as opposed to locating and extracting + the Data Matrix Code from an image.

+ + bbrown@google.com (Brian Brown) +
+
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a Data Matrix Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+ + booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code + if the Data Matrix Code cannot be decoded +
+
+ + +

Decodes a Data Matrix Code represented as a . A 1 or "true" is taken + to mean a black module.

+
+ booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+ + data and error correction codewords + number of codewords that are data bytes +
+
+ + + The Version object encapsulates attributes about a particular + size Data Matrix Code. + + bbrown@google.com (Brian Brown) + + + + + returns the version numer + + + + + + returns the symbol size rows + + + + + + returns the symbols size columns + + + + + + retursn the data region size rows + + + + + + returns the data region size columns + + + + + + returns the total codewords count + + + + + +

Deduces version information from Data Matrix dimensions.

+ + Number of rows in modules + Number of columns in modules + Version for a Data Matrix Code of those dimensions + if dimensions do correspond to a valid Data Matrix size +
+
+ + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the Data Matrix code version's format.

+
+
+ + + returns the version number as string + + + + + + See ISO 16022:2006 5.5.1 Table 7 + + + + +

Encapsulates logic that can detect a Data Matrix Code in an image, even if the Data Matrix Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + +

Detects a Data Matrix Code in an image.

+
+ encapsulating results of detecting a Data Matrix Code or null +
+ + + Calculates the position of the white top right module using the output of the rectangle detector + for a rectangular matrix + + + + + Calculates the position of the white top right module using the output of the rectangle detector + for a square matrix + + + + + Increments the Integer associated with a key by one. + + + + + Counts the number of black/white transitions between two points, using something like Bresenham's algorithm. + + + + + Simply encapsulates two points and a number of transitions between them. + + + + + Orders ResultPointsAndTransitions by number of transitions, ascending. + + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Symbol Character Placement Program. Adapted from Annex M.1 in ISO/IEC 16022:2000(E). + + + + + Main constructor + + the codewords to place + the number of columns + the number of rows + + + + Places the 8 bits of a utah-shaped symbol character in ECC200. + + The row. + The col. + character position + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Enumeration for encodation types + + + + + Error Correction Code for ECC200. + + + + + Lookup table which factors to use for which number of error correction codewords. + See FACTORS. + + + + + Precomputed polynomial factors for ECC 200. + + + + + Creates the ECC200 error correction for an encoded message. + + The codewords. + information about the symbol to be encoded + the codewords with interleaved error correction. + + + + DataMatrix ECC 200 data encoder following the algorithm described in ISO/IEC 16022:200(E) in + annex S. + + + + + Padding character + + + + + mode latch to C40 encodation mode + + + + + mode latch to Base 256 encodation mode + + + + + FNC1 Codeword + + + + + Structured Append Codeword + + + + + Reader Programming + + + + + Upper Shift + + + + + 05 Macro + + + + + 06 Macro + + + + + mode latch to ANSI X.12 encodation mode + + + + + mode latch to Text encodation mode + + + + + mode latch to EDIFACT encodation mode + + + + + ECI character (Extended Channel Interpretation) + + + + + Unlatch from C40 encodation + + + + + Unlatch from X12 encodation + + + + + 05 Macro header + + + + + 06 Macro header + + + + + Macro trailer + + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + the encoded message (the char values range from 0 to 255) + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + requested shape. May be {@code SymbolShapeHint.FORCE_NONE},{@code SymbolShapeHint.FORCE_SQUARE} or {@code SymbolShapeHint.FORCE_RECTANGLE}. + the minimum symbol size constraint or null for no constraint + the maximum symbol size constraint or null for no constraint + encoding mode to start with + the encoded message (the char values range from 0 to 255) + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + Symbol info table for DataMatrix. + + + + Overrides the symbol info set used by this class. Used for testing purposes. + + @param override the symbol info set to use + + + + Enumeration for DataMatrix symbol shape hint. It can be used to force square or rectangular + symbols. + + + + + The class holds the available options for the DatamatrixWriter + + + + + Specifies the matrix shape for Data Matrix + + + + + Specifies a minimum barcode size + + + + + Specifies a maximum barcode size + + + + + Specifies the default encodation + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Encapsulates a type of hint that a caller may pass to a barcode reader to help it + more quickly or accurately decode it. It is up to implementations to decide what, + if anything, to do with the information that is supplied. + + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Unspecified, application-specific hint. Maps to an unspecified . + + + + + Image is a pure monochrome image of a barcode. Doesn't matter what it maps to; + use = true. + + + + + Image is known to be of one of a few possible formats. + Maps to a of s. + + + + + Spend more time to try to find a barcode; optimize for accuracy, not speed. + Doesn't matter what it maps to; use = true. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + + + The caller needs to be notified via callback when a possible + is found. Maps to a . + + + + + Assume MSI codes employ a check digit. Maps to . + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + Maps to . + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + 1D readers supporting rotation with TRY_HARDER enabled. + But BarcodeReader class can do auto-rotating for 1D and 2D codes. + Enabling that option prevents 1D readers doing double rotation. + BarcodeReader enables that option automatically if "global" auto-rotation is enabled. + Maps to . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to; + use . + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Simply encapsulates a width and height. + + + + + initializing constructor + + + + + + + the width + + + + + the height + + + + + + + + + + + + + + + + + + + + + + + + These are a set of hints that you may pass to Writers to specify their behavior. + + dswitkin@google.com (Daniel Switkin) + + + + Specifies the width of the barcode image + type: + + + + + Specifies the height of the barcode image + type: + + + + + Don't put the content string into the output image. + type: + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + + For Aztec it is of type , representing the minimal percentage of error correction words. + In all cases, it can also be a representation of the desired value as well. + Note: an Aztec symbol should have a minimum of 25% EC words. + For PDF417 it is of type or (between 0 and 8), + + + + + Specifies what character encoding to use where applicable. + type: + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + type: , or representation of the integer value + + + + + Specifies the aspect ratio to use. Default is 4. + type: , or 1-4. + + + + + Specifies whether to use compact mode for PDF417 + type: , or "true" or "false" + value + + + + + Specifies what compaction mode to use for PDF417. + type: or value of one of its + enum values + + + + + Specifies the minimum and maximum number of rows and columns for PDF417. + type: + + + + + Don't append ECI segment. + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + type: + + + + + Specifies the matrix shape for Data Matrix (type ) + + + + + Specifies a minimum barcode size (type ). Only applicable to Data Matrix now. + + + + + Specifies a maximum barcode size (type ). Only applicable to Data Matrix now. + + + + + if true, don't switch to codeset C for numbers + + + + + Specifies the default encodation for Data Matrix (type ) + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Specifies the required number of layers for an Aztec code. + A negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + type: , or representation of the integer value + + + + + Specifies the exact version of QR code to be encoded. + (Type , or representation of the integer value). + + + + + Specifies whether the data should be encoded to the GS1 standard + type: , or "true" or "false" + value + + + + + Thrown when a barcode was successfully detected, but some aspect of + the content did not conform to the barcode's format rules. This could have + been due to a mis-detection. + Sean Owen + + + + + + + + + + + + + + + + + + + + + + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Decodes the specified barcode bitmap which is given by a generic byte array. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Interface for a smart class to encode some content into a barcode + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents. + + The contents. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + The matrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents. + + The contents. + + + + + implements an Intelligent Mail barcode + Rishabh Hatgadkar + + + + + A wrapper implementation of {@link LuminanceSource} which inverts the luminances it returns -- black becomes + white and vice versa, and each value becomes (255-value). + + Sean Owen + + + + Initializes a new instance of the class. + + The @delegate. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff; + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Inverts this instance. + + original delegate {@link LuminanceSource} since invert undoes itself + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + The purpose of this class hierarchy is to abstract different bitmap implementations across + platforms into a standard interface for requesting greyscale luminance values. The interface + only provides immutable methods; therefore crop and rotation create copies. This is to ensure + that one Reader does not modify the original luminance source and leave it in an unknown state + for other Readers in the chain. + + dswitkin@google.com (Daniel Switkin) + + + + initializing constructor + + + + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff + + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + The width of the bitmap. + + + The height of the bitmap. + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + Whether this subclass supports counter-clockwise rotation. + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + + Whether this subclass supports invertion. + + + + inverts the luminance values, not supported here. has to implemented in sub classes + + + + + + + + + + + + mike32767 + Manuel Kasten + + + + + to parse + + + + +

MaxiCodes can encode text or structured information as bits in one of several modes, + with multiple character sets in one code. This class decodes the bits back into text.

+ + mike32767 + Manuel Kasten +
+
+ + +

The main class which implements MaxiCode decoding -- as opposed to locating and extracting + the MaxiCode from an image.

+ + Manuel Kasten +
+
+ + + This implementation can detect and decode a MaxiCode in an image. + + + + + Locates and decodes a MaxiCode in an image. + + a String representing the content encoded by the MaxiCode + if a MaxiCode cannot be decoded + + + + + Locates and decodes a MaxiCode within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + + MultiFormatReader is a convenience class and the main entry point into the library for most uses. + By default it attempts to decode all barcode formats that the library supports. Optionally, you + can provide a hints object to request different behavior, for example only decoding QR codes. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + This version of decode honors the intent of Reader.decode(BinaryBitmap) in that it + passes null as a hint to the decoders. However, that makes it inefficient to call repeatedly. + Use setHints() followed by decodeWithState() for continuous scan applications. + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the hints provided. Does not honor existing state. + + + The pixel data to decode + + The hints to use, clearing the previous state. + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the state set up by calling setHints() previously. Continuous scan + clients will get a large speed increase by using this instead of decode(). + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls + to decodeWithState(image) can reuse the same set of readers without reallocating memory. This + is important for performance in continuous scan clients. + + + + + + resets all specific readers + + + + This is a factory class which finds the appropriate Writer subclass for the BarcodeFormat + requested and encodes the barcode with the supplied contents. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Gets the collection of supported writers. + + + + + encode the given data + + + + + + + + + + encode the given data + + + + + + + + + + + This class attempts to decode a barcode from an image, not by scanning the whole image, + but by scanning subsets of the image. This is important when there may be multiple barcodes in + an image, and detecting a barcode may find parts of multiple barcode and fail to decode + (e.g. QR Codes). Instead this scans the four quadrants of the image -- and also the center + 'quadrant' to cover the case where a barcode is found in the center. + + + + + + Initializes a new instance of the class. + + The @delegate. + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Attempts to locate multiple barcodes in an image by repeatedly decoding portion of the image. + After one barcode is found, the areas left, above, right and below the barcode's + {@link com.google.zxing.ResultPoint}s are scanned, recursively.

+

A caller may want to also employ {@link ByQuadrantReader} when attempting to find multiple + 2D barcodes, like QR Codes, in an image, where the presence of multiple barcodes might prevent + detecting any one of them.

+

That is, instead of passing a {@link Reader} a caller might pass + new ByQuadrantReader(reader).

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The @delegate. + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Implementation of this interface attempt to read several barcodes from one image. + Sean Owen + + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + +

Encapsulates logic that can detect one or more QR Codes in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+ + Sean Owen + Hannes Erven +
+
+ + + Initializes a new instance of the class. + + The image. + + + + Detects the multi. + + The hints. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +

In contrast to , this class will return an array of all possible + QR code locations in the image.

+ +

Use the TRY_HARDER hint to ask for a more thorough detection.

+ + Sean Owen + Hannes Erven +
+
+ + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF_PERCENT percent in their + estimated modules sizes. + + + + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF pixels/module in their + estimated modules sizes. + + + + + A comparator that orders FinderPatterns by their estimated module size. + + + + +

Creates a finder that will search the image for three finder patterns.

+ + image to search +
+
+ + + + the 3 best s from our list of candidates. The "best" are + those that have been detected at least CENTER_QUORUM times, and whose module + size differs from the average among those patterns the least + + + + + This implementation can detect and decode multiple QR Codes in an image. + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + for compatibility with .net 4.0 + + + + + for compatibility with .net 4.0 + + The type of the 1. + The param1. + + + + for compatibility with .net 4.0 + + The type of the 1. + The type of the 2. + The param1. + The param2. + + + + for compatibility with .net 4.0 + + The type of the 1. + The type of the 2. + The type of the 3. + The param1. + The param2. + The param3. + + + + for compatibility with .net 4.0 + + The type of the 1. + The type of the 2. + The type of the 3. + The type of the 4. + The param1. + The param2. + The param3. + The param4. + + + + for compatibility with .net 4.0 + + The type of the result. + + + + + for compatibility with .net 4.0 + + The type of the 1. + The type of the result. + The param1. + + + + + for compatibility with .net 4.0 + + The type of the 1. + The type of the 2. + The type of the result. + The param1. + The param2. + + + + + for compatibility with .net 4.0 + + The type of the 1. + The type of the 2. + The type of the 3. + The type of the result. + The param1. + The param2. + The param3. + + + + + for compatibility with .net 4.0 + + The type of the 1. + The type of the 2. + The type of the 3. + The type of the 4. + The type of the result. + The param1. + The param2. + The param3. + The param4. + + + + +

Decodes Codabar barcodes.

+ + Bas Vijfwinkel +
+
+ + These represent the encodings of characters, as patterns of wide and narrow bars. The 7 least-significant bits of + each int correspond to the pattern of wide and narrow, with 1s representing "wide" and 0s representing narrow. + + + + Records the size of all runs of white and black pixels, starting with white. + This is just like recordPattern, except it records all the counters, and + uses our builtin "counters" member for storage. + + row to count from + + + + This class renders CodaBar as []. + + dsbnatut@gmail.com (Kazuki Nishiura) + + + + The class holds the available options for the QrCodeWriter + + + + + if true, don't switch to codeset C for numbers + + + + +

Decodes Code 128 barcodes.

+ + Sean Owen +
+
+ + + This object renders a CODE128 code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + +

Decodes Code 39 barcodes. Supports "Full ASCII Code 39" if USE_CODE_39_EXTENDED_MODE is set.

+ Sean Owen + @see Code93Reader +
+
+ + + Returns a string with all possible characters + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. It will not decoded "extended Code 39" sequences. + + + + + Creates a reader that can be configured to check the last character as a check digit. + It will not decoded "extended Code 39" sequences. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + + Creates a reader that can be configured to check the last character as a check digit, + or optionally attempt to decode "extended Code 39" sequences that are used to encode + the full ASCII character set. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + if true, will attempt to decode extended Code 39 sequences in the text. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a CODE39 code as a . + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Decodes Code 93 barcodes.

+ Sean Owen + +
+
+ + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a CODE93 code as a BitMatrix + + + + + + output to append to + start position + pattern to append + unused + 9 + + + +

Implements decoding of the EAN-13 format.

+ + dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Initializes a new instance of the class. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + Get the format of this decoder. + The 1D format. + + + + + Based on pattern of odd-even ('L' and 'G') patterns used to encoded the explicitly-encoded + digits in a barcode, determines the implicitly encoded first digit and adds it to the + result string. + + string to insert decoded first digit into + int whose bits indicates the pattern of odd/even L/G patterns used to + encode digits + -1 if first digit cannot be determined + + + + This object renders an EAN13 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Implements decoding of the EAN-8 format.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Get the format of this decoder. + The 1D format. + + + + + This object renders an EAN8 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + + + a byte array of horizontal pixels (false = white, true = black) + + + + + Records EAN prefix to GS1 Member Organization, where the member organization + correlates strongly with a country. This is an imperfect means of identifying + a country of origin by EAN-13 barcode value. See + + http://en.wikipedia.org/wiki/List_of_GS1_country_codes. + + Sean Owen + + + + +

Implements decoding of the ITF format, or Interleaved Two of Five.

+ +

This Reader will scan ITF barcodes of certain lengths only. + At the moment it reads length 6, 8, 10, 12, 14, 16, 18, 20, 24, 44 and 48 as these have appeared "in the wild". Not all + lengths are scanned, especially shorter ones, to avoid false positives. This in turn is due to a lack of + required checksum function.

+ +

The checksum is optional and is not applied by this Reader. The consumer of the decoded + value will have to apply a checksum if required.

+ +

http://en.wikipedia.org/wiki/Interleaved_2_of_5 + is a great reference for Interleaved 2 of 5 information.

+ + kevin.osullivan@sita.aero, SITA Lab. +
+
+ + + Valid ITF lengths. Anything longer than the largest value is also allowed. + + + + + Start/end guard pattern. + + Note: The end pattern is reversed because the row is reversed before + searching for the END_PATTERN + + + + + Patterns of Wide / Narrow lines to indicate each digit + + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + + row of black/white values to search + offset of start pattern + The payload end. + to append decoded chars to + + false, if decoding could not complete successfully + + + + + Identify where the start of the middle / payload section starts. + + row of black/white values to search + Array, containing index of start of 'start block' and end of 'start block' + + + + The start & end patterns must be pre/post fixed by a quiet zone. This + zone must be at least 10 times the width of a narrow line. Scan back until + we either get to the start of the barcode or match the necessary number of + quiet zone pixels. + + Note: Its assumed the row is reversed when using this method to find + quiet zone after the end pattern. + + ref: http://www.barcode-1.net/i25code.html + + bit array representing the scanned barcode. + index into row of the start or end pattern. + false, if the quiet zone cannot be found + + + + Skip all whitespace until we get to the first black line. + + row of black/white values to search + index of the first black line or -1 if no black lines are found in the row. + + + + Identify where the end of the middle / payload section ends. + + row of black/white values to search + Array, containing index of start of 'end block' and end of 'end + block' or null, if nothing found + + + + + row of black/white values to search + position to start search + pattern of counts of number of black and white pixels that are being searched for as a pattern + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a sequence of ITF black/white lines into single + digit. + + the counts of runs of observed black/white/black/... values + The decoded digit + + false, if digit cannot be decoded + + + + + This object renders a ITF code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code bool[]} of horizontal pixels (false = white, true = black) + + + + + + + Decodes MSI barcodes. + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. + + + + + Creates a reader that can be configured to check the last character as a check digit, + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a MSI code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

A reader that can read all available UPC/EAN formats. If a caller wants to try to + read all such formats, it is most efficient to use this implementation rather than invoke + individual readers.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Encapsulates functionality and implementation that is common to one-dimensional barcodes.

+ dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + a byte array of horizontal pixels (0 = white, 1 = black) + + + + Appends the given pattern to the target array starting at pos. + + encode black/white pattern into this array + position to start encoding at in target + lengths of black/white runs to encode + starting color - false for white, true for black + the number of elements added to target. + + + + Gets the default margin. + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + + barcode contents to encode + a bool[] of horizontal pixels (false = white, true = black) + + + + Calculates the checksum digit modulo10. + + The contents. + + + + + Encapsulates functionality and implementation that is common to all families + of one-dimensional barcodes. + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + + + + + + + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + Note that we don't try rotation without the try harder flag, even if rotation was supported. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + We're going to examine rows from the middle outward, searching alternately above and below the + middle, and farther out each time. rowStep is the number of rows between each successive + attempt above and below the middle. So we'd scan row middle, then middle - rowStep, then + middle + rowStep, then middle - (2 * rowStep), etc. + rowStep is bigger as the image is taller, but is always at least 1. We've somewhat arbitrarily + decided that moving up and down by about 1/16 of the image is pretty good; we try more of the + image if "trying harder". + + The image to decode + Any hints that were requested + The contents of the decoded barcode + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the pattern in reverse. + + The row. + The start. + The counters. + + + + + Determines how closely a set of observed counts of runs of black/white values matches a given + target pattern. This is reported as the ratio of the total variance from the expected pattern + proportions across all pattern elements, to the length of the pattern. + + observed counters + expected pattern + The most any counter can differ before we give up + ratio of total variance between counters and pattern compared to total pattern size, + where the ratio has been multiplied by 256. So, 0 means no variance (perfect match); 256 means + the total variance between counters and patterns equals the pattern length, higher values mean + even more variance + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + This object renders a Plessey code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + Superclass of implementations that read barcodes in the RSS family of formats. + + + + + Initializes a new instance of the class. + + + + + Gets the decode finder counters. + + + + + + Gets the data character counters. + + + + + + Gets the odd rounding errors. + + + + + + Gets the even rounding errors. + + + + + + Gets the odd counts. + + + + + + Gets the even counts. + + + + + + Parses the finder value. + + The counters. + The finder patterns. + The value. + + + + + Counts the specified array. + + The array. + + + + + Increments the specified array. + + The array. + The errors. + + + + Decrements the specified array. + + The array. + The errors. + + + + Determines whether [is finder pattern] [the specified counters]. + + The counters. + + true if [is finder pattern] [the specified counters]; otherwise, false. + + + + + Encapsulates a since character value in an RSS barcode, including its checksum information. + + + + + Gets the value. + + + + + Gets the checksum portion. + + + + + Initializes a new instance of the class. + + The value. + The checksum portion. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Gets the information. + + + + + + Parses the information. + + + + + + Creates the decoder. + + The information. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + One row of an RSS Expanded Stacked symbol, consisting of 1+ expanded pairs. + + + + + Did this row of the image have to be reversed (mirrored) to recognize the pairs? + + + + + Two rows are equal if they contain the same pairs in the same order. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Encapsulates an RSS barcode finder pattern, including its start/end position and row. + + + + + Gets the value. + + + + + Gets the start end. + + + + + Gets the result points. + + + + + Initializes a new instance of the class. + + The value. + The start end. + The start. + The end. + The row number. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Decodes RSS-14, including truncated and stacked variants. See ISO/IEC 24724:2006. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Adapted from listings in ISO/IEC 24724 Appendix B and Appendix G. + + + + + Gets the RS svalue. + + The widths. + Width of the max. + if set to true [no narrow]. + + + + +

Implements decoding of the UPC-A format.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen +
+
+ + +

Like decodeRow(int, BitArray, java.util.Map), but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ + + + + +
+ + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Decodes the specified image. + + The image. + The hints. + + + + + Get the format of this decoder. + The 1D format. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + This object renders a UPC-A code as a . + qwandor@google.com (Andrew Walbran) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + @see UPCEANExtension5Support + + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + + + @see UPCEANExtension2Support + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + one {@link ResultMetadataType} to appropriate value, or {@code null} if not known + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Start/end guard pattern. + + + + + Pattern marking the middle of a UPC/EAN pattern, separating the two halves. + + + + + end guard pattern. + + + + + "Odd", or "L" patterns used to encode UPC/EAN digits. + + + + + As above but also including the "even", or "G" patterns used to encode UPC/EAN digits. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + +

Like , but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ row index into the image + encoding of the row of the barcode image + start/end column where the opening start pattern was found + optional hints that influence decoding + encapsulating the result of decoding a barcode in the row +
+ + + + string of digits to check + see + + + + Computes the UPC/EAN checksum on a string of digits, and reports + whether the checksum is correct or not. + + string of digits to check + true iff string of digits passes the UPC/EAN checksum algorithm + + + + Decodes the end. + + The row. + The end start. + + + + + + row of black/white values to search + position to start search + if true, indicates that the pattern specifies white/black/white/... + pixel counts, otherwise, it is interpreted as black/white/black/... + pattern of counts of number of black and white pixels that are being + searched for as a pattern + array of counters, as long as pattern, to re-use + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a single UPC/EAN-encoded digit. + + row of black/white values to decode + the counts of runs of observed black/white/black/... values + horizontal offset to start decoding from + the set of patterns to use to decode -- sometimes different encodings + for the digits 0-9 are used, and this indicates the encodings for 0 to 9 that should + be used + horizontal offset of first pixel beyond the decoded digit + + + + Get the format of this decoder. + + The 1D format. + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ aripollak@gmail.com (Ari Pollak) + dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Gets the default margin. + + + + +

Implements decoding of the UPC-E format.

+

Thisis a great reference for + UPC-E information.

+ Sean Owen +
+
+ + + The pattern that marks the middle, and end, of a UPC-E pattern. + There is no "second half" to a UPC-E barcode. + + + + + See L_AND_G_PATTERNS these values similarly represent patterns of + even-odd parity encodings of digits that imply both the number system (0 or 1) + used, and the check digit. + + + + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Decodes the end. + + The row. + The end start. + + + + + see checkStandardUPCEANChecksum(String) + + + + + + + Determines the num sys and check digit. + + The result string. + The lg pattern found. + + + + + Get the format of this decoder. + The 1D format. + + + + + Expands a UPC-E value back into its full, equivalent UPC-A code value. + + UPC-E code as string of digits + equivalent UPC-A code as string of digits + + + + + This object renders an UPC-E code as a {@link BitMatrix}. + @author 0979097955s@gmail.com (RX) + + + + + Metadata about a PDF417 Barcode + + Guenther Grau + + + + A Barcode Value for the PDF417 barcode. + The scanner will iterate through the bitmatrix, + and given the different methods or iterations + will increment a given barcode value's confidence. + + When done, this will return the values of highest confidence. + + Guenther Grau + + + + Incremenets the Confidence for a given value. (Adds an occurance of a value) + + + Value. + + + + Determines the maximum occurrence of a set value and returns all values which were set with this occurrence. + + an array of int, containing the values with the highest occurrence, or null, if no value was set. + + + + Returns the confience value for a given barcode value + + Barcode value. + + + + A Bounding Box helper class + + Guenther Grau + + + + Initializes a new instance of the class. + returns null if the corner points don't match up correctly + + The image. + The top left. + The bottom left. + The top right. + The bottom right. + + + + + Creates the specified box. + + The box. + + + + + Initializes a new instance of the class. + Will throw an exception if the corner points don't match up correctly + + Image. + Top left. + Top right. + Bottom left. + Bottom right. + + + + Merge two Bounding Boxes, getting the left corners of left, and the right corners of right + (Images should be the same) + + Left. + Right. + + + + Adds the missing rows. + + The missing rows. + Missing start rows. + Missing end rows. + If set to true is left. + + + + Calculates the minimum and maximum X & Y values based on the corner points. + + + + + If we adjust the width, set a new right corner coordinate and recalculate + + Bottom right. + + + + A Codeword in the PDF417 barcode + + Guenther Grau + + + + Default value for the RowNumber (-1 being an invalid real number) + + + + + Initializes a new instance of the class. + + Start x. + End x. + Bucket. + Value. + + + + Gets the width. + + The width. + + + + Gets a value indicating whether this instance has valid row number. + + true if this instance has valid row number; otherwise, false. + + + + Determines whether this instance is valid row number the specified rowNumber. + + true if this instance is valid row number the specified rowNumber; otherwise, false. + Row number. + + + + Sets the row number as the row's indicator column. + + + + + Returns a that represents the current . + + A that represents the current . + + + +

This class contains the methods for decoding the PDF417 codewords.

+ + SITA Lab (kevin.osullivan@sita.aero) +
+
+ + + Table containing values for the exponent of 900. + This is used in the numeric compaction decode algorithm. + + + + + Text Compaction mode (see 5.4.1.5) permits all printable ASCII characters to be + encoded, i.e. values 32 - 126 inclusive in accordance with ISO/IEC 646 (IRV), as + well as selected control characters. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + The Text Compaction mode includes all the printable ASCII characters + (i.e. values from 32 to 126) and three ASCII control characters: HT or tab + (ASCII value 9), LF or line feed (ASCII value 10), and CR or carriage + return (ASCII value 13). The Text Compaction mode also includes various latch + and shift characters which are used exclusively within the mode. The Text + Compaction mode encodes up to 2 characters per codeword. The compaction rules + for converting data into PDF417 codewords are defined in 5.4.2.2. The sub-mode + switches are defined in 5.4.2.3. + + The text compaction data. + The byte compaction data if there + was a mode shift. + The size of the text compaction and byte compaction data. + The decoded data is appended to the result. + + + + + Byte Compaction mode (see 5.4.3) permits all 256 possible 8-bit byte values to be encoded. + This includes all ASCII characters value 0 to 127 inclusive and provides for international + character set support. + + The byte compaction mode i.e. 901 or 924 + The array of codewords (data + error) + Currently active character encoding + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Numeric Compaction mode (see 5.4.4) permits efficient encoding of numeric data strings. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Convert a list of Numeric Compacted codewords from Base 900 to Base 10. + EXAMPLE + Encode the fifteen digit numeric string 000213298174000 + Prefix the numeric string with a 1 and set the initial value of + t = 1 000 213 298 174 000 + Calculate codeword 0 + d0 = 1 000 213 298 174 000 mod 900 = 200 + + t = 1 000 213 298 174 000 div 900 = 1 111 348 109 082 + Calculate codeword 1 + d1 = 1 111 348 109 082 mod 900 = 282 + + t = 1 111 348 109 082 div 900 = 1 234 831 232 + Calculate codeword 2 + d2 = 1 234 831 232 mod 900 = 632 + + t = 1 234 831 232 div 900 = 1 372 034 + Calculate codeword 3 + d3 = 1 372 034 mod 900 = 434 + + t = 1 372 034 div 900 = 1 524 + Calculate codeword 4 + d4 = 1 524 mod 900 = 624 + + t = 1 524 div 900 = 1 + Calculate codeword 5 + d5 = 1 mod 900 = 1 + t = 1 div 900 = 0 + Codeword sequence is: 1, 624, 434, 632, 282, 200 + + Decode the above codewords involves + 1 x 900 power of 5 + 624 x 900 power of 4 + 434 x 900 power of 3 + + 632 x 900 power of 2 + 282 x 900 power of 1 + 200 x 900 power of 0 = 1000213298174000 + + Remove leading 1 => Result is 000213298174000 + The array of codewords + The number of codewords + The decoded string representing the Numeric data. + + + + + + + Guenther Grau + + + + Returns the DetectionResult Columns. This does a fair bit of calculation, so call it sparingly. + + The detection result columns. + + + + Adjusts the indicator column row numbers. + + Detection result column. + + + + return number of codewords which don't have a valid row number. Note that the count is not accurate as codewords . + will be counted several times. It just serves as an indicator to see when we can stop adjusting row numbers + + The row numbers. + + + + Adjusts the row numbers by row. + + The row numbers by row. + + + + Adjusts the row numbers from both Row Indicators + + zero + + + + Adjusts the row numbers from Right Row Indicator. + + The unadjusted row count. + + + + Adjusts the row numbers from Left Row Indicator. + + Unadjusted row Count. + + + + Adjusts the row number if valid. + + The invalid rows + Row indicator row number. + Invalid row counts. + Codeword. + + + + Adjusts the row numbers. + + Barcode column. + Codewords row. + Codewords. + + + + Adjusts the row number. + + true, if row number was adjusted, false otherwise. + Codeword. + Other codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + The maximum distance to search in the codeword array in both the positive and negative directions + + + + + The Bounding Box around the column (in the BitMatrix) + + The box. + + + + The Codewords the Box encodes for, offset by the Box minY. + Remember to Access this ONLY through GetCodeword(imageRow) if you're accessing it in that manner. + + The codewords. + + + + Initializes a new instance of the class. + + The Bounding Box around the column (in the BitMatrix) + + + + Converts the Image's Row to the index in the Codewords array + + The Codeword Index. + Image row. + + + + Converts the Codeword array index into a Row in the Image (BitMatrix) + + The Image Row. + Codeword index. + + + + Gets the codeword for a given row + + The codeword. + Image row. + + + + Gets the codeword closest to the specified row in the image + + Image row. + + + + Sets the codeword for an image row + + Image row. + Codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + Gets or sets a value indicating whether this instance is the left indicator + + true if this instance is left; otherwise, false. + + + + Initializes a new instance of the class. + + Box. + If set to true is left. + + + + Sets the Row Numbers as Inidicator Columns + + + + + TODO implement properly + TODO maybe we should add missing codewords to store the correct row number to make + finding row numbers for other columns easier + use row height count to make detection of invalid row numbers more reliable + + The indicator column row numbers. + Metadata. + + + + Gets the row heights. + + The row heights. + + + + Adjusts the in omplete indicator column row numbers. + + Metadata. + + + + Gets the barcode metadata. + + The barcode metadata. + + + + Prune the codewords which do not match the metadata + TODO Maybe we should keep the incorrect codewords for the start and end positions? + + Codewords. + Metadata. + + + + Returns a that represents the current . + + A that represents the current . + + + +

PDF417 error correction implementation.

+

This example + is quite useful in understanding the algorithm.

+ Sean Owen + +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the specified received. + + received codewords + number of those codewords used for EC + location of erasures + The error locations count. + + + + + Runs the euclidean algorithm (Greatest Common Divisor) until r's degree is less than R/2 + + The euclidean algorithm. + + + + Finds the error locations as a direct application of Chien's search + + The error locations. + Error locator. + + + + Finds the error magnitudes by directly applying Forney's Formula + + The error magnitudes. + Error evaluator. + Error locator. + Error locations. + + + +

A field based on powers of a generator integer, modulo some modulus.

+ +
+ Sean Owen +
+ + + + + Sean Owen + + + + Gets the coefficients. + + The coefficients. + + + + degree of this polynomial + + + + + Gets a value indicating whether this instance is zero. + + true if this polynomial is the monomial "0" + + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + + + Adds another Modulus + + Other. + + + + Subtract another Modulus + + Other. + + + + Multiply by another Modulus + + Other. + + + + Returns a Negative version of this instance + + + + + Multiply by a Scalar. + + Scalar. + + + + Multiplies by a Monomial + + The by monomial. + Degree. + Coefficient. + + + + Returns a that represents the current . + + A that represents the current . + + + + + + Guenther Grau + creatale GmbH (christoph.schulz@creatale.de) + + + + The ratios table + + + + + Initializes the class & Pre-computes the symbol ratio table. + + + + + Gets the decoded value. + + The decoded value. + Module bit count. + + + + Samples the bit counts. + + The bit counts. + Module bit count. + + + + Gets the decoded codeword value. + + The decoded codeword value. + Module bit count. + + + + Gets the bit value. + + The bit value. + Module bit count. + + + + Gets the closest decoded value. + + The closest decoded value. + Module bit count. + + + + + + Guenther Grau + + + + Decode the specified image, imageTopLeft, imageBottomLeft, imageTopRight, imageBottomRight, minCodewordWidth + and maxCodewordWidth. + TODO: don't pass in minCodewordWidth and maxCodewordWidth, pass in barcode columns for start and stop pattern + columns. That way width can be deducted from the pattern column. + This approach also allows to detect more details about the barcode, e.g. if a bar type (white or black) is wider + than it should be. This can happen if the scanner used a bad blackpoint. + + Image. + Image top left. + Image bottom left. + Image top right. + Image bottom right. + Minimum codeword width. + Max codeword width. + + + + Merge the specified leftRowIndicatorColumn and rightRowIndicatorColumn. + + Left row indicator column. + Right row indicator column. + + + + Adjusts the bounding box. + + The bounding box. + Row indicator column. + + + + Gets the barcode metadata. + + The barcode metadata. + Left row indicator column. + Right row indicator column. + + + + Gets the row indicator column. + + The row indicator column. + Image. + Bounding box. + Start point. + If set to true left to right. + Minimum codeword width. + Max codeword width. + + + + Adjusts the codeword count. + + Detection result. + Barcode matrix. + + + + Creates the decoder result. + + The decoder result. + Detection result. + + + + This method deals with the fact, that the decoding process doesn't always yield a single most likely value. The + current error correction implementation doesn't deal with erasures very well, so it's better to provide a value + for these ambiguous codewords instead of treating it as an erasure. The problem is that we don't know which of + the ambiguous values to choose. We try decode using the first value, and if that fails, we use another of the + ambiguous values and try to decode again. This usually only happens on very hard to read and decode barcodes, + so decoding the normal barcodes is not affected by this. + + The decoder result from ambiguous values. + Ec level. + Codewords. + contains the indexes of erasures. + array with the indexes that have more than one most likely value. + two dimensional array that contains the ambiguous values. The first dimension must + be the same Length as the ambiguousIndexes array. + + + + Creates the barcode matrix. + + The barcode matrix. + Detection result. + + + + Tests to see if the Barcode Column is Valid + + true, if barcode column is valid, false otherwise. + Detection result. + Barcode column. + + + + Gets the start column. + + The start column. + Detection result. + Barcode column. + Image row. + If set to true left to right. + + + + Detects the codeword. + + The codeword. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + Minimum codeword width. + Max codeword width. + + + + Gets the module bit count. + + The module bit count. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + + + + Gets the number of EC code words. + + The number of EC code words. + Barcode EC level. + + + + Adjusts the codeword start column. + + The codeword start column. + Image. + Minimum column. + Max column. + If set to true left to right. + Codeword start column. + Image row. + + + + Checks the codeword for any skew. + + true, if codeword is within the skew, false otherwise. + Codeword size. + Minimum codeword width. + Max codeword width. + + + + Decodes the codewords. + + The codewords. + Codewords. + Ec level. + Erasures. + + + + Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place. + + The errors. + data and error correction codewords. + positions of any known erasures. + number of error correction codewords that are available in codewords. + + + + Verifies that all is well with the the codeword array. + + Codewords. + Number EC codewords. + + + + Gets the bit count for codeword. + + The bit count for codeword. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Module bit count. + + + + Returns a that represents the jagged array. + + A that represents the jagged array. + Barcode matrix as a jagged array. + + + +

Encapsulates logic that can detect a PDF417 Code in an image, even if the + PDF417 Code is rotated or skewed, or partially obscured.

+ + SITA Lab (kevin.osullivan@sita.aero) + dswitkin@google.com (Daniel Switkin) + Guenther Grau +
+
+ + + B S B S B S B S Bar/Space pattern + 11111111 0 1 0 1 0 1 000. + + + + + 1111111 0 1 000 1 0 1 00 1 + + + + + if we set the value too low, then we don't detect the correct height of the bar if the start patterns are damaged. + if we set the value too high, then we might detect the start pattern from a neighbor barcode. + + + + + A PDF471 barcode should have at least 3 rows, with each row being >= 3 times the module width. Therefore it should be at least + 9 pixels tall. To be conservative, we use about half the size to ensure we don't miss it. + + + + +

Detects a PDF417 Code in an image. Only checks 0 and 180 degree rotations.

+
+ barcode image to decode + optional hints to detector + if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned + + encapsulating results of detecting a PDF417 code + +
+ + + Detects PDF417 codes in an image. Only checks 0 degree rotation (so rotate the matrix and check again outside of this method) + + multiple if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned. + bit matrix to detect barcodes in. + List of ResultPoint arrays containing the coordinates of found barcodes + + + + Locate the vertices and the codewords area of a black blob using the Start and Stop patterns as locators. + + Matrix. + Start row. + Start column. + an array containing the vertices: + vertices[0] x, y top left barcode + vertices[1] x, y bottom left barcode + vertices[2] x, y top right barcode + vertices[3] x, y bottom right barcode + vertices[4] x, y top left codeword area + vertices[5] x, y bottom left codeword area + vertices[6] x, y top right codeword area + vertices[7] x, y bottom right codeword area + + + + + Copies the temp data to the final result + + Result. + Temp result. + Destination indexes. + + + + Finds the rows with the given pattern. + + The rows with pattern. + Matrix. + Height. + Width. + Start row. + Start column. + Pattern. + + + + Finds the guard pattern. Uses System.Linq.Enumerable.Repeat to fill in counters. This might be a performance issue? + + start/end horizontal offset of guard pattern, as an array of two ints. + matrix row of black/white values to search + column x position to start search. + row y position to start search. + width the number of pixels to search on this row. + If set to true search the white patterns first. + pattern of counts of number of black and white pixels that are being searched for as a pattern. + counters array of counters, as long as pattern, to re-use . + + + + Determines how closely a set of observed counts of runs of black/white. + values matches a given target pattern. This is reported as the ratio of + the total variance from the expected pattern proportions across all + pattern elements, to the length of the pattern. + + + ratio of total variance between counters and pattern compared to + total pattern size, where the ratio has been multiplied by 256. + So, 0 means no variance (perfect match); 256 means the total + variance between counters and patterns equals the pattern length, + higher values mean even more variance + + observed counters. + expected pattern. + The most any counter can differ before we give up. + + + + PDF 417 Detector Result class. Skipped private backing stores. + Guenther Grau + + + + + Initializes a new instance of the class. + + Bits. + Points. + + + + defines the level of the error correction / count of error correction codewords + + + + + Holds all of the information for a barcode in a format where it can be easily accessible + + Jacob Haynes + + + + + the height of the matrix (Rows) + the width of the matrix (Cols) + + + + + Jacob Haynes + + + + + Creates a Barcode row of the width + + The width. + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + A boolean which is true if the bar black false if it is white + How many spots wide the bar is. + + + + + This function scales the row + + How much you want the image to be scaled, must be greater than or equal to 1. + the scaled row + + + + + Represents possible PDF417 barcode compaction types. + + + + + + + + + + + + + + + + + + + + + + + + + Data object to specify the minimum and maximum number of rows and columns for a PDF417 barcode. + @author qwandor@google.com (Andrew Walbran) + + + + + Initializes a new instance of the class. + + The min cols. + The max cols. + The min rows. + The max rows. + + + + Gets the min cols. + + + + + Gets the max cols. + + + + + Gets the min rows. + + + + + Gets the max rows. + + + + + Top-level class for the logic part of the PDF417 implementation. + + + + + The start pattern (17 bits) + + + + + The stop pattern (18 bits) + + + + + The codeword table from the Annex A of ISO/IEC 15438:2001(E). + + + + + Calculates the necessary number of rows as described in annex Q of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol (r) + + + + Calculates the number of pad codewords as described in 4.9.2 of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol + the number of pad codewords + + + + Generates the barcode logic. + + the message to encode + PDF417 error correction level to use + + + + Determine optimal nr of columns and rows for the specified number of + codewords. + + number of code words + number of error correction code words + The longest dimension of the barcode, used for columns + The short dimension of the barcode, used for rows + The height of a row, will alter this parameter if aspectRatio>4 (aspectRatio==AUTO) + dimension object containing cols as width and rows as height + + + + Sets max/min row/col values + + maximum allowed columns + minimum allowed columns + maximum allowed rows + minimum allowed rows + + + + Sets compaction to values stored in enum + + compaction mode to use + + + + Sets compact to be true or false + + if true, enables compaction + + + + Sets output encoding. + + sets character encoding to use + + + + Sets the disable eci. + + if set to true don't add an ECI segment for different encodings than default. + + + + PDF417 error correction code following the algorithm described in ISO/IEC 15438:2001(E) in + chapter 4.10. + + + + + Tables of coefficients for calculating error correction words + (see annex F, ISO/IEC 15438:2001(E)) + + + + + Determines the number of error correction codewords for a specified error correction + level. + + the error correction level (0-8) + the number of codewords generated for error correction + + + + Determines the error correction level for AUTO + + The error correction level (0-9) + The number of codewords for AUTO errorCorrectionLevel + the number of codewords generated for error correction + + + + Returns the recommended minimum error correction level as described in annex E of + ISO/IEC 15438:2001(E). + + the number of data codewords + the recommended minimum error correction level + + + + Generates the error correction codewords according to 4.10 in ISO/IEC 15438:2001(E). + + the data codewords + the error correction level (0-8) + the String representing the error correction codewords + + + + defines the level of the error correction / count of error correction codewords + + + + + PDF417 high-level encoder following the algorithm described in ISO/IEC 15438:2001(E) in + annex P. + + + + + code for Text compaction + + + + + code for Byte compaction + + + + + code for Numeric compaction + + + + + Text compaction submode Alpha + + + + + Text compaction submode Lower + + + + + Text compaction submode Mixed + + + + + Text compaction submode Punctuation + + + + + mode latch to Text Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters NOT a multiple of 6) + + + + + mode latch to Numeric Compaction mode + + + + + mode shift to Byte Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters a multiple of 6) + + + + + identifier for a user defined Extended Channel Interpretation (ECI) + + + + + identifier for a general purpose ECO format + + + + + identifier for an ECI of a character set of code page + + + + + Raw code table for text compaction Mixed sub-mode + + + + + Raw code table for text compaction: Punctuation sub-mode + + + + + Performs high-level encoding of a PDF417 message using the algorithm described in annex P + of ISO/IEC 15438:2001(E). If byte compaction has been selected, then only byte compaction + is used. + + the message + compaction mode to use + character encoding used to encode in default or byte compaction + or null for default / not applicable + if true, don't add an ECI segment for different encodings than default + the encoded message (the char values range from 0 to 928) + + + + Encode parts of the message using Text Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.2. + + the message + the start position within the message + the number of characters to encode + receives the encoded codewords + should normally be SUBMODE_ALPHA + the text submode in which this method ends + + + + + Encode parts of the message using Byte Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.3. The Unicode characters will be converted to binary using the cp437 + codepage. + + the message converted to a byte array + the start position within the message + the number of bytes to encode + the mode from which this method starts + receives the encoded codewords + + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using text compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using binary compaction. + + the message + the message converted to a byte array + the start position within the message + + the requested character count + + + + The class holds the available options for the + + + + + Specifies whether to use compact mode for PDF417 (type ). + + + + + Specifies what compaction mode to use for PDF417 (type + ). + + + + + Specifies the minimum and maximum number of rows and columns for PDF417 (type + ). + + + + + Specifies what degree of error correction to use + + + + + Specifies what degree of error correction to use + + + + + Specifies what character encoding to use where applicable (type {@link String}) + + + + + Explicitly disables ECI segment when generating PDF417 Code + That is against the specification but some + readers have problems if the charset is switched from + CP437 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use different encodings + and the ECI segment is omitted. + + + + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Maximum Codewords (Data + Error). + + + + + Gets the bit count sum. + + The bit count sum. + Module bit count. + + + + Converts an ICollection<int> to an int[] + Carry-over from Java. Will likely remove and replace with the Generic .ToArray() method. + + The int array. + List. + + + + Translate the symbol into a codeword + + the codeword corresponding to the symbol. + encoded symbol to translate to a codeword + + + + The sorted table of all possible symbols. Extracted from the PDF417 + specification. The index of a symbol in this table corresponds to the + index into the codeword table. + + + + + This table contains to codewords for all symbols. + + + + + This implementation can detect and decode PDF417 codes in an image. + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Locates and decodes a PDF417 code in an image. + + a String representing the content encoded by the PDF417 code + if a PDF417 cannot be decoded + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + **Note** this will return the FIRST barcode discovered if there are many. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Locates and decodes Multiple PDF417 codes in an image. + + an array of Strings representing the content encoded by the PDF417 codes + + + + + Locates and decodes multiple barcodes in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcodes encode + + + + + Decode the specified image, with the hints and optionally multiple barcodes. + Based on Owen's Comments in , this method has been modified to continue silently + if a barcode was not decoded where it was detected instead of throwing a new exception object. + + Image. + Hints. + If set to true multiple. + + + + Gets the maximum width of the barcode + + The max width. + P1. + P2. + + + + Gets the minimum width of the barcode + + The minimum width. + P1. + P2. + + + + Gets the maximum width of the codeword. + + The max codeword width. + P. + + + + Gets the minimum width of the codeword. + + The minimum codeword width. + P. + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + PDF 417 result meta data. + Guenther Grau + + + + + The Segment ID represents the segment of the whole file distributed over different symbols. + + + + + Is the same for each related PDF417 symbol + + + + + always null + + + + + true if it is the last segment + + + + + count of segments, -1 if not set + + + + + Filename of the encoded file + + + + + filesize in bytes of the encoded file + returns filesize in bytes, -1 if not set + + + + + 16-bit CRC checksum using CCITT-16 + returns crc checksum, -1 if not set + + + + + unix epock timestamp, elapsed seconds since 1970-01-01 + returns elapsed seconds, -1 if not set + + + + + Jacob Haynes + qwandor@google.com (Andrew Walbran) + + + + + default white space (margin) around the code + + + + + default error correction level + + + + + default aspect ratio + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The height of a row in the barcode + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Takes encoder, accounts for width/height, and retrieves bit matrix + + + + + This takes an array holding the values of the PDF 417 + + a byte array of information with 0 is black, and 1 is white + border around the barcode + BitMatrix of the input + + + + Takes and rotates the it 90 degrees + + + + + This object extends LuminanceSource around an array of YUV data returned from the camera driver, + with the option to crop to a rectangle within the full data. This can be used to exclude + superfluous pixels around the perimeter and speed up decoding. + It works for any pixel format where the Y channel is planar and appears first, including + YCbCr_420_SP and YCbCr_422_SP. + @author dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The yuv data. + Width of the data. + Height of the data. + The left. + The top. + The width. + The height. + if set to true [reverse horiz]. + + + + Initializes a new instance of the class. + + The luminances. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + + + + + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Renders the cropped greyscale bitmap. + + + + + + width of image from {@link #renderThumbnail()} + + + + + height of image from {@link #renderThumbnail()} + + + + + creates a new instance + + + + + + + + Sean Owen + + + {@link BitMatrix} to parse + ReaderException if dimension is not >= 21 and 1 mod 4 + + +

Reads format information from one of its two locations within the QR Code.

+ +
+ {@link FormatInformation} encapsulating the QR Code's format info + + ReaderException if both format information locations cannot be parsed as + the valid encoding of format information + +
+ +

Reads version information from one of its two locations within the QR Code.

+ +
+ {@link Version} encapsulating the QR Code's version + + ReaderException if both version information locations cannot be parsed as + the valid encoding of version information + +
+ +

Reads the bits in the {@link BitMatrix} representing the finder pattern in the + correct order in order to reconstruct the codewords bytes contained within the + QR Code.

+ +
+ bytes encoded within the QR Code + + ReaderException if the exact number of bytes expected is not read +
+ + Revert the mask removal done while reading the code words. The bit matrix should revert to its original state. + + + Prepare the parser for a mirrored operation. + This flag has effect only on the {@link #readFormatInformation()} and the + {@link #readVersion()}. Before proceeding with {@link #readCodewords()} the + {@link #mirror()} method should be called. + + @param mirror Whether to read version and format information mirrored. + + + Mirror the bit matrix in order to attempt a second reading. + + +

Encapsulates a block of data within a QR Code. QR Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

When QR Codes use multiple data blocks, they are actually interleaved. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ +
+ bytes as read directly from the QR Code + + version of the QR Code + + error-correction level of the QR Code + + {@link DataBlock}s containing original bytes, "de-interleaved" from representation in the + QR Code + +
+ +

Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations + of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix, + including areas used for finder patterns, timing patterns, etc. These areas should be unused + after the point they are unmasked anyway.

+ +

Note that the diagram in section 6.8.1 is misleading since it indicates that i is column position + and j is row position. In fact, as the text says, i is row position and j is column position.

+ +
+ Sean Owen +
+ + See ISO 18004:2006 6.8.1 + + +

Implementations of this method reverse the data masking process applied to a QR Code and + make its bits ready to read.

+
+ + representation of QR Code bits + dimension of QR Code, represented by bits, being unmasked +
+ +

QR Codes can encode text as bits in one of several modes, and can use multiple modes + in one QR Code. This class decodes the bits back into text.

+ +

See ISO 18004:2006, 6.4.3 - 6.4.7

+ Sean Owen +
+
+ + + See ISO 18004:2006, 6.4.4 Table 5 + + + + + See specification GBT 18284-2000 + + The bits. + The result. + The count. + + + + +

The main class which implements QR Code decoding -- as opposed to locating and extracting + the QR Code from an image.

+
+ + Sean Owen + +
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a QR Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Decodes a QR Code represented as a {@link BitMatrix}. A 1 or "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+
+ data and error correction codewords + number of codewords that are data bytes + +
+ + +

See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels + defined by the QR code standard.

+
+ Sean Owen +
+ + L = ~7% correction + + + M = ~15% correction + + + Q = ~25% correction + + + H = ~30% correction + + + + Gets the bits. + + + + + Gets the name. + + + + + Ordinals this instance. + + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Fors the bits. + + int containing the two bits encoding a QR Code's error correction level + + representing the encoded error correction level + + + +

Encapsulates a QR Code's format information, including the data mask used and + error correction level.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + +
+ + See ISO 18004:2006, Annex C, Table C.1 + + + Offset i holds the number of 1 bits in the binary representation of i + + + + Decodes the format information. + + format info indicator, with mask still applied + The masked format info2. + + information about the format it specifies, or null + if doesn't seem to match any known pattern + + + + +

See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which + data can be encoded to bits in the QR code standard.

+
+ Sean Owen +
+ + + Gets the name. + + + + + enumeration for encoding modes + + + + + + + + + + numeric encoding + + + + + alpha-numeric encoding + + + + + structured append + + + + + byte mode encoding + + + + + ECI segment + + + + + Kanji mode + + + + + FNC1 char, first position + + + + + FNC1 char, second position + + + + + Hanzi mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See GBT 18284-2000; "Hanzi" is a transliteration of this mode name. + + + + Fors the bits. + + four bits encoding a QR Code data mode + + encoded by these bits + + if bits do not correspond to a known mode + + + version in question + + number of bits used, in this QR Code symbol {@link Version}, to encode the + count of characters that will follow encoded in this {@link Mode} + + + + + Gets the bits. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Meta-data container for QR Code decoding. Instances of this class may be used to convey information back to the + decoding caller. Callers are expected to process this. + + + + + Initializes a new instance of the class. + + if set to true [mirrored]. + + + + true if the QR Code was mirrored. + + + + + Apply the result points' order correction due to mirroring. + + Array of points to apply mirror correction to. + + + + See ISO 18004:2006 Annex D + + Sean Owen + + + See ISO 18004:2006 Annex D. + Element i represents the raw version bits that specify version i + 7 + + + + + Gets the version number. + + + + + Gets the alignment pattern centers. + + + + + Gets the total codewords. + + + + + Gets the dimension for version. + + + + + Gets the EC blocks for level. + + The ec level. + + + +

Deduces version information purely from QR Code dimensions.

+ +
+ dimension in modules + + for a QR Code of that dimension or null +
+ + + Gets the version for number. + + The version number. + + + + See ISO 18004:2006 Annex E + + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + + Gets the EC codewords per block. + + + + + Gets the num blocks. + + + + + Gets the total EC codewords. + + + + + Gets the EC blocks. + + + + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the QR code version's format.

+
+
+ + + Gets the count. + + + + + Gets the data codewords. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + See ISO 18004:2006 6.5.1 Table 9 + + +

Encapsulates an alignment pattern, which are the smaller square patterns found in + all but the simplest QR Codes.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Determines if this alignment pattern "about equals" an alignment pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing an average of the two. + + The i. + The j. + New size of the module. + + + +

This class attempts to find alignment patterns in a QR Code. Alignment patterns look like finder + patterns but are smaller and appear at regular intervals throughout the image.

+ +

At the moment this only looks for the bottom-right alignment pattern.

+ +

This is mostly a simplified copy of {@link FinderPatternFinder}. It is copied, + pasted and stripped down here for maximum performance but does unfortunately duplicate + some code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Creates a finder that will look in a portion of the whole image.

+ +
+ image to search + + left column from which to start searching + + top row from which to start searching + + width of region to search + + height of region to search + + estimated module size so far + + callback function which is called, when a result point is found +
+ +

This method attempts to find the bottom-right alignment pattern in the image. It is a bit messy since + it's pretty performance-critical and so is written to be fast foremost.

+ +
+ if found +
+ + Given a count of black/white/black pixels just seen and an end position, + figures the location of the center of this black/white/black run. + + + + count of black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/1 ratios + used by alignment patterns to be considered a match + + + + +

After a horizontal scan finds a potential alignment pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + alignment pattern to see if the same proportion is detected.

+
+ row where an alignment pattern was detected + center of the section that appears to cross an alignment pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of alignment pattern, or null if not found + +
+ +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will see if this pattern had been + found on a previous horizontal scan. If so, we consider it confirmed and conclude we have + found the alignment pattern.

+ +
+ reading state module counts from horizontal scan + + row where alignment pattern may be found + + end of possible alignment pattern in row + + {@link AlignmentPattern} if we have found the same pattern twice, or null if not + +
+ + +

Encapsulates logic that can detect a QR Code in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + + Gets the image. + + + + + Gets the result point callback. + + + + +

Detects a QR Code in an image.

+
+ + encapsulating results of detecting a QR Code + +
+ + +

Detects a QR Code in an image.

+
+ optional hints to detector + + encapsulating results of detecting a QR Code + +
+ + + Processes the finder pattern info. + + The info. + + + +

Computes the dimension (number of modules on a size) of the QR Code based on the position + of the finder patterns and estimated module size.

+
+
+ + +

Computes an average estimated module size based on estimated derived from the positions + of the three finder patterns.

+
+ detected top-left finder pattern center + detected top-right finder pattern center + detected bottom-left finder pattern center + estimated module size +
+ +

Estimates module size based on two finder patterns -- it uses + {@link #sizeOfBlackWhiteBlackRunBothWays(int, int, int, int)} to figure the + width of each, measuring along the axis between their centers.

+
+
+ + See {@link #sizeOfBlackWhiteBlackRun(int, int, int, int)}; computes the total width of + a finder pattern by looking for a black-white-black run from the center in the direction + of another point (another finder pattern center), and in the opposite direction too. + + + +

This method traces a line from a point in the image, in the direction towards another point. + It begins in a black region, and keeps going until it finds white, then black, then white again. + It reports the distance from the start to this point.

+ +

This is used when figuring out how wide a finder pattern is, when the finder pattern + may be skewed or rotated.

+
+
+ + +

Attempts to locate an alignment pattern in a limited region of the image, which is + guessed to contain it. This method uses {@link AlignmentPattern}.

+
+ estimated module size so far + x coordinate of center of area probably containing alignment pattern + y coordinate of above + number of pixels in all directions to search from the center + + if found, or null otherwise + +
+ + +

Encapsulates a finder pattern, which are the three square patterns found in + the corners of QR Codes. It also encapsulates a count of similar finder patterns, + as a convenience to the finder's bookkeeping.

+
+ Sean Owen +
+ + + Gets the size of the estimated module. + + + The size of the estimated module. + + + +

Determines if this finder pattern "about equals" a finder pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing a weighted average + based on count. + + The i. + The j. + New size of the module. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+
+ Sean Owen +
+ + + 1 pixel/module times 3 modules/center + + + + + support up to version 20 for mobile clients + + + + +

Creates a finder that will search the image for three finder patterns.

+
+ image to search +
+ + + Initializes a new instance of the class. + + The image. + The result point callback. + + + + Gets the image. + + + + + Gets the possible centers. + + + + Given a count of black/white/black/white/black pixels just seen and an end position, + figures the location of the center of this run. + + + + count of black/white/black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/3/1/1 ratios + used by finder patterns to be considered a match + + + + + + count of black/white/black/white/black pixels just read + true if the proportions of the counts is close enough to the 1/1/3/1/1 ratios + by finder patterns to be considered a match + + + + After a vertical and horizontal scan finds a potential finder pattern, this method + "cross-cross-cross-checks" by scanning down diagonally through the center of the possible + finder pattern to see if the same proportion is detected. + @param maxCount maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + @param originalStateCountTotal The original state count total. + + row where a finder pattern was detected + center of the section that appears to cross a finder pattern + true if proportions are withing expected limits + + + +

After a horizontal scan finds a potential finder pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + finder pattern to see if the same proportion is detected.

+
+ row where a finder pattern was detected + center of the section that appears to cross a finder pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of finder pattern, or null if not found + +
+ +

Like {@link #crossCheckVertical(int, int, int, int)}, and in fact is basically identical, + except it reads horizontally instead of vertically. This is used to cross-cross + check a vertical cross check and locate the real center of the alignment pattern.

+
+
+ + + @see #handlePossibleCenter(int[], int, int) + + reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + ignored + true if a finder pattern candidate was found this time + + + +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will, ah, cross-cross-check + with another horizontal scan. This is needed primarily to locate the real horizontal + center of the pattern in cases of extreme skew. + And then we cross-cross-cross check with another diagonal scan.

+ If that succeeds the finder pattern location is added to a list that tracks + the number of times each location has been nearly-matched as a finder pattern. + Each additional find is more evidence that the location is in fact a finder + pattern center +
+ reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + + true if a finder pattern candidate was found this time + +
+ + number of rows we could safely skip during scanning, based on the first + two finder patterns that have been located. In some cases their position will + allow us to infer that the third pattern must lie below a certain point farther + down in the image. + + + + true iff we have found at least 3 finder patterns that have been detected + at least {@link #CENTER_QUORUM} times each, and, the estimated module size of the + candidates is "pretty similar" + + + + the 3 best {@link FinderPattern}s from our list of candidates. The "best" are + those that have been detected at least {@link #CENTER_QUORUM} times, and whose module + size differs from the average among those patterns the least + + + + + Orders by furthest from average + + + +

Orders by {@link FinderPattern#getCount()}, descending.

+
+ + +

Encapsulates information about finder patterns in an image, including the location of + the three finder patterns, and their estimated module size.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The pattern centers. + + + + Gets the bottom left. + + + + + Gets the top left. + + + + + Gets the top right. + + + + + JAVAPORT: The original code was a 2D array of ints, but since it only ever gets assigned + 0, 1 and 2 I'm going to use less memory and go with bytes. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Gets the height. + + + + + Gets the width. + + + + + Gets or sets the with the specified x. + + + + + an internal representation as bytes, in row-major order. array[y][x] represents point (x,y) + + + + + Sets the specified x. + + The x. + The y. + The value. + + + + Sets the specified x. + + The x. + The y. + if set to true [value]. + + + + Clears the specified value. + + The value. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + Encode "bytes" with the error correction level "ecLevel". The encoding mode will be chosen + internally by chooseMode(). On success, store the result in "qrCode". + We recommend you to use QRCode.EC_LEVEL_L (the lowest level) for + "getECLevel" since our primary use is to show QR code on desktop screens. We don't need very + strong error correction for this purpose. + Note that there is no way to encode bytes in MODE_KANJI. We might want to add EncodeWithMode() + with which clients can specify the encoding mode. For now, we don't need the functionality. + + text to encode + error correction level to use + representing the encoded QR code + + + + Encodes the specified content. + + The content. + The ec level. + The hints. + + + + + Decides the smallest version of QR code that will contain all of the provided data. + + if the data cannot fit in any version + + + + Gets the alphanumeric code. + + The code. + the code point of the table used in alphanumeric mode or + -1 if there is no corresponding code in the table. + + + + Chooses the mode. + + The content. + + + + + Choose the best mode by examining the content. Note that 'encoding' is used as a hint; + if it is Shift_JIS, and the input is only double-byte Kanji, then we return {@link Mode#KANJI}. + + The content. + The encoding. + + + + + true if the number of input bits will fit in a code with the specified version and error correction level. + + + + Terminate bits as described in 8.4.8 and 8.4.9 of JISX0510:2004 (p.24). + + The num data bytes. + The bits. + + + + Get number of data bytes and number of error correction bytes for block id "blockID". Store + the result in "numDataBytesInBlock", and "numECBytesInBlock". See table 12 in 8.5.1 of + JISX0510:2004 (p.30) + + The num total bytes. + The num data bytes. + The num RS blocks. + The block ID. + The num data bytes in block. + The num EC bytes in block. + + + + Interleave "bits" with corresponding error correction bytes. On success, store the result in + "result". The interleave rule is complicated. See 8.6 of JISX0510:2004 (p.37) for details. + + The bits. + The num total bytes. + The num data bytes. + The num RS blocks. + + + + + Append mode info. On success, store the result in "bits". + + The mode. + The bits. + + + + Append length info. On success, store the result in "bits". + + The num letters. + The version. + The mode. + The bits. + + + + Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits". + + The content. + The mode. + The bits. + The encoding. + + + + + + Satoru Takabayashi + Daniel Switkin + Sean Owen + + + + Apply mask penalty rule 1 and return the penalty. Find repetitive cells with the same color and + give penalty to them. Example: 00000 or 11111. + + The matrix. + + + + + Apply mask penalty rule 2 and return the penalty. Find 2x2 blocks with the same color and give + penalty to them. This is actually equivalent to the spec's rule, which is to find MxN blocks and give a + penalty proportional to (M-1)x(N-1), because this is the number of 2x2 blocks inside such a block. + + The matrix. + + + + + Apply mask penalty rule 3 and return the penalty. Find consecutive cells of 00001011101 or + 10111010000, and give penalty to them. If we find patterns like 000010111010000, we give + penalties twice (i.e. 40 * 2). + + The matrix. + + + + + Apply mask penalty rule 4 and return the penalty. Calculate the ratio of dark cells and give + penalty if the ratio is far from 50%. It gives 10 penalty for 5% distance. + + The matrix. + + + + + Return the mask bit for "getMaskPattern" at "x" and "y". See 8.8 of JISX0510:2004 for mask + pattern conditions. + + The mask pattern. + The x. + The y. + + + + + Helper function for applyMaskPenaltyRule1. We need this for doing this calculation in both + vertical and horizontal orders respectively. + + The matrix. + if set to true [is horizontal]. + + + + + + + + satorux@google.com (Satoru Takabayashi) - creator + + + + + Set all cells to 2. 2 means that the cell is empty (not set yet). + + JAVAPORT: We shouldn't need to do this at all. The code should be rewritten to begin encoding + with the ByteMatrix initialized all to zero. + + The matrix. + + + + Build 2D matrix of QR Code from "dataBits" with "ecLevel", "version" and "getMaskPattern". On + success, store the result in "matrix" and return true. + + The data bits. + The ec level. + The version. + The mask pattern. + The matrix. + + + + Embed basic patterns. On success, modify the matrix and return true. + The basic patterns are: + - Position detection patterns + - Timing patterns + - Dark dot at the left bottom corner + - Position adjustment patterns, if need be + + The version. + The matrix. + + + + Embed type information. On success, modify the matrix. + + The ec level. + The mask pattern. + The matrix. + + + + Embed version information if need be. On success, modify the matrix and return true. + See 8.10 of JISX0510:2004 (p.47) for how to embed version information. + + The version. + The matrix. + + + + Embed "dataBits" using "getMaskPattern". On success, modify the matrix and return true. + For debugging purposes, it skips masking process if "getMaskPattern" is -1. + See 8.7 of JISX0510:2004 (p.38) for how to embed data bits. + + The data bits. + The mask pattern. + The matrix. + + + + Return the position of the most significant bit set (to one) in the "value". The most + significant bit is position 32. If there is no bit set, return 0. Examples: + - findMSBSet(0) => 0 + - findMSBSet(1) => 1 + - findMSBSet(255) => 8 + + The value_ renamed. + + + + + Calculate BCH (Bose-Chaudhuri-Hocquenghem) code for "value" using polynomial "poly". The BCH + code is used for encoding type information and version information. + Example: Calculation of version information of 7. + f(x) is created from 7. + - 7 = 000111 in 6 bits + - f(x) = x^2 + x^2 + x^1 + g(x) is given by the standard (p. 67) + - g(x) = x^12 + x^11 + x^10 + x^9 + x^8 + x^5 + x^2 + 1 + Multiply f(x) by x^(18 - 6) + - f'(x) = f(x) * x^(18 - 6) + - f'(x) = x^14 + x^13 + x^12 + Calculate the remainder of f'(x) / g(x) + x^2 + __________________________________________________ + g(x) )x^14 + x^13 + x^12 + x^14 + x^13 + x^12 + x^11 + x^10 + x^7 + x^4 + x^2 + -------------------------------------------------- + x^11 + x^10 + x^7 + x^4 + x^2 + + The remainder is x^11 + x^10 + x^7 + x^4 + x^2 + Encode it in binary: 110010010100 + The return value is 0xc94 (1100 1001 0100) + + Since all coefficients in the polynomials are 1 or 0, we can do the calculation by bit + operations. We don't care if coefficients are positive or negative. + + The value. + The poly. + + + + + Make bit vector of type information. On success, store the result in "bits" and return true. + Encode error correction level and mask pattern. See 8.9 of + JISX0510:2004 (p.45) for details. + + The ec level. + The mask pattern. + The bits. + + + + Make bit vector of version information. On success, store the result in "bits" and return true. + See 8.10 of JISX0510:2004 (p.45) for details. + + The version. + The bits. + + + + Check if "value" is empty. + + The value. + + true if the specified value is empty; otherwise, false. + + + + + Embed the lonely dark dot at left bottom corner. JISX0510:2004 (p.46) + + The matrix. + + + + + + The x start. + The y start. + The matrix. + + + + Embed position detection patterns and surrounding vertical/horizontal separators. + + The matrix. + + + + Embed position adjustment patterns if need be. + + The version. + The matrix. + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + + + + + + Initializes a new instance of the class. + + + + + Gets or sets the mode. + + + The mode. + + + + + Gets or sets the EC level. + + + The EC level. + + + + + Gets or sets the version. + + + The version. + + + + + Gets or sets the mask pattern. + + + The mask pattern. + + + + + Gets or sets the matrix. + + + The matrix. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Check if "mask_pattern" is valid. + + The mask pattern. + + true if [is valid mask pattern] [the specified mask pattern]; otherwise, false. + + + + + The class holds the available options for the QrCodeWriter + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + . + + + + + Specifies what character encoding to use where applicable (type ) + + + + + Explicitly disables ECI segment when generating QR Code + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + + + + + Specifies the exact version of QR code to be encoded. An integer, range 1 to 40. If the data specified + cannot fit within the required version, a WriterException will be thrown. + + + + + This implementation can detect and decode QR Codes in an image. + Sean Owen + + + + + Gets the decoder. + + + + + + Locates and decodes a QR code in an image. + + a String representing the content encoded by the QR code + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a QR Code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Implementations of this interface can decode an image of a barcode in some format into + the String it encodes. For example, can + decode a QR code. The decoder may optionally receive hints from the caller which may help + it decode more quickly or accurately. + + See , which attempts to determine what barcode + format is present within the image as well, and then decodes it accordingly. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + String which the barcode encodes + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + The general exception class throw when something goes wrong during decoding of a barcode. + This includes, but is not limited to, failing checksums / error correction algorithms, being + unable to locate finder timing patterns, and so on. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class. + + The inner exception. + + + + Initializes a new instance of the class. + + The inner exception. + + + + + Renders a to a image + + + + + Gets or sets the foreground color. + + The foreground color. + + + + Gets or sets the background color. + + The background color. + + + + Gets or sets the resolution which should be used to create the bitmap + If nothing is set the current system settings are used + + + + + Gets or sets the resolution which should be used to create the bitmap + If nothing is set the current system settings are used + + + + + Gets or sets the text font. + + + The text font. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Interface for a class to convert a BitMatrix to an output image format + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + The options. + + + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + + + converts the pixel data to a bitmap object + + + + + + the generated code as byte array of BGRA pixels + + + + + the width of the image + + + + + the height of the image + + + + + Renders a to an byte array with pixel data (4 byte per pixel, BGRA) + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Renders a barcode into a Svg image + + + + + Gets or sets the foreground color. + + The foreground color. + + + + Gets or sets the background color. + + The background color. + + + + Gets or sets the font family name + + The font family name. + + + + Gets or sets the font size in pixel + + The font size in pixel. + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Represents a barcode as a Svg image + + + + + Gets or sets the content. + + + The content. + + + + + The original height of the bitmatrix for the barcode + + + + + The original width of the bitmatrix for the barcode + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The content. + + + + Gives the XML representation of the SVG image + + + + + Encapsulates the result of decoding a barcode within an image. + + + + raw text encoded by the barcode, if applicable, otherwise null + + + raw bytes encoded by the barcode, if applicable, otherwise null + + + + points related to the barcode in the image. These are typically points + identifying finder patterns or the corners of the barcode. The exact meaning is + specific to the type of barcode that was decoded. + + + + {@link BarcodeFormat} representing the format of the barcode that was decoded + + + + {@link Hashtable} mapping {@link ResultMetadataType} keys to values. May be + null. This contains optional metadata about what was detected about the barcode, + like orientation. + + + + + Gets the timestamp. + + + + + how many bits of are valid; typically 8 times its length + + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + The timestamp. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + The timestamp. + + + + Adds one metadata to the result + + The type. + The value. + + + + Adds a list of metadata to the result + + The metadata. + + + + Adds the result points. + + The new points. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Represents some type of metadata about the result of the decoding that the decoder + wishes to communicate back to the caller. + + Sean Owen + + + + Unspecified, application-specific metadata. Maps to an unspecified {@link Object}. + + + + + Denotes the likely approximate orientation of the barcode in the image. This value + is given as degrees rotated clockwise from the normal, upright orientation. + For example a 1D barcode which was found by reading top-to-bottom would be + said to have orientation "90". This key maps to an {@link Integer} whose + value is in the range [0,360). + + + + +

2D barcode formats typically encode text, but allow for a sort of 'byte mode' + which is sometimes used to encode binary data. While {@link Result} makes available + the complete raw bytes in the barcode for these formats, it does not offer the bytes + from the byte segments alone.

+

This maps to a {@link java.util.List} of byte arrays corresponding to the + raw bytes in the byte segments in the barcode, in order.

+
+
+ + + Error correction level used, if applicable. The value type depends on the + format, but is typically a String. + + + + + For some periodicals, indicates the issue number as an {@link Integer}. + + + + + For some products, indicates the suggested retail price in the barcode as a + formatted {@link String}. + + + + + For some products, the possible country of manufacture as a {@link String} denoting the + ISO country code. Some map to multiple possible countries, like "US/CA". + + + + + For some products, the extension text + + + + + If the code format supports structured append and + the current scanned code is part of one then the + sequence number is given with it. + + + + + If the code format supports structured append and + the current scanned code is part of one then the + parity is given with it. + + + + + PDF417-specific metadata + + + + + Aztec-specific metadata + + + + + Encapsulates a point of interest in an image containing a barcode. Typically, this + would be the location of a finder pattern or the corner of the barcode, for example. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The x. + The y. + + + + Gets the X. + + + + + Gets the Y. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC and + BC is less than AC and the angle between BC and BA is less than 180 degrees. + + array of three to order + + + + calculates the distance between two points + + first pattern + second pattern + + distance between two points + + + + + Returns the z component of the cross product between vectors BC and BA. + + + + Callback which is invoked when a possible result point (significant + point in the barcode image such as a corner) is found. + + + + + + + + Luminance source class which support different formats of images. + + + + + enumeration of supported bitmap format which the RGBLuminanceSource can process + + + + + format of the byte[] isn't known. RGBLuminanceSource tries to determine the best possible value + + + + + grayscale array, the byte array is a luminance array with 1 byte per pixel + + + + + grayscale array, the byte array is a luminance array with 2 bytes per pixel + + + + + 3 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels alpha, red, green and blue + + + + + 3 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green, red and alpha + + + + + 2 bytes per pixel, 5 bit red, 6 bits green and 5 bits blue + + + + + 4 bytes per pixel with the channels red, green, blue and alpha + + + + + 4 bytes for two pixels, UYVY formatted + + + + + 4 bytes for two pixels, YUYV formatted + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 1 byte per pixel (Gray8). + That means the whole array consists of the luminance values (grayscale). + + The luminance array. + The width. + The height. + if set to true [is8 bit]. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + The bitmap format. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + calculates the luminance values for the given byte array and bitmap format + + + + + + + Contains conversion support elements such as classes, interfaces and static methods. + + + + + Copies an array of chars obtained from a String into a specified array of chars + + The String to get the chars from + Position of the String to start getting the chars + Position of the String to end getting the chars + Array to return the chars + Position of the destination array of chars to start storing the chars + An array of chars + + + + Sets the capacity for the specified List + + The List which capacity will be set + The new capacity value + + + + Converts a string-Collection to an array + + The strings. + + + + + Joins all elements to one string. + + + The separator. + The values. + + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The value. + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The start index. + The end index. + The value. + + + + + + + + + + + + + + + + + + Savely gets the value of a decoding hint + if hints is null the default is returned + + + The hints. + Type of the hint. + The @default. + + + + The base class for all objects which encode/generate a barcode image. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + A base class which covers the range of exceptions which may occur when encoding a barcode using + the Writer framework. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner exc. + + + + Integer inefficiently represented internally using base-10 digits, in order to allow a + visual representation as a base-10 string. Only for internal use. + + + + + 10 numeration base for string representation, very inefficient for computations. + + + + + Maximum size for numbers is up to 10240 binary digits or approximately (safe to use) 3000 decimal digits. + The maximum size is, in fact, double the previously specified amount, in order to accommodate operations' + overflow. + + + + Integer constants + + + + The array of digits of the number. + + + + + The actual number of digits of the number. + + + + + The number sign. + + + + + Sets the number sign. + + + + + Default constructor, intializing the Base10BigInteger with zero. + + + + + Constructor creating a new Base10BigInteger as a conversion of a regular base-10 long. + + The base-10 long to be converted + + + + Constructor creating a new Base10BigInteger as a copy of an existing Base10BigInteger. + + The Base10BigInteger to be copied + + + + Determines whether the specified Base10BigInteger is equal to the current Base10BigInteger. + + The Base10BigInteger to compare with the current Base10BigInteger + True if the specified Base10BigInteger is equal to the current Base10BigInteger, + false otherwise + + + + Determines whether the specified System.Object is equal to the current Base10BigInteger. + + The System.Object to compare with the current Base10BigInteger + True if the specified System.Object is equal to the current Base10BigInteger, + false otherwise + + + + Serves as a hash function for the Base10BigInteger type. + + A hash code for the current Base10BigInteger + + + + String representation of the current Base10BigInteger, converted to its base-10 representation. + + The string representation of the current Base10BigInteger + + + + Base10BigInteger inverse with respect to addition. + + The Base10BigInteger whose opposite is to be computed + The Base10BigInteger inverse with respect to addition + + + + Greater test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a > b, false otherwise + + + + Greater or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a >= b, false otherwise + + + + Smaller test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a < b, false otherwise + + + + Smaller or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a <= b, false otherwise + + + + Computes the absolute value of a Base10BigInteger. + + The Base10BigInteger whose absolute value is to be computed + The absolute value of the given BigInteger + + + + Addition operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the addition + + + + Subtraction operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the subtraction + + + + Multiplication operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the multiplication + + + + Implicit conversion operator from long to Base10BigInteger. + + The long to be converted to a Base10BigInteger + The Base10BigInteger converted from the given long + + + + Equality test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a == b, false otherwise + + + + Inequality test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a != b, false otherwise + + + + Greater test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a > b, false otherwise + + + + Smaller test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a < b, false otherwise + + + + Greater or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a >= b, false otherwise + + + + Smaller or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a <= b, false otherwise + + + + Base10BigInteger inverse with respect to addition. + + The Base10BigInteger whose opposite is to be computed + The Base10BigInteger inverse with respect to addition + + + + Addition operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the addition + + + + Subtraction operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the subtraction + + + + Multiplication operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the multiplication + + + + Incremetation by one operation of a Base10BigInteger. + + The Base10BigInteger to be incremented by one + The Base10BigInteger result of incrementing by one + + + + Decremetation by one operation of a Base10BigInteger. + + The Base10BigInteger to be decremented by one + The Base10BigInteger result of decrementing by one + + + + Adds two BigNumbers a and b, where a >= b, a, b non-negative. + + + + + Subtracts the Base10BigInteger b from the Base10BigInteger a, where a >= b, a, b non-negative. + + + + + Multiplies two Base10BigIntegers. + + + + + .NET 2.0 class for handling of very large integers, up to 10240 binary digits or + approximately (safe to use) 3000 decimal digits. + + + + + 2^16 numeration base for internal computations, in order to benefit the most from the + 32 bit (or 64 bit) integer processor registers. + + + + + Maximum size for numbers is up to 10240 binary digits or approximately (safe to use) 3000 decimal digits. + The maximum size is, in fact, double the previously specified amount, in order to accommodate operations's + overflow. + + + + + Ratio for the convertion of a BigInteger's size to a binary digits size. + + + + Integer constants + + + + The array of digits of the number. + + + + + The actual number of digits of the number. + + + + + The number sign. + + + + + Default constructor, intializing the BigInteger with zero. + + + + + Constructor creating a new BigInteger as a conversion of a regular base-10 long. + + The base-10 long to be converted + + + + Constructor creating a new BigInteger as a copy of an existing BigInteger. + + The BigInteger to be copied + + + + Constructor creating a BigInteger instance out of a base-10 formatted string. + + The base-10 formatted string. + Invalid numeric string exception + + + + Constructor creating a positive BigInteger by extracting it's digits from a given byte array. + + The byte array + The byte array's content exceeds the maximum size of a BigInteger + exception + + + + Constructor deserializing a BigInteger. + + + + + BigInteger serializing method, which should not be called manually. + + Serialization information object + Streaming context object + Public access + + + + Determines whether the specified BigInteger is equal to the current BigInteger. + + The BigInteger to compare with the current BigInteger + True if the specified BigInteger is equal to the current BigInteger, + false otherwise + + + + Determines whether the specified System.Object is equal to the current BigInteger. + + The System.Object to compare with the current BigInteger + True if the specified System.Object is equal to the current BigInteger, + false otherwise + + + + Serves as a hash function for the BigInteger type. + + A hash code for the current BigInteger + + + + String representation of the current BigInteger, converted to its base-10 representation. + + The string representation of the current BigInteger + + + + Parses the number given by a string + + the number as a string + + + + + Compares this instance to a specified BigInteger. + + The BigInteger to compare this instance with + -1 if the current instance is smaller than the given BigInteger, + 0 if the two are equal, 1 otherwise + + + + Compares this instance to a specified object. + + The object to compare this instance with + -1 if the current instance is smaller than the given object, + 0 if the two are equal, 1 otherwise + obj is not a BigInteger exception + + + + Returns a BigInteger's size in binary digits. + + The BigInteger whose size in binary digits is to be determined + The BigInteger's size in binary digits + + + + BigInteger inverse with respect to addition. + + The BigInteger whose opposite is to be computed + The BigInteger inverse with respect to addition + + + + Greater test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a > b, false otherwise + + + + Greater or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a >= b, false otherwise + + + + Smaller test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a < b, false otherwise + + + + Smaller or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a <= b, false otherwise + + + + Computes the absolute value of a BigInteger. + + The BigInteger whose absolute value is to be computed + The absolute value of the given BigInteger + + + + Addition operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the addition + + + + Subtraction operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the subtraction + + + + Multiplication operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the multiplication + + + + Division operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the division + Cannot divide by zero exception + + + + Modulo operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the modulo + Cannot divide by zero exception + + + + Returns the power of a BigInteger base to a non-negative exponent by using the + fast exponentiation algorithm (right to left binary exponentiation). + + The BigInteger base + The non-negative exponent + The power of the BigInteger base to the non-negative exponent + Cannot raise a BigInteger to a negative power exception. + + + + Integer square root of the given BigInteger using Newton's numeric method. + + The BigInteger whose integer square root is to be computed + The integer square root of the given BigInteger + Cannot compute the integer square root of a negative number exception + + + + Euclidean algorithm for computing the greatest common divisor of two non-negative BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The greatest common divisor of the two given BigIntegers + Cannot compute the Gcd of negative BigIntegers exception + + + + Extended Euclidian Gcd algorithm, returning the greatest common divisor of two non-negative BigIntegers, + while also providing u and v, where: a*u + b*v = gcd(a,b). + + The 1st BigInteger + The 2nd BigInteger + Output BigInteger parameter, where a*u + b*v = gcd(a,b) + Output BigInteger parameter, where a*u + b*v = gcd(a,b) + The greatest common divisor of the two given BigIntegers + Cannot compute the Gcd of negative BigIntegers exception + + + + Computes the modular inverse of a given BigInteger. + + The non-zero BigInteger whose inverse is to be computed + The BigInteger modulus, which must be greater than or equal to 2 + The BigInteger equal to a^(-1) mod n + Invalid number or modulus exception + + + + Returns the power of a BigInteger to a non-negative exponent modulo n, by using the + fast exponentiation algorithm (right to left binary exponentiation) and modulo optimizations. + + The BigInteger base + The non-negative exponent + The modulus, which must be greater than or equal to 2 + The power of the BigInteger to the non-negative exponent + Invalid exponent or modulus exception + + + + Implicit conversion operator from long to BigInteger. + + The long to be converted to a BigInteger + The BigInteger converted from the given long + + + + Implicit conversion operator from int to BigInteger. + + The int to be converted to a BigInteger + The BigInteger converted from the given int + + + + Equality test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a == b, false otherwise + + + + Inequality test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a != b, false otherwise + + + + Greater test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a > b, false otherwise + + + + Smaller test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a < b, false otherwise + + + + Greater or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a >= b, false otherwise + + + + Smaller or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a <= b, false otherwise + + + + BigInteger inverse with respect to addition. + + The BigInteger whose opposite is to be computed + The BigInteger inverse with respect to addition + + + + Addition operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the addition + + + + Subtraction operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the subtraction + + + + Multiplication operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the multiplication + + + + Division operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the division + Cannot divide by zero exception + + + + Modulo operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the modulo + Cannot divide by zero exception + + + + Incremetation by one operation of a BigInteger. + + The BigInteger to be incremented by one + The BigInteger result of incrementing by one + + + + Decremetation by one operation of a BigInteger. + + The BigInteger to be decremented by one + The BigInteger result of decrementing by one + + + + Adds two BigNumbers a and b, where a >= b, a, b non-negative. + + + + + Subtracts the BigInteger b from the BigInteger a, where a >= b, a, b non-negative. + + + + + Multiplies two BigIntegers. + + + + + Divides a BigInteger by a one-digit int. + + + + + Divides a BigInteger by another BigInteger. + + + + + DivideByBigNumber auxiliary method. + + + + + DivideByBigNumber auxilary method. + + + + + DivideByBigNumber auxilary method. + + + + + BigInteger-related exception class. + + + + + BigIntegerException constructor. + + The exception message + The inner exception + + + + The number's sign, where Positive also stands for the number zero. + + +
+
diff --git a/packages/ZXing.Net.0.16.4/lib/net20/zxing.dll b/packages/ZXing.Net.0.16.4/lib/net20/zxing.dll new file mode 100644 index 0000000..25e68ea Binary files /dev/null and b/packages/ZXing.Net.0.16.4/lib/net20/zxing.dll differ diff --git a/packages/ZXing.Net.0.16.4/lib/net35-cf/zxing.ce3.5.dll b/packages/ZXing.Net.0.16.4/lib/net35-cf/zxing.ce3.5.dll new file mode 100644 index 0000000..77d1d17 Binary files /dev/null and b/packages/ZXing.Net.0.16.4/lib/net35-cf/zxing.ce3.5.dll differ diff --git a/packages/ZXing.Net.0.16.4/lib/net35-cf/zxing.ce3.5.xml b/packages/ZXing.Net.0.16.4/lib/net35-cf/zxing.ce3.5.xml new file mode 100644 index 0000000..be1cb3d --- /dev/null +++ b/packages/ZXing.Net.0.16.4/lib/net35-cf/zxing.ce3.5.xml @@ -0,0 +1,11673 @@ + + + + zxing.ce3.5 + + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + + + + + + Initializes a new instance of the class. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Check if "mask_pattern" is valid. + + The mask pattern. + + true if [is valid mask pattern] [the specified mask pattern]; otherwise, false. + + + + + Gets or sets the mode. + + + The mode. + + + + + Gets or sets the EC level. + + + The EC level. + + + + + Gets or sets the version. + + + The version. + + + + + Gets or sets the mask pattern. + + + The mask pattern. + + + + + Gets or sets the matrix. + + + The matrix. + + + + + Holds all of the information for a barcode in a format where it can be easily accessible + + Jacob Haynes + + + + + the height of the matrix (Rows) + the width of the matrix (Cols) + + + + +

Encapsulates logic that can detect a PDF417 Code in an image, even if the + PDF417 Code is rotated or skewed, or partially obscured.

+ + SITA Lab (kevin.osullivan@sita.aero) + dswitkin@google.com (Daniel Switkin) + Guenther Grau +
+
+ + + if we set the value too low, then we don't detect the correct height of the bar if the start patterns are damaged. + if we set the value too high, then we might detect the start pattern from a neighbor barcode. + + + + + A PDF471 barcode should have at least 3 rows, with each row being >= 3 times the module width. Therefore it should be at least + 9 pixels tall. To be conservative, we use about half the size to ensure we don't miss it. + + + + + B S B S B S B S Bar/Space pattern + 11111111 0 1 0 1 0 1 000. + + + + + 1111111 0 1 000 1 0 1 00 1 + + + + +

Detects a PDF417 Code in an image. Only checks 0 and 180 degree rotations.

+
+ barcode image to decode + optional hints to detector + if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned + + encapsulating results of detecting a PDF417 code + +
+ + + Detects PDF417 codes in an image. Only checks 0 degree rotation (so rotate the matrix and check again outside of this method) + + multiple if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned. + bit matrix to detect barcodes in. + List of ResultPoint arrays containing the coordinates of found barcodes + + + + Locate the vertices and the codewords area of a black blob using the Start and Stop patterns as locators. + + Matrix. + Start row. + Start column. + an array containing the vertices: + vertices[0] x, y top left barcode + vertices[1] x, y bottom left barcode + vertices[2] x, y top right barcode + vertices[3] x, y bottom right barcode + vertices[4] x, y top left codeword area + vertices[5] x, y bottom left codeword area + vertices[6] x, y top right codeword area + vertices[7] x, y bottom right codeword area + + + + + Copies the temp data to the final result + + Result. + Temp result. + Destination indexes. + + + + Finds the rows with the given pattern. + + The rows with pattern. + Matrix. + Height. + Width. + Start row. + Start column. + Pattern. + + + + Finds the guard pattern. Uses System.Linq.Enumerable.Repeat to fill in counters. This might be a performance issue? + + start/end horizontal offset of guard pattern, as an array of two ints. + matrix row of black/white values to search + column x position to start search. + row y position to start search. + width the number of pixels to search on this row. + If set to true search the white patterns first. + pattern of counts of number of black and white pixels that are being searched for as a pattern. + counters array of counters, as long as pattern, to re-use . + + + + Determines how closely a set of observed counts of runs of black/white. + values matches a given target pattern. This is reported as the ratio of + the total variance from the expected pattern proportions across all + pattern elements, to the length of the pattern. + + + ratio of total variance between counters and pattern compared to + total pattern size, where the ratio has been multiplied by 256. + So, 0 means no variance (perfect match); 256 means the total + variance between counters and patterns equals the pattern length, + higher values mean even more variance + + observed counters. + expected pattern. + The most any counter can differ before we give up. + + + + Encapsulates an RSS barcode finder pattern, including its start/end position and row. + + + + + Initializes a new instance of the class. + + The value. + The start end. + The start. + The end. + The row number. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Gets the value. + + + + + Gets the start end. + + + + + Gets the result points. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Gets the information. + + + + + + Parses the information. + + + + + + Creates the decoder. + + The information. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + This object renders a ITF code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + +

Encapsulates functionality and implementation that is common to one-dimensional barcodes.

+ dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + The base class for all objects which encode/generate a barcode image. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + a byte array of horizontal pixels (0 = white, 1 = black) + + + + Appends the given pattern to the target array starting at pos. + + encode black/white pattern into this array + position to start encoding at in target + lengths of black/white runs to encode + starting color - false for white, true for black + the number of elements added to target. + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + + barcode contents to encode + a bool[] of horizontal pixels (false = white, true = black) + + + + Calculates the checksum digit modulo10. + + The contents. + + + + + Gets the default margin. + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code bool[]} of horizontal pixels (false = white, true = black) + + + + + + +

Implements decoding of the ITF format, or Interleaved Two of Five.

+ +

This Reader will scan ITF barcodes of certain lengths only. + At the moment it reads length 6, 8, 10, 12, 14, 16, 18, 20, 24, 44 and 48 as these have appeared "in the wild". Not all + lengths are scanned, especially shorter ones, to avoid false positives. This in turn is due to a lack of + required checksum function.

+ +

The checksum is optional and is not applied by this Reader. The consumer of the decoded + value will have to apply a checksum if required.

+ +

http://en.wikipedia.org/wiki/Interleaved_2_of_5 + is a great reference for Interleaved 2 of 5 information.

+ + kevin.osullivan@sita.aero, SITA Lab. +
+
+ + + Encapsulates functionality and implementation that is common to all families + of one-dimensional barcodes. + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Implementations of this interface can decode an image of a barcode in some format into + the String it encodes. For example, can + decode a QR code. The decoder may optionally receive hints from the caller which may help + it decode more quickly or accurately. + + See , which attempts to determine what barcode + format is present within the image as well, and then decodes it accordingly. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + String which the barcode encodes + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + + + + + + + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + Note that we don't try rotation without the try harder flag, even if rotation was supported. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + We're going to examine rows from the middle outward, searching alternately above and below the + middle, and farther out each time. rowStep is the number of rows between each successive + attempt above and below the middle. So we'd scan row middle, then middle - rowStep, then + middle + rowStep, then middle - (2 * rowStep), etc. + rowStep is bigger as the image is taller, but is always at least 1. We've somewhat arbitrarily + decided that moving up and down by about 1/16 of the image is pretty good; we try more of the + image if "trying harder". + + The image to decode + Any hints that were requested + The contents of the decoded barcode + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the pattern in reverse. + + The row. + The start. + The counters. + + + + + Determines how closely a set of observed counts of runs of black/white values matches a given + target pattern. This is reported as the ratio of the total variance from the expected pattern + proportions across all pattern elements, to the length of the pattern. + + observed counters + expected pattern + The most any counter can differ before we give up + ratio of total variance between counters and pattern compared to total pattern size, + where the ratio has been multiplied by 256. So, 0 means no variance (perfect match); 256 means + the total variance between counters and patterns equals the pattern length, higher values mean + even more variance + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + Valid ITF lengths. Anything longer than the largest value is also allowed. + + + + + Start/end guard pattern. + + Note: The end pattern is reversed because the row is reversed before + searching for the END_PATTERN + + + + + Patterns of Wide / Narrow lines to indicate each digit + + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + + row of black/white values to search + offset of start pattern + The payload end. + to append decoded chars to + + false, if decoding could not complete successfully + + + + + Identify where the start of the middle / payload section starts. + + row of black/white values to search + Array, containing index of start of 'start block' and end of 'start block' + + + + The start & end patterns must be pre/post fixed by a quiet zone. This + zone must be at least 10 times the width of a narrow line. Scan back until + we either get to the start of the barcode or match the necessary number of + quiet zone pixels. + + Note: Its assumed the row is reversed when using this method to find + quiet zone after the end pattern. + + ref: http://www.barcode-1.net/i25code.html + + bit array representing the scanned barcode. + index into row of the start or end pattern. + false, if the quiet zone cannot be found + + + + Skip all whitespace until we get to the first black line. + + row of black/white values to search + index of the first black line or -1 if no black lines are found in the row. + + + + Identify where the end of the middle / payload section ends. + + row of black/white values to search + Array, containing index of start of 'end block' and end of 'end + block' or null, if nothing found + + + + + row of black/white values to search + position to start search + pattern of counts of number of black and white pixels that are being searched for as a pattern + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a sequence of ITF black/white lines into single + digit. + + the counts of runs of observed black/white/black/... values + The decoded digit + + false, if digit cannot be decoded + + + + + mike32767 + Manuel Kasten + + + + + to parse + + + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode the barcode inside a bitmap object + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Common string-related functions. + + Sean Owen + Alex Dupre + + + + SJIS + + + + + GB2312 + + + + + Guesses the encoding. + + bytes encoding a string, whose encoding should be guessed + decode hints if applicable + name of guessed encoding; at the moment will only guess one of: + {@link #SHIFT_JIS}, {@link #UTF8}, {@link #ISO88591}, or the platform + default encoding if none of these can possibly be correct + + + Implementations of this class can, given locations of finder patterns for a QR code in an + image, sample the right points in the image to reconstruct the QR code, accounting for + perspective distortion. It is abstracted since it is relatively expensive and should be allowed + to take advantage of platform-specific optimized implementations, like Sun's Java Advanced + Imaging library, but which may not be available in other environments such as J2ME, and vice + versa. + + The implementation used can be controlled by calling {@link #setGridSampler(GridSampler)} + with an instance of a class which implements this interface. + + Sean Owen + + + Sets the implementation of used by the library. One global + instance is stored, which may sound problematic. But, the implementation provided + ought to be appropriate for the entire platform, and all uses of this library + in the whole lifetime of the JVM. For instance, an Android activity can swap in + an implementation that takes advantage of native platform libraries. + + The platform-specific object to install. + + + +

Samples an image for a square matrix of bits of the given dimension. This is used to extract + the black/white modules of a 2D barcode like a QR Code found in an image. Because this barcode + may be rotated or perspective-distorted, the caller supplies four points in the source image + that define known points in the barcode, so that the image may be sampled appropriately.

+

The last eight "from" parameters are four X/Y coordinate pairs of locations of points in + the image that define some significant points in the image to be sample. For example, + these may be the location of finder pattern in a QR Code.

+

The first eight "to" parameters are four X/Y coordinate pairs measured in the destination + , from the top left, where the known points in the image given by the "from" + parameters map to.

+

These 16 parameters define the transformation needed to sample the image.

+
+ image to sample + The dimension X. + The dimension Y. + The p1 preimage X. + The p1 preimage Y. + The p2 preimage X. + The p2 preimage Y. + The p3 preimage X. + The p3 preimage Y. + The p4 preimage X. + The p4 preimage Y. + The p1 image X. + The p1 image Y. + The p2 image X. + The p2 image Y. + The p3 image X. + The p3 image Y. + The p4 image X. + The p4 image Y. + + representing a grid of points sampled from the image within a region + defined by the "from" parameters + + ReaderException if image can't be sampled, for example, if the transformation defined +
+ + + + + + + + + + + +

Checks a set of points that have been transformed to sample points on an image against + the image's dimensions to see if the point are even within the image.

+ +

This method will actually "nudge" the endpoints back onto the image if they are found to be + barely (less than 1 pixel) off the image. This accounts for imperfect detection of finder + patterns in an image where the QR Code runs all the way to the image border.

+ +

For efficiency, the method will check points from either end of the line until one is found + to be within the image. Because the set of points are assumed to be linear, this is valid.

+ +
+ image into which the points should map + + actual points in x1,y1,...,xn,yn form + +
+ + the current implementation of + + + + + Represents a parsed result that encodes a product by an identifier of some kind. + + dswitkin@google.com (Daniel Switkin) + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link ResultParser#parseResult(Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + The base class for luminance sources which supports + cropping and rotating based upon the luminance values. + + + + + The purpose of this class hierarchy is to abstract different bitmap implementations across + platforms into a standard interface for requesting greyscale luminance values. The interface + only provides immutable methods; therefore crop and rotation create copies. This is to ensure + that one Reader does not modify the original luminance source and leave it in an unknown state + for other Readers in the chain. + + dswitkin@google.com (Daniel Switkin) + + + + initializing constructor + + + + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + inverts the luminance values, not supported here. has to implemented in sub classes + + + + + + + + + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff + + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + The width of the bitmap. + + + The height of the bitmap. + + + Whether this subclass supports cropping. + + + Whether this subclass supports counter-clockwise rotation. + + + + + Whether this subclass supports invertion. + + + + weight of the red channel for calculating a gray scale image + + + + + weight of the green channel for calculating a gray scale image + + + + + weight of the blue channel for calculating a gray scale image + + + + + numbers of bits which for right shifting + + + + + + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + + The luminance array. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + TODO: not implemented yet + + + A rotated version of this object. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Inverts the luminance values (newValue = 255 - oldValue) + + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + gets the luminance matrix + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + + Whether this subclass supports cropping. + + + + + Whether this subclass supports invertion. + + + + A smart class to decode the barcode inside a bitmap object + + + + + A smart class to decode the barcode inside a bitmap object + + + + + A smart class to decode the barcode inside a bitmap object + + + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode the barcode inside a bitmap object + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap which is given by a generic byte array. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + represents the default function which is called to get a instance from a raw byte array + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb array. + If null the RGBLuminanceSource is used. The handler is only called when Decode with a byte[] array is called. + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + raises the ResultFound event + + + + + + raises the ResultFound event + + + + + + calls the explicitResultPointFound action + + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + Gets or sets the options. + + + The options. + + + + + Gets the reader which should be used to find and decode the barcode. + + + The reader. + + + + + Gets or sets a method which is called if an important point is found + + + The result point callback. + + + + + event is executed if a result was found via decode + + + + + Gets or sets a value indicating whether the image should be automatically rotated. + Rotation is supported for 90, 180 and 270 degrees + + + true if image should be rotated; otherwise, false. + + + + + Gets or sets a value indicating whether the image should be automatically inverted + if no result is found in the original image. + ATTENTION: Please be carefully because it slows down the decoding process if it is used + + + true if image should be inverted; otherwise, false. + + + + + Optional: Gets or sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + The function to create a binarizer object. + + + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode the barcode inside a bitmap object + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Constructor for additional image formats for one BarcodeReader class + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Optional: Gets or sets the function to create a luminance source object for a bitmap. + If null a platform specific default LuminanceSource is used + + + The function to create a luminance source object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + represents a token for a binary shift + + + + + initializing constructor + + + + + + + + appends the byte array to the BitArray + + + + + + + string representation + + + + + + The class holds the available options for the QrCodeWriter + + + + + Defines an container for encoder options + + + + + Initializes a new instance of the class. + + + + + Gets the data container for all options + + + + + Specifies the height of the barcode image + + + + + Specifies the width of the barcode image + + + + + Don't put the content string into the output image. + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + + + + + Specifies whether the data should be encoded to the GS1 standard; + FNC1 character is added in front of the data + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + . + + + + + Specifies what character encoding to use where applicable (type ) + + + + + Explicitly disables ECI segment when generating QR Code + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + + + + + Specifies the exact version of QR code to be encoded. An integer, range 1 to 40. If the data specified + cannot fit within the required version, a WriterException will be thrown. + + + + + Jacob Haynes + qwandor@google.com (Andrew Walbran) + + + + + default white space (margin) around the code + + + + + default error correction level + + + + + default aspect ratio + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The height of a row in the barcode + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Takes encoder, accounts for width/height, and retrieves bit matrix + + + + + This takes an array holding the values of the PDF 417 + + a byte array of information with 0 is black, and 1 is white + border around the barcode + BitMatrix of the input + + + + Takes and rotates the it 90 degrees + + + + + This implementation can detect and decode PDF417 codes in an image. + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Implementation of this interface attempt to read several barcodes from one image. + Sean Owen + + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Locates and decodes a PDF417 code in an image. + + a String representing the content encoded by the PDF417 code + if a PDF417 cannot be decoded + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + **Note** this will return the FIRST barcode discovered if there are many. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Locates and decodes Multiple PDF417 codes in an image. + + an array of Strings representing the content encoded by the PDF417 codes + + + + + Locates and decodes multiple barcodes in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcodes encode + + + + + Decode the specified image, with the hints and optionally multiple barcodes. + Based on Owen's Comments in , this method has been modified to continue silently + if a barcode was not decoded where it was detected instead of throwing a new exception object. + + Image. + Hints. + If set to true multiple. + + + + Gets the maximum width of the barcode + + The max width. + P1. + P2. + + + + Gets the minimum width of the barcode + + The minimum width. + P1. + P2. + + + + Gets the maximum width of the codeword. + + The max codeword width. + P. + + + + Gets the minimum width of the codeword. + + The minimum codeword width. + P. + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + + + Guenther Grau + + + + Decode the specified image, imageTopLeft, imageBottomLeft, imageTopRight, imageBottomRight, minCodewordWidth + and maxCodewordWidth. + TODO: don't pass in minCodewordWidth and maxCodewordWidth, pass in barcode columns for start and stop pattern + columns. That way width can be deducted from the pattern column. + This approach also allows to detect more details about the barcode, e.g. if a bar type (white or black) is wider + than it should be. This can happen if the scanner used a bad blackpoint. + + Image. + Image top left. + Image bottom left. + Image top right. + Image bottom right. + Minimum codeword width. + Max codeword width. + + + + Merge the specified leftRowIndicatorColumn and rightRowIndicatorColumn. + + Left row indicator column. + Right row indicator column. + + + + Adjusts the bounding box. + + The bounding box. + Row indicator column. + + + + Gets the barcode metadata. + + The barcode metadata. + Left row indicator column. + Right row indicator column. + + + + Gets the row indicator column. + + The row indicator column. + Image. + Bounding box. + Start point. + If set to true left to right. + Minimum codeword width. + Max codeword width. + + + + Adjusts the codeword count. + + Detection result. + Barcode matrix. + + + + Creates the decoder result. + + The decoder result. + Detection result. + + + + This method deals with the fact, that the decoding process doesn't always yield a single most likely value. The + current error correction implementation doesn't deal with erasures very well, so it's better to provide a value + for these ambiguous codewords instead of treating it as an erasure. The problem is that we don't know which of + the ambiguous values to choose. We try decode using the first value, and if that fails, we use another of the + ambiguous values and try to decode again. This usually only happens on very hard to read and decode barcodes, + so decoding the normal barcodes is not affected by this. + + The decoder result from ambiguous values. + Ec level. + Codewords. + contains the indexes of erasures. + array with the indexes that have more than one most likely value. + two dimensional array that contains the ambiguous values. The first dimension must + be the same Length as the ambiguousIndexes array. + + + + Creates the barcode matrix. + + The barcode matrix. + Detection result. + + + + Tests to see if the Barcode Column is Valid + + true, if barcode column is valid, false otherwise. + Detection result. + Barcode column. + + + + Gets the start column. + + The start column. + Detection result. + Barcode column. + Image row. + If set to true left to right. + + + + Detects the codeword. + + The codeword. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + Minimum codeword width. + Max codeword width. + + + + Gets the module bit count. + + The module bit count. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + + + + Gets the number of EC code words. + + The number of EC code words. + Barcode EC level. + + + + Adjusts the codeword start column. + + The codeword start column. + Image. + Minimum column. + Max column. + If set to true left to right. + Codeword start column. + Image row. + + + + Checks the codeword for any skew. + + true, if codeword is within the skew, false otherwise. + Codeword size. + Minimum codeword width. + Max codeword width. + + + + Decodes the codewords. + + The codewords. + Codewords. + Ec level. + Erasures. + + + + Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place. + + The errors. + data and error correction codewords. + positions of any known erasures. + number of error correction codewords that are available in codewords. + + + + Verifies that all is well with the the codeword array. + + Codewords. + Number EC codewords. + + + + Gets the bit count for codeword. + + The bit count for codeword. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Module bit count. + + + + Returns a that represents the jagged array. + + A that represents the jagged array. + Barcode matrix as a jagged array. + + + + + + Guenther Grau + creatale GmbH (christoph.schulz@creatale.de) + + + + The ratios table + + + + + Initializes the class & Pre-computes the symbol ratio table. + + + + + Gets the decoded value. + + The decoded value. + Module bit count. + + + + Samples the bit counts. + + The bit counts. + Module bit count. + + + + Gets the decoded codeword value. + + The decoded codeword value. + Module bit count. + + + + Gets the bit value. + + The bit value. + Module bit count. + + + + Gets the closest decoded value. + + The closest decoded value. + Module bit count. + + + +

This class contains the methods for decoding the PDF417 codewords.

+ + SITA Lab (kevin.osullivan@sita.aero) +
+
+ + + Table containing values for the exponent of 900. + This is used in the numeric compaction decode algorithm. + + + + + Text Compaction mode (see 5.4.1.5) permits all printable ASCII characters to be + encoded, i.e. values 32 - 126 inclusive in accordance with ISO/IEC 646 (IRV), as + well as selected control characters. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + The Text Compaction mode includes all the printable ASCII characters + (i.e. values from 32 to 126) and three ASCII control characters: HT or tab + (ASCII value 9), LF or line feed (ASCII value 10), and CR or carriage + return (ASCII value 13). The Text Compaction mode also includes various latch + and shift characters which are used exclusively within the mode. The Text + Compaction mode encodes up to 2 characters per codeword. The compaction rules + for converting data into PDF417 codewords are defined in 5.4.2.2. The sub-mode + switches are defined in 5.4.2.3. + + The text compaction data. + The byte compaction data if there + was a mode shift. + The size of the text compaction and byte compaction data. + The decoded data is appended to the result. + + + + + Byte Compaction mode (see 5.4.3) permits all 256 possible 8-bit byte values to be encoded. + This includes all ASCII characters value 0 to 127 inclusive and provides for international + character set support. + + The byte compaction mode i.e. 901 or 924 + The array of codewords (data + error) + Currently active character encoding + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Numeric Compaction mode (see 5.4.4) permits efficient encoding of numeric data strings. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Convert a list of Numeric Compacted codewords from Base 900 to Base 10. + EXAMPLE + Encode the fifteen digit numeric string 000213298174000 + Prefix the numeric string with a 1 and set the initial value of + t = 1 000 213 298 174 000 + Calculate codeword 0 + d0 = 1 000 213 298 174 000 mod 900 = 200 + + t = 1 000 213 298 174 000 div 900 = 1 111 348 109 082 + Calculate codeword 1 + d1 = 1 111 348 109 082 mod 900 = 282 + + t = 1 111 348 109 082 div 900 = 1 234 831 232 + Calculate codeword 2 + d2 = 1 234 831 232 mod 900 = 632 + + t = 1 234 831 232 div 900 = 1 372 034 + Calculate codeword 3 + d3 = 1 372 034 mod 900 = 434 + + t = 1 372 034 div 900 = 1 524 + Calculate codeword 4 + d4 = 1 524 mod 900 = 624 + + t = 1 524 div 900 = 1 + Calculate codeword 5 + d5 = 1 mod 900 = 1 + t = 1 div 900 = 0 + Codeword sequence is: 1, 624, 434, 632, 282, 200 + + Decode the above codewords involves + 1 x 900 power of 5 + 624 x 900 power of 4 + 434 x 900 power of 3 + + 632 x 900 power of 2 + 282 x 900 power of 1 + 200 x 900 power of 0 = 1000213298174000 + + Remove leading 1 => Result is 000213298174000 + The array of codewords + The number of codewords + The decoded string representing the Numeric data. + + + + + This object renders an UPC-E code as a {@link BitMatrix}. + @author 0979097955s@gmail.com (RX) + + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ aripollak@gmail.com (Ari Pollak) + dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Gets the default margin. + + + + +

Implements decoding of the UPC-E format.

+

Thisis a great reference for + UPC-E information.

+ Sean Owen +
+
+ + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Start/end guard pattern. + + + + + Pattern marking the middle of a UPC/EAN pattern, separating the two halves. + + + + + end guard pattern. + + + + + "Odd", or "L" patterns used to encode UPC/EAN digits. + + + + + As above but also including the "even", or "G" patterns used to encode UPC/EAN digits. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + +

Like , but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ row index into the image + encoding of the row of the barcode image + start/end column where the opening start pattern was found + optional hints that influence decoding + encapsulating the result of decoding a barcode in the row +
+ + + + string of digits to check + see + + + + Computes the UPC/EAN checksum on a string of digits, and reports + whether the checksum is correct or not. + + string of digits to check + true iff string of digits passes the UPC/EAN checksum algorithm + + + + Decodes the end. + + The row. + The end start. + + + + + + row of black/white values to search + position to start search + if true, indicates that the pattern specifies white/black/white/... + pixel counts, otherwise, it is interpreted as black/white/black/... + pattern of counts of number of black and white pixels that are being + searched for as a pattern + array of counters, as long as pattern, to re-use + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a single UPC/EAN-encoded digit. + + row of black/white values to decode + the counts of runs of observed black/white/black/... values + horizontal offset to start decoding from + the set of patterns to use to decode -- sometimes different encodings + for the digits 0-9 are used, and this indicates the encodings for 0 to 9 that should + be used + horizontal offset of first pixel beyond the decoded digit + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + Get the format of this decoder. + + The 1D format. + + + + The pattern that marks the middle, and end, of a UPC-E pattern. + There is no "second half" to a UPC-E barcode. + + + + + See L_AND_G_PATTERNS these values similarly represent patterns of + even-odd parity encodings of digits that imply both the number system (0 or 1) + used, and the check digit. + + + + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Decodes the end. + + The row. + The end start. + + + + + see checkStandardUPCEANChecksum(String) + + + + + + + Determines the num sys and check digit. + + The result string. + The lg pattern found. + + + + + Expands a UPC-E value back into its full, equivalent UPC-A code value. + + UPC-E code as string of digits + equivalent UPC-A code as string of digits + + + + + Get the format of this decoder. + The 1D format. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Symbol Character Placement Program. Adapted from Annex M.1 in ISO/IEC 16022:2000(E). + + + + + Main constructor + + the codewords to place + the number of columns + the number of rows + + + + Places the 8 bits of a utah-shaped symbol character in ECC200. + + The row. + The col. + character position + + +

This provides an easy abstraction to read bits at a time from a sequence of bytes, where the + number of bits read is not often a multiple of 8.

+ +

This class is thread-safe but not reentrant. Unless the caller modifies the bytes array + it passed in, in which case all bets are off.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + bytes from which this will read bits. Bits will be read from the first byte first. + Bits are read within a byte from most-significant to least-significant bit. + + + + number of bits to read + + int representing the bits read. The bits will appear as the least-significant + bits of the int + + if numBits isn't in [1,32] or more than is available + + + number of bits that can be read successfully + + + + + index of next bit in current byte which would be read by the next call to {@link #readBits(int)}. + + + + + index of next byte in input byte array which would be read by the next call to {@link #readBits(int)}. + + + + + This class is the core bitmap class used by ZXing to represent 1 bit data. Reader objects + accept a BinaryBitmap and attempt to decode it. + + dswitkin@google.com (Daniel Switkin) + + + + + + + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + + The row to fetch, which must be in [0, bitmap height). + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if isCropSupported() is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + The width of the bitmap. + + + + + The height of the bitmap. + + + + + Converts a 2D array of luminance data to 1 bit. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + + Whether this bitmap can be cropped. + + + + + Whether this bitmap supports counter-clockwise rotation. + + + + + This produces nearly optimal encodings of text into the first-level of + encoding used by Aztec code. + It uses a dynamic algorithm. For each prefix of the string, it determines + a set of encodings that could lead to this prefix. We repeatedly add a + character and generate a new set of optimal encodings until we have read + through the entire input. + @author Frank Yellin + @author Rustam Abdullaev + + + + + + + + + + + Convert the text represented by this High Level Encoder into a BitArray. + + text represented by this encoder encoded as a + + + Callback which is invoked when a possible result point (significant + point in the barcode image such as a corner) is found. + + + + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+
+ Sean Owen +
+ + + 1 pixel/module times 3 modules/center + + + + + support up to version 20 for mobile clients + + + + +

Creates a finder that will search the image for three finder patterns.

+
+ image to search +
+ + + Initializes a new instance of the class. + + The image. + The result point callback. + + + Given a count of black/white/black/white/black pixels just seen and an end position, + figures the location of the center of this run. + + + + count of black/white/black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/3/1/1 ratios + used by finder patterns to be considered a match + + + + + + count of black/white/black/white/black pixels just read + true if the proportions of the counts is close enough to the 1/1/3/1/1 ratios + by finder patterns to be considered a match + + + + After a vertical and horizontal scan finds a potential finder pattern, this method + "cross-cross-cross-checks" by scanning down diagonally through the center of the possible + finder pattern to see if the same proportion is detected. + @param maxCount maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + @param originalStateCountTotal The original state count total. + + row where a finder pattern was detected + center of the section that appears to cross a finder pattern + true if proportions are withing expected limits + + + +

After a horizontal scan finds a potential finder pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + finder pattern to see if the same proportion is detected.

+
+ row where a finder pattern was detected + center of the section that appears to cross a finder pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of finder pattern, or null if not found + +
+ +

Like {@link #crossCheckVertical(int, int, int, int)}, and in fact is basically identical, + except it reads horizontally instead of vertically. This is used to cross-cross + check a vertical cross check and locate the real center of the alignment pattern.

+
+
+ + + @see #handlePossibleCenter(int[], int, int) + + reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + ignored + true if a finder pattern candidate was found this time + + + +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will, ah, cross-cross-check + with another horizontal scan. This is needed primarily to locate the real horizontal + center of the pattern in cases of extreme skew. + And then we cross-cross-cross check with another diagonal scan.

+ If that succeeds the finder pattern location is added to a list that tracks + the number of times each location has been nearly-matched as a finder pattern. + Each additional find is more evidence that the location is in fact a finder + pattern center +
+ reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + + true if a finder pattern candidate was found this time + +
+ + number of rows we could safely skip during scanning, based on the first + two finder patterns that have been located. In some cases their position will + allow us to infer that the third pattern must lie below a certain point farther + down in the image. + + + + true iff we have found at least 3 finder patterns that have been detected + at least {@link #CENTER_QUORUM} times each, and, the estimated module size of the + candidates is "pretty similar" + + + + the 3 best {@link FinderPattern}s from our list of candidates. The "best" are + those that have been detected at least {@link #CENTER_QUORUM} times, and whose module + size differs from the average among those patterns the least + + + + + Gets the image. + + + + + Gets the possible centers. + + + + + Orders by furthest from average + + + +

Orders by {@link FinderPattern#getCount()}, descending.

+
+ + +

Encapsulates a finder pattern, which are the three square patterns found in + the corners of QR Codes. It also encapsulates a count of similar finder patterns, + as a convenience to the finder's bookkeeping.

+
+ Sean Owen +
+ + + Encapsulates a point of interest in an image containing a barcode. Typically, this + would be the location of a finder pattern or the corner of the barcode, for example. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The x. + The y. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC and + BC is less than AC and the angle between BC and BA is less than 180 degrees. + + array of three to order + + + + calculates the distance between two points + + first pattern + second pattern + + distance between two points + + + + + Returns the z component of the cross product between vectors BC and BA. + + + + + Gets the X. + + + + + Gets the Y. + + + +

Determines if this finder pattern "about equals" a finder pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing a weighted average + based on count. + + The i. + The j. + New size of the module. + + + + + Gets the size of the estimated module. + + + The size of the estimated module. + + + + +

A field based on powers of a generator integer, modulo some modulus.

+ +
+ Sean Owen +
+ + + Interface for a smart class to encode some content into a barcode + + + + + Encodes the specified contents. + + The contents. + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + +

Data Matrix Codes can encode text as bits in one of several modes, and can use multiple modes + in one Data Matrix Code. This class decodes the bits back into text.

+ +

See ISO 16022:2006, 5.2.1 - 5.2.9.2

+ + bbrown@google.com (Brian Brown) + Sean Owen +
+
+ + + See ISO 16022:2006, Annex C Table C.1 + The C40 Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, Annex C Table C.2 + The Text Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, 5.2.3 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.5 and Annex C, Table C.1 + + + + + See ISO 16022:2006, 5.2.6 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.7 + + + + + See ISO 16022:2006, 5.2.8 and Annex C Table C.3 + + + + + See ISO 16022:2006, 5.2.9 and Annex B, B.2 + + + + + See ISO 16022:2006, Annex B, B.2 + + + + + bbrown@google.com (Brian Brown) + + + + + to parse + if dimension is < 8 or > 144 or not 0 mod 2 + + + + +

Creates the version object based on the dimension of the original bit matrix from + the datamatrix code.

+ +

See ISO 16022:2006 Table 7 - ECC 200 symbol attributes

+ + Original including alignment patterns + encapsulating the Data Matrix Code's "version" + if the dimensions of the mapping matrix are not valid + Data Matrix dimensions. +
+
+ + +

Reads the bits in the representing the mapping matrix (No alignment patterns) + in the correct order in order to reconstitute the codewords bytes contained within the + Data Matrix Code.

+ + bytes encoded within the Data Matrix Code + if the exact number of bytes expected is not read +
+
+ + +

Reads a bit of the mapping matrix accounting for boundary wrapping.

+ + Row to read in the mapping matrix + Column to read in the mapping matrix + Number of rows in the mapping matrix + Number of columns in the mapping matrix + value of the given bit in the mapping matrix +
+
+ + +

Reads the 8 bits of the standard Utah-shaped pattern.

+ +

See ISO 16022:2006, 5.8.1 Figure 6

+ + Current row in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Current column in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the utah shape +
+
+ + +

Reads the 8 bits of the special corner condition 1.

+ +

See ISO 16022:2006, Figure F.3

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 1 +
+
+ + +

Reads the 8 bits of the special corner condition 2.

+ +

See ISO 16022:2006, Figure F.4

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 2 +
+
+ + +

Reads the 8 bits of the special corner condition 3.

+ +

See ISO 16022:2006, Figure F.5

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 3 +
+
+ + +

Reads the 8 bits of the special corner condition 4.

+ +

See ISO 16022:2006, Figure F.6

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 4 +
+
+ + +

Extracts the data region from a that contains + alignment patterns.

+ + Original with alignment patterns + BitMatrix that has the alignment patterns removed +
+
+ +

This class implements a perspective transform in two dimensions. Given four source and four + destination points, it will compute the transformation implied between them. The code is based + directly upon section 3.4.2 of George Wolberg's "Digital Image Warping"; see pages 54-56.

+
+ Sean Owen +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Convenience method, not optimized for performance. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Represents a parsed result that encodes a product ISBN number. + + jbreiden@google.com (Jeff Breidenbach) + + + + the ISBN number + + + +

This class attempts to find alignment patterns in a QR Code. Alignment patterns look like finder + patterns but are smaller and appear at regular intervals throughout the image.

+ +

At the moment this only looks for the bottom-right alignment pattern.

+ +

This is mostly a simplified copy of {@link FinderPatternFinder}. It is copied, + pasted and stripped down here for maximum performance but does unfortunately duplicate + some code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Creates a finder that will look in a portion of the whole image.

+ +
+ image to search + + left column from which to start searching + + top row from which to start searching + + width of region to search + + height of region to search + + estimated module size so far + + callback function which is called, when a result point is found +
+ +

This method attempts to find the bottom-right alignment pattern in the image. It is a bit messy since + it's pretty performance-critical and so is written to be fast foremost.

+ +
+ if found +
+ + Given a count of black/white/black pixels just seen and an end position, + figures the location of the center of this black/white/black run. + + + + count of black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/1 ratios + used by alignment patterns to be considered a match + + + + +

After a horizontal scan finds a potential alignment pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + alignment pattern to see if the same proportion is detected.

+
+ row where an alignment pattern was detected + center of the section that appears to cross an alignment pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of alignment pattern, or null if not found + +
+ +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will see if this pattern had been + found on a previous horizontal scan. If so, we consider it confirmed and conclude we have + found the alignment pattern.

+ +
+ reading state module counts from horizontal scan + + row where alignment pattern may be found + + end of possible alignment pattern in row + + {@link AlignmentPattern} if we have found the same pattern twice, or null if not + +
+ + + PDF 417 result meta data. + Guenther Grau + + + + + The Segment ID represents the segment of the whole file distributed over different symbols. + + + + + Is the same for each related PDF417 symbol + + + + + always null + + + + + true if it is the last segment + + + + + count of segments, -1 if not set + + + + + Filename of the encoded file + + + + + filesize in bytes of the encoded file + returns filesize in bytes, -1 if not set + + + + + 16-bit CRC checksum using CCITT-16 + returns crc checksum, -1 if not set + + + + + unix epock timestamp, elapsed seconds since 1970-01-01 + returns elapsed seconds, -1 if not set + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + This object renders a CODE128 code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + +

Decodes Code 128 barcodes.

+ + Sean Owen +
+
+ + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + +

A somewhat generic detector that looks for a barcode-like rectangular region within an image. + It looks within a mostly white region of an image for a region of black and white, but mostly + black. It returns the four corners of the region, as best it can determine.

+ +
+ Sean Owen +
+ + + initializing constructor + + + + + +

Detects a rectangular region of black and white -- mostly black -- with a region of mostly + white, in an image.

+
+ [] describing the corners of the rectangular region. The first and + last points are opposed on the diagonal, as are the second and third. The first point will be + the topmost point and the last, the bottommost. The second point will be leftmost and the + third, the rightmost + +
+ + Attempts to locate a corner of the barcode by scanning up, down, left or right from a center + point which should be within the barcode. + + + center's x component (horizontal) + + same as deltaY but change in x per step instead + + minimum value of x + + maximum value of x + + center's y component (vertical) + + change in y per step. If scanning up this is negative; down, positive; + left or right, 0 + + minimum value of y to search through (meaningless when di == 0) + + maximum value of y + + maximum run of white pixels that can still be considered to be within + the barcode + + a encapsulating the corner that was found + + + + Computes the start and end of a region of pixels, either horizontally or vertically, that could + be part of a Data Matrix barcode. + + + if scanning horizontally, this is the row (the fixed vertical location) + where we are scanning. If scanning vertically it's the column, the fixed horizontal location + + largest run of white pixels that can still be considered part of the + barcode region + + minimum pixel location, horizontally or vertically, to consider + + maximum pixel location, horizontally or vertically, to consider + + if true, we're scanning left-right, instead of up-down + + int[] with start and end of found range, or null if no such range is found + (e.g. only white was found) + + + + + A simple result type encapsulating a URI that has no further interpretation. + + Sean Owen + + + Transforms a string that represents a URI into something more proper, by adding or canonicalizing + the protocol. + + + + true if the URI contains suspicious patterns that may suggest it intends to + mislead the user about its true nature. At the moment this looks for the presence + of user/password syntax in the host/authority portion of a URI which may be used + in attempts to make the URI's host appear to be other than it is. Example: + http://yourbank.com@phisher.com This URI connects to phisher.com but may appear + to connect to yourbank.com at first glance. + + + + + Parses a "tel:" URI result, which specifies a phone number. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link #parseResult(com.google.zxing.Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Attempts to parse the raw {@link Result}'s contents as a particular type + of information (email, URL, etc.) and return a {@link ParsedResult} encapsulating + the result of parsing. + + the raw to parse + encapsulating the parsing result + + + + Parses the result. + + The result. + + + + + Attribute is only for compatibility issues + + + + + Luminance source class which support different formats of images. + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 1 byte per pixel (Gray8). + That means the whole array consists of the luminance values (grayscale). + + The luminance array. + The width. + The height. + if set to true [is8 bit]. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + The bitmap format. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + calculates the luminance values for the given byte array and bitmap format + + + + + + + enumeration of supported bitmap format which the RGBLuminanceSource can process + + + + + format of the byte[] isn't known. RGBLuminanceSource tries to determine the best possible value + + + + + grayscale array, the byte array is a luminance array with 1 byte per pixel + + + + + grayscale array, the byte array is a luminance array with 2 bytes per pixel + + + + + 3 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels alpha, red, green and blue + + + + + 3 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green, red and alpha + + + + + 2 bytes per pixel, 5 bit red, 6 bits green and 5 bits blue + + + + + 4 bytes per pixel with the channels red, green, blue and alpha + + + + + 4 bytes for two pixels, UYVY formatted + + + + + 4 bytes for two pixels, YUYV formatted + + + + + Represents some type of metadata about the result of the decoding that the decoder + wishes to communicate back to the caller. + + Sean Owen + + + + Unspecified, application-specific metadata. Maps to an unspecified {@link Object}. + + + + + Denotes the likely approximate orientation of the barcode in the image. This value + is given as degrees rotated clockwise from the normal, upright orientation. + For example a 1D barcode which was found by reading top-to-bottom would be + said to have orientation "90". This key maps to an {@link Integer} whose + value is in the range [0,360). + + + + +

2D barcode formats typically encode text, but allow for a sort of 'byte mode' + which is sometimes used to encode binary data. While {@link Result} makes available + the complete raw bytes in the barcode for these formats, it does not offer the bytes + from the byte segments alone.

+

This maps to a {@link java.util.List} of byte arrays corresponding to the + raw bytes in the byte segments in the barcode, in order.

+
+
+ + + Error correction level used, if applicable. The value type depends on the + format, but is typically a String. + + + + + For some periodicals, indicates the issue number as an {@link Integer}. + + + + + For some products, indicates the suggested retail price in the barcode as a + formatted {@link String}. + + + + + For some products, the possible country of manufacture as a {@link String} denoting the + ISO country code. Some map to multiple possible countries, like "US/CA". + + + + + For some products, the extension text + + + + + If the code format supports structured append and + the current scanned code is part of one then the + sequence number is given with it. + + + + + If the code format supports structured append and + the current scanned code is part of one then the + parity is given with it. + + + + + PDF417-specific metadata + + + + + Aztec-specific metadata + + + + +

See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels + defined by the QR code standard.

+
+ Sean Owen +
+ + L = ~7% correction + + + M = ~15% correction + + + Q = ~25% correction + + + H = ~30% correction + + + + Ordinals this instance. + + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Fors the bits. + + int containing the two bits encoding a QR Code's error correction level + + representing the encoded error correction level + + + + + Gets the bits. + + + + + Gets the name. + + + + + PDF417 high-level encoder following the algorithm described in ISO/IEC 15438:2001(E) in + annex P. + + + + + code for Text compaction + + + + + code for Byte compaction + + + + + code for Numeric compaction + + + + + Text compaction submode Alpha + + + + + Text compaction submode Lower + + + + + Text compaction submode Mixed + + + + + Text compaction submode Punctuation + + + + + mode latch to Text Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters NOT a multiple of 6) + + + + + mode latch to Numeric Compaction mode + + + + + mode shift to Byte Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters a multiple of 6) + + + + + identifier for a user defined Extended Channel Interpretation (ECI) + + + + + identifier for a general purpose ECO format + + + + + identifier for an ECI of a character set of code page + + + + + Raw code table for text compaction Mixed sub-mode + + + + + Raw code table for text compaction: Punctuation sub-mode + + + + + Performs high-level encoding of a PDF417 message using the algorithm described in annex P + of ISO/IEC 15438:2001(E). If byte compaction has been selected, then only byte compaction + is used. + + the message + compaction mode to use + character encoding used to encode in default or byte compaction + or null for default / not applicable + if true, don't add an ECI segment for different encodings than default + the encoded message (the char values range from 0 to 928) + + + + Encode parts of the message using Text Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.2. + + the message + the start position within the message + the number of characters to encode + receives the encoded codewords + should normally be SUBMODE_ALPHA + the text submode in which this method ends + + + + + Encode parts of the message using Byte Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.3. The Unicode characters will be converted to binary using the cp437 + codepage. + + the message converted to a byte array + the start position within the message + the number of bytes to encode + the mode from which this method starts + receives the encoded codewords + + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using text compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using binary compaction. + + the message + the message converted to a byte array + the start position within the message + + the requested character count + + + + Represents possible PDF417 barcode compaction types. + + + + + + + + + + + + + + + + + + + + + + + + + defines the level of the error correction / count of error correction codewords + + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + The maximum distance to search in the codeword array in both the positive and negative directions + + + + + Initializes a new instance of the class. + + The Bounding Box around the column (in the BitMatrix) + + + + Converts the Image's Row to the index in the Codewords array + + The Codeword Index. + Image row. + + + + Converts the Codeword array index into a Row in the Image (BitMatrix) + + The Image Row. + Codeword index. + + + + Gets the codeword for a given row + + The codeword. + Image row. + + + + Gets the codeword closest to the specified row in the image + + Image row. + + + + Sets the codeword for an image row + + Image row. + Codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + The Bounding Box around the column (in the BitMatrix) + + The box. + + + + The Codewords the Box encodes for, offset by the Box minY. + Remember to Access this ONLY through GetCodeword(imageRow) if you're accessing it in that manner. + + The codewords. + + + + Initializes a new instance of the class. + + Box. + If set to true is left. + + + + Sets the Row Numbers as Inidicator Columns + + + + + TODO implement properly + TODO maybe we should add missing codewords to store the correct row number to make + finding row numbers for other columns easier + use row height count to make detection of invalid row numbers more reliable + + The indicator column row numbers. + Metadata. + + + + Gets the row heights. + + The row heights. + + + + Adjusts the in omplete indicator column row numbers. + + Metadata. + + + + Gets the barcode metadata. + + The barcode metadata. + + + + Prune the codewords which do not match the metadata + TODO Maybe we should keep the incorrect codewords for the start and end positions? + + Codewords. + Metadata. + + + + Returns a that represents the current . + + A that represents the current . + + + + Gets or sets a value indicating whether this instance is the left indicator + + true if this instance is left; otherwise, false. + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + These are a set of hints that you may pass to Writers to specify their behavior. + + dswitkin@google.com (Daniel Switkin) + + + + Specifies the width of the barcode image + type: + + + + + Specifies the height of the barcode image + type: + + + + + Don't put the content string into the output image. + type: + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + + For Aztec it is of type , representing the minimal percentage of error correction words. + In all cases, it can also be a representation of the desired value as well. + Note: an Aztec symbol should have a minimum of 25% EC words. + For PDF417 it is of type or (between 0 and 8), + + + + + Specifies what character encoding to use where applicable. + type: + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + type: , or representation of the integer value + + + + + Specifies the aspect ratio to use. Default is 4. + type: , or 1-4. + + + + + Specifies whether to use compact mode for PDF417 + type: , or "true" or "false" + value + + + + + Specifies what compaction mode to use for PDF417. + type: or value of one of its + enum values + + + + + Specifies the minimum and maximum number of rows and columns for PDF417. + type: + + + + + Don't append ECI segment. + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + type: + + + + + Specifies the matrix shape for Data Matrix (type ) + + + + + Specifies a minimum barcode size (type ). Only applicable to Data Matrix now. + + + + + Specifies a maximum barcode size (type ). Only applicable to Data Matrix now. + + + + + if true, don't switch to codeset C for numbers + + + + + Specifies the default encodation for Data Matrix (type ) + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Specifies the required number of layers for an Aztec code. + A negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + type: , or representation of the integer value + + + + + Specifies the exact version of QR code to be encoded. + (Type , or representation of the integer value). + + + + + Specifies whether the data should be encoded to the GS1 standard + type: , or "true" or "false" + value + + + + + Parses strings of digits that represent a UPC code. + + dswitkin@google.com (Daniel Switkin) + + + + Represents the type of data encoded by a barcode -- from plain text, to a + URI, to an e-mail address, etc. + + Sean Owen + + + This class hierarchy provides a set of methods to convert luminance data to 1 bit data. + It allows the algorithm to vary polymorphically, for example allowing a very expensive + thresholding technique for servers and a fast one for mobile. It also permits the implementation + to vary, e.g. a JNI version for Android and a Java fallback version for other platforms. + + dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The source. + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + For callers which only examine one row of pixels at a time, the same BitArray should be reused + and passed in with each call for performance. However it is legal to keep more than one row + at a time if needed. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + A new concrete Binarizer implementation object. + + + + Gets the luminance source object. + + + + Converts a 2D array of luminance data to 1 bit data. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + + Gets the width of the luminance source object. + + + + + Gets the height of the luminance source object. + + + + + A smart class to encode some content to a barcode image + + + + + A base class for specific barcode writers with specific formats of barcode images. + + The type of the output. + + + + A base class for specific barcode writers with specific formats of barcode images. + + + + + + + + + + + + + + + + Encodes the specified contents and returns a BitMatrix array. + That array has to be rendered manually or with a IBarcodeRenderer. + + The contents. + + + + + Gets or sets the barcode format. + The value is only suitable if the MultiFormatWriter is used. + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + The matrix. + + + + + Encodes the specified contents and returns a rendered instance of the barcode. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The matrix. + + + + + Gets or sets the renderer which should be used to render the encoded BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + Interface for a smart class to encode some content into a barcode + + + + + Encodes the specified contents. + + The contents. + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Initializes a new instance of the class. + + + + + Contains conversion support elements such as classes, interfaces and static methods. + + + + + Copies an array of chars obtained from a String into a specified array of chars + + The String to get the chars from + Position of the String to start getting the chars + Position of the String to end getting the chars + Array to return the chars + Position of the destination array of chars to start storing the chars + An array of chars + + + + Sets the capacity for the specified List + + The List which capacity will be set + The new capacity value + + + + Converts a string-Collection to an array + + The strings. + + + + + Joins all elements to one string. + + + The separator. + The values. + + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The value. + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The start index. + The end index. + The value. + + + + + + + + + + + + + + + + + + Savely gets the value of a decoding hint + if hints is null the default is returned + + + The hints. + Type of the hint. + The @default. + + + + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + Encode "bytes" with the error correction level "ecLevel". The encoding mode will be chosen + internally by chooseMode(). On success, store the result in "qrCode". + We recommend you to use QRCode.EC_LEVEL_L (the lowest level) for + "getECLevel" since our primary use is to show QR code on desktop screens. We don't need very + strong error correction for this purpose. + Note that there is no way to encode bytes in MODE_KANJI. We might want to add EncodeWithMode() + with which clients can specify the encoding mode. For now, we don't need the functionality. + + text to encode + error correction level to use + representing the encoded QR code + + + + Encodes the specified content. + + The content. + The ec level. + The hints. + + + + + Decides the smallest version of QR code that will contain all of the provided data. + + if the data cannot fit in any version + + + + Gets the alphanumeric code. + + The code. + the code point of the table used in alphanumeric mode or + -1 if there is no corresponding code in the table. + + + + Chooses the mode. + + The content. + + + + + Choose the best mode by examining the content. Note that 'encoding' is used as a hint; + if it is Shift_JIS, and the input is only double-byte Kanji, then we return {@link Mode#KANJI}. + + The content. + The encoding. + + + + + true if the number of input bits will fit in a code with the specified version and error correction level. + + + + Terminate bits as described in 8.4.8 and 8.4.9 of JISX0510:2004 (p.24). + + The num data bytes. + The bits. + + + + Get number of data bytes and number of error correction bytes for block id "blockID". Store + the result in "numDataBytesInBlock", and "numECBytesInBlock". See table 12 in 8.5.1 of + JISX0510:2004 (p.30) + + The num total bytes. + The num data bytes. + The num RS blocks. + The block ID. + The num data bytes in block. + The num EC bytes in block. + + + + Interleave "bits" with corresponding error correction bytes. On success, store the result in + "result". The interleave rule is complicated. See 8.6 of JISX0510:2004 (p.37) for details. + + The bits. + The num total bytes. + The num data bytes. + The num RS blocks. + + + + + Append mode info. On success, store the result in "bits". + + The mode. + The bits. + + + + Append length info. On success, store the result in "bits". + + The num letters. + The version. + The mode. + The bits. + + + + Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits". + + The content. + The mode. + The bits. + The encoding. + + +

Encapsulates an alignment pattern, which are the smaller square patterns found in + all but the simplest QR Codes.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Determines if this alignment pattern "about equals" an alignment pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing an average of the two. + + The i. + The j. + New size of the module. + + + + + PDF417 error correction code following the algorithm described in ISO/IEC 15438:2001(E) in + chapter 4.10. + + + + + Tables of coefficients for calculating error correction words + (see annex F, ISO/IEC 15438:2001(E)) + + + + + Determines the number of error correction codewords for a specified error correction + level. + + the error correction level (0-8) + the number of codewords generated for error correction + + + + Determines the error correction level for AUTO + + The error correction level (0-9) + The number of codewords for AUTO errorCorrectionLevel + the number of codewords generated for error correction + + + + Returns the recommended minimum error correction level as described in annex E of + ISO/IEC 15438:2001(E). + + the number of data codewords + the recommended minimum error correction level + + + + Generates the error correction codewords according to 4.10 in ISO/IEC 15438:2001(E). + + the data codewords + the error correction level (0-8) + the String representing the error correction codewords + + + + defines the level of the error correction / count of error correction codewords + + + + + A Bounding Box helper class + + Guenther Grau + + + + Initializes a new instance of the class. + returns null if the corner points don't match up correctly + + The image. + The top left. + The bottom left. + The top right. + The bottom right. + + + + + Creates the specified box. + + The box. + + + + + Initializes a new instance of the class. + Will throw an exception if the corner points don't match up correctly + + Image. + Top left. + Top right. + Bottom left. + Bottom right. + + + + Merge two Bounding Boxes, getting the left corners of left, and the right corners of right + (Images should be the same) + + Left. + Right. + + + + Adds the missing rows. + + The missing rows. + Missing start rows. + Missing end rows. + If set to true is left. + + + + Calculates the minimum and maximum X & Y values based on the corner points. + + + + + If we adjust the width, set a new right corner coordinate and recalculate + + Bottom right. + + + + Adapted from listings in ISO/IEC 24724 Appendix B and Appendix G. + + + + + Gets the RS svalue. + + The widths. + Width of the max. + if set to true [no narrow]. + + + + + Encapsulates a since character value in an RSS barcode, including its checksum information. + + + + + Initializes a new instance of the class. + + The value. + The checksum portion. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Gets the value. + + + + + Gets the checksum portion. + + + + + Decodes MSI barcodes. + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. + + + + + Creates a reader that can be configured to check the last character as a check digit, + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + +

Encapsulates logic that can detect a Data Matrix Code in an image, even if the Data Matrix Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + +

Detects a Data Matrix Code in an image.

+
+ encapsulating results of detecting a Data Matrix Code or null +
+ + + Calculates the position of the white top right module using the output of the rectangle detector + for a rectangular matrix + + + + + Calculates the position of the white top right module using the output of the rectangle detector + for a square matrix + + + + + Increments the Integer associated with a key by one. + + + + + Counts the number of black/white transitions between two points, using something like Bresenham's algorithm. + + + + + Simply encapsulates two points and a number of transitions between them. + + + + + Orders ResultPointsAndTransitions by number of transitions, ascending. + + + + +

This class contains utility methods for performing mathematical operations over + the Galois Fields. Operations use a given primitive polynomial in calculations.

+

Throughout this package, elements of the GF are represented as an {@code int} + for convenience and speed (but at the cost of memory). +

+
+ Sean Owen +
+ + + Create a representation of GF(size) using the given primitive polynomial. + + irreducible polynomial whose coefficients are represented by + * the bits of an int, where the least-significant bit represents the constant + * coefficient + the size of the field + the factor b in the generator polynomial can be 0- or 1-based + * (g(x) = (x+a^b)(x+a^(b+1))...(x+a^(b+2t-1))). + * In most cases it should be 1, but for QR code it is 0. + + + + Builds the monomial. + + The degree. + The coefficient. + the monomial representing coefficient * x^degree + + + + Implements both addition and subtraction -- they are the same in GF(size). + + sum/difference of a and b + + + + Exps the specified a. + + 2 to the power of a in GF(size) + + + + Logs the specified a. + + A. + base 2 log of a in GF(size) + + + + Inverses the specified a. + + multiplicative inverse of a + + + + Multiplies the specified a with b. + + A. + The b. + product of a and b in GF(size) + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Gets the size. + + + + + Gets the generator base. + + + + + Represents a parsed result that encodes wifi network information, like SSID and password. + + Vikram Aggarwal + + + + Represents a parsed result that encodes a geographic coordinate, with latitude, longitude and altitude. + + Sean Owen + + + latitude in degrees + + + + longitude in degrees + + + + altitude in meters. If not specified, in the geo URI, returns 0.0 + + + + query string associated with geo URI or null if none exists + + + + the geo URI + + + + a URI link to Google Maps which display the point on the Earth described + by this instance, and sets the zoom level in a way that roughly reflects the + altitude, if specified + + + + + Enumerates barcode formats known to this package. + + Sean Owen + + + Aztec 2D barcode format. + + + CODABAR 1D format. + + + Code 39 1D format. + + + Code 93 1D format. + + + Code 128 1D format. + + + Data Matrix 2D barcode format. + + + EAN-8 1D format. + + + EAN-13 1D format. + + + ITF (Interleaved Two of Five) 1D format. + + + MaxiCode 2D barcode format. + + + PDF417 format. + + + QR Code 2D barcode format. + + + RSS 14 + + + RSS EXPANDED + + + UPC-A 1D format. + + + UPC-E 1D format. + + + UPC/EAN extension format. Not a stand-alone format. + + + MSI + + + Plessey + + + Intelligent Mail barcode + + + + UPC_A | UPC_E | EAN_13 | EAN_8 | CODABAR | CODE_39 | CODE_93 | CODE_128 | ITF | RSS_14 | RSS_EXPANDED + without MSI (to many false-positives) and IMB (not enough tested, and it looks more like a 2D) + + + + + Renders an Aztec code as a + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + This implementation can detect and decode Aztec codes in an image. + + David Olivier + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + a String representing the content encoded by the Data Matrix code + + + + + Locates and decodes a Data Matrix code in an image. + + image of barcode to decode + passed as a {@link java.util.Hashtable} from {@link com.google.zxing.DecodeHintType} + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + The general exception class throw when something goes wrong during decoding of a barcode. + This includes, but is not limited to, failing checksums / error correction algorithms, being + unable to locate finder timing patterns, and so on. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class. + + The inner exception. + + + + Initializes a new instance of the class. + + The inner exception. + + + + + JAVAPORT: The original code was a 2D array of ints, but since it only ever gets assigned + 0, 1 and 2 I'm going to use less memory and go with bytes. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Sets the specified x. + + The x. + The y. + The value. + + + + Sets the specified x. + + The x. + The y. + if set to true [value]. + + + + Clears the specified value. + + The value. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Gets the height. + + + + + Gets the width. + + + + + Gets or sets the with the specified x. + + + + + an internal representation as bytes, in row-major order. array[y][x] represents point (x,y) + + + + + Jacob Haynes + + + + + Creates a Barcode row of the width + + The width. + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + A boolean which is true if the bar black false if it is white + How many spots wide the bar is. + + + + + This function scales the row + + How much you want the image to be scaled, must be greater than or equal to 1. + the scaled row + + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Superclass of implementations that read barcodes in the RSS family of formats. + + + + + Initializes a new instance of the class. + + + + + Gets the decode finder counters. + + + + + + Gets the data character counters. + + + + + + Gets the odd rounding errors. + + + + + + Gets the even rounding errors. + + + + + + Gets the odd counts. + + + + + + Gets the even counts. + + + + + + Parses the finder value. + + The counters. + The finder patterns. + The value. + + + + + Counts the specified array. + + The array. + + + + + Increments the specified array. + + The array. + The errors. + + + + Decrements the specified array. + + The array. + The errors. + + + + Determines whether [is finder pattern] [the specified counters]. + + The counters. + + true if [is finder pattern] [the specified counters]; otherwise, false. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + This object renders a MSI code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Implements decoding of the EAN-13 format.

+ + dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Initializes a new instance of the class. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + Based on pattern of odd-even ('L' and 'G') patterns used to encoded the explicitly-encoded + digits in a barcode, determines the implicitly encoded first digit and adds it to the + result string. + + string to insert decoded first digit into + int whose bits indicates the pattern of odd/even L/G patterns used to + encode digits + -1 if first digit cannot be determined + + + + Get the format of this decoder. + The 1D format. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Error Correction Code for ECC200. + + + + + Lookup table which factors to use for which number of error correction codewords. + See FACTORS. + + + + + Precomputed polynomial factors for ECC 200. + + + + + Creates the ECC200 error correction for an encoded message. + + The codewords. + information about the symbol to be encoded + the codewords with interleaved error correction. + + + +

Encapsulates a block of data within a Data Matrix Code. Data Matrix Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ + bbrown@google.com (Brian Brown) +
+
+ + +

When Data Matrix Codes use multiple data blocks, they actually interleave the bytes of each of them. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ + bytes as read directly from the Data Matrix Code + version of the Data Matrix Code + DataBlocks containing original bytes, "de-interleaved" from representation in the + Data Matrix Code +
+
+ + + Implements Reed-Solomon encoding, as the name implies. + + Sean Owen + William Rucklidge + + + This Binarizer implementation uses the old ZXing global histogram approach. It is suitable + for low-end mobile devices which don't have enough CPU or memory to use a local thresholding + algorithm. However, because it picks a global black point, it cannot handle difficult shadows + and gradients. + + Faster mobile devices and all desktop applications should probably use HybridBinarizer instead. + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The source. + + + + Applies simple sharpening to the row data to improve performance of the 1D Readers. + + + + + + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + + A new concrete Binarizer implementation object. + + + + + Does not sharpen the data, as this call is intended to only be used by 2D Readers. + + + + +

Encapsulates the result of detecting a barcode in an image. This includes the raw + matrix of black/white pixels corresponding to the barcode, and possibly points of interest + in the image, like the location of finder patterns or corners of the barcode in the image.

+
+ Sean Owen +
+ + + initializing constructor + + + + + + + the detected bits + + + + + the pixel points where the result is found + + + + +

Represents a 2D matrix of bits. In function arguments below, and throughout the common + module, x is the column position, and y is the row position. The ordering is always x, y. + The origin is at the top-left.

+

Internally the bits are represented in a 1-D array of 32-bit ints. However, each row begins + with a new int. This is done intentionally so that we can copy out a row into a BitArray very + efficiently.

+

The ordering of bits is row-major. Within each int, the least significant bits are used first, + meaning they represent lower x values. This is compatible with BitArray's implementation.

+
+ Sean Owen + dswitkin@google.com (Daniel Switkin) +
+ + + Converts this ByteMatrix to a black and white bitmap. + + A black and white bitmap converted from this ByteMatrix. + + + + Creates an empty square . + + height and width + + + + Creates an empty square . + + bit matrix width + bit matrix height + + + + Interprets a 2D array of booleans as a , where "true" means an "on" bit. + + bits of the image, as a row-major 2D array. Elements are arrays representing rows + representation of image + + + +

Flips the given bit.

+
+ The horizontal component (i.e. which column) + The vertical component (i.e. which row) +
+ + + flip all of the bits, if shouldBeFlipped is true for the coordinates + + should return true, if the bit at a given coordinate should be flipped + + + + Exclusive-or (XOR): Flip the bit in this {@code BitMatrix} if the corresponding + mask bit is set. + + The mask. + + + Clears all bits (sets to false). + + +

Sets a square region of the bit matrix to true.

+ +
+ The horizontal position to begin at (inclusive) + + The vertical position to begin at (inclusive) + + The width of the region + + The height of the region + +
+ + A fast method to retrieve one row of data from the matrix as a BitArray. + + + The row to retrieve + + An optional caller-allocated BitArray, will be allocated if null or too small + + The resulting BitArray - this reference should always be used even when passing + your own row + + + + + Sets the row. + + row to set + {@link BitArray} to copy from + + + + Modifies this {@code BitMatrix} to represent the same but rotated 180 degrees + + + + + This is useful in detecting the enclosing rectangle of a 'pure' barcode. + + {left,top,width,height} enclosing rectangle of all 1 bits, or null if it is all white + + + + This is useful in detecting a corner of a 'pure' barcode. + + {x,y} coordinate of top-left-most 1 bit, or null if it is all white + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + The line separator. + + A that represents this instance. + + + + + Clones this instance. + + + + + The width of the matrix + + + + The height of the matrix + + + + This method is for compatibility with older code. It's only logical to call if the matrix + is square, so I'm throwing if that's not the case. + + + row/column dimension of this matrix + + + + + The rowsize of the matrix + + + +

Gets the requested bit, where true means black.

+ +
+ The horizontal component (i.e. which column) + + The vertical component (i.e. which row) + + value of given bit in matrix + +
+ + + The number's sign, where Positive also stands for the number zero. + + + + + A simple result type encapsulating a string that has no further interpretation. + + Sean Owen + + + Parses strings of digits that represent a ISBN. + + + jbreiden@google.com (Jeff Breidenbach) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + See ISBN-13 For Dummies + + The result. + + + + + Represents a parsed result that encodes extended product information as encoded by the RSS format, like weight, price, dates, etc. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + extension for kilogram weight type + + + + + extension for pounds weight type + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the raw text + + + + + the product id + + + + + the sscc + + + + + the lot number + + + + + the production date + + + + + the packaging date + + + + + the best before date + + + + + the expiration date + + + + + the weight + + + + + the weight type + + + + + the weight increment + + + + + the price + + + + + the price increment + + + + + the price currency + + + + + the uncommon AIs + + + + + the display representation (raw text) + + + + + A smart class to encode some content to raw pixel data + + + + + Initializes a new instance of the class. + + + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + + + converts the pixel data to a bitmap object + + + + + + the generated code as byte array of BGRA pixels + + + + + the width of the image + + + + + the height of the image + + + + + + + Satoru Takabayashi + Daniel Switkin + Sean Owen + + + + Apply mask penalty rule 1 and return the penalty. Find repetitive cells with the same color and + give penalty to them. Example: 00000 or 11111. + + The matrix. + + + + + Apply mask penalty rule 2 and return the penalty. Find 2x2 blocks with the same color and give + penalty to them. This is actually equivalent to the spec's rule, which is to find MxN blocks and give a + penalty proportional to (M-1)x(N-1), because this is the number of 2x2 blocks inside such a block. + + The matrix. + + + + + Apply mask penalty rule 3 and return the penalty. Find consecutive cells of 00001011101 or + 10111010000, and give penalty to them. If we find patterns like 000010111010000, we give + penalties twice (i.e. 40 * 2). + + The matrix. + + + + + Apply mask penalty rule 4 and return the penalty. Calculate the ratio of dark cells and give + penalty if the ratio is far from 50%. It gives 10 penalty for 5% distance. + + The matrix. + + + + + Return the mask bit for "getMaskPattern" at "x" and "y". See 8.8 of JISX0510:2004 for mask + pattern conditions. + + The mask pattern. + The x. + The y. + + + + + Helper function for applyMaskPenaltyRule1. We need this for doing this calculation in both + vertical and horizontal orders respectively. + + The matrix. + if set to true [is horizontal]. + + + +

Encapsulates a QR Code's format information, including the data mask used and + error correction level.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + +
+ + See ISO 18004:2006, Annex C, Table C.1 + + + Offset i holds the number of 1 bits in the binary representation of i + + + + Decodes the format information. + + format info indicator, with mask still applied + The masked format info2. + + information about the format it specifies, or null + if doesn't seem to match any known pattern + + + +

Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations + of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix, + including areas used for finder patterns, timing patterns, etc. These areas should be unused + after the point they are unmasked anyway.

+ +

Note that the diagram in section 6.8.1 is misleading since it indicates that i is column position + and j is row position. In fact, as the text says, i is row position and j is column position.

+ +
+ Sean Owen +
+ + See ISO 18004:2006 6.8.1 + + +

Implementations of this method reverse the data masking process applied to a QR Code and + make its bits ready to read.

+
+ + representation of QR Code bits + dimension of QR Code, represented by bits, being unmasked +
+ + + A Barcode Value for the PDF417 barcode. + The scanner will iterate through the bitmatrix, + and given the different methods or iterations + will increment a given barcode value's confidence. + + When done, this will return the values of highest confidence. + + Guenther Grau + + + + Incremenets the Confidence for a given value. (Adds an occurance of a value) + + + Value. + + + + Determines the maximum occurrence of a set value and returns all values which were set with this occurrence. + + an array of int, containing the values with the highest occurrence, or null, if no value was set. + + + + Returns the confience value for a given barcode value + + Barcode value. + + + @see UPCEANExtension2Support + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + one {@link ResultMetadataType} to appropriate value, or {@code null} if not known + + + + @see UPCEANExtension5Support + + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + + + + One row of an RSS Expanded Stacked symbol, consisting of 1+ expanded pairs. + + + + + Two rows are equal if they contain the same pairs in the same order. + + + + + Did this row of the image have to be reversed (mirrored) to recognize the pairs? + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + This object renders an EAN13 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + This object renders a CODE39 code as a . + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Decodes Code 39 barcodes. Supports "Full ASCII Code 39" if USE_CODE_39_EXTENDED_MODE is set.

+ Sean Owen + @see Code93Reader +
+
+ + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. It will not decoded "extended Code 39" sequences. + + + + + Creates a reader that can be configured to check the last character as a check digit. + It will not decoded "extended Code 39" sequences. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + + Creates a reader that can be configured to check the last character as a check digit, + or optionally attempt to decode "extended Code 39" sequences that are used to encode + the full ASCII character set. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + if true, will attempt to decode extended Code 39 sequences in the text. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + Returns a string with all possible characters + + + + + implements an Intelligent Mail barcode + Rishabh Hatgadkar + + + + + Encapsulates the result of decoding a matrix of bits. This typically + applies to 2D barcode formats. For now it contains the raw bytes obtained, + as well as a String interpretation of those bytes, if applicable. + Sean Owen + + + + + initializing constructor + + + + + + + + + initializing constructor + + + + + + + + + + + initializing constructor + + + + + + + + + + initializing constructor + + + + + + + + + + + + raw bytes representing the result, or null if not applicable + + + + + how many bits of are valid; typically 8 times its length + + + + + text representation of the result + + + + + list of byte segments in the result, or null if not applicable + + + + + name of error correction level used, or null if not applicable + + + + + gets a value which describe if structure append data was found + + + + + number of errors corrected, or null if not applicable + + + + + gives the sequence number of the result if structured append was found + + + + + number of erasures corrected, or null if not applicable + + + + + gives the parity information if structured append was found + + + + + Miscellanseous data value for the various decoders + + The other. + + + + Integer inefficiently represented internally using base-10 digits, in order to allow a + visual representation as a base-10 string. Only for internal use. + + + + + 10 numeration base for string representation, very inefficient for computations. + + + + + Maximum size for numbers is up to 10240 binary digits or approximately (safe to use) 3000 decimal digits. + The maximum size is, in fact, double the previously specified amount, in order to accommodate operations' + overflow. + + + + Integer constants + + + + The array of digits of the number. + + + + + The actual number of digits of the number. + + + + + The number sign. + + + + + Default constructor, intializing the Base10BigInteger with zero. + + + + + Constructor creating a new Base10BigInteger as a conversion of a regular base-10 long. + + The base-10 long to be converted + + + + Constructor creating a new Base10BigInteger as a copy of an existing Base10BigInteger. + + The Base10BigInteger to be copied + + + + Determines whether the specified Base10BigInteger is equal to the current Base10BigInteger. + + The Base10BigInteger to compare with the current Base10BigInteger + True if the specified Base10BigInteger is equal to the current Base10BigInteger, + false otherwise + + + + Determines whether the specified System.Object is equal to the current Base10BigInteger. + + The System.Object to compare with the current Base10BigInteger + True if the specified System.Object is equal to the current Base10BigInteger, + false otherwise + + + + Serves as a hash function for the Base10BigInteger type. + + A hash code for the current Base10BigInteger + + + + String representation of the current Base10BigInteger, converted to its base-10 representation. + + The string representation of the current Base10BigInteger + + + + Base10BigInteger inverse with respect to addition. + + The Base10BigInteger whose opposite is to be computed + The Base10BigInteger inverse with respect to addition + + + + Greater test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a > b, false otherwise + + + + Greater or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a >= b, false otherwise + + + + Smaller test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a < b, false otherwise + + + + Smaller or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a <= b, false otherwise + + + + Computes the absolute value of a Base10BigInteger. + + The Base10BigInteger whose absolute value is to be computed + The absolute value of the given BigInteger + + + + Addition operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the addition + + + + Subtraction operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the subtraction + + + + Multiplication operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the multiplication + + + + Implicit conversion operator from long to Base10BigInteger. + + The long to be converted to a Base10BigInteger + The Base10BigInteger converted from the given long + + + + Equality test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a == b, false otherwise + + + + Inequality test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a != b, false otherwise + + + + Greater test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a > b, false otherwise + + + + Smaller test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a < b, false otherwise + + + + Greater or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a >= b, false otherwise + + + + Smaller or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a <= b, false otherwise + + + + Base10BigInteger inverse with respect to addition. + + The Base10BigInteger whose opposite is to be computed + The Base10BigInteger inverse with respect to addition + + + + Addition operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the addition + + + + Subtraction operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the subtraction + + + + Multiplication operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the multiplication + + + + Incremetation by one operation of a Base10BigInteger. + + The Base10BigInteger to be incremented by one + The Base10BigInteger result of incrementing by one + + + + Decremetation by one operation of a Base10BigInteger. + + The Base10BigInteger to be decremented by one + The Base10BigInteger result of decrementing by one + + + + Adds two BigNumbers a and b, where a >= b, a, b non-negative. + + + + + Subtracts the Base10BigInteger b from the Base10BigInteger a, where a >= b, a, b non-negative. + + + + + Multiplies two Base10BigIntegers. + + + + + Sets the number sign. + + + + + Tries to parse results that are a URI of some kind. + + Sean Owen + + + +

Parses an "smtp:" URI result, whose format is not standardized but appears to be like: + smtp[:subject[:body]]}.

+

See http://code.google.com/p/zxing/issues/detail?id=536

+
+ Sean Owen +
+ + Implements the "MECARD" address book entry format. + + Supported keys: N, SOUND, TEL, EMAIL, NOTE, ADR, BDAY, URL, plus ORG + Unsupported keys: TEL-AV, NICKNAME + + Except for TEL, multiple values for keys are also not supported; + the first one found takes precedence. + + Our understanding of the MECARD format is based on this document: + + http://www.mobicode.org.tw/files/OMIA%20Mobile%20Bar%20Code%20Standard%20v3.2.1.doc + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + +

See + + DoCoMo's documentation about the result types represented by subclasses of this class.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + Implements KDDI AU's address book format. See + + http://www.au.kddi.com/ezfactory/tec/two_dimensions/index.html. + (Thanks to Yuzo for translating!) + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + class which represents the luminance values for a bitmap object + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class + with the image of a Bitmap instance + + The bitmap. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + Aztec result meta data. + + + + + + + + + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + This object extends LuminanceSource around an array of YUV data returned from the camera driver, + with the option to crop to a rectangle within the full data. This can be used to exclude + superfluous pixels around the perimeter and speed up decoding. + It works for any pixel format where the Y channel is planar and appears first, including + YCbCr_420_SP and YCbCr_422_SP. + @author dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The yuv data. + Width of the data. + Height of the data. + The left. + The top. + The width. + The height. + if set to true [reverse horiz]. + + + + Initializes a new instance of the class. + + The luminances. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Renders the cropped greyscale bitmap. + + + + + + creates a new instance + + + + + + + + + + + + + + + Whether this subclass supports cropping. + + + + width of image from {@link #renderThumbnail()} + + + + + height of image from {@link #renderThumbnail()} + + + + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Maximum Codewords (Data + Error). + + + + + Gets the bit count sum. + + The bit count sum. + Module bit count. + + + + Converts an ICollection<int> to an int[] + Carry-over from Java. Will likely remove and replace with the Generic .ToArray() method. + + The int array. + List. + + + + Translate the symbol into a codeword + + the codeword corresponding to the symbol. + encoded symbol to translate to a codeword + + + + The sorted table of all possible symbols. Extracted from the PDF417 + specification. The index of a symbol in this table corresponds to the + index into the codeword table. + + + + + This table contains to codewords for all symbols. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + The class holds the available options for the QrCodeWriter + + + + + if true, don't switch to codeset C for numbers + + + + + This class renders CodaBar as []. + + dsbnatut@gmail.com (Kazuki Nishiura) + + + +

Decodes Codabar barcodes.

+ + Bas Vijfwinkel +
+
+ + These represent the encodings of characters, as patterns of wide and narrow bars. The 7 least-significant bits of + each int correspond to the pattern of wide and narrow, with 1s representing "wide" and 0s representing narrow. + + + + Records the size of all runs of white and black pixels, starting with white. + This is just like recordPattern, except it records all the counters, and + uses our builtin "counters" member for storage. + + row to count from + + + + Encapsulates a type of hint that a caller may pass to a barcode reader to help it + more quickly or accurately decode it. It is up to implementations to decide what, + if anything, to do with the information that is supplied. + + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Unspecified, application-specific hint. Maps to an unspecified . + + + + + Image is a pure monochrome image of a barcode. Doesn't matter what it maps to; + use = true. + + + + + Image is known to be of one of a few possible formats. + Maps to a of s. + + + + + Spend more time to try to find a barcode; optimize for accuracy, not speed. + Doesn't matter what it maps to; use = true. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + + + The caller needs to be notified via callback when a possible + is found. Maps to a . + + + + + Assume MSI codes employ a check digit. Maps to . + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + Maps to . + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + 1D readers supporting rotation with TRY_HARDER enabled. + But BarcodeReader class can do auto-rotating for 1D and 2D codes. + Enabling that option prevents 1D readers doing double rotation. + BarcodeReader enables that option automatically if "global" auto-rotation is enabled. + Maps to . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to; + use . + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + The class holds the available options for the DatamatrixWriter + + + + + Specifies the matrix shape for Data Matrix + + + + + Specifies a minimum barcode size + + + + + Specifies a maximum barcode size + + + + + Specifies the default encodation + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + +

Represents a polynomial whose coefficients are elements of a GF. + Instances of this class are immutable.

+

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + the {@link GenericGF} instance representing the field to use + to perform computations + coefficients as ints representing elements of GF(size), arranged + from most significant (highest-power term) coefficient to least significant + if argument is null or empty, + or if leading coefficient is 0 and this is not a + constant polynomial (that is, it is not the monomial "0") + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + + + degree of this polynomial + + + + + Gets a value indicating whether this is zero. + + true iff this polynomial is the monomial "0" + + + + Represents a parsed result that encodes a Vehicle Identification Number (VIN). + + + + + State represents all information about a sequence necessary to generate the current output. + Note that a state is immutable. + + + + + Create a new state representing this state with a latch to a (not + necessary different) mode, and then a code. + + + + + Create a new state representing this state, with a temporary shift + to a different mode to output a single value. + + + + + Create a new state representing this state, but an additional character + output in Binary Shift mode. + + + + + Create the state identical to this one, but we are no longer in + Binary Shift mode. + + + + + Returns true if "this" state is better (or equal) to be in than "that" + state under all possible circumstances. + + + + + Generates Aztec 2D barcodes. + + Rustam Abdullaev + + + + Encodes the given binary content as an Aztec symbol + + input data string + Aztec symbol matrix with metadata + + + + Encodes the given binary content as an Aztec symbol + + input data string + minimal percentage of error check words (According to ISO/IEC 24778:2008, + a minimum of 23% + 3 words is recommended) + if non-zero, a user-specified value for the number of layers + + Aztec symbol matrix with metadata + + + + + A Codeword in the PDF417 barcode + + Guenther Grau + + + + Default value for the RowNumber (-1 being an invalid real number) + + + + + Initializes a new instance of the class. + + Start x. + End x. + Bucket. + Value. + + + + Determines whether this instance is valid row number the specified rowNumber. + + true if this instance is valid row number the specified rowNumber; otherwise, false. + Row number. + + + + Sets the row number as the row's indicator column. + + + + + Returns a that represents the current . + + A that represents the current . + + + + Gets the width. + + The width. + + + + Gets a value indicating whether this instance has valid row number. + + true if this instance has valid row number; otherwise, false. + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + This implementation can detect and decode multiple QR Codes in an image. + + + + + This implementation can detect and decode QR Codes in an image. + Sean Owen + + + + + Gets the decoder. + + + + + + Locates and decodes a QR code in an image. + + a String representing the content encoded by the QR code + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Simply encapsulates a width and height. + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + + + + + + the width + + + + + the height + + + + + Enumeration for encodation types + + + + +

The main class which implements Data Matrix Code decoding -- as opposed to locating and extracting + the Data Matrix Code from an image.

+ + bbrown@google.com (Brian Brown) +
+
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a Data Matrix Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+ + booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code + if the Data Matrix Code cannot be decoded +
+
+ + +

Decodes a Data Matrix Code represented as a . A 1 or "true" is taken + to mean a black module.

+
+ booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+ + data and error correction codewords + number of codewords that are data bytes +
+
+ + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. By keeping track of the + last black points it encountered, it determines the corners of the barcode. + + David Olivier + + + + Creates a WhiteRectangleDetector instance + + The image. + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + Creates a WhiteRectangleDetector instance + + barcode image to find a rectangle in + initial size of search area around center + x position of search center + y position of search center + + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + + Initializes a new instance of the class. + + The image. + if image is too small + + + + Initializes a new instance of the class. + + The image. + Size of the init. + The x. + The y. + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. + + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + recenters the points of a constant distance towards the center + + bottom most point + left most point + right most point + top most point + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + Determines whether a segment contains a black point + + min value of the scanned coordinate + max value of the scanned coordinate + value of fixed coordinate + set to true if scan must be horizontal, false if vertical + + true if a black point has been found, else false. + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Parses the "URLTO" result format, which is of the form "URLTO:[title]:[url]". + This seems to be used sometimes, but I am not able to find documentation + on its origin or official format? + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Parses a "geo:" URI result, which specifies a location on the surface of + the Earth as well as an optional altitude above the surface. See + + http://tools.ietf.org/html/draft-mayrhofer-geo-uri-00. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a calendar event at a certain time, optionally with attendees and a location. + + Sean Owen + + + + Determines whether [is start all day]. + + if start time was specified as a whole day + + + + Parses a string as a date. RFC 2445 allows the start and end fields to be of type DATE (e.g. 20081021) + or DATE-TIME (e.g. 20081021T123000 for local time, or 20081021T123000Z for UTC). + + The string to parse + + if not a date formatted string + + + + Gets the start. + + + + + event end , or null if event has no duration + + + + + Gets a value indicating whether this instance is end all day. + + true if end time was specified as a whole day + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Aztec 2D code representation + + Rustam Abdullaev + + + + Compact or full symbol indicator + + + + + Size in pixels (width and height) + + + + + Number of levels + + + + + Number of data codewords + + + + + The symbol image + + + + + Encapsulates logic that can detect an Aztec Code in an image, even if the Aztec Code + is rotated or skewed, or partially obscured. + + David Olivier + + + + Initializes a new instance of the class. + + The image. + + + + Detects an Aztec Code in an image. + + + + + Detects an Aztec Code in an image. + + if true, image is a mirror-image of original. + + encapsulating results of detecting an Aztec Code + + + + + Extracts the number of data layers and data blocks from the layer around the bull's eye + + bullEyeCornerPoints the array of bull's eye corners + + + + + Corrects the parameter bits using Reed-Solomon algorithm + + paremeter bits + compact true if this is a compact Aztec code + + + + + Finds the corners of a bull-eye centered on the passed point + This returns the centers of the diagonal points just outside the bull's eye + Returns [topRight, bottomRight, bottomLeft, topLeft] + + Center point + The corners of the bull-eye + + + + Finds a candidate center point of an Aztec code from an image + + the center point + + + + Gets the Aztec code corners from the bull's eye corners and the parameters. + + the array of bull's eye corners + the array of aztec code corners + + + + Creates a BitMatrix by sampling the provided image. + topLeft, topRight, bottomRight, and bottomLeft are the centers of the squares on the + diagonal just outside the bull's eye. + + The image. + The top left. + The bottom left. + The bottom right. + The top right. + + + + + Samples a line + + start point (inclusive) + end point (exclusive) + number of bits + the array of bits as an int (first bit is high-order bit of result) + + + + Determines whether [is white or black rectangle] [the specified p1]. + + The p1. + The p2. + The p3. + The p4. + true if the border of the rectangle passed in parameter is compound of white points only + or black points only + + + + Gets the color of a segment + + The p1. + The p2. + 1 if segment more than 90% black, -1 if segment is more than 90% white, 0 else + + + + Gets the coordinate of the first point with a different color in the given direction + + The init. + if set to true [color]. + The dx. + The dy. + + + + + Expand the square represented by the corner points by pushing out equally in all directions + + the corners of the square, which has the bull's eye at its center + the original length of the side of the square in the target bit matrix + the new length of the size of the square in the target bit matrix + the corners of the expanded square + + + +

The main class which implements QR Code decoding -- as opposed to locating and extracting + the QR Code from an image.

+
+ + Sean Owen + +
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a QR Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Decodes a QR Code represented as a {@link BitMatrix}. A 1 or "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+
+ data and error correction codewords + number of codewords that are data bytes + +
+ + Sean Owen + + + {@link BitMatrix} to parse + ReaderException if dimension is not >= 21 and 1 mod 4 + + +

Reads format information from one of its two locations within the QR Code.

+ +
+ {@link FormatInformation} encapsulating the QR Code's format info + + ReaderException if both format information locations cannot be parsed as + the valid encoding of format information + +
+ +

Reads version information from one of its two locations within the QR Code.

+ +
+ {@link Version} encapsulating the QR Code's version + + ReaderException if both version information locations cannot be parsed as + the valid encoding of version information + +
+ +

Reads the bits in the {@link BitMatrix} representing the finder pattern in the + correct order in order to reconstruct the codewords bytes contained within the + QR Code.

+ +
+ bytes encoded within the QR Code + + ReaderException if the exact number of bytes expected is not read +
+ + Revert the mask removal done while reading the code words. The bit matrix should revert to its original state. + + + Prepare the parser for a mirrored operation. + This flag has effect only on the {@link #readFormatInformation()} and the + {@link #readVersion()}. Before proceeding with {@link #readCodewords()} the + {@link #mirror()} method should be called. + + @param mirror Whether to read version and format information mirrored. + + + Mirror the bit matrix in order to attempt a second reading. + + + + The class holds the available options for the + + + + + Specifies whether to use compact mode for PDF417 (type ). + + + + + Specifies what compaction mode to use for PDF417 (type + ). + + + + + Specifies the minimum and maximum number of rows and columns for PDF417 (type + ). + + + + + Specifies what degree of error correction to use + + + + + Specifies what degree of error correction to use + + + + + Specifies what character encoding to use where applicable (type {@link String}) + + + + + Explicitly disables ECI segment when generating PDF417 Code + That is against the specification but some + readers have problems if the charset is switched from + CP437 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use different encodings + and the ECI segment is omitted. + + + + + Data object to specify the minimum and maximum number of rows and columns for a PDF417 barcode. + @author qwandor@google.com (Andrew Walbran) + + + + + Initializes a new instance of the class. + + The min cols. + The max cols. + The min rows. + The max rows. + + + + Gets the min cols. + + + + + Gets the max cols. + + + + + Gets the min rows. + + + + + Gets the max rows. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + MultiFormatReader is a convenience class and the main entry point into the library for most uses. + By default it attempts to decode all barcode formats that the library supports. Optionally, you + can provide a hints object to request different behavior, for example only decoding QR codes. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + This version of decode honors the intent of Reader.decode(BinaryBitmap) in that it + passes null as a hint to the decoders. However, that makes it inefficient to call repeatedly. + Use setHints() followed by decodeWithState() for continuous scan applications. + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the hints provided. Does not honor existing state. + + + The pixel data to decode + + The hints to use, clearing the previous state. + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the state set up by calling setHints() previously. Continuous scan + clients will get a large speed increase by using this instead of decode(). + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + + resets all specific readers + + + + This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls + to decodeWithState(image) can reuse the same set of readers without reallocating memory. This + is important for performance in continuous scan clients. + + + + + + A wrapper implementation of {@link LuminanceSource} which inverts the luminances it returns -- black becomes + white and vice versa, and each value becomes (255-value). + + Sean Owen + + + + Initializes a new instance of the class. + + The @delegate. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Inverts this instance. + + original delegate {@link LuminanceSource} since invert undoes itself + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff; + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + + + Whether this subclass supports cropping. + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + This object renders a Data Matrix code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + Guillaume Le Biller Added to zxing lib. + + + + encodes the content to a BitMatrix + + + + + + + + + + encodes the content to a BitMatrix + + + + + + + + + + + Encode the given symbol info to a bit matrix. + + The DataMatrix placement. + The symbol info to encode. + + + The bit matrix generated. + + + + Convert the ByteMatrix to BitMatrix. + + The input matrix. + The requested width of the image (in pixels) with the Datamatrix code + The requested height of the image (in pixels) with the Datamatrix code + The output matrix. + + + + This implementation can detect and decode Data Matrix codes in an image. + + bbrown@google.com (Brian Brown) + + + + + Locates and decodes a Data Matrix code in an image. + + + a String representing the content encoded by the Data Matrix code + + + + Locates and decodes a Data Matrix code in an image. + + + + a String representing the content encoded by the Data Matrix code + + + + does nothing here + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + This class implements a local thresholding algorithm, which while slower than the + GlobalHistogramBinarizer, is fairly efficient for what it does. It is designed for + high frequency images of barcodes with black data on white backgrounds. For this application, + it does a much better job than a global blackpoint with severe shadows and gradients. + However it tends to produce artifacts on lower frequency images and is therefore not + a good general purpose binarizer for uses outside ZXing. + + This class extends GlobalHistogramBinarizer, using the older histogram approach for 1D readers, + and the newer local approach for 2D readers. 1D decoding using a per-row histogram is already + inherently local, and only fails for horizontal gradients. We can revisit that problem later, + but for now it was not a win to use local blocks for 1D. + + This Binarizer is the default for the unit tests and the recommended class for library users. + dswitkin@google.com (Daniel Switkin) + + + + + initializing constructor + + + + + + creates a new instance + + + + + + + Calculates the final BitMatrix once for all requests. This could be called once from the + constructor instead, but there are some advantages to doing it lazily, such as making + profiling easier, and not doing heavy lifting when callers don't expect it. + + + + + For each 8x8 block in the image, calculate the average black point using a 5x5 grid + of the blocks around it. Also handles the corner cases (fractional blocks are computed based + on the last 8 pixels in the row/column which are also used in the previous block). + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + The black points. + The matrix. + + + + Applies a single threshold to an 8x8 block of pixels. + + The luminances. + The xoffset. + The yoffset. + The threshold. + The stride. + The matrix. + + + + Calculates a single black point for each 8x8 block of pixels and saves it away. + See the following thread for a discussion of this algorithm: + http://groups.google.com/group/zxing/browse_thread/thread/d06efa2c35a7ddc0 + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + + + + + gives the black matrix + + + + + Superclass of classes encapsulating types ECIs, according to "Extended Channel Interpretations" + 5.3 of ISO 18004. + + Sean Owen + + + ECI value + representing ECI of given value, or null if it is legal but unsupported + ArgumentException if ECI value is invalid + + + + the ECI value + + + + + A simple, fast array of bits, represented compactly by an array of ints internally. + + Sean Owen + + + + default constructor + + + + + initializing constructor + + desired size of the array + + + + Flips bit i. + + bit to set + + + + + Gets the next set. + + first bit to check + index of first bit that is set, starting from the given index, or size if none are set + at or beyond this given index + + + + see getNextSet(int) + + index to start looking for unset bit + index of next unset bit, or if none are unset until the end + + + Sets a block of 32 bits, starting at bit i. + + + first bit to set + + the new value of the next 32 bits. Note again that the least-significant bit + corresponds to bit i, the next-least-significant to i+1, and so on. + + + + + Sets a range of bits. + + start of range, inclusive. + end of range, exclusive + + + Clears all bits (sets to false). + + + Efficient method to check if a range of bits is set, or not set. + + + start of range, inclusive. + + end of range, exclusive + + if true, checks that bits in range are set, otherwise checks that they are not set + + true iff all bits are set or not set in range, according to value argument + if end is less than start or the range is not contained in the array + + + + Appends the bit. + + The bit. + + + + Appends the least-significant bits, from value, in order from most-significant to + least-significant. For example, appending 6 bits from 0x000001E will append the bits + 0, 1, 1, 1, 1, 0 in that order. + + containing bits to append + bits from value to append + + + + adds the array to the end + + + + + + XOR operation + + + + + + converts to bytes. + + first bit to start writing + array to write into. Bytes are written most-significant byte first. This is the opposite + of the internal representation, which is exposed by BitArray + position in array to start writing + how many bytes to write + + + Reverses all bits in the array. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Erstellt ein neues Objekt, das eine Kopie der aktuellen Instanz darstellt. + + + Ein neues Objekt, das eine Kopie dieser Instanz darstellt. + + + + + size of the array, number of elements + + + + + size of the array in bytes + + + + + index accessor + + + + + + underlying array of ints. The first element holds the first 32 bits, and the least + significant bit is bit 0. + + + +

Parses an "sms:" URI result, which specifies a number to SMS and optional + "via" number. See + the IETF draft on this.

+ +

This actually also parses URIs starting with "mms:", "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + + Parses strings of digits that represent a RSS Extended code. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + tries to parse a text representation to a specific result object + + + + + + + Extends with more information specific to the Aztec format, + like the number of layers and whether it's compact. + + + + + Initializes a new instance of the class. + + The bits. + The points. + if set to true [compact]. + The nb datablocks. + The nb layers. + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + Encapsulates the result of decoding a barcode within an image. + + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + The timestamp. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + The timestamp. + + + + Adds one metadata to the result + + The type. + The value. + + + + Adds a list of metadata to the result + + The metadata. + + + + Adds the result points. + + The new points. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + raw text encoded by the barcode, if applicable, otherwise null + + + raw bytes encoded by the barcode, if applicable, otherwise null + + + + points related to the barcode in the image. These are typically points + identifying finder patterns or the corners of the barcode. The exact meaning is + specific to the type of barcode that was decoded. + + + + {@link BarcodeFormat} representing the format of the barcode that was decoded + + + + {@link Hashtable} mapping {@link ResultMetadataType} keys to values. May be + null. This contains optional metadata about what was detected about the barcode, + like orientation. + + + + + Gets the timestamp. + + + + + how many bits of are valid; typically 8 times its length + + + + + This object renders a QR Code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + PDF 417 Detector Result class. Skipped private backing stores. + Guenther Grau + + + + + Initializes a new instance of the class. + + Bits. + Points. + + + + + + Sean Owen + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + + + Adds another Modulus + + Other. + + + + Subtract another Modulus + + Other. + + + + Multiply by another Modulus + + Other. + + + + Returns a Negative version of this instance + + + + + Multiply by a Scalar. + + Scalar. + + + + Multiplies by a Monomial + + The by monomial. + Degree. + Coefficient. + + + + Returns a that represents the current . + + A that represents the current . + + + + Gets the coefficients. + + The coefficients. + + + + degree of this polynomial + + + + + Gets a value indicating whether this instance is zero. + + true if this polynomial is the monomial "0" + + + + + Metadata about a PDF417 Barcode + + Guenther Grau + + + + Decodes RSS-14, including truncated and stacked variants. See ISO/IEC 24724:2006. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + This object renders a Plessey code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + This object renders an EAN8 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + + + a byte array of horizontal pixels (false = white, true = black) + + + + +

Implements decoding of the EAN-8 format.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Get the format of this decoder. + The 1D format. + + + + This is a factory class which finds the appropriate Writer subclass for the BarcodeFormat + requested and encodes the barcode with the supplied contents. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + encode the given data + + + + + + + + + + encode the given data + + + + + + + + + + + Gets the collection of supported writers. + + + + + This implementation can detect and decode a MaxiCode in an image. + + + + + Locates and decodes a MaxiCode in an image. + + a String representing the content encoded by the MaxiCode + if a MaxiCode cannot be decoded + + + + + Locates and decodes a MaxiCode within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + + Symbol info table for DataMatrix. + + + + Overrides the symbol info set used by this class. Used for testing purposes. + + @param override the symbol info set to use + + + + DataMatrix ECC 200 data encoder following the algorithm described in ISO/IEC 16022:200(E) in + annex S. + + + + + Padding character + + + + + mode latch to C40 encodation mode + + + + + mode latch to Base 256 encodation mode + + + + + FNC1 Codeword + + + + + Structured Append Codeword + + + + + Reader Programming + + + + + Upper Shift + + + + + 05 Macro + + + + + 06 Macro + + + + + mode latch to ANSI X.12 encodation mode + + + + + mode latch to Text encodation mode + + + + + mode latch to EDIFACT encodation mode + + + + + ECI character (Extended Channel Interpretation) + + + + + Unlatch from C40 encodation + + + + + Unlatch from X12 encodation + + + + + 05 Macro header + + + + + 06 Macro header + + + + + Macro trailer + + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + the encoded message (the char values range from 0 to 255) + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + requested shape. May be {@code SymbolShapeHint.FORCE_NONE},{@code SymbolShapeHint.FORCE_SQUARE} or {@code SymbolShapeHint.FORCE_RECTANGLE}. + the minimum symbol size constraint or null for no constraint + the maximum symbol size constraint or null for no constraint + encoding mode to start with + the encoded message (the char values range from 0 to 255) + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + General math-related and numeric utility functions. + + + + + Ends up being a bit faster than {@link Math#round(float)}. This merely rounds its + argument to the nearest int, where x.5 rounds up to x+1. Semantics of this shortcut + differ slightly from {@link Math#round(float)} in that half rounds down for negative + values. -2.5 rounds to -3, not -2. For purposes here it makes no difference. + + real value to round + nearest int + + + + + + + + + + Euclidean distance between points A and B + + + + + + + + + + Euclidean distance between points A and B + + + + + values to sum + sum of values in array + + + Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1 + of ISO 18004. + + + Sean Owen + + + character set ECI value + representing ECI of given value, or null if it is legal but unsupported + + + character set ECI encoding name + representing ECI for character encoding, or null if it is legalbut unsupported + + + + Represents a parsed result that encodes an email message including recipients, subject and body text. + + Sean Owen + + + + the email address + + + + + the TOs + + + + + the CCs + + + + + the BCCs + + + + + the subject + + + + + the body + + + + + the mailto: uri + + + + + A smart class to encode some content to a svg barcode image + + + + + Initializes a new instance of the class. + + + + + A base class which covers the range of exceptions which may occur when encoding a barcode using + the Writer framework. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner exc. + + + + Renders a to a image + + + + + Interface for a class to convert a BitMatrix to an output image format + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + The options. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Gets or sets the foreground color. + + The foreground color. + + + + Gets or sets the background color. + + The background color. + + + + Gets or sets the text font. + + + The text font. + + + + + + + + satorux@google.com (Satoru Takabayashi) - creator + + + + + Set all cells to 2. 2 means that the cell is empty (not set yet). + + JAVAPORT: We shouldn't need to do this at all. The code should be rewritten to begin encoding + with the ByteMatrix initialized all to zero. + + The matrix. + + + + Build 2D matrix of QR Code from "dataBits" with "ecLevel", "version" and "getMaskPattern". On + success, store the result in "matrix" and return true. + + The data bits. + The ec level. + The version. + The mask pattern. + The matrix. + + + + Embed basic patterns. On success, modify the matrix and return true. + The basic patterns are: + - Position detection patterns + - Timing patterns + - Dark dot at the left bottom corner + - Position adjustment patterns, if need be + + The version. + The matrix. + + + + Embed type information. On success, modify the matrix. + + The ec level. + The mask pattern. + The matrix. + + + + Embed version information if need be. On success, modify the matrix and return true. + See 8.10 of JISX0510:2004 (p.47) for how to embed version information. + + The version. + The matrix. + + + + Embed "dataBits" using "getMaskPattern". On success, modify the matrix and return true. + For debugging purposes, it skips masking process if "getMaskPattern" is -1. + See 8.7 of JISX0510:2004 (p.38) for how to embed data bits. + + The data bits. + The mask pattern. + The matrix. + + + + Return the position of the most significant bit set (to one) in the "value". The most + significant bit is position 32. If there is no bit set, return 0. Examples: + - findMSBSet(0) => 0 + - findMSBSet(1) => 1 + - findMSBSet(255) => 8 + + The value_ renamed. + + + + + Calculate BCH (Bose-Chaudhuri-Hocquenghem) code for "value" using polynomial "poly". The BCH + code is used for encoding type information and version information. + Example: Calculation of version information of 7. + f(x) is created from 7. + - 7 = 000111 in 6 bits + - f(x) = x^2 + x^2 + x^1 + g(x) is given by the standard (p. 67) + - g(x) = x^12 + x^11 + x^10 + x^9 + x^8 + x^5 + x^2 + 1 + Multiply f(x) by x^(18 - 6) + - f'(x) = f(x) * x^(18 - 6) + - f'(x) = x^14 + x^13 + x^12 + Calculate the remainder of f'(x) / g(x) + x^2 + __________________________________________________ + g(x) )x^14 + x^13 + x^12 + x^14 + x^13 + x^12 + x^11 + x^10 + x^7 + x^4 + x^2 + -------------------------------------------------- + x^11 + x^10 + x^7 + x^4 + x^2 + + The remainder is x^11 + x^10 + x^7 + x^4 + x^2 + Encode it in binary: 110010010100 + The return value is 0xc94 (1100 1001 0100) + + Since all coefficients in the polynomials are 1 or 0, we can do the calculation by bit + operations. We don't care if coefficients are positive or negative. + + The value. + The poly. + + + + + Make bit vector of type information. On success, store the result in "bits" and return true. + Encode error correction level and mask pattern. See 8.9 of + JISX0510:2004 (p.45) for details. + + The ec level. + The mask pattern. + The bits. + + + + Make bit vector of version information. On success, store the result in "bits" and return true. + See 8.10 of JISX0510:2004 (p.45) for details. + + The version. + The bits. + + + + Check if "value" is empty. + + The value. + + true if the specified value is empty; otherwise, false. + + + + + Embed the lonely dark dot at left bottom corner. JISX0510:2004 (p.46) + + The matrix. + + + + + + The x start. + The y start. + The matrix. + + + + Embed position detection patterns and surrounding vertical/horizontal separators. + + The matrix. + + + + Embed position adjustment patterns if need be. + + The version. + The matrix. + + + +

Encapsulates logic that can detect a QR Code in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + +

Detects a QR Code in an image.

+
+ + encapsulating results of detecting a QR Code + +
+ + +

Detects a QR Code in an image.

+
+ optional hints to detector + + encapsulating results of detecting a QR Code + +
+ + + Processes the finder pattern info. + + The info. + + + +

Computes the dimension (number of modules on a size) of the QR Code based on the position + of the finder patterns and estimated module size.

+
+
+ + +

Computes an average estimated module size based on estimated derived from the positions + of the three finder patterns.

+
+ detected top-left finder pattern center + detected top-right finder pattern center + detected bottom-left finder pattern center + estimated module size +
+ +

Estimates module size based on two finder patterns -- it uses + {@link #sizeOfBlackWhiteBlackRunBothWays(int, int, int, int)} to figure the + width of each, measuring along the axis between their centers.

+
+
+ + See {@link #sizeOfBlackWhiteBlackRun(int, int, int, int)}; computes the total width of + a finder pattern by looking for a black-white-black run from the center in the direction + of another point (another finder pattern center), and in the opposite direction too. + + + +

This method traces a line from a point in the image, in the direction towards another point. + It begins in a black region, and keeps going until it finds white, then black, then white again. + It reports the distance from the start to this point.

+ +

This is used when figuring out how wide a finder pattern is, when the finder pattern + may be skewed or rotated.

+
+
+ + +

Attempts to locate an alignment pattern in a limited region of the image, which is + guessed to contain it. This method uses {@link AlignmentPattern}.

+
+ estimated module size so far + x coordinate of center of area probably containing alignment pattern + y coordinate of above + number of pixels in all directions to search from the center + + if found, or null otherwise + +
+ + + Gets the image. + + + + + Gets the result point callback. + + + + + Meta-data container for QR Code decoding. Instances of this class may be used to convey information back to the + decoding caller. Callers are expected to process this. + + + + + Initializes a new instance of the class. + + if set to true [mirrored]. + + + + Apply the result points' order correction due to mirroring. + + Array of points to apply mirror correction to. + + + + true if the QR Code was mirrored. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + This object renders a CODE93 code as a BitMatrix + + + + + + output to append to + start position + pattern to append + unused + 9 + + + +

Decodes Code 93 barcodes.

+ Sean Owen + +
+
+ + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +

In contrast to , this class will return an array of all possible + QR code locations in the image.

+ +

Use the TRY_HARDER hint to ask for a more thorough detection.

+ + Sean Owen + Hannes Erven +
+
+ + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF pixels/module in their + estimated modules sizes. + + + + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF_PERCENT percent in their + estimated modules sizes. + + + + +

Creates a finder that will search the image for three finder patterns.

+ + image to search +
+
+ + + + the 3 best s from our list of candidates. The "best" are + those that have been detected at least CENTER_QUORUM times, and whose module + size differs from the average among those patterns the least + + + + + A comparator that orders FinderPatterns by their estimated module size. + + + + +

MaxiCodes can encode text or structured information as bits in one of several modes, + with multiple character sets in one code. This class decodes the bits back into text.

+ + mike32767 + Manuel Kasten +
+
+ + + Defines an container for encoder options + + + + + Initializes a new instance of the class. + + + + + Gets the data container for all options + + + + + event is raised when a value is changed + + + + + Gets or sets a flag which cause a deeper look into the bitmap + + + true if [try harder]; otherwise, false. + + + + + Image is a pure monochrome image of a barcode. + + + true if monochrome image of a barcode; otherwise, false. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + The character set. + + + + + Image is known to be of one of a few possible formats. + Maps to a {@link java.util.List} of {@link BarcodeFormat}s. + + + The possible formats. + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + true if it should assume a Code 39 check digit; otherwise, false. + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). + + + true if it should assume GS1; otherwise, false. + + + + + Assume MSI codes employ a check digit. Maps to . + + + true if it should assume a MSI check digit; otherwise, false. + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + .NET 2.0 class for handling of very large integers, up to 10240 binary digits or + approximately (safe to use) 3000 decimal digits. + + + + + 2^16 numeration base for internal computations, in order to benefit the most from the + 32 bit (or 64 bit) integer processor registers. + + + + + Maximum size for numbers is up to 10240 binary digits or approximately (safe to use) 3000 decimal digits. + The maximum size is, in fact, double the previously specified amount, in order to accommodate operations's + overflow. + + + + + Ratio for the convertion of a BigInteger's size to a binary digits size. + + + + Integer constants + + + + The array of digits of the number. + + + + + The actual number of digits of the number. + + + + + The number sign. + + + + + Default constructor, intializing the BigInteger with zero. + + + + + Constructor creating a new BigInteger as a conversion of a regular base-10 long. + + The base-10 long to be converted + + + + Constructor creating a new BigInteger as a copy of an existing BigInteger. + + The BigInteger to be copied + + + + Constructor creating a BigInteger instance out of a base-10 formatted string. + + The base-10 formatted string. + Invalid numeric string exception + + + + Constructor creating a positive BigInteger by extracting it's digits from a given byte array. + + The byte array + The byte array's content exceeds the maximum size of a BigInteger + exception + + + + Determines whether the specified BigInteger is equal to the current BigInteger. + + The BigInteger to compare with the current BigInteger + True if the specified BigInteger is equal to the current BigInteger, + false otherwise + + + + Determines whether the specified System.Object is equal to the current BigInteger. + + The System.Object to compare with the current BigInteger + True if the specified System.Object is equal to the current BigInteger, + false otherwise + + + + Serves as a hash function for the BigInteger type. + + A hash code for the current BigInteger + + + + String representation of the current BigInteger, converted to its base-10 representation. + + The string representation of the current BigInteger + + + + Parses the number given by a string + + the number as a string + + + + + Compares this instance to a specified BigInteger. + + The BigInteger to compare this instance with + -1 if the current instance is smaller than the given BigInteger, + 0 if the two are equal, 1 otherwise + + + + Compares this instance to a specified object. + + The object to compare this instance with + -1 if the current instance is smaller than the given object, + 0 if the two are equal, 1 otherwise + obj is not a BigInteger exception + + + + Returns a BigInteger's size in binary digits. + + The BigInteger whose size in binary digits is to be determined + The BigInteger's size in binary digits + + + + BigInteger inverse with respect to addition. + + The BigInteger whose opposite is to be computed + The BigInteger inverse with respect to addition + + + + Greater test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a > b, false otherwise + + + + Greater or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a >= b, false otherwise + + + + Smaller test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a < b, false otherwise + + + + Smaller or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a <= b, false otherwise + + + + Computes the absolute value of a BigInteger. + + The BigInteger whose absolute value is to be computed + The absolute value of the given BigInteger + + + + Addition operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the addition + + + + Subtraction operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the subtraction + + + + Multiplication operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the multiplication + + + + Division operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the division + Cannot divide by zero exception + + + + Modulo operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the modulo + Cannot divide by zero exception + + + + Returns the power of a BigInteger base to a non-negative exponent by using the + fast exponentiation algorithm (right to left binary exponentiation). + + The BigInteger base + The non-negative exponent + The power of the BigInteger base to the non-negative exponent + Cannot raise a BigInteger to a negative power exception. + + + + Integer square root of the given BigInteger using Newton's numeric method. + + The BigInteger whose integer square root is to be computed + The integer square root of the given BigInteger + Cannot compute the integer square root of a negative number exception + + + + Euclidean algorithm for computing the greatest common divisor of two non-negative BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The greatest common divisor of the two given BigIntegers + Cannot compute the Gcd of negative BigIntegers exception + + + + Extended Euclidian Gcd algorithm, returning the greatest common divisor of two non-negative BigIntegers, + while also providing u and v, where: a*u + b*v = gcd(a,b). + + The 1st BigInteger + The 2nd BigInteger + Output BigInteger parameter, where a*u + b*v = gcd(a,b) + Output BigInteger parameter, where a*u + b*v = gcd(a,b) + The greatest common divisor of the two given BigIntegers + Cannot compute the Gcd of negative BigIntegers exception + + + + Computes the modular inverse of a given BigInteger. + + The non-zero BigInteger whose inverse is to be computed + The BigInteger modulus, which must be greater than or equal to 2 + The BigInteger equal to a^(-1) mod n + Invalid number or modulus exception + + + + Returns the power of a BigInteger to a non-negative exponent modulo n, by using the + fast exponentiation algorithm (right to left binary exponentiation) and modulo optimizations. + + The BigInteger base + The non-negative exponent + The modulus, which must be greater than or equal to 2 + The power of the BigInteger to the non-negative exponent + Invalid exponent or modulus exception + + + + Implicit conversion operator from long to BigInteger. + + The long to be converted to a BigInteger + The BigInteger converted from the given long + + + + Implicit conversion operator from int to BigInteger. + + The int to be converted to a BigInteger + The BigInteger converted from the given int + + + + Equality test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a == b, false otherwise + + + + Inequality test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a != b, false otherwise + + + + Greater test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a > b, false otherwise + + + + Smaller test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a < b, false otherwise + + + + Greater or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a >= b, false otherwise + + + + Smaller or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a <= b, false otherwise + + + + BigInteger inverse with respect to addition. + + The BigInteger whose opposite is to be computed + The BigInteger inverse with respect to addition + + + + Addition operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the addition + + + + Subtraction operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the subtraction + + + + Multiplication operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the multiplication + + + + Division operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the division + Cannot divide by zero exception + + + + Modulo operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the modulo + Cannot divide by zero exception + + + + Incremetation by one operation of a BigInteger. + + The BigInteger to be incremented by one + The BigInteger result of incrementing by one + + + + Decremetation by one operation of a BigInteger. + + The BigInteger to be decremented by one + The BigInteger result of decrementing by one + + + + Adds two BigNumbers a and b, where a >= b, a, b non-negative. + + + + + Subtracts the BigInteger b from the BigInteger a, where a >= b, a, b non-negative. + + + + + Multiplies two BigIntegers. + + + + + Divides a BigInteger by a one-digit int. + + + + + Divides a BigInteger by another BigInteger. + + + + + DivideByBigNumber auxiliary method. + + + + + DivideByBigNumber auxilary method. + + + + + DivideByBigNumber auxilary method. + + + + + Detects a result that is likely a vehicle identification number. + @author Sean Owen + + + +

QR Codes can encode text as bits in one of several modes, and can use multiple modes + in one QR Code. This class decodes the bits back into text.

+ +

See ISO 18004:2006, 6.4.3 - 6.4.7

+ Sean Owen +
+
+ + + See ISO 18004:2006, 6.4.4 Table 5 + + + + + See specification GBT 18284-2000 + + The bits. + The result. + The count. + + + +

Encapsulates a block of data within a QR Code. QR Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

When QR Codes use multiple data blocks, they are actually interleaved. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ +
+ bytes as read directly from the QR Code + + version of the QR Code + + error-correction level of the QR Code + + {@link DataBlock}s containing original bytes, "de-interleaved" from representation in the + QR Code + +
+ + + + + Guenther Grau + + + + Returns the DetectionResult Columns. This does a fair bit of calculation, so call it sparingly. + + The detection result columns. + + + + Adjusts the indicator column row numbers. + + Detection result column. + + + + return number of codewords which don't have a valid row number. Note that the count is not accurate as codewords . + will be counted several times. It just serves as an indicator to see when we can stop adjusting row numbers + + The row numbers. + + + + Adjusts the row numbers by row. + + The row numbers by row. + + + + Adjusts the row numbers from both Row Indicators + + zero + + + + Adjusts the row numbers from Right Row Indicator. + + The unadjusted row count. + + + + Adjusts the row numbers from Left Row Indicator. + + Unadjusted row Count. + + + + Adjusts the row number if valid. + + The invalid rows + Row indicator row number. + Invalid row counts. + Codeword. + + + + Adjusts the row numbers. + + Barcode column. + Codewords row. + Codewords. + + + + Adjusts the row number. + + true, if row number was adjusted, false otherwise. + Codeword. + Other codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + +

Attempts to locate multiple barcodes in an image by repeatedly decoding portion of the image. + After one barcode is found, the areas left, above, right and below the barcode's + {@link com.google.zxing.ResultPoint}s are scanned, recursively.

+

A caller may want to also employ {@link ByQuadrantReader} when attempting to find multiple + 2D barcodes, like QR Codes, in an image, where the presence of multiple barcodes might prevent + detecting any one of them.

+

That is, instead of passing a {@link Reader} a caller might pass + new ByQuadrantReader(reader).

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The @delegate. + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Thrown when a barcode was successfully detected, but some aspect of + the content did not conform to the barcode's format rules. This could have + been due to a mis-detection. + Sean Owen + + + + + + + + + + + + + + + + + + + + + + + + +

Parses an "smsto:" URI result, whose format is not standardized but appears to be like: + {@code smsto:number(:body)}.

+

This actually also parses URIs starting with "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+
+ Sean Owen +
+ + + Represents a parsed result that encodes an SMS message, including recipients, subject and body text. + + Sean Owen + + + + The class holds the available options for the + + + + + Representing the minimal percentage of error correction words. + Note: an Aztec symbol should have a minimum of 25% EC words. + + + + + Specifies the required number of layers for an Aztec code: + a negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + a positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + + + + + The main class which implements Aztec Code decoding -- as opposed to locating and extracting + the Aztec Code from an image. + + David Olivier + + + + Decodes the specified detector result. + + The detector result. + + + + + This method is used for testing the high-level encoder + + + + + + + Gets the string encoded in the aztec code bits + + The corrected bits. + the decoded string + + + + gets the table corresponding to the char passed + + The t. + + + + + Gets the character (or string) corresponding to the passed code in the given table + + the table used + the code of the character + + + + + Performs RS error correction on an array of bits. + + The rawbits. + the corrected array + + + + Gets the array of bits from an Aztec Code matrix + + The matrix. + the array of bits + + + + Reads a code of given length and at given index in an array of bits + + The rawbits. + The start index. + The length. + + + + + Reads a code of length 8 in an array of bits, padding with zeros + + + + + + + + Packs a bit array into bytes, most significant bit first + + + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + This class attempts to decode a barcode from an image, not by scanning the whole image, + but by scanning subsets of the image. This is important when there may be multiple barcodes in + an image, and detecting a barcode may find parts of multiple barcode and fail to decode + (e.g. QR Codes). Instead this scans the four quadrants of the image -- and also the center + 'quadrant' to cover the case where a barcode is found in the center. + + + + + + Initializes a new instance of the class. + + The @delegate. + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

The main class which implements MaxiCode decoding -- as opposed to locating and extracting + the MaxiCode from an image.

+ + Manuel Kasten +
+
+ + + Implements the "MATMSG" email message entry format. + + Supported keys: TO, SUB, BODY + + Sean Owen + + + + This implements only the most basic checking for an email address's validity -- that it contains + an '@' and contains no characters disallowed by RFC 2822. This is an overly lenient definition of + validity. We want to generally be lenient here since this class is only intended to encapsulate what's + in a barcode, not "judge" it. + + The email. + + true if it is basically a valid email address; otherwise, false. + + + + + Renders a barcode into a Svg image + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Gets or sets the foreground color. + + The foreground color. + + + + Gets or sets the background color. + + The background color. + + + + Gets or sets the font family name + + The font family name. + + + + Gets or sets the font size in pixel + + The font size in pixel. + + + + Represents a barcode as a Svg image + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The content. + + + + Gives the XML representation of the SVG image + + + + + Gets or sets the content. + + + The content. + + + + + The original height of the bitmatrix for the barcode + + + + + The original width of the bitmatrix for the barcode + + + + + Renders a to an byte array with pixel data (4 byte per pixel, BGRA) + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + +

PDF417 error correction implementation.

+

This example + is quite useful in understanding the algorithm.

+ Sean Owen + +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the specified received. + + received codewords + number of those codewords used for EC + location of erasures + The error locations count. + + + + + Runs the euclidean algorithm (Greatest Common Divisor) until r's degree is less than R/2 + + The euclidean algorithm. + + + + Finds the error locations as a direct application of Chien's search + + The error locations. + Error locator. + + + + Finds the error magnitudes by directly applying Forney's Formula + + The error magnitudes. + Error evaluator. + Error locator. + Error locations. + + + + This object renders a UPC-A code as a . + qwandor@google.com (Andrew Walbran) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + +

Implements decoding of the UPC-A format.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen +
+
+ + +

Like decodeRow(int, BitArray, java.util.Map), but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ + + + + +
+ + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Decodes the specified image. + + The image. + The hints. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + Get the format of this decoder. + The 1D format. + + + + + Enumeration for DataMatrix symbol shape hint. It can be used to force square or rectangular + symbols. + + + + + The Version object encapsulates attributes about a particular + size Data Matrix Code. + + bbrown@google.com (Brian Brown) + + + + + returns the version numer + + + + + + returns the symbol size rows + + + + + + returns the symbols size columns + + + + + + retursn the data region size rows + + + + + + returns the data region size columns + + + + + + returns the total codewords count + + + + + +

Deduces version information from Data Matrix dimensions.

+ + Number of rows in modules + Number of columns in modules + Version for a Data Matrix Code of those dimensions + if dimensions do correspond to a valid Data Matrix size +
+
+ + + returns the version number as string + + + + + + See ISO 16022:2006 5.5.1 Table 7 + + + + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the Data Matrix code version's format.

+
+
+ +

Implements Reed-Solomon decoding, as the name implies.

+ +

The algorithm will not be explained here, but the following references were helpful + in creating this implementation:

+ + + +

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+ +
+ Sean Owen + William Rucklidge + sanfordsquires +
+ + +

Decodes given set of received codewords, which include both data and error-correction + codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place, + in the input.

+
+ data and error-correction codewords + number of error-correction codewords available + false: decoding fails +
+ + + Partially implements the iCalendar format's "VEVENT" format for specifying a + calendar event. See RFC 2445. This supports SUMMARY, DTSTART and DTEND fields. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Parses contact information formatted according to the VCard (2.1) format. This is not a complete + implementation but should parse information as commonly encoded in 2D barcodes. + + Sean Owen + + + Formats name fields of the form "Public;John;Q.;Reverend;III" into a form like + "Reverend John Q. Public III". + + @param names name values to format, in place + + + + Represents a result that encodes an e-mail address, either as a plain address + like "joe@example.org" or a mailto: URL like "mailto:joe@example.org". + + Sean Owen + + + Implements the "BIZCARD" address book entry format, though this has been + largely reverse-engineered from examples observed in the wild -- still + looking for a definitive reference. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + +

Encapsulates information about finder patterns in an image, including the location of + the three finder patterns, and their estimated module size.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The pattern centers. + + + + Gets the bottom left. + + + + + Gets the top left. + + + + + Gets the top right. + + + + + See ISO 18004:2006 Annex D + + Sean Owen + + + See ISO 18004:2006 Annex D. + Element i represents the raw version bits that specify version i + 7 + + + + + Gets the EC blocks for level. + + The ec level. + + + +

Deduces version information purely from QR Code dimensions.

+ +
+ dimension in modules + + for a QR Code of that dimension or null +
+ + + Gets the version for number. + + The version number. + + + + See ISO 18004:2006 Annex E + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + See ISO 18004:2006 6.5.1 Table 9 + + + + Gets the version number. + + + + + Gets the alignment pattern centers. + + + + + Gets the total codewords. + + + + + Gets the dimension for version. + + + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + + Gets the EC blocks. + + + + + + Gets the EC codewords per block. + + + + + Gets the num blocks. + + + + + Gets the total EC codewords. + + + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the QR code version's format.

+
+
+ + + Gets the count. + + + + + Gets the data codewords. + + + + +

See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which + data can be encoded to bits in the QR code standard.

+
+ Sean Owen +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See GBT 18284-2000; "Hanzi" is a transliteration of this mode name. + + + + Fors the bits. + + four bits encoding a QR Code data mode + + encoded by these bits + + if bits do not correspond to a known mode + + + version in question + + number of bits used, in this QR Code symbol {@link Version}, to encode the + count of characters that will follow encoded in this {@link Mode} + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Gets the name. + + + + + Gets the bits. + + + + + enumeration for encoding modes + + + + + + + + + + numeric encoding + + + + + alpha-numeric encoding + + + + + structured append + + + + + byte mode encoding + + + + + ECI segment + + + + + Kanji mode + + + + + FNC1 char, first position + + + + + FNC1 char, second position + + + + + Hanzi mode + + + + + Top-level class for the logic part of the PDF417 implementation. + + + + + The start pattern (17 bits) + + + + + The stop pattern (18 bits) + + + + + The codeword table from the Annex A of ISO/IEC 15438:2001(E). + + + + + Calculates the necessary number of rows as described in annex Q of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol (r) + + + + Calculates the number of pad codewords as described in 4.9.2 of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol + the number of pad codewords + + + + Generates the barcode logic. + + the message to encode + PDF417 error correction level to use + + + + Determine optimal nr of columns and rows for the specified number of + codewords. + + number of code words + number of error correction code words + The longest dimension of the barcode, used for columns + The short dimension of the barcode, used for rows + The height of a row, will alter this parameter if aspectRatio>4 (aspectRatio==AUTO) + dimension object containing cols as width and rows as height + + + + Sets max/min row/col values + + maximum allowed columns + minimum allowed columns + maximum allowed rows + minimum allowed rows + + + + Sets compaction to values stored in enum + + compaction mode to use + + + + Sets compact to be true or false + + if true, enables compaction + + + + Sets output encoding. + + sets character encoding to use + + + + Sets the disable eci. + + if set to true don't add an ECI segment for different encodings than default. + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + +

A reader that can read all available UPC/EAN formats. If a caller wants to try to + read all such formats, it is most efficient to use this implementation rather than invoke + individual readers.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Records EAN prefix to GS1 Member Organization, where the member organization + correlates strongly with a country. This is an imperfect means of identifying + a country of origin by EAN-13 barcode value. See + + http://en.wikipedia.org/wiki/List_of_GS1_country_codes. + + Sean Owen + + + + +

Encapsulates logic that can detect one or more QR Codes in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+ + Sean Owen + Hannes Erven +
+
+ + + Initializes a new instance of the class. + + The image. + + + + Detects the multi. + + The hints. + + + + + BigInteger-related exception class. + + + + + BigIntegerException constructor. + + The exception message + The inner exception + + + + Represents a parsed result that encodes a telephone number. + + Sean Owen + + + + Represents a parsed result that encodes contact information, like that in an address book entry. + + Sean Owen + + + + initializing constructor + + + + + + + + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + the names + + + + + the nicknames + + + + + In Japanese, the name is written in kanji, which can have multiple readings. Therefore a hint + is often provided, called furigana, which spells the name phonetically. + + The pronunciation of the getNames() field, often in hiragana or katakana. + + + + the phone numbers + + + + optional descriptions of the type of each phone number. It could be like "HOME", but, + there is no guaranteed or standard format. + + + + the e-mail addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the instant messenger addresses + + + + + the note field + + + + + the addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the title + + + + + the urls + + + + birthday formatted as yyyyMMdd (e.g. 19780917) + + + a location as a latitude/longitude pair + +
+
diff --git a/packages/ZXing.Net.0.16.4/lib/net35/zxing.XML b/packages/ZXing.Net.0.16.4/lib/net35/zxing.XML new file mode 100644 index 0000000..37e8dec --- /dev/null +++ b/packages/ZXing.Net.0.16.4/lib/net35/zxing.XML @@ -0,0 +1,11693 @@ + + + + zxing + + + + + Extends with more information specific to the Aztec format, + like the number of layers and whether it's compact. + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + Initializes a new instance of the class. + + The bits. + The points. + if set to true [compact]. + The nb datablocks. + The nb layers. + + + + The main class which implements Aztec Code decoding -- as opposed to locating and extracting + the Aztec Code from an image. + + David Olivier + + + + Decodes the specified detector result. + + The detector result. + + + + + This method is used for testing the high-level encoder + + + + + + + Gets the string encoded in the aztec code bits + + The corrected bits. + the decoded string + + + + gets the table corresponding to the char passed + + The t. + + + + + Gets the character (or string) corresponding to the passed code in the given table + + the table used + the code of the character + + + + + Performs RS error correction on an array of bits. + + The rawbits. + the corrected array + + + + Gets the array of bits from an Aztec Code matrix + + The matrix. + the array of bits + + + + Reads a code of given length and at given index in an array of bits + + The rawbits. + The start index. + The length. + + + + + Reads a code of length 8 in an array of bits, padding with zeros + + + + + + + + Packs a bit array into bytes, most significant bit first + + + + + + + Encapsulates logic that can detect an Aztec Code in an image, even if the Aztec Code + is rotated or skewed, or partially obscured. + + David Olivier + + + + Initializes a new instance of the class. + + The image. + + + + Detects an Aztec Code in an image. + + + + + Detects an Aztec Code in an image. + + if true, image is a mirror-image of original. + + encapsulating results of detecting an Aztec Code + + + + + Extracts the number of data layers and data blocks from the layer around the bull's eye + + bullEyeCornerPoints the array of bull's eye corners + + + + + Corrects the parameter bits using Reed-Solomon algorithm + + paremeter bits + compact true if this is a compact Aztec code + + + + + Finds the corners of a bull-eye centered on the passed point + This returns the centers of the diagonal points just outside the bull's eye + Returns [topRight, bottomRight, bottomLeft, topLeft] + + Center point + The corners of the bull-eye + + + + Finds a candidate center point of an Aztec code from an image + + the center point + + + + Gets the Aztec code corners from the bull's eye corners and the parameters. + + the array of bull's eye corners + the array of aztec code corners + + + + Creates a BitMatrix by sampling the provided image. + topLeft, topRight, bottomRight, and bottomLeft are the centers of the squares on the + diagonal just outside the bull's eye. + + The image. + The top left. + The bottom left. + The bottom right. + The top right. + + + + + Samples a line + + start point (inclusive) + end point (exclusive) + number of bits + the array of bits as an int (first bit is high-order bit of result) + + + + Determines whether [is white or black rectangle] [the specified p1]. + + The p1. + The p2. + The p3. + The p4. + true if the border of the rectangle passed in parameter is compound of white points only + or black points only + + + + Gets the color of a segment + + The p1. + The p2. + 1 if segment more than 90% black, -1 if segment is more than 90% white, 0 else + + + + Gets the coordinate of the first point with a different color in the given direction + + The init. + if set to true [color]. + The dx. + The dy. + + + + + Expand the square represented by the corner points by pushing out equally in all directions + + the corners of the square, which has the bull's eye at its center + the original length of the side of the square in the target bit matrix + the new length of the size of the square in the target bit matrix + the corners of the expanded square + + + + Aztec 2D code representation + + Rustam Abdullaev + + + + Compact or full symbol indicator + + + + + Size in pixels (width and height) + + + + + Number of levels + + + + + Number of data codewords + + + + + The symbol image + + + + + represents a token for a binary shift + + + + + initializing constructor + + + + + + + + appends the byte array to the BitArray + + + + + + + string representation + + + + + + Generates Aztec 2D barcodes. + + Rustam Abdullaev + + + + Encodes the given binary content as an Aztec symbol + + input data string + Aztec symbol matrix with metadata + + + + Encodes the given binary content as an Aztec symbol + + input data string + minimal percentage of error check words (According to ISO/IEC 24778:2008, + a minimum of 23% + 3 words is recommended) + if non-zero, a user-specified value for the number of layers + + Aztec symbol matrix with metadata + + + + + This produces nearly optimal encodings of text into the first-level of + encoding used by Aztec code. + It uses a dynamic algorithm. For each prefix of the string, it determines + a set of encodings that could lead to this prefix. We repeatedly add a + character and generate a new set of optimal encodings until we have read + through the entire input. + @author Frank Yellin + @author Rustam Abdullaev + + + + + + + + + + + Convert the text represented by this High Level Encoder into a BitArray. + + text represented by this encoder encoded as a + + + + State represents all information about a sequence necessary to generate the current output. + Note that a state is immutable. + + + + + Create a new state representing this state with a latch to a (not + necessary different) mode, and then a code. + + + + + Create a new state representing this state, with a temporary shift + to a different mode to output a single value. + + + + + Create a new state representing this state, but an additional character + output in Binary Shift mode. + + + + + Create the state identical to this one, but we are no longer in + Binary Shift mode. + + + + + Returns true if "this" state is better (or equal) to be in than "that" + state under all possible circumstances. + + + + + This implementation can detect and decode Aztec codes in an image. + + David Olivier + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + a String representing the content encoded by the Data Matrix code + + + + + Locates and decodes a Data Matrix code in an image. + + image of barcode to decode + passed as a {@link java.util.Hashtable} from {@link com.google.zxing.DecodeHintType} + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Aztec result meta data. + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + + + + + + + + + Renders an Aztec code as a + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + The class holds the available options for the + + + + + Representing the minimal percentage of error correction words. + Note: an Aztec symbol should have a minimum of 25% EC words. + + + + + Specifies the required number of layers for an Aztec code: + a negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + a positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + + + + + Enumerates barcode formats known to this package. + + Sean Owen + + + Aztec 2D barcode format. + + + CODABAR 1D format. + + + Code 39 1D format. + + + Code 93 1D format. + + + Code 128 1D format. + + + Data Matrix 2D barcode format. + + + EAN-8 1D format. + + + EAN-13 1D format. + + + ITF (Interleaved Two of Five) 1D format. + + + MaxiCode 2D barcode format. + + + PDF417 format. + + + QR Code 2D barcode format. + + + RSS 14 + + + RSS EXPANDED + + + UPC-A 1D format. + + + UPC-E 1D format. + + + UPC/EAN extension format. Not a stand-alone format. + + + MSI + + + Plessey + + + Intelligent Mail barcode + + + + UPC_A | UPC_E | EAN_13 | EAN_8 | CODABAR | CODE_39 | CODE_93 | CODE_128 | ITF | RSS_14 | RSS_EXPANDED + without MSI (to many false-positives) and IMB (not enough tested, and it looks more like a 2D) + + + + + A smart class to decode the barcode inside a bitmap object + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + A smart class to decode the barcode inside a bitmap object + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Constructor for additional image formats for one BarcodeReader class + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Optional: Gets or sets the function to create a luminance source object for a bitmap. + If null a platform specific default LuminanceSource is used + + + The function to create a luminance source object. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + A smart class to decode the barcode inside a bitmap object + + + + + represents the default function which is called to get a instance from a raw byte array + + + + + Gets or sets the options. + + + The options. + + + + + Gets the reader which should be used to find and decode the barcode. + + + The reader. + + + + + Gets or sets a method which is called if an important point is found + + + The result point callback. + + + + + event is executed if a result was found via decode + + + + + Gets or sets a value indicating whether the image should be automatically rotated. + Rotation is supported for 90, 180 and 270 degrees + + + true if image should be rotated; otherwise, false. + + + + + Gets or sets a value indicating whether the image should be automatically inverted + if no result is found in the original image. + ATTENTION: Please be carefully because it slows down the decoding process if it is used + + + true if image should be inverted; otherwise, false. + + + + + Optional: Gets or sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + The function to create a binarizer object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb array. + If null the RGBLuminanceSource is used. The handler is only called when Decode with a byte[] array is called. + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + raises the ResultFound event + + + + + + raises the ResultFound event + + + + + + calls the explicitResultPointFound action + + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + A smart class to encode some content to a barcode image + + + + + Initializes a new instance of the class. + + + + + A smart class to encode some content to raw pixel data + + + + + Initializes a new instance of the class. + + + + + A smart class to encode some content to a svg barcode image + + + + + Initializes a new instance of the class. + + + + + A base class for specific barcode writers with specific formats of barcode images. + + The type of the output. + + + + Gets or sets the renderer which should be used to render the encoded BitMatrix. + + + + + Encodes the specified contents and returns a rendered instance of the barcode. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The matrix. + + + + + A base class for specific barcode writers with specific formats of barcode images. + + + + + Gets or sets the barcode format. + The value is only suitable if the MultiFormatWriter is used. + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + + + + + + + + + + + + Encodes the specified contents and returns a BitMatrix array. + That array has to be rendered manually or with a IBarcodeRenderer. + + The contents. + + + + + The base class for luminance sources which supports + cropping and rotating based upon the luminance values. + + + + + weight of the red channel for calculating a gray scale image + + + + + weight of the green channel for calculating a gray scale image + + + + + weight of the blue channel for calculating a gray scale image + + + + + numbers of bits which for right shifting + + + + + + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + + The luminance array. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + gets the luminance matrix + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + TODO: not implemented yet + + + A rotated version of this object. + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + + Whether this subclass supports cropping. + + + + + Whether this subclass supports invertion. + + + + Inverts the luminance values (newValue = 255 - oldValue) + + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + This class hierarchy provides a set of methods to convert luminance data to 1 bit data. + It allows the algorithm to vary polymorphically, for example allowing a very expensive + thresholding technique for servers and a fast one for mobile. It also permits the implementation + to vary, e.g. a JNI version for Android and a Java fallback version for other platforms. + + dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The source. + + + + Gets the luminance source object. + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + For callers which only examine one row of pixels at a time, the same BitArray should be reused + and passed in with each call for performance. However it is legal to keep more than one row + at a time if needed. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + Converts a 2D array of luminance data to 1 bit data. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + A new concrete Binarizer implementation object. + + + + Gets the width of the luminance source object. + + + + + Gets the height of the luminance source object. + + + + + This class is the core bitmap class used by ZXing to represent 1 bit data. Reader objects + accept a BinaryBitmap and attempt to decode it. + + dswitkin@google.com (Daniel Switkin) + + + + + + + + + + The width of the bitmap. + + + + + The height of the bitmap. + + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + + The row to fetch, which must be in [0, bitmap height). + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + + Converts a 2D array of luminance data to 1 bit. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + + Whether this bitmap can be cropped. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if isCropSupported() is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + + Whether this bitmap supports counter-clockwise rotation. + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + class which represents the luminance values for a bitmap object + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class + with the image of a Bitmap instance + + The bitmap. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + +

See + + DoCoMo's documentation about the result types represented by subclasses of this class.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + Implements KDDI AU's address book format. See + + http://www.au.kddi.com/ezfactory/tec/two_dimensions/index.html. + (Thanks to Yuzo for translating!) + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Implements the "MECARD" address book entry format. + + Supported keys: N, SOUND, TEL, EMAIL, NOTE, ADR, BDAY, URL, plus ORG + Unsupported keys: TEL-AV, NICKNAME + + Except for TEL, multiple values for keys are also not supported; + the first one found takes precedence. + + Our understanding of the MECARD format is based on this document: + + http://www.mobicode.org.tw/files/OMIA%20Mobile%20Bar%20Code%20Standard%20v3.2.1.doc + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes contact information, like that in an address book entry. + + Sean Owen + + + + initializing constructor + + + + + + + + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + the names + + + + + the nicknames + + + + + In Japanese, the name is written in kanji, which can have multiple readings. Therefore a hint + is often provided, called furigana, which spells the name phonetically. + + The pronunciation of the getNames() field, often in hiragana or katakana. + + + + the phone numbers + + + + optional descriptions of the type of each phone number. It could be like "HOME", but, + there is no guaranteed or standard format. + + + + the e-mail addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the instant messenger addresses + + + + + the note field + + + + + the addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the title + + + + + the urls + + + + birthday formatted as yyyyMMdd (e.g. 19780917) + + + a location as a latitude/longitude pair + + + Implements the "BIZCARD" address book entry format, though this has been + largely reverse-engineered from examples observed in the wild -- still + looking for a definitive reference. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a calendar event at a certain time, optionally with attendees and a location. + + Sean Owen + + + + Gets the start. + + + + + Determines whether [is start all day]. + + if start time was specified as a whole day + + + + event end , or null if event has no duration + + + + + Gets a value indicating whether this instance is end all day. + + true if end time was specified as a whole day + + + + Parses a string as a date. RFC 2445 allows the start and end fields to be of type DATE (e.g. 20081021) + or DATE-TIME (e.g. 20081021T123000 for local time, or 20081021T123000Z for UTC). + + The string to parse + + if not a date formatted string + + + + Represents a parsed result that encodes an email message including recipients, subject and body text. + + Sean Owen + + + + the email address + + + + + the TOs + + + + + the CCs + + + + + the BCCs + + + + + the subject + + + + + the body + + + + + the mailto: uri + + + + + Represents a result that encodes an e-mail address, either as a plain address + like "joe@example.org" or a mailto: URL like "mailto:joe@example.org". + + Sean Owen + + + + Implements the "MATMSG" email message entry format. + + Supported keys: TO, SUB, BODY + + Sean Owen + + + + This implements only the most basic checking for an email address's validity -- that it contains + an '@' and contains no characters disallowed by RFC 2822. This is an overly lenient definition of + validity. We want to generally be lenient here since this class is only intended to encapsulate what's + in a barcode, not "judge" it. + + The email. + + true if it is basically a valid email address; otherwise, false. + + + + + Represents a parsed result that encodes extended product information as encoded by the RSS format, like weight, price, dates, etc. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + extension for kilogram weight type + + + + + extension for pounds weight type + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the raw text + + + + + the product id + + + + + the sscc + + + + + the lot number + + + + + the production date + + + + + the packaging date + + + + + the best before date + + + + + the expiration date + + + + + the weight + + + + + the weight type + + + + + the weight increment + + + + + the price + + + + + the price increment + + + + + the price currency + + + + + the uncommon AIs + + + + + the display representation (raw text) + + + + + Parses strings of digits that represent a RSS Extended code. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + tries to parse a text representation to a specific result object + + + + + + + Represents a parsed result that encodes a geographic coordinate, with latitude, longitude and altitude. + + Sean Owen + + + latitude in degrees + + + + longitude in degrees + + + + altitude in meters. If not specified, in the geo URI, returns 0.0 + + + + query string associated with geo URI or null if none exists + + + + the geo URI + + + + a URI link to Google Maps which display the point on the Earth described + by this instance, and sets the zoom level in a way that roughly reflects the + altitude, if specified + + + + Parses a "geo:" URI result, which specifies a location on the surface of + the Earth as well as an optional altitude above the surface. See + + http://tools.ietf.org/html/draft-mayrhofer-geo-uri-00. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a product ISBN number. + + jbreiden@google.com (Jeff Breidenbach) + + + + the ISBN number + + + + Parses strings of digits that represent a ISBN. + + + jbreiden@google.com (Jeff Breidenbach) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + See ISBN-13 For Dummies + + The result. + + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link ResultParser#parseResult(Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Represents the type of data encoded by a barcode -- from plain text, to a + URI, to an e-mail address, etc. + + Sean Owen + + + + Represents a parsed result that encodes a product by an identifier of some kind. + + dswitkin@google.com (Daniel Switkin) + + + + Parses strings of digits that represent a UPC code. + + dswitkin@google.com (Daniel Switkin) + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link #parseResult(com.google.zxing.Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Attempts to parse the raw {@link Result}'s contents as a particular type + of information (email, URL, etc.) and return a {@link ParsedResult} encapsulating + the result of parsing. + + the raw to parse + encapsulating the parsing result + + + + Parses the result. + + The result. + + + +

Parses an "sms:" URI result, which specifies a number to SMS and optional + "via" number. See + the IETF draft on this.

+ +

This actually also parses URIs starting with "mms:", "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + + Represents a parsed result that encodes an SMS message, including recipients, subject and body text. + + Sean Owen + + + +

Parses an "smsto:" URI result, whose format is not standardized but appears to be like: + {@code smsto:number(:body)}.

+

This actually also parses URIs starting with "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+
+ Sean Owen +
+ + +

Parses an "smtp:" URI result, whose format is not standardized but appears to be like: + smtp[:subject[:body]]}.

+

See http://code.google.com/p/zxing/issues/detail?id=536

+
+ Sean Owen +
+ + + Represents a parsed result that encodes a telephone number. + + Sean Owen + + + + Parses a "tel:" URI result, which specifies a phone number. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + A simple result type encapsulating a string that has no further interpretation. + + Sean Owen + + + + A simple result type encapsulating a URI that has no further interpretation. + + Sean Owen + + + true if the URI contains suspicious patterns that may suggest it intends to + mislead the user about its true nature. At the moment this looks for the presence + of user/password syntax in the host/authority portion of a URI which may be used + in attempts to make the URI's host appear to be other than it is. Example: + http://yourbank.com@phisher.com This URI connects to phisher.com but may appear + to connect to yourbank.com at first glance. + + + + Transforms a string that represents a URI into something more proper, by adding or canonicalizing + the protocol. + + + + + Tries to parse results that are a URI of some kind. + + Sean Owen + + + Parses the "URLTO" result format, which is of the form "URLTO:[title]:[url]". + This seems to be used sometimes, but I am not able to find documentation + on its origin or official format? + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Parses contact information formatted according to the VCard (2.1) format. This is not a complete + implementation but should parse information as commonly encoded in 2D barcodes. + + Sean Owen + + + Formats name fields of the form "Public;John;Q.;Reverend;III" into a form like + "Reverend John Q. Public III". + + @param names name values to format, in place + + + + Partially implements the iCalendar format's "VEVENT" format for specifying a + calendar event. See RFC 2445. This supports SUMMARY, DTSTART and DTEND fields. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a Vehicle Identification Number (VIN). + + + + + Detects a result that is likely a vehicle identification number. + @author Sean Owen + + + + + Represents a parsed result that encodes wifi network information, like SSID and password. + + Vikram Aggarwal + + + + + A simple, fast array of bits, represented compactly by an array of ints internally. + + Sean Owen + + + + size of the array, number of elements + + + + + size of the array in bytes + + + + + index accessor + + + + + + + default constructor + + + + + initializing constructor + + desired size of the array + + + + Flips bit i. + + bit to set + + + + + Gets the next set. + + first bit to check + index of first bit that is set, starting from the given index, or size if none are set + at or beyond this given index + + + + see getNextSet(int) + + index to start looking for unset bit + index of next unset bit, or if none are unset until the end + + + Sets a block of 32 bits, starting at bit i. + + + first bit to set + + the new value of the next 32 bits. Note again that the least-significant bit + corresponds to bit i, the next-least-significant to i+1, and so on. + + + + + Sets a range of bits. + + start of range, inclusive. + end of range, exclusive + + + Clears all bits (sets to false). + + + Efficient method to check if a range of bits is set, or not set. + + + start of range, inclusive. + + end of range, exclusive + + if true, checks that bits in range are set, otherwise checks that they are not set + + true iff all bits are set or not set in range, according to value argument + if end is less than start or the range is not contained in the array + + + + Appends the bit. + + The bit. + + + underlying array of ints. The first element holds the first 32 bits, and the least + significant bit is bit 0. + + + + + Appends the least-significant bits, from value, in order from most-significant to + least-significant. For example, appending 6 bits from 0x000001E will append the bits + 0, 1, 1, 1, 1, 0 in that order. + + containing bits to append + bits from value to append + + + + adds the array to the end + + + + + + XOR operation + + + + + + converts to bytes. + + first bit to start writing + array to write into. Bytes are written most-significant byte first. This is the opposite + of the internal representation, which is exposed by BitArray + position in array to start writing + how many bytes to write + + + Reverses all bits in the array. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Erstellt ein neues Objekt, das eine Kopie der aktuellen Instanz darstellt. + + + Ein neues Objekt, das eine Kopie dieser Instanz darstellt. + + + + +

Represents a 2D matrix of bits. In function arguments below, and throughout the common + module, x is the column position, and y is the row position. The ordering is always x, y. + The origin is at the top-left.

+

Internally the bits are represented in a 1-D array of 32-bit ints. However, each row begins + with a new int. This is done intentionally so that we can copy out a row into a BitArray very + efficiently.

+

The ordering of bits is row-major. Within each int, the least significant bits are used first, + meaning they represent lower x values. This is compatible with BitArray's implementation.

+
+ Sean Owen + dswitkin@google.com (Daniel Switkin) +
+ + The width of the matrix + + + + The height of the matrix + + + + This method is for compatibility with older code. It's only logical to call if the matrix + is square, so I'm throwing if that's not the case. + + + row/column dimension of this matrix + + + + + The rowsize of the matrix + + + + + Creates an empty square . + + height and width + + + + Creates an empty square . + + bit matrix width + bit matrix height + + + + Interprets a 2D array of booleans as a , where "true" means an "on" bit. + + bits of the image, as a row-major 2D array. Elements are arrays representing rows + representation of image + + +

Gets the requested bit, where true means black.

+ +
+ The horizontal component (i.e. which column) + + The vertical component (i.e. which row) + + value of given bit in matrix + +
+ + +

Flips the given bit.

+
+ The horizontal component (i.e. which column) + The vertical component (i.e. which row) +
+ + + flip all of the bits, if shouldBeFlipped is true for the coordinates + + should return true, if the bit at a given coordinate should be flipped + + + + Exclusive-or (XOR): Flip the bit in this {@code BitMatrix} if the corresponding + mask bit is set. + + The mask. + + + Clears all bits (sets to false). + + +

Sets a square region of the bit matrix to true.

+ +
+ The horizontal position to begin at (inclusive) + + The vertical position to begin at (inclusive) + + The width of the region + + The height of the region + +
+ + A fast method to retrieve one row of data from the matrix as a BitArray. + + + The row to retrieve + + An optional caller-allocated BitArray, will be allocated if null or too small + + The resulting BitArray - this reference should always be used even when passing + your own row + + + + + Sets the row. + + row to set + {@link BitArray} to copy from + + + + Modifies this {@code BitMatrix} to represent the same but rotated 180 degrees + + + + + This is useful in detecting the enclosing rectangle of a 'pure' barcode. + + {left,top,width,height} enclosing rectangle of all 1 bits, or null if it is all white + + + + This is useful in detecting a corner of a 'pure' barcode. + + {x,y} coordinate of top-left-most 1 bit, or null if it is all white + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + The line separator. + + A that represents this instance. + + + + + Clones this instance. + + + + + + Converts this ByteMatrix to a black and white bitmap. + + A black and white bitmap converted from this ByteMatrix. + + +

This provides an easy abstraction to read bits at a time from a sequence of bytes, where the + number of bits read is not often a multiple of 8.

+ +

This class is thread-safe but not reentrant. Unless the caller modifies the bytes array + it passed in, in which case all bets are off.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + bytes from which this will read bits. Bits will be read from the first byte first. + Bits are read within a byte from most-significant to least-significant bit. + + + + + index of next bit in current byte which would be read by the next call to {@link #readBits(int)}. + + + + + index of next byte in input byte array which would be read by the next call to {@link #readBits(int)}. + + + + number of bits to read + + int representing the bits read. The bits will appear as the least-significant + bits of the int + + if numBits isn't in [1,32] or more than is available + + + number of bits that can be read successfully + + + + Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1 + of ISO 18004. + + + Sean Owen + + + character set ECI value + representing ECI of given value, or null if it is legal but unsupported + + + character set ECI encoding name + representing ECI for character encoding, or null if it is legalbut unsupported + + + + Encapsulates the result of decoding a matrix of bits. This typically + applies to 2D barcode formats. For now it contains the raw bytes obtained, + as well as a String interpretation of those bytes, if applicable. + Sean Owen + + + + + raw bytes representing the result, or null if not applicable + + + + + how many bits of are valid; typically 8 times its length + + + + + text representation of the result + + + + + list of byte segments in the result, or null if not applicable + + + + + name of error correction level used, or null if not applicable + + + + + gets a value which describe if structure append data was found + + + + + number of errors corrected, or null if not applicable + + + + + gives the sequence number of the result if structured append was found + + + + + number of erasures corrected, or null if not applicable + + + + + gives the parity information if structured append was found + + + + + Miscellanseous data value for the various decoders + + The other. + + + + initializing constructor + + + + + + + + + initializing constructor + + + + + + + + + + + initializing constructor + + + + + + + + + + initializing constructor + + + + + + + + + + + + Defines an container for encoder options + + + + + Gets the data container for all options + + + + + event is raised when a value is changed + + + + + Gets or sets a flag which cause a deeper look into the bitmap + + + true if [try harder]; otherwise, false. + + + + + Image is a pure monochrome image of a barcode. + + + true if monochrome image of a barcode; otherwise, false. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + The character set. + + + + + Image is known to be of one of a few possible formats. + Maps to a {@link java.util.List} of {@link BarcodeFormat}s. + + + The possible formats. + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + true if it should assume a Code 39 check digit; otherwise, false. + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). + + + true if it should assume GS1; otherwise, false. + + + + + Assume MSI codes employ a check digit. Maps to . + + + true if it should assume a MSI check digit; otherwise, false. + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Initializes a new instance of the class. + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Encapsulates the result of detecting a barcode in an image. This includes the raw + matrix of black/white pixels corresponding to the barcode, and possibly points of interest + in the image, like the location of finder patterns or corners of the barcode in the image.

+
+ Sean Owen +
+ + + the detected bits + + + + + the pixel points where the result is found + + + + + initializing constructor + + + + + + + General math-related and numeric utility functions. + + + + + Ends up being a bit faster than {@link Math#round(float)}. This merely rounds its + argument to the nearest int, where x.5 rounds up to x+1. Semantics of this shortcut + differ slightly from {@link Math#round(float)} in that half rounds down for negative + values. -2.5 rounds to -3, not -2. For purposes here it makes no difference. + + real value to round + nearest int + + + + + + + + + + Euclidean distance between points A and B + + + + + + + + + + Euclidean distance between points A and B + + + + + values to sum + sum of values in array + + +

A somewhat generic detector that looks for a barcode-like rectangular region within an image. + It looks within a mostly white region of an image for a region of black and white, but mostly + black. It returns the four corners of the region, as best it can determine.

+ +
+ Sean Owen +
+ + + initializing constructor + + + + + +

Detects a rectangular region of black and white -- mostly black -- with a region of mostly + white, in an image.

+
+ [] describing the corners of the rectangular region. The first and + last points are opposed on the diagonal, as are the second and third. The first point will be + the topmost point and the last, the bottommost. The second point will be leftmost and the + third, the rightmost + +
+ + Attempts to locate a corner of the barcode by scanning up, down, left or right from a center + point which should be within the barcode. + + + center's x component (horizontal) + + same as deltaY but change in x per step instead + + minimum value of x + + maximum value of x + + center's y component (vertical) + + change in y per step. If scanning up this is negative; down, positive; + left or right, 0 + + minimum value of y to search through (meaningless when di == 0) + + maximum value of y + + maximum run of white pixels that can still be considered to be within + the barcode + + a encapsulating the corner that was found + + + + Computes the start and end of a region of pixels, either horizontally or vertically, that could + be part of a Data Matrix barcode. + + + if scanning horizontally, this is the row (the fixed vertical location) + where we are scanning. If scanning vertically it's the column, the fixed horizontal location + + largest run of white pixels that can still be considered part of the + barcode region + + minimum pixel location, horizontally or vertically, to consider + + maximum pixel location, horizontally or vertically, to consider + + if true, we're scanning left-right, instead of up-down + + int[] with start and end of found range, or null if no such range is found + (e.g. only white was found) + + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. By keeping track of the + last black points it encountered, it determines the corners of the barcode. + + David Olivier + + + + Creates a WhiteRectangleDetector instance + + The image. + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + Creates a WhiteRectangleDetector instance + + barcode image to find a rectangle in + initial size of search area around center + x position of search center + y position of search center + + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + + Initializes a new instance of the class. + + The image. + if image is too small + + + + Initializes a new instance of the class. + + The image. + Size of the init. + The x. + The y. + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. + + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + recenters the points of a constant distance towards the center + + bottom most point + left most point + right most point + top most point + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + Determines whether a segment contains a black point + + min value of the scanned coordinate + max value of the scanned coordinate + value of fixed coordinate + set to true if scan must be horizontal, false if vertical + + true if a black point has been found, else false. + + + + + Superclass of classes encapsulating types ECIs, according to "Extended Channel Interpretations" + 5.3 of ISO 18004. + + Sean Owen + + + + the ECI value + + + + ECI value + representing ECI of given value, or null if it is legal but unsupported + ArgumentException if ECI value is invalid + + + + Defines an container for encoder options + + + + + Gets the data container for all options + + + + + Specifies the height of the barcode image + + + + + Specifies the width of the barcode image + + + + + Don't put the content string into the output image. + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + + + + + Specifies whether the data should be encoded to the GS1 standard; + FNC1 character is added in front of the data + + + + + Initializes a new instance of the class. + + + + This Binarizer implementation uses the old ZXing global histogram approach. It is suitable + for low-end mobile devices which don't have enough CPU or memory to use a local thresholding + algorithm. However, because it picks a global black point, it cannot handle difficult shadows + and gradients. + + Faster mobile devices and all desktop applications should probably use HybridBinarizer instead. + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The source. + + + + Applies simple sharpening to the row data to improve performance of the 1D Readers. + + + + + + + + Does not sharpen the data, as this call is intended to only be used by 2D Readers. + + + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + + A new concrete Binarizer implementation object. + + + + Implementations of this class can, given locations of finder patterns for a QR code in an + image, sample the right points in the image to reconstruct the QR code, accounting for + perspective distortion. It is abstracted since it is relatively expensive and should be allowed + to take advantage of platform-specific optimized implementations, like Sun's Java Advanced + Imaging library, but which may not be available in other environments such as J2ME, and vice + versa. + + The implementation used can be controlled by calling {@link #setGridSampler(GridSampler)} + with an instance of a class which implements this interface. + + Sean Owen + + + the current implementation of + + + + Sets the implementation of used by the library. One global + instance is stored, which may sound problematic. But, the implementation provided + ought to be appropriate for the entire platform, and all uses of this library + in the whole lifetime of the JVM. For instance, an Android activity can swap in + an implementation that takes advantage of native platform libraries. + + The platform-specific object to install. + + + +

Samples an image for a square matrix of bits of the given dimension. This is used to extract + the black/white modules of a 2D barcode like a QR Code found in an image. Because this barcode + may be rotated or perspective-distorted, the caller supplies four points in the source image + that define known points in the barcode, so that the image may be sampled appropriately.

+

The last eight "from" parameters are four X/Y coordinate pairs of locations of points in + the image that define some significant points in the image to be sample. For example, + these may be the location of finder pattern in a QR Code.

+

The first eight "to" parameters are four X/Y coordinate pairs measured in the destination + , from the top left, where the known points in the image given by the "from" + parameters map to.

+

These 16 parameters define the transformation needed to sample the image.

+
+ image to sample + The dimension X. + The dimension Y. + The p1 preimage X. + The p1 preimage Y. + The p2 preimage X. + The p2 preimage Y. + The p3 preimage X. + The p3 preimage Y. + The p4 preimage X. + The p4 preimage Y. + The p1 image X. + The p1 image Y. + The p2 image X. + The p2 image Y. + The p3 image X. + The p3 image Y. + The p4 image X. + The p4 image Y. + + representing a grid of points sampled from the image within a region + defined by the "from" parameters + + ReaderException if image can't be sampled, for example, if the transformation defined +
+ + + + + + + + + + + +

Checks a set of points that have been transformed to sample points on an image against + the image's dimensions to see if the point are even within the image.

+ +

This method will actually "nudge" the endpoints back onto the image if they are found to be + barely (less than 1 pixel) off the image. This accounts for imperfect detection of finder + patterns in an image where the QR Code runs all the way to the image border.

+ +

For efficiency, the method will check points from either end of the line until one is found + to be within the image. Because the set of points are assumed to be linear, this is valid.

+ +
+ image into which the points should map + + actual points in x1,y1,...,xn,yn form + +
+ + This class implements a local thresholding algorithm, which while slower than the + GlobalHistogramBinarizer, is fairly efficient for what it does. It is designed for + high frequency images of barcodes with black data on white backgrounds. For this application, + it does a much better job than a global blackpoint with severe shadows and gradients. + However it tends to produce artifacts on lower frequency images and is therefore not + a good general purpose binarizer for uses outside ZXing. + + This class extends GlobalHistogramBinarizer, using the older histogram approach for 1D readers, + and the newer local approach for 2D readers. 1D decoding using a per-row histogram is already + inherently local, and only fails for horizontal gradients. We can revisit that problem later, + but for now it was not a win to use local blocks for 1D. + + This Binarizer is the default for the unit tests and the recommended class for library users. + dswitkin@google.com (Daniel Switkin) + + + + + gives the black matrix + + + + + initializing constructor + + + + + + creates a new instance + + + + + + + Calculates the final BitMatrix once for all requests. This could be called once from the + constructor instead, but there are some advantages to doing it lazily, such as making + profiling easier, and not doing heavy lifting when callers don't expect it. + + + + + For each 8x8 block in the image, calculate the average black point using a 5x5 grid + of the blocks around it. Also handles the corner cases (fractional blocks are computed based + on the last 8 pixels in the row/column which are also used in the previous block). + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + The black points. + The matrix. + + + + Applies a single threshold to an 8x8 block of pixels. + + The luminances. + The xoffset. + The yoffset. + The threshold. + The stride. + The matrix. + + + + Calculates a single black point for each 8x8 block of pixels and saves it away. + See the following thread for a discussion of this algorithm: + http://groups.google.com/group/zxing/browse_thread/thread/d06efa2c35a7ddc0 + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + + + +

This class implements a perspective transform in two dimensions. Given four source and four + destination points, it will compute the transformation implied between them. The code is based + directly upon section 3.4.2 of George Wolberg's "Digital Image Warping"; see pages 54-56.

+
+ Sean Owen +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Convenience method, not optimized for performance. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

This class contains utility methods for performing mathematical operations over + the Galois Fields. Operations use a given primitive polynomial in calculations.

+

Throughout this package, elements of the GF are represented as an {@code int} + for convenience and speed (but at the cost of memory). +

+
+ Sean Owen +
+ + + Create a representation of GF(size) using the given primitive polynomial. + + irreducible polynomial whose coefficients are represented by + * the bits of an int, where the least-significant bit represents the constant + * coefficient + the size of the field + the factor b in the generator polynomial can be 0- or 1-based + * (g(x) = (x+a^b)(x+a^(b+1))...(x+a^(b+2t-1))). + * In most cases it should be 1, but for QR code it is 0. + + + + Builds the monomial. + + The degree. + The coefficient. + the monomial representing coefficient * x^degree + + + + Implements both addition and subtraction -- they are the same in GF(size). + + sum/difference of a and b + + + + Exps the specified a. + + 2 to the power of a in GF(size) + + + + Logs the specified a. + + A. + base 2 log of a in GF(size) + + + + Inverses the specified a. + + multiplicative inverse of a + + + + Multiplies the specified a with b. + + A. + The b. + product of a and b in GF(size) + + + + Gets the size. + + + + + Gets the generator base. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + +

Represents a polynomial whose coefficients are elements of a GF. + Instances of this class are immutable.

+

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + the {@link GenericGF} instance representing the field to use + to perform computations + coefficients as ints representing elements of GF(size), arranged + from most significant (highest-power term) coefficient to least significant + if argument is null or empty, + or if leading coefficient is 0 and this is not a + constant polynomial (that is, it is not the monomial "0") + + + + degree of this polynomial + + + + + Gets a value indicating whether this is zero. + + true iff this polynomial is the monomial "0" + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + +

Implements Reed-Solomon decoding, as the name implies.

+ +

The algorithm will not be explained here, but the following references were helpful + in creating this implementation:

+ + + +

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+ +
+ Sean Owen + William Rucklidge + sanfordsquires +
+ + +

Decodes given set of received codewords, which include both data and error-correction + codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place, + in the input.

+
+ data and error-correction codewords + number of error-correction codewords available + false: decoding fails +
+ + + Implements Reed-Solomon encoding, as the name implies. + + Sean Owen + William Rucklidge + + + + Common string-related functions. + + Sean Owen + Alex Dupre + + + + SJIS + + + + + GB2312 + + + + + Guesses the encoding. + + bytes encoding a string, whose encoding should be guessed + decode hints if applicable + name of guessed encoding; at the moment will only guess one of: + {@link #SHIFT_JIS}, {@link #UTF8}, {@link #ISO88591}, or the platform + default encoding if none of these can possibly be correct + + + + This implementation can detect and decode Data Matrix codes in an image. + + bbrown@google.com (Brian Brown) + + + + + Locates and decodes a Data Matrix code in an image. + + + a String representing the content encoded by the Data Matrix code + + + + Locates and decodes a Data Matrix code in an image. + + + + a String representing the content encoded by the Data Matrix code + + + + does nothing here + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a Data Matrix code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + Guillaume Le Biller Added to zxing lib. + + + + encodes the content to a BitMatrix + + + + + + + + + + encodes the content to a BitMatrix + + + + + + + + + + + Encode the given symbol info to a bit matrix. + + The DataMatrix placement. + The symbol info to encode. + + + The bit matrix generated. + + + + Convert the ByteMatrix to BitMatrix. + + The input matrix. + The requested width of the image (in pixels) with the Datamatrix code + The requested height of the image (in pixels) with the Datamatrix code + The output matrix. + + + + bbrown@google.com (Brian Brown) + + + + + to parse + if dimension is < 8 or > 144 or not 0 mod 2 + + + + +

Creates the version object based on the dimension of the original bit matrix from + the datamatrix code.

+ +

See ISO 16022:2006 Table 7 - ECC 200 symbol attributes

+ + Original including alignment patterns + encapsulating the Data Matrix Code's "version" + if the dimensions of the mapping matrix are not valid + Data Matrix dimensions. +
+
+ + +

Reads the bits in the representing the mapping matrix (No alignment patterns) + in the correct order in order to reconstitute the codewords bytes contained within the + Data Matrix Code.

+ + bytes encoded within the Data Matrix Code + if the exact number of bytes expected is not read +
+
+ + +

Reads a bit of the mapping matrix accounting for boundary wrapping.

+ + Row to read in the mapping matrix + Column to read in the mapping matrix + Number of rows in the mapping matrix + Number of columns in the mapping matrix + value of the given bit in the mapping matrix +
+
+ + +

Reads the 8 bits of the standard Utah-shaped pattern.

+ +

See ISO 16022:2006, 5.8.1 Figure 6

+ + Current row in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Current column in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the utah shape +
+
+ + +

Reads the 8 bits of the special corner condition 1.

+ +

See ISO 16022:2006, Figure F.3

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 1 +
+
+ + +

Reads the 8 bits of the special corner condition 2.

+ +

See ISO 16022:2006, Figure F.4

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 2 +
+
+ + +

Reads the 8 bits of the special corner condition 3.

+ +

See ISO 16022:2006, Figure F.5

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 3 +
+
+ + +

Reads the 8 bits of the special corner condition 4.

+ +

See ISO 16022:2006, Figure F.6

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 4 +
+
+ + +

Extracts the data region from a that contains + alignment patterns.

+ + Original with alignment patterns + BitMatrix that has the alignment patterns removed +
+
+ + +

Encapsulates a block of data within a Data Matrix Code. Data Matrix Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ + bbrown@google.com (Brian Brown) +
+
+ + +

When Data Matrix Codes use multiple data blocks, they actually interleave the bytes of each of them. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ + bytes as read directly from the Data Matrix Code + version of the Data Matrix Code + DataBlocks containing original bytes, "de-interleaved" from representation in the + Data Matrix Code +
+
+ + +

Data Matrix Codes can encode text as bits in one of several modes, and can use multiple modes + in one Data Matrix Code. This class decodes the bits back into text.

+ +

See ISO 16022:2006, 5.2.1 - 5.2.9.2

+ + bbrown@google.com (Brian Brown) + Sean Owen +
+
+ + + See ISO 16022:2006, Annex C Table C.1 + The C40 Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, Annex C Table C.2 + The Text Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, 5.2.3 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.5 and Annex C, Table C.1 + + + + + See ISO 16022:2006, 5.2.6 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.7 + + + + + See ISO 16022:2006, 5.2.8 and Annex C Table C.3 + + + + + See ISO 16022:2006, 5.2.9 and Annex B, B.2 + + + + + See ISO 16022:2006, Annex B, B.2 + + + + +

The main class which implements Data Matrix Code decoding -- as opposed to locating and extracting + the Data Matrix Code from an image.

+ + bbrown@google.com (Brian Brown) +
+
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a Data Matrix Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+ + booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code + if the Data Matrix Code cannot be decoded +
+
+ + +

Decodes a Data Matrix Code represented as a . A 1 or "true" is taken + to mean a black module.

+
+ booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+ + data and error correction codewords + number of codewords that are data bytes +
+
+ + + The Version object encapsulates attributes about a particular + size Data Matrix Code. + + bbrown@google.com (Brian Brown) + + + + + returns the version numer + + + + + + returns the symbol size rows + + + + + + returns the symbols size columns + + + + + + retursn the data region size rows + + + + + + returns the data region size columns + + + + + + returns the total codewords count + + + + + +

Deduces version information from Data Matrix dimensions.

+ + Number of rows in modules + Number of columns in modules + Version for a Data Matrix Code of those dimensions + if dimensions do correspond to a valid Data Matrix size +
+
+ + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the Data Matrix code version's format.

+
+
+ + + returns the version number as string + + + + + + See ISO 16022:2006 5.5.1 Table 7 + + + + +

Encapsulates logic that can detect a Data Matrix Code in an image, even if the Data Matrix Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + +

Detects a Data Matrix Code in an image.

+
+ encapsulating results of detecting a Data Matrix Code or null +
+ + + Calculates the position of the white top right module using the output of the rectangle detector + for a rectangular matrix + + + + + Calculates the position of the white top right module using the output of the rectangle detector + for a square matrix + + + + + Increments the Integer associated with a key by one. + + + + + Counts the number of black/white transitions between two points, using something like Bresenham's algorithm. + + + + + Simply encapsulates two points and a number of transitions between them. + + + + + Orders ResultPointsAndTransitions by number of transitions, ascending. + + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Symbol Character Placement Program. Adapted from Annex M.1 in ISO/IEC 16022:2000(E). + + + + + Main constructor + + the codewords to place + the number of columns + the number of rows + + + + Places the 8 bits of a utah-shaped symbol character in ECC200. + + The row. + The col. + character position + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Enumeration for encodation types + + + + + Error Correction Code for ECC200. + + + + + Lookup table which factors to use for which number of error correction codewords. + See FACTORS. + + + + + Precomputed polynomial factors for ECC 200. + + + + + Creates the ECC200 error correction for an encoded message. + + The codewords. + information about the symbol to be encoded + the codewords with interleaved error correction. + + + + DataMatrix ECC 200 data encoder following the algorithm described in ISO/IEC 16022:200(E) in + annex S. + + + + + Padding character + + + + + mode latch to C40 encodation mode + + + + + mode latch to Base 256 encodation mode + + + + + FNC1 Codeword + + + + + Structured Append Codeword + + + + + Reader Programming + + + + + Upper Shift + + + + + 05 Macro + + + + + 06 Macro + + + + + mode latch to ANSI X.12 encodation mode + + + + + mode latch to Text encodation mode + + + + + mode latch to EDIFACT encodation mode + + + + + ECI character (Extended Channel Interpretation) + + + + + Unlatch from C40 encodation + + + + + Unlatch from X12 encodation + + + + + 05 Macro header + + + + + 06 Macro header + + + + + Macro trailer + + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + the encoded message (the char values range from 0 to 255) + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + requested shape. May be {@code SymbolShapeHint.FORCE_NONE},{@code SymbolShapeHint.FORCE_SQUARE} or {@code SymbolShapeHint.FORCE_RECTANGLE}. + the minimum symbol size constraint or null for no constraint + the maximum symbol size constraint or null for no constraint + encoding mode to start with + the encoded message (the char values range from 0 to 255) + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + Symbol info table for DataMatrix. + + + + Overrides the symbol info set used by this class. Used for testing purposes. + + @param override the symbol info set to use + + + + Enumeration for DataMatrix symbol shape hint. It can be used to force square or rectangular + symbols. + + + + + The class holds the available options for the DatamatrixWriter + + + + + Specifies the matrix shape for Data Matrix + + + + + Specifies a minimum barcode size + + + + + Specifies a maximum barcode size + + + + + Specifies the default encodation + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Encapsulates a type of hint that a caller may pass to a barcode reader to help it + more quickly or accurately decode it. It is up to implementations to decide what, + if anything, to do with the information that is supplied. + + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Unspecified, application-specific hint. Maps to an unspecified . + + + + + Image is a pure monochrome image of a barcode. Doesn't matter what it maps to; + use = true. + + + + + Image is known to be of one of a few possible formats. + Maps to a of s. + + + + + Spend more time to try to find a barcode; optimize for accuracy, not speed. + Doesn't matter what it maps to; use = true. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + + + The caller needs to be notified via callback when a possible + is found. Maps to a . + + + + + Assume MSI codes employ a check digit. Maps to . + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + Maps to . + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + 1D readers supporting rotation with TRY_HARDER enabled. + But BarcodeReader class can do auto-rotating for 1D and 2D codes. + Enabling that option prevents 1D readers doing double rotation. + BarcodeReader enables that option automatically if "global" auto-rotation is enabled. + Maps to . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to; + use . + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Simply encapsulates a width and height. + + + + + initializing constructor + + + + + + + the width + + + + + the height + + + + + + + + + + + + + + + + + + + + + + + + These are a set of hints that you may pass to Writers to specify their behavior. + + dswitkin@google.com (Daniel Switkin) + + + + Specifies the width of the barcode image + type: + + + + + Specifies the height of the barcode image + type: + + + + + Don't put the content string into the output image. + type: + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + + For Aztec it is of type , representing the minimal percentage of error correction words. + In all cases, it can also be a representation of the desired value as well. + Note: an Aztec symbol should have a minimum of 25% EC words. + For PDF417 it is of type or (between 0 and 8), + + + + + Specifies what character encoding to use where applicable. + type: + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + type: , or representation of the integer value + + + + + Specifies the aspect ratio to use. Default is 4. + type: , or 1-4. + + + + + Specifies whether to use compact mode for PDF417 + type: , or "true" or "false" + value + + + + + Specifies what compaction mode to use for PDF417. + type: or value of one of its + enum values + + + + + Specifies the minimum and maximum number of rows and columns for PDF417. + type: + + + + + Don't append ECI segment. + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + type: + + + + + Specifies the matrix shape for Data Matrix (type ) + + + + + Specifies a minimum barcode size (type ). Only applicable to Data Matrix now. + + + + + Specifies a maximum barcode size (type ). Only applicable to Data Matrix now. + + + + + if true, don't switch to codeset C for numbers + + + + + Specifies the default encodation for Data Matrix (type ) + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Specifies the required number of layers for an Aztec code. + A negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + type: , or representation of the integer value + + + + + Specifies the exact version of QR code to be encoded. + (Type , or representation of the integer value). + + + + + Specifies whether the data should be encoded to the GS1 standard + type: , or "true" or "false" + value + + + + + Thrown when a barcode was successfully detected, but some aspect of + the content did not conform to the barcode's format rules. This could have + been due to a mis-detection. + Sean Owen + + + + + + + + + + + + + + + + + + + + + + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Decodes the specified barcode bitmap which is given by a generic byte array. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Interface for a smart class to encode some content into a barcode + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents. + + The contents. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + The matrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents. + + The contents. + + + + + implements an Intelligent Mail barcode + Rishabh Hatgadkar + + + + + A wrapper implementation of {@link LuminanceSource} which inverts the luminances it returns -- black becomes + white and vice versa, and each value becomes (255-value). + + Sean Owen + + + + Initializes a new instance of the class. + + The @delegate. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff; + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Inverts this instance. + + original delegate {@link LuminanceSource} since invert undoes itself + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + The purpose of this class hierarchy is to abstract different bitmap implementations across + platforms into a standard interface for requesting greyscale luminance values. The interface + only provides immutable methods; therefore crop and rotation create copies. This is to ensure + that one Reader does not modify the original luminance source and leave it in an unknown state + for other Readers in the chain. + + dswitkin@google.com (Daniel Switkin) + + + + initializing constructor + + + + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff + + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + The width of the bitmap. + + + The height of the bitmap. + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + Whether this subclass supports counter-clockwise rotation. + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + + Whether this subclass supports invertion. + + + + inverts the luminance values, not supported here. has to implemented in sub classes + + + + + + + + + + + + mike32767 + Manuel Kasten + + + + + to parse + + + + +

MaxiCodes can encode text or structured information as bits in one of several modes, + with multiple character sets in one code. This class decodes the bits back into text.

+ + mike32767 + Manuel Kasten +
+
+ + +

The main class which implements MaxiCode decoding -- as opposed to locating and extracting + the MaxiCode from an image.

+ + Manuel Kasten +
+
+ + + This implementation can detect and decode a MaxiCode in an image. + + + + + Locates and decodes a MaxiCode in an image. + + a String representing the content encoded by the MaxiCode + if a MaxiCode cannot be decoded + + + + + Locates and decodes a MaxiCode within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + + MultiFormatReader is a convenience class and the main entry point into the library for most uses. + By default it attempts to decode all barcode formats that the library supports. Optionally, you + can provide a hints object to request different behavior, for example only decoding QR codes. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + This version of decode honors the intent of Reader.decode(BinaryBitmap) in that it + passes null as a hint to the decoders. However, that makes it inefficient to call repeatedly. + Use setHints() followed by decodeWithState() for continuous scan applications. + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the hints provided. Does not honor existing state. + + + The pixel data to decode + + The hints to use, clearing the previous state. + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the state set up by calling setHints() previously. Continuous scan + clients will get a large speed increase by using this instead of decode(). + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls + to decodeWithState(image) can reuse the same set of readers without reallocating memory. This + is important for performance in continuous scan clients. + + + + + + resets all specific readers + + + + This is a factory class which finds the appropriate Writer subclass for the BarcodeFormat + requested and encodes the barcode with the supplied contents. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Gets the collection of supported writers. + + + + + encode the given data + + + + + + + + + + encode the given data + + + + + + + + + + + This class attempts to decode a barcode from an image, not by scanning the whole image, + but by scanning subsets of the image. This is important when there may be multiple barcodes in + an image, and detecting a barcode may find parts of multiple barcode and fail to decode + (e.g. QR Codes). Instead this scans the four quadrants of the image -- and also the center + 'quadrant' to cover the case where a barcode is found in the center. + + + + + + Initializes a new instance of the class. + + The @delegate. + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Attempts to locate multiple barcodes in an image by repeatedly decoding portion of the image. + After one barcode is found, the areas left, above, right and below the barcode's + {@link com.google.zxing.ResultPoint}s are scanned, recursively.

+

A caller may want to also employ {@link ByQuadrantReader} when attempting to find multiple + 2D barcodes, like QR Codes, in an image, where the presence of multiple barcodes might prevent + detecting any one of them.

+

That is, instead of passing a {@link Reader} a caller might pass + new ByQuadrantReader(reader).

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The @delegate. + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Implementation of this interface attempt to read several barcodes from one image. + Sean Owen + + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + +

Encapsulates logic that can detect one or more QR Codes in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+ + Sean Owen + Hannes Erven +
+
+ + + Initializes a new instance of the class. + + The image. + + + + Detects the multi. + + The hints. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +

In contrast to , this class will return an array of all possible + QR code locations in the image.

+ +

Use the TRY_HARDER hint to ask for a more thorough detection.

+ + Sean Owen + Hannes Erven +
+
+ + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF_PERCENT percent in their + estimated modules sizes. + + + + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF pixels/module in their + estimated modules sizes. + + + + + A comparator that orders FinderPatterns by their estimated module size. + + + + +

Creates a finder that will search the image for three finder patterns.

+ + image to search +
+
+ + + + the 3 best s from our list of candidates. The "best" are + those that have been detected at least CENTER_QUORUM times, and whose module + size differs from the average among those patterns the least + + + + + This implementation can detect and decode multiple QR Codes in an image. + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + +

Decodes Codabar barcodes.

+ + Bas Vijfwinkel +
+
+ + These represent the encodings of characters, as patterns of wide and narrow bars. The 7 least-significant bits of + each int correspond to the pattern of wide and narrow, with 1s representing "wide" and 0s representing narrow. + + + + Records the size of all runs of white and black pixels, starting with white. + This is just like recordPattern, except it records all the counters, and + uses our builtin "counters" member for storage. + + row to count from + + + + This class renders CodaBar as []. + + dsbnatut@gmail.com (Kazuki Nishiura) + + + + The class holds the available options for the QrCodeWriter + + + + + if true, don't switch to codeset C for numbers + + + + +

Decodes Code 128 barcodes.

+ + Sean Owen +
+
+ + + This object renders a CODE128 code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + +

Decodes Code 39 barcodes. Supports "Full ASCII Code 39" if USE_CODE_39_EXTENDED_MODE is set.

+ Sean Owen + @see Code93Reader +
+
+ + + Returns a string with all possible characters + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. It will not decoded "extended Code 39" sequences. + + + + + Creates a reader that can be configured to check the last character as a check digit. + It will not decoded "extended Code 39" sequences. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + + Creates a reader that can be configured to check the last character as a check digit, + or optionally attempt to decode "extended Code 39" sequences that are used to encode + the full ASCII character set. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + if true, will attempt to decode extended Code 39 sequences in the text. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a CODE39 code as a . + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Decodes Code 93 barcodes.

+ Sean Owen + +
+
+ + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a CODE93 code as a BitMatrix + + + + + + output to append to + start position + pattern to append + unused + 9 + + + +

Implements decoding of the EAN-13 format.

+ + dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Initializes a new instance of the class. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + Get the format of this decoder. + The 1D format. + + + + + Based on pattern of odd-even ('L' and 'G') patterns used to encoded the explicitly-encoded + digits in a barcode, determines the implicitly encoded first digit and adds it to the + result string. + + string to insert decoded first digit into + int whose bits indicates the pattern of odd/even L/G patterns used to + encode digits + -1 if first digit cannot be determined + + + + This object renders an EAN13 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Implements decoding of the EAN-8 format.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Get the format of this decoder. + The 1D format. + + + + + This object renders an EAN8 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + + + a byte array of horizontal pixels (false = white, true = black) + + + + + Records EAN prefix to GS1 Member Organization, where the member organization + correlates strongly with a country. This is an imperfect means of identifying + a country of origin by EAN-13 barcode value. See + + http://en.wikipedia.org/wiki/List_of_GS1_country_codes. + + Sean Owen + + + + +

Implements decoding of the ITF format, or Interleaved Two of Five.

+ +

This Reader will scan ITF barcodes of certain lengths only. + At the moment it reads length 6, 8, 10, 12, 14, 16, 18, 20, 24, 44 and 48 as these have appeared "in the wild". Not all + lengths are scanned, especially shorter ones, to avoid false positives. This in turn is due to a lack of + required checksum function.

+ +

The checksum is optional and is not applied by this Reader. The consumer of the decoded + value will have to apply a checksum if required.

+ +

http://en.wikipedia.org/wiki/Interleaved_2_of_5 + is a great reference for Interleaved 2 of 5 information.

+ + kevin.osullivan@sita.aero, SITA Lab. +
+
+ + + Valid ITF lengths. Anything longer than the largest value is also allowed. + + + + + Start/end guard pattern. + + Note: The end pattern is reversed because the row is reversed before + searching for the END_PATTERN + + + + + Patterns of Wide / Narrow lines to indicate each digit + + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + + row of black/white values to search + offset of start pattern + The payload end. + to append decoded chars to + + false, if decoding could not complete successfully + + + + + Identify where the start of the middle / payload section starts. + + row of black/white values to search + Array, containing index of start of 'start block' and end of 'start block' + + + + The start & end patterns must be pre/post fixed by a quiet zone. This + zone must be at least 10 times the width of a narrow line. Scan back until + we either get to the start of the barcode or match the necessary number of + quiet zone pixels. + + Note: Its assumed the row is reversed when using this method to find + quiet zone after the end pattern. + + ref: http://www.barcode-1.net/i25code.html + + bit array representing the scanned barcode. + index into row of the start or end pattern. + false, if the quiet zone cannot be found + + + + Skip all whitespace until we get to the first black line. + + row of black/white values to search + index of the first black line or -1 if no black lines are found in the row. + + + + Identify where the end of the middle / payload section ends. + + row of black/white values to search + Array, containing index of start of 'end block' and end of 'end + block' or null, if nothing found + + + + + row of black/white values to search + position to start search + pattern of counts of number of black and white pixels that are being searched for as a pattern + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a sequence of ITF black/white lines into single + digit. + + the counts of runs of observed black/white/black/... values + The decoded digit + + false, if digit cannot be decoded + + + + + This object renders a ITF code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code bool[]} of horizontal pixels (false = white, true = black) + + + + + + + Decodes MSI barcodes. + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. + + + + + Creates a reader that can be configured to check the last character as a check digit, + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a MSI code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

A reader that can read all available UPC/EAN formats. If a caller wants to try to + read all such formats, it is most efficient to use this implementation rather than invoke + individual readers.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Encapsulates functionality and implementation that is common to one-dimensional barcodes.

+ dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + a byte array of horizontal pixels (0 = white, 1 = black) + + + + Appends the given pattern to the target array starting at pos. + + encode black/white pattern into this array + position to start encoding at in target + lengths of black/white runs to encode + starting color - false for white, true for black + the number of elements added to target. + + + + Gets the default margin. + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + + barcode contents to encode + a bool[] of horizontal pixels (false = white, true = black) + + + + Calculates the checksum digit modulo10. + + The contents. + + + + + Encapsulates functionality and implementation that is common to all families + of one-dimensional barcodes. + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + + + + + + + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + Note that we don't try rotation without the try harder flag, even if rotation was supported. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + We're going to examine rows from the middle outward, searching alternately above and below the + middle, and farther out each time. rowStep is the number of rows between each successive + attempt above and below the middle. So we'd scan row middle, then middle - rowStep, then + middle + rowStep, then middle - (2 * rowStep), etc. + rowStep is bigger as the image is taller, but is always at least 1. We've somewhat arbitrarily + decided that moving up and down by about 1/16 of the image is pretty good; we try more of the + image if "trying harder". + + The image to decode + Any hints that were requested + The contents of the decoded barcode + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the pattern in reverse. + + The row. + The start. + The counters. + + + + + Determines how closely a set of observed counts of runs of black/white values matches a given + target pattern. This is reported as the ratio of the total variance from the expected pattern + proportions across all pattern elements, to the length of the pattern. + + observed counters + expected pattern + The most any counter can differ before we give up + ratio of total variance between counters and pattern compared to total pattern size, + where the ratio has been multiplied by 256. So, 0 means no variance (perfect match); 256 means + the total variance between counters and patterns equals the pattern length, higher values mean + even more variance + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + This object renders a Plessey code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + Superclass of implementations that read barcodes in the RSS family of formats. + + + + + Initializes a new instance of the class. + + + + + Gets the decode finder counters. + + + + + + Gets the data character counters. + + + + + + Gets the odd rounding errors. + + + + + + Gets the even rounding errors. + + + + + + Gets the odd counts. + + + + + + Gets the even counts. + + + + + + Parses the finder value. + + The counters. + The finder patterns. + The value. + + + + + Counts the specified array. + + The array. + + + + + Increments the specified array. + + The array. + The errors. + + + + Decrements the specified array. + + The array. + The errors. + + + + Determines whether [is finder pattern] [the specified counters]. + + The counters. + + true if [is finder pattern] [the specified counters]; otherwise, false. + + + + + Encapsulates a since character value in an RSS barcode, including its checksum information. + + + + + Gets the value. + + + + + Gets the checksum portion. + + + + + Initializes a new instance of the class. + + The value. + The checksum portion. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Gets the information. + + + + + + Parses the information. + + + + + + Creates the decoder. + + The information. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + One row of an RSS Expanded Stacked symbol, consisting of 1+ expanded pairs. + + + + + Did this row of the image have to be reversed (mirrored) to recognize the pairs? + + + + + Two rows are equal if they contain the same pairs in the same order. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Encapsulates an RSS barcode finder pattern, including its start/end position and row. + + + + + Gets the value. + + + + + Gets the start end. + + + + + Gets the result points. + + + + + Initializes a new instance of the class. + + The value. + The start end. + The start. + The end. + The row number. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Decodes RSS-14, including truncated and stacked variants. See ISO/IEC 24724:2006. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Adapted from listings in ISO/IEC 24724 Appendix B and Appendix G. + + + + + Gets the RS svalue. + + The widths. + Width of the max. + if set to true [no narrow]. + + + + +

Implements decoding of the UPC-A format.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen +
+
+ + +

Like decodeRow(int, BitArray, java.util.Map), but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ + + + + +
+ + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Decodes the specified image. + + The image. + The hints. + + + + + Get the format of this decoder. + The 1D format. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + This object renders a UPC-A code as a . + qwandor@google.com (Andrew Walbran) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + @see UPCEANExtension5Support + + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + + + @see UPCEANExtension2Support + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + one {@link ResultMetadataType} to appropriate value, or {@code null} if not known + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Start/end guard pattern. + + + + + Pattern marking the middle of a UPC/EAN pattern, separating the two halves. + + + + + end guard pattern. + + + + + "Odd", or "L" patterns used to encode UPC/EAN digits. + + + + + As above but also including the "even", or "G" patterns used to encode UPC/EAN digits. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + +

Like , but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ row index into the image + encoding of the row of the barcode image + start/end column where the opening start pattern was found + optional hints that influence decoding + encapsulating the result of decoding a barcode in the row +
+ + + + string of digits to check + see + + + + Computes the UPC/EAN checksum on a string of digits, and reports + whether the checksum is correct or not. + + string of digits to check + true iff string of digits passes the UPC/EAN checksum algorithm + + + + Decodes the end. + + The row. + The end start. + + + + + + row of black/white values to search + position to start search + if true, indicates that the pattern specifies white/black/white/... + pixel counts, otherwise, it is interpreted as black/white/black/... + pattern of counts of number of black and white pixels that are being + searched for as a pattern + array of counters, as long as pattern, to re-use + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a single UPC/EAN-encoded digit. + + row of black/white values to decode + the counts of runs of observed black/white/black/... values + horizontal offset to start decoding from + the set of patterns to use to decode -- sometimes different encodings + for the digits 0-9 are used, and this indicates the encodings for 0 to 9 that should + be used + horizontal offset of first pixel beyond the decoded digit + + + + Get the format of this decoder. + + The 1D format. + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ aripollak@gmail.com (Ari Pollak) + dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Gets the default margin. + + + + +

Implements decoding of the UPC-E format.

+

Thisis a great reference for + UPC-E information.

+ Sean Owen +
+
+ + + The pattern that marks the middle, and end, of a UPC-E pattern. + There is no "second half" to a UPC-E barcode. + + + + + See L_AND_G_PATTERNS these values similarly represent patterns of + even-odd parity encodings of digits that imply both the number system (0 or 1) + used, and the check digit. + + + + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Decodes the end. + + The row. + The end start. + + + + + see checkStandardUPCEANChecksum(String) + + + + + + + Determines the num sys and check digit. + + The result string. + The lg pattern found. + + + + + Get the format of this decoder. + The 1D format. + + + + + Expands a UPC-E value back into its full, equivalent UPC-A code value. + + UPC-E code as string of digits + equivalent UPC-A code as string of digits + + + + + This object renders an UPC-E code as a {@link BitMatrix}. + @author 0979097955s@gmail.com (RX) + + + + + Metadata about a PDF417 Barcode + + Guenther Grau + + + + A Barcode Value for the PDF417 barcode. + The scanner will iterate through the bitmatrix, + and given the different methods or iterations + will increment a given barcode value's confidence. + + When done, this will return the values of highest confidence. + + Guenther Grau + + + + Incremenets the Confidence for a given value. (Adds an occurance of a value) + + + Value. + + + + Determines the maximum occurrence of a set value and returns all values which were set with this occurrence. + + an array of int, containing the values with the highest occurrence, or null, if no value was set. + + + + Returns the confience value for a given barcode value + + Barcode value. + + + + A Bounding Box helper class + + Guenther Grau + + + + Initializes a new instance of the class. + returns null if the corner points don't match up correctly + + The image. + The top left. + The bottom left. + The top right. + The bottom right. + + + + + Creates the specified box. + + The box. + + + + + Initializes a new instance of the class. + Will throw an exception if the corner points don't match up correctly + + Image. + Top left. + Top right. + Bottom left. + Bottom right. + + + + Merge two Bounding Boxes, getting the left corners of left, and the right corners of right + (Images should be the same) + + Left. + Right. + + + + Adds the missing rows. + + The missing rows. + Missing start rows. + Missing end rows. + If set to true is left. + + + + Calculates the minimum and maximum X & Y values based on the corner points. + + + + + If we adjust the width, set a new right corner coordinate and recalculate + + Bottom right. + + + + A Codeword in the PDF417 barcode + + Guenther Grau + + + + Default value for the RowNumber (-1 being an invalid real number) + + + + + Initializes a new instance of the class. + + Start x. + End x. + Bucket. + Value. + + + + Gets the width. + + The width. + + + + Gets a value indicating whether this instance has valid row number. + + true if this instance has valid row number; otherwise, false. + + + + Determines whether this instance is valid row number the specified rowNumber. + + true if this instance is valid row number the specified rowNumber; otherwise, false. + Row number. + + + + Sets the row number as the row's indicator column. + + + + + Returns a that represents the current . + + A that represents the current . + + + +

This class contains the methods for decoding the PDF417 codewords.

+ + SITA Lab (kevin.osullivan@sita.aero) +
+
+ + + Table containing values for the exponent of 900. + This is used in the numeric compaction decode algorithm. + + + + + Text Compaction mode (see 5.4.1.5) permits all printable ASCII characters to be + encoded, i.e. values 32 - 126 inclusive in accordance with ISO/IEC 646 (IRV), as + well as selected control characters. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + The Text Compaction mode includes all the printable ASCII characters + (i.e. values from 32 to 126) and three ASCII control characters: HT or tab + (ASCII value 9), LF or line feed (ASCII value 10), and CR or carriage + return (ASCII value 13). The Text Compaction mode also includes various latch + and shift characters which are used exclusively within the mode. The Text + Compaction mode encodes up to 2 characters per codeword. The compaction rules + for converting data into PDF417 codewords are defined in 5.4.2.2. The sub-mode + switches are defined in 5.4.2.3. + + The text compaction data. + The byte compaction data if there + was a mode shift. + The size of the text compaction and byte compaction data. + The decoded data is appended to the result. + + + + + Byte Compaction mode (see 5.4.3) permits all 256 possible 8-bit byte values to be encoded. + This includes all ASCII characters value 0 to 127 inclusive and provides for international + character set support. + + The byte compaction mode i.e. 901 or 924 + The array of codewords (data + error) + Currently active character encoding + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Numeric Compaction mode (see 5.4.4) permits efficient encoding of numeric data strings. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Convert a list of Numeric Compacted codewords from Base 900 to Base 10. + EXAMPLE + Encode the fifteen digit numeric string 000213298174000 + Prefix the numeric string with a 1 and set the initial value of + t = 1 000 213 298 174 000 + Calculate codeword 0 + d0 = 1 000 213 298 174 000 mod 900 = 200 + + t = 1 000 213 298 174 000 div 900 = 1 111 348 109 082 + Calculate codeword 1 + d1 = 1 111 348 109 082 mod 900 = 282 + + t = 1 111 348 109 082 div 900 = 1 234 831 232 + Calculate codeword 2 + d2 = 1 234 831 232 mod 900 = 632 + + t = 1 234 831 232 div 900 = 1 372 034 + Calculate codeword 3 + d3 = 1 372 034 mod 900 = 434 + + t = 1 372 034 div 900 = 1 524 + Calculate codeword 4 + d4 = 1 524 mod 900 = 624 + + t = 1 524 div 900 = 1 + Calculate codeword 5 + d5 = 1 mod 900 = 1 + t = 1 div 900 = 0 + Codeword sequence is: 1, 624, 434, 632, 282, 200 + + Decode the above codewords involves + 1 x 900 power of 5 + 624 x 900 power of 4 + 434 x 900 power of 3 + + 632 x 900 power of 2 + 282 x 900 power of 1 + 200 x 900 power of 0 = 1000213298174000 + + Remove leading 1 => Result is 000213298174000 + The array of codewords + The number of codewords + The decoded string representing the Numeric data. + + + + + + + Guenther Grau + + + + Returns the DetectionResult Columns. This does a fair bit of calculation, so call it sparingly. + + The detection result columns. + + + + Adjusts the indicator column row numbers. + + Detection result column. + + + + return number of codewords which don't have a valid row number. Note that the count is not accurate as codewords . + will be counted several times. It just serves as an indicator to see when we can stop adjusting row numbers + + The row numbers. + + + + Adjusts the row numbers by row. + + The row numbers by row. + + + + Adjusts the row numbers from both Row Indicators + + zero + + + + Adjusts the row numbers from Right Row Indicator. + + The unadjusted row count. + + + + Adjusts the row numbers from Left Row Indicator. + + Unadjusted row Count. + + + + Adjusts the row number if valid. + + The invalid rows + Row indicator row number. + Invalid row counts. + Codeword. + + + + Adjusts the row numbers. + + Barcode column. + Codewords row. + Codewords. + + + + Adjusts the row number. + + true, if row number was adjusted, false otherwise. + Codeword. + Other codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + The maximum distance to search in the codeword array in both the positive and negative directions + + + + + The Bounding Box around the column (in the BitMatrix) + + The box. + + + + The Codewords the Box encodes for, offset by the Box minY. + Remember to Access this ONLY through GetCodeword(imageRow) if you're accessing it in that manner. + + The codewords. + + + + Initializes a new instance of the class. + + The Bounding Box around the column (in the BitMatrix) + + + + Converts the Image's Row to the index in the Codewords array + + The Codeword Index. + Image row. + + + + Converts the Codeword array index into a Row in the Image (BitMatrix) + + The Image Row. + Codeword index. + + + + Gets the codeword for a given row + + The codeword. + Image row. + + + + Gets the codeword closest to the specified row in the image + + Image row. + + + + Sets the codeword for an image row + + Image row. + Codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + Gets or sets a value indicating whether this instance is the left indicator + + true if this instance is left; otherwise, false. + + + + Initializes a new instance of the class. + + Box. + If set to true is left. + + + + Sets the Row Numbers as Inidicator Columns + + + + + TODO implement properly + TODO maybe we should add missing codewords to store the correct row number to make + finding row numbers for other columns easier + use row height count to make detection of invalid row numbers more reliable + + The indicator column row numbers. + Metadata. + + + + Gets the row heights. + + The row heights. + + + + Adjusts the in omplete indicator column row numbers. + + Metadata. + + + + Gets the barcode metadata. + + The barcode metadata. + + + + Prune the codewords which do not match the metadata + TODO Maybe we should keep the incorrect codewords for the start and end positions? + + Codewords. + Metadata. + + + + Returns a that represents the current . + + A that represents the current . + + + +

PDF417 error correction implementation.

+

This example + is quite useful in understanding the algorithm.

+ Sean Owen + +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the specified received. + + received codewords + number of those codewords used for EC + location of erasures + The error locations count. + + + + + Runs the euclidean algorithm (Greatest Common Divisor) until r's degree is less than R/2 + + The euclidean algorithm. + + + + Finds the error locations as a direct application of Chien's search + + The error locations. + Error locator. + + + + Finds the error magnitudes by directly applying Forney's Formula + + The error magnitudes. + Error evaluator. + Error locator. + Error locations. + + + +

A field based on powers of a generator integer, modulo some modulus.

+ +
+ Sean Owen +
+ + + + + Sean Owen + + + + Gets the coefficients. + + The coefficients. + + + + degree of this polynomial + + + + + Gets a value indicating whether this instance is zero. + + true if this polynomial is the monomial "0" + + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + + + Adds another Modulus + + Other. + + + + Subtract another Modulus + + Other. + + + + Multiply by another Modulus + + Other. + + + + Returns a Negative version of this instance + + + + + Multiply by a Scalar. + + Scalar. + + + + Multiplies by a Monomial + + The by monomial. + Degree. + Coefficient. + + + + Returns a that represents the current . + + A that represents the current . + + + + + + Guenther Grau + creatale GmbH (christoph.schulz@creatale.de) + + + + The ratios table + + + + + Initializes the class & Pre-computes the symbol ratio table. + + + + + Gets the decoded value. + + The decoded value. + Module bit count. + + + + Samples the bit counts. + + The bit counts. + Module bit count. + + + + Gets the decoded codeword value. + + The decoded codeword value. + Module bit count. + + + + Gets the bit value. + + The bit value. + Module bit count. + + + + Gets the closest decoded value. + + The closest decoded value. + Module bit count. + + + + + + Guenther Grau + + + + Decode the specified image, imageTopLeft, imageBottomLeft, imageTopRight, imageBottomRight, minCodewordWidth + and maxCodewordWidth. + TODO: don't pass in minCodewordWidth and maxCodewordWidth, pass in barcode columns for start and stop pattern + columns. That way width can be deducted from the pattern column. + This approach also allows to detect more details about the barcode, e.g. if a bar type (white or black) is wider + than it should be. This can happen if the scanner used a bad blackpoint. + + Image. + Image top left. + Image bottom left. + Image top right. + Image bottom right. + Minimum codeword width. + Max codeword width. + + + + Merge the specified leftRowIndicatorColumn and rightRowIndicatorColumn. + + Left row indicator column. + Right row indicator column. + + + + Adjusts the bounding box. + + The bounding box. + Row indicator column. + + + + Gets the barcode metadata. + + The barcode metadata. + Left row indicator column. + Right row indicator column. + + + + Gets the row indicator column. + + The row indicator column. + Image. + Bounding box. + Start point. + If set to true left to right. + Minimum codeword width. + Max codeword width. + + + + Adjusts the codeword count. + + Detection result. + Barcode matrix. + + + + Creates the decoder result. + + The decoder result. + Detection result. + + + + This method deals with the fact, that the decoding process doesn't always yield a single most likely value. The + current error correction implementation doesn't deal with erasures very well, so it's better to provide a value + for these ambiguous codewords instead of treating it as an erasure. The problem is that we don't know which of + the ambiguous values to choose. We try decode using the first value, and if that fails, we use another of the + ambiguous values and try to decode again. This usually only happens on very hard to read and decode barcodes, + so decoding the normal barcodes is not affected by this. + + The decoder result from ambiguous values. + Ec level. + Codewords. + contains the indexes of erasures. + array with the indexes that have more than one most likely value. + two dimensional array that contains the ambiguous values. The first dimension must + be the same Length as the ambiguousIndexes array. + + + + Creates the barcode matrix. + + The barcode matrix. + Detection result. + + + + Tests to see if the Barcode Column is Valid + + true, if barcode column is valid, false otherwise. + Detection result. + Barcode column. + + + + Gets the start column. + + The start column. + Detection result. + Barcode column. + Image row. + If set to true left to right. + + + + Detects the codeword. + + The codeword. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + Minimum codeword width. + Max codeword width. + + + + Gets the module bit count. + + The module bit count. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + + + + Gets the number of EC code words. + + The number of EC code words. + Barcode EC level. + + + + Adjusts the codeword start column. + + The codeword start column. + Image. + Minimum column. + Max column. + If set to true left to right. + Codeword start column. + Image row. + + + + Checks the codeword for any skew. + + true, if codeword is within the skew, false otherwise. + Codeword size. + Minimum codeword width. + Max codeword width. + + + + Decodes the codewords. + + The codewords. + Codewords. + Ec level. + Erasures. + + + + Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place. + + The errors. + data and error correction codewords. + positions of any known erasures. + number of error correction codewords that are available in codewords. + + + + Verifies that all is well with the the codeword array. + + Codewords. + Number EC codewords. + + + + Gets the bit count for codeword. + + The bit count for codeword. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Module bit count. + + + + Returns a that represents the jagged array. + + A that represents the jagged array. + Barcode matrix as a jagged array. + + + +

Encapsulates logic that can detect a PDF417 Code in an image, even if the + PDF417 Code is rotated or skewed, or partially obscured.

+ + SITA Lab (kevin.osullivan@sita.aero) + dswitkin@google.com (Daniel Switkin) + Guenther Grau +
+
+ + + B S B S B S B S Bar/Space pattern + 11111111 0 1 0 1 0 1 000. + + + + + 1111111 0 1 000 1 0 1 00 1 + + + + + if we set the value too low, then we don't detect the correct height of the bar if the start patterns are damaged. + if we set the value too high, then we might detect the start pattern from a neighbor barcode. + + + + + A PDF471 barcode should have at least 3 rows, with each row being >= 3 times the module width. Therefore it should be at least + 9 pixels tall. To be conservative, we use about half the size to ensure we don't miss it. + + + + +

Detects a PDF417 Code in an image. Only checks 0 and 180 degree rotations.

+
+ barcode image to decode + optional hints to detector + if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned + + encapsulating results of detecting a PDF417 code + +
+ + + Detects PDF417 codes in an image. Only checks 0 degree rotation (so rotate the matrix and check again outside of this method) + + multiple if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned. + bit matrix to detect barcodes in. + List of ResultPoint arrays containing the coordinates of found barcodes + + + + Locate the vertices and the codewords area of a black blob using the Start and Stop patterns as locators. + + Matrix. + Start row. + Start column. + an array containing the vertices: + vertices[0] x, y top left barcode + vertices[1] x, y bottom left barcode + vertices[2] x, y top right barcode + vertices[3] x, y bottom right barcode + vertices[4] x, y top left codeword area + vertices[5] x, y bottom left codeword area + vertices[6] x, y top right codeword area + vertices[7] x, y bottom right codeword area + + + + + Copies the temp data to the final result + + Result. + Temp result. + Destination indexes. + + + + Finds the rows with the given pattern. + + The rows with pattern. + Matrix. + Height. + Width. + Start row. + Start column. + Pattern. + + + + Finds the guard pattern. Uses System.Linq.Enumerable.Repeat to fill in counters. This might be a performance issue? + + start/end horizontal offset of guard pattern, as an array of two ints. + matrix row of black/white values to search + column x position to start search. + row y position to start search. + width the number of pixels to search on this row. + If set to true search the white patterns first. + pattern of counts of number of black and white pixels that are being searched for as a pattern. + counters array of counters, as long as pattern, to re-use . + + + + Determines how closely a set of observed counts of runs of black/white. + values matches a given target pattern. This is reported as the ratio of + the total variance from the expected pattern proportions across all + pattern elements, to the length of the pattern. + + + ratio of total variance between counters and pattern compared to + total pattern size, where the ratio has been multiplied by 256. + So, 0 means no variance (perfect match); 256 means the total + variance between counters and patterns equals the pattern length, + higher values mean even more variance + + observed counters. + expected pattern. + The most any counter can differ before we give up. + + + + PDF 417 Detector Result class. Skipped private backing stores. + Guenther Grau + + + + + Initializes a new instance of the class. + + Bits. + Points. + + + + defines the level of the error correction / count of error correction codewords + + + + + Holds all of the information for a barcode in a format where it can be easily accessible + + Jacob Haynes + + + + + the height of the matrix (Rows) + the width of the matrix (Cols) + + + + + Jacob Haynes + + + + + Creates a Barcode row of the width + + The width. + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + A boolean which is true if the bar black false if it is white + How many spots wide the bar is. + + + + + This function scales the row + + How much you want the image to be scaled, must be greater than or equal to 1. + the scaled row + + + + + Represents possible PDF417 barcode compaction types. + + + + + + + + + + + + + + + + + + + + + + + + + Data object to specify the minimum and maximum number of rows and columns for a PDF417 barcode. + @author qwandor@google.com (Andrew Walbran) + + + + + Initializes a new instance of the class. + + The min cols. + The max cols. + The min rows. + The max rows. + + + + Gets the min cols. + + + + + Gets the max cols. + + + + + Gets the min rows. + + + + + Gets the max rows. + + + + + Top-level class for the logic part of the PDF417 implementation. + + + + + The start pattern (17 bits) + + + + + The stop pattern (18 bits) + + + + + The codeword table from the Annex A of ISO/IEC 15438:2001(E). + + + + + Calculates the necessary number of rows as described in annex Q of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol (r) + + + + Calculates the number of pad codewords as described in 4.9.2 of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol + the number of pad codewords + + + + Generates the barcode logic. + + the message to encode + PDF417 error correction level to use + + + + Determine optimal nr of columns and rows for the specified number of + codewords. + + number of code words + number of error correction code words + The longest dimension of the barcode, used for columns + The short dimension of the barcode, used for rows + The height of a row, will alter this parameter if aspectRatio>4 (aspectRatio==AUTO) + dimension object containing cols as width and rows as height + + + + Sets max/min row/col values + + maximum allowed columns + minimum allowed columns + maximum allowed rows + minimum allowed rows + + + + Sets compaction to values stored in enum + + compaction mode to use + + + + Sets compact to be true or false + + if true, enables compaction + + + + Sets output encoding. + + sets character encoding to use + + + + Sets the disable eci. + + if set to true don't add an ECI segment for different encodings than default. + + + + PDF417 error correction code following the algorithm described in ISO/IEC 15438:2001(E) in + chapter 4.10. + + + + + Tables of coefficients for calculating error correction words + (see annex F, ISO/IEC 15438:2001(E)) + + + + + Determines the number of error correction codewords for a specified error correction + level. + + the error correction level (0-8) + the number of codewords generated for error correction + + + + Determines the error correction level for AUTO + + The error correction level (0-9) + The number of codewords for AUTO errorCorrectionLevel + the number of codewords generated for error correction + + + + Returns the recommended minimum error correction level as described in annex E of + ISO/IEC 15438:2001(E). + + the number of data codewords + the recommended minimum error correction level + + + + Generates the error correction codewords according to 4.10 in ISO/IEC 15438:2001(E). + + the data codewords + the error correction level (0-8) + the String representing the error correction codewords + + + + defines the level of the error correction / count of error correction codewords + + + + + PDF417 high-level encoder following the algorithm described in ISO/IEC 15438:2001(E) in + annex P. + + + + + code for Text compaction + + + + + code for Byte compaction + + + + + code for Numeric compaction + + + + + Text compaction submode Alpha + + + + + Text compaction submode Lower + + + + + Text compaction submode Mixed + + + + + Text compaction submode Punctuation + + + + + mode latch to Text Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters NOT a multiple of 6) + + + + + mode latch to Numeric Compaction mode + + + + + mode shift to Byte Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters a multiple of 6) + + + + + identifier for a user defined Extended Channel Interpretation (ECI) + + + + + identifier for a general purpose ECO format + + + + + identifier for an ECI of a character set of code page + + + + + Raw code table for text compaction Mixed sub-mode + + + + + Raw code table for text compaction: Punctuation sub-mode + + + + + Performs high-level encoding of a PDF417 message using the algorithm described in annex P + of ISO/IEC 15438:2001(E). If byte compaction has been selected, then only byte compaction + is used. + + the message + compaction mode to use + character encoding used to encode in default or byte compaction + or null for default / not applicable + if true, don't add an ECI segment for different encodings than default + the encoded message (the char values range from 0 to 928) + + + + Encode parts of the message using Text Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.2. + + the message + the start position within the message + the number of characters to encode + receives the encoded codewords + should normally be SUBMODE_ALPHA + the text submode in which this method ends + + + + + Encode parts of the message using Byte Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.3. The Unicode characters will be converted to binary using the cp437 + codepage. + + the message converted to a byte array + the start position within the message + the number of bytes to encode + the mode from which this method starts + receives the encoded codewords + + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using text compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using binary compaction. + + the message + the message converted to a byte array + the start position within the message + + the requested character count + + + + The class holds the available options for the + + + + + Specifies whether to use compact mode for PDF417 (type ). + + + + + Specifies what compaction mode to use for PDF417 (type + ). + + + + + Specifies the minimum and maximum number of rows and columns for PDF417 (type + ). + + + + + Specifies what degree of error correction to use + + + + + Specifies what degree of error correction to use + + + + + Specifies what character encoding to use where applicable (type {@link String}) + + + + + Explicitly disables ECI segment when generating PDF417 Code + That is against the specification but some + readers have problems if the charset is switched from + CP437 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use different encodings + and the ECI segment is omitted. + + + + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Maximum Codewords (Data + Error). + + + + + Gets the bit count sum. + + The bit count sum. + Module bit count. + + + + Converts an ICollection<int> to an int[] + Carry-over from Java. Will likely remove and replace with the Generic .ToArray() method. + + The int array. + List. + + + + Translate the symbol into a codeword + + the codeword corresponding to the symbol. + encoded symbol to translate to a codeword + + + + The sorted table of all possible symbols. Extracted from the PDF417 + specification. The index of a symbol in this table corresponds to the + index into the codeword table. + + + + + This table contains to codewords for all symbols. + + + + + This implementation can detect and decode PDF417 codes in an image. + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Locates and decodes a PDF417 code in an image. + + a String representing the content encoded by the PDF417 code + if a PDF417 cannot be decoded + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + **Note** this will return the FIRST barcode discovered if there are many. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Locates and decodes Multiple PDF417 codes in an image. + + an array of Strings representing the content encoded by the PDF417 codes + + + + + Locates and decodes multiple barcodes in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcodes encode + + + + + Decode the specified image, with the hints and optionally multiple barcodes. + Based on Owen's Comments in , this method has been modified to continue silently + if a barcode was not decoded where it was detected instead of throwing a new exception object. + + Image. + Hints. + If set to true multiple. + + + + Gets the maximum width of the barcode + + The max width. + P1. + P2. + + + + Gets the minimum width of the barcode + + The minimum width. + P1. + P2. + + + + Gets the maximum width of the codeword. + + The max codeword width. + P. + + + + Gets the minimum width of the codeword. + + The minimum codeword width. + P. + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + PDF 417 result meta data. + Guenther Grau + + + + + The Segment ID represents the segment of the whole file distributed over different symbols. + + + + + Is the same for each related PDF417 symbol + + + + + always null + + + + + true if it is the last segment + + + + + count of segments, -1 if not set + + + + + Filename of the encoded file + + + + + filesize in bytes of the encoded file + returns filesize in bytes, -1 if not set + + + + + 16-bit CRC checksum using CCITT-16 + returns crc checksum, -1 if not set + + + + + unix epock timestamp, elapsed seconds since 1970-01-01 + returns elapsed seconds, -1 if not set + + + + + Jacob Haynes + qwandor@google.com (Andrew Walbran) + + + + + default white space (margin) around the code + + + + + default error correction level + + + + + default aspect ratio + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The height of a row in the barcode + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Takes encoder, accounts for width/height, and retrieves bit matrix + + + + + This takes an array holding the values of the PDF 417 + + a byte array of information with 0 is black, and 1 is white + border around the barcode + BitMatrix of the input + + + + Takes and rotates the it 90 degrees + + + + + This object extends LuminanceSource around an array of YUV data returned from the camera driver, + with the option to crop to a rectangle within the full data. This can be used to exclude + superfluous pixels around the perimeter and speed up decoding. + It works for any pixel format where the Y channel is planar and appears first, including + YCbCr_420_SP and YCbCr_422_SP. + @author dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The yuv data. + Width of the data. + Height of the data. + The left. + The top. + The width. + The height. + if set to true [reverse horiz]. + + + + Initializes a new instance of the class. + + The luminances. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + + + + + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Renders the cropped greyscale bitmap. + + + + + + width of image from {@link #renderThumbnail()} + + + + + height of image from {@link #renderThumbnail()} + + + + + creates a new instance + + + + + + + + Sean Owen + + + {@link BitMatrix} to parse + ReaderException if dimension is not >= 21 and 1 mod 4 + + +

Reads format information from one of its two locations within the QR Code.

+ +
+ {@link FormatInformation} encapsulating the QR Code's format info + + ReaderException if both format information locations cannot be parsed as + the valid encoding of format information + +
+ +

Reads version information from one of its two locations within the QR Code.

+ +
+ {@link Version} encapsulating the QR Code's version + + ReaderException if both version information locations cannot be parsed as + the valid encoding of version information + +
+ +

Reads the bits in the {@link BitMatrix} representing the finder pattern in the + correct order in order to reconstruct the codewords bytes contained within the + QR Code.

+ +
+ bytes encoded within the QR Code + + ReaderException if the exact number of bytes expected is not read +
+ + Revert the mask removal done while reading the code words. The bit matrix should revert to its original state. + + + Prepare the parser for a mirrored operation. + This flag has effect only on the {@link #readFormatInformation()} and the + {@link #readVersion()}. Before proceeding with {@link #readCodewords()} the + {@link #mirror()} method should be called. + + @param mirror Whether to read version and format information mirrored. + + + Mirror the bit matrix in order to attempt a second reading. + + +

Encapsulates a block of data within a QR Code. QR Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

When QR Codes use multiple data blocks, they are actually interleaved. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ +
+ bytes as read directly from the QR Code + + version of the QR Code + + error-correction level of the QR Code + + {@link DataBlock}s containing original bytes, "de-interleaved" from representation in the + QR Code + +
+ +

Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations + of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix, + including areas used for finder patterns, timing patterns, etc. These areas should be unused + after the point they are unmasked anyway.

+ +

Note that the diagram in section 6.8.1 is misleading since it indicates that i is column position + and j is row position. In fact, as the text says, i is row position and j is column position.

+ +
+ Sean Owen +
+ + See ISO 18004:2006 6.8.1 + + +

Implementations of this method reverse the data masking process applied to a QR Code and + make its bits ready to read.

+
+ + representation of QR Code bits + dimension of QR Code, represented by bits, being unmasked +
+ +

QR Codes can encode text as bits in one of several modes, and can use multiple modes + in one QR Code. This class decodes the bits back into text.

+ +

See ISO 18004:2006, 6.4.3 - 6.4.7

+ Sean Owen +
+
+ + + See ISO 18004:2006, 6.4.4 Table 5 + + + + + See specification GBT 18284-2000 + + The bits. + The result. + The count. + + + + +

The main class which implements QR Code decoding -- as opposed to locating and extracting + the QR Code from an image.

+
+ + Sean Owen + +
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a QR Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Decodes a QR Code represented as a {@link BitMatrix}. A 1 or "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+
+ data and error correction codewords + number of codewords that are data bytes + +
+ + +

See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels + defined by the QR code standard.

+
+ Sean Owen +
+ + L = ~7% correction + + + M = ~15% correction + + + Q = ~25% correction + + + H = ~30% correction + + + + Gets the bits. + + + + + Gets the name. + + + + + Ordinals this instance. + + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Fors the bits. + + int containing the two bits encoding a QR Code's error correction level + + representing the encoded error correction level + + + +

Encapsulates a QR Code's format information, including the data mask used and + error correction level.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + +
+ + See ISO 18004:2006, Annex C, Table C.1 + + + Offset i holds the number of 1 bits in the binary representation of i + + + + Decodes the format information. + + format info indicator, with mask still applied + The masked format info2. + + information about the format it specifies, or null + if doesn't seem to match any known pattern + + + + +

See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which + data can be encoded to bits in the QR code standard.

+
+ Sean Owen +
+ + + Gets the name. + + + + + enumeration for encoding modes + + + + + + + + + + numeric encoding + + + + + alpha-numeric encoding + + + + + structured append + + + + + byte mode encoding + + + + + ECI segment + + + + + Kanji mode + + + + + FNC1 char, first position + + + + + FNC1 char, second position + + + + + Hanzi mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See GBT 18284-2000; "Hanzi" is a transliteration of this mode name. + + + + Fors the bits. + + four bits encoding a QR Code data mode + + encoded by these bits + + if bits do not correspond to a known mode + + + version in question + + number of bits used, in this QR Code symbol {@link Version}, to encode the + count of characters that will follow encoded in this {@link Mode} + + + + + Gets the bits. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Meta-data container for QR Code decoding. Instances of this class may be used to convey information back to the + decoding caller. Callers are expected to process this. + + + + + Initializes a new instance of the class. + + if set to true [mirrored]. + + + + true if the QR Code was mirrored. + + + + + Apply the result points' order correction due to mirroring. + + Array of points to apply mirror correction to. + + + + See ISO 18004:2006 Annex D + + Sean Owen + + + See ISO 18004:2006 Annex D. + Element i represents the raw version bits that specify version i + 7 + + + + + Gets the version number. + + + + + Gets the alignment pattern centers. + + + + + Gets the total codewords. + + + + + Gets the dimension for version. + + + + + Gets the EC blocks for level. + + The ec level. + + + +

Deduces version information purely from QR Code dimensions.

+ +
+ dimension in modules + + for a QR Code of that dimension or null +
+ + + Gets the version for number. + + The version number. + + + + See ISO 18004:2006 Annex E + + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + + Gets the EC codewords per block. + + + + + Gets the num blocks. + + + + + Gets the total EC codewords. + + + + + Gets the EC blocks. + + + + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the QR code version's format.

+
+
+ + + Gets the count. + + + + + Gets the data codewords. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + See ISO 18004:2006 6.5.1 Table 9 + + +

Encapsulates an alignment pattern, which are the smaller square patterns found in + all but the simplest QR Codes.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Determines if this alignment pattern "about equals" an alignment pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing an average of the two. + + The i. + The j. + New size of the module. + + + +

This class attempts to find alignment patterns in a QR Code. Alignment patterns look like finder + patterns but are smaller and appear at regular intervals throughout the image.

+ +

At the moment this only looks for the bottom-right alignment pattern.

+ +

This is mostly a simplified copy of {@link FinderPatternFinder}. It is copied, + pasted and stripped down here for maximum performance but does unfortunately duplicate + some code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Creates a finder that will look in a portion of the whole image.

+ +
+ image to search + + left column from which to start searching + + top row from which to start searching + + width of region to search + + height of region to search + + estimated module size so far + + callback function which is called, when a result point is found +
+ +

This method attempts to find the bottom-right alignment pattern in the image. It is a bit messy since + it's pretty performance-critical and so is written to be fast foremost.

+ +
+ if found +
+ + Given a count of black/white/black pixels just seen and an end position, + figures the location of the center of this black/white/black run. + + + + count of black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/1 ratios + used by alignment patterns to be considered a match + + + + +

After a horizontal scan finds a potential alignment pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + alignment pattern to see if the same proportion is detected.

+
+ row where an alignment pattern was detected + center of the section that appears to cross an alignment pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of alignment pattern, or null if not found + +
+ +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will see if this pattern had been + found on a previous horizontal scan. If so, we consider it confirmed and conclude we have + found the alignment pattern.

+ +
+ reading state module counts from horizontal scan + + row where alignment pattern may be found + + end of possible alignment pattern in row + + {@link AlignmentPattern} if we have found the same pattern twice, or null if not + +
+ + +

Encapsulates logic that can detect a QR Code in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + + Gets the image. + + + + + Gets the result point callback. + + + + +

Detects a QR Code in an image.

+
+ + encapsulating results of detecting a QR Code + +
+ + +

Detects a QR Code in an image.

+
+ optional hints to detector + + encapsulating results of detecting a QR Code + +
+ + + Processes the finder pattern info. + + The info. + + + +

Computes the dimension (number of modules on a size) of the QR Code based on the position + of the finder patterns and estimated module size.

+
+
+ + +

Computes an average estimated module size based on estimated derived from the positions + of the three finder patterns.

+
+ detected top-left finder pattern center + detected top-right finder pattern center + detected bottom-left finder pattern center + estimated module size +
+ +

Estimates module size based on two finder patterns -- it uses + {@link #sizeOfBlackWhiteBlackRunBothWays(int, int, int, int)} to figure the + width of each, measuring along the axis between their centers.

+
+
+ + See {@link #sizeOfBlackWhiteBlackRun(int, int, int, int)}; computes the total width of + a finder pattern by looking for a black-white-black run from the center in the direction + of another point (another finder pattern center), and in the opposite direction too. + + + +

This method traces a line from a point in the image, in the direction towards another point. + It begins in a black region, and keeps going until it finds white, then black, then white again. + It reports the distance from the start to this point.

+ +

This is used when figuring out how wide a finder pattern is, when the finder pattern + may be skewed or rotated.

+
+
+ + +

Attempts to locate an alignment pattern in a limited region of the image, which is + guessed to contain it. This method uses {@link AlignmentPattern}.

+
+ estimated module size so far + x coordinate of center of area probably containing alignment pattern + y coordinate of above + number of pixels in all directions to search from the center + + if found, or null otherwise + +
+ + +

Encapsulates a finder pattern, which are the three square patterns found in + the corners of QR Codes. It also encapsulates a count of similar finder patterns, + as a convenience to the finder's bookkeeping.

+
+ Sean Owen +
+ + + Gets the size of the estimated module. + + + The size of the estimated module. + + + +

Determines if this finder pattern "about equals" a finder pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing a weighted average + based on count. + + The i. + The j. + New size of the module. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+
+ Sean Owen +
+ + + 1 pixel/module times 3 modules/center + + + + + support up to version 20 for mobile clients + + + + +

Creates a finder that will search the image for three finder patterns.

+
+ image to search +
+ + + Initializes a new instance of the class. + + The image. + The result point callback. + + + + Gets the image. + + + + + Gets the possible centers. + + + + Given a count of black/white/black/white/black pixels just seen and an end position, + figures the location of the center of this run. + + + + count of black/white/black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/3/1/1 ratios + used by finder patterns to be considered a match + + + + + + count of black/white/black/white/black pixels just read + true if the proportions of the counts is close enough to the 1/1/3/1/1 ratios + by finder patterns to be considered a match + + + + After a vertical and horizontal scan finds a potential finder pattern, this method + "cross-cross-cross-checks" by scanning down diagonally through the center of the possible + finder pattern to see if the same proportion is detected. + @param maxCount maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + @param originalStateCountTotal The original state count total. + + row where a finder pattern was detected + center of the section that appears to cross a finder pattern + true if proportions are withing expected limits + + + +

After a horizontal scan finds a potential finder pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + finder pattern to see if the same proportion is detected.

+
+ row where a finder pattern was detected + center of the section that appears to cross a finder pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of finder pattern, or null if not found + +
+ +

Like {@link #crossCheckVertical(int, int, int, int)}, and in fact is basically identical, + except it reads horizontally instead of vertically. This is used to cross-cross + check a vertical cross check and locate the real center of the alignment pattern.

+
+
+ + + @see #handlePossibleCenter(int[], int, int) + + reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + ignored + true if a finder pattern candidate was found this time + + + +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will, ah, cross-cross-check + with another horizontal scan. This is needed primarily to locate the real horizontal + center of the pattern in cases of extreme skew. + And then we cross-cross-cross check with another diagonal scan.

+ If that succeeds the finder pattern location is added to a list that tracks + the number of times each location has been nearly-matched as a finder pattern. + Each additional find is more evidence that the location is in fact a finder + pattern center +
+ reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + + true if a finder pattern candidate was found this time + +
+ + number of rows we could safely skip during scanning, based on the first + two finder patterns that have been located. In some cases their position will + allow us to infer that the third pattern must lie below a certain point farther + down in the image. + + + + true iff we have found at least 3 finder patterns that have been detected + at least {@link #CENTER_QUORUM} times each, and, the estimated module size of the + candidates is "pretty similar" + + + + the 3 best {@link FinderPattern}s from our list of candidates. The "best" are + those that have been detected at least {@link #CENTER_QUORUM} times, and whose module + size differs from the average among those patterns the least + + + + + Orders by furthest from average + + + +

Orders by {@link FinderPattern#getCount()}, descending.

+
+ + +

Encapsulates information about finder patterns in an image, including the location of + the three finder patterns, and their estimated module size.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The pattern centers. + + + + Gets the bottom left. + + + + + Gets the top left. + + + + + Gets the top right. + + + + + JAVAPORT: The original code was a 2D array of ints, but since it only ever gets assigned + 0, 1 and 2 I'm going to use less memory and go with bytes. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Gets the height. + + + + + Gets the width. + + + + + Gets or sets the with the specified x. + + + + + an internal representation as bytes, in row-major order. array[y][x] represents point (x,y) + + + + + Sets the specified x. + + The x. + The y. + The value. + + + + Sets the specified x. + + The x. + The y. + if set to true [value]. + + + + Clears the specified value. + + The value. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + Encode "bytes" with the error correction level "ecLevel". The encoding mode will be chosen + internally by chooseMode(). On success, store the result in "qrCode". + We recommend you to use QRCode.EC_LEVEL_L (the lowest level) for + "getECLevel" since our primary use is to show QR code on desktop screens. We don't need very + strong error correction for this purpose. + Note that there is no way to encode bytes in MODE_KANJI. We might want to add EncodeWithMode() + with which clients can specify the encoding mode. For now, we don't need the functionality. + + text to encode + error correction level to use + representing the encoded QR code + + + + Encodes the specified content. + + The content. + The ec level. + The hints. + + + + + Decides the smallest version of QR code that will contain all of the provided data. + + if the data cannot fit in any version + + + + Gets the alphanumeric code. + + The code. + the code point of the table used in alphanumeric mode or + -1 if there is no corresponding code in the table. + + + + Chooses the mode. + + The content. + + + + + Choose the best mode by examining the content. Note that 'encoding' is used as a hint; + if it is Shift_JIS, and the input is only double-byte Kanji, then we return {@link Mode#KANJI}. + + The content. + The encoding. + + + + + true if the number of input bits will fit in a code with the specified version and error correction level. + + + + Terminate bits as described in 8.4.8 and 8.4.9 of JISX0510:2004 (p.24). + + The num data bytes. + The bits. + + + + Get number of data bytes and number of error correction bytes for block id "blockID". Store + the result in "numDataBytesInBlock", and "numECBytesInBlock". See table 12 in 8.5.1 of + JISX0510:2004 (p.30) + + The num total bytes. + The num data bytes. + The num RS blocks. + The block ID. + The num data bytes in block. + The num EC bytes in block. + + + + Interleave "bits" with corresponding error correction bytes. On success, store the result in + "result". The interleave rule is complicated. See 8.6 of JISX0510:2004 (p.37) for details. + + The bits. + The num total bytes. + The num data bytes. + The num RS blocks. + + + + + Append mode info. On success, store the result in "bits". + + The mode. + The bits. + + + + Append length info. On success, store the result in "bits". + + The num letters. + The version. + The mode. + The bits. + + + + Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits". + + The content. + The mode. + The bits. + The encoding. + + + + + + Satoru Takabayashi + Daniel Switkin + Sean Owen + + + + Apply mask penalty rule 1 and return the penalty. Find repetitive cells with the same color and + give penalty to them. Example: 00000 or 11111. + + The matrix. + + + + + Apply mask penalty rule 2 and return the penalty. Find 2x2 blocks with the same color and give + penalty to them. This is actually equivalent to the spec's rule, which is to find MxN blocks and give a + penalty proportional to (M-1)x(N-1), because this is the number of 2x2 blocks inside such a block. + + The matrix. + + + + + Apply mask penalty rule 3 and return the penalty. Find consecutive cells of 00001011101 or + 10111010000, and give penalty to them. If we find patterns like 000010111010000, we give + penalties twice (i.e. 40 * 2). + + The matrix. + + + + + Apply mask penalty rule 4 and return the penalty. Calculate the ratio of dark cells and give + penalty if the ratio is far from 50%. It gives 10 penalty for 5% distance. + + The matrix. + + + + + Return the mask bit for "getMaskPattern" at "x" and "y". See 8.8 of JISX0510:2004 for mask + pattern conditions. + + The mask pattern. + The x. + The y. + + + + + Helper function for applyMaskPenaltyRule1. We need this for doing this calculation in both + vertical and horizontal orders respectively. + + The matrix. + if set to true [is horizontal]. + + + + + + + + satorux@google.com (Satoru Takabayashi) - creator + + + + + Set all cells to 2. 2 means that the cell is empty (not set yet). + + JAVAPORT: We shouldn't need to do this at all. The code should be rewritten to begin encoding + with the ByteMatrix initialized all to zero. + + The matrix. + + + + Build 2D matrix of QR Code from "dataBits" with "ecLevel", "version" and "getMaskPattern". On + success, store the result in "matrix" and return true. + + The data bits. + The ec level. + The version. + The mask pattern. + The matrix. + + + + Embed basic patterns. On success, modify the matrix and return true. + The basic patterns are: + - Position detection patterns + - Timing patterns + - Dark dot at the left bottom corner + - Position adjustment patterns, if need be + + The version. + The matrix. + + + + Embed type information. On success, modify the matrix. + + The ec level. + The mask pattern. + The matrix. + + + + Embed version information if need be. On success, modify the matrix and return true. + See 8.10 of JISX0510:2004 (p.47) for how to embed version information. + + The version. + The matrix. + + + + Embed "dataBits" using "getMaskPattern". On success, modify the matrix and return true. + For debugging purposes, it skips masking process if "getMaskPattern" is -1. + See 8.7 of JISX0510:2004 (p.38) for how to embed data bits. + + The data bits. + The mask pattern. + The matrix. + + + + Return the position of the most significant bit set (to one) in the "value". The most + significant bit is position 32. If there is no bit set, return 0. Examples: + - findMSBSet(0) => 0 + - findMSBSet(1) => 1 + - findMSBSet(255) => 8 + + The value_ renamed. + + + + + Calculate BCH (Bose-Chaudhuri-Hocquenghem) code for "value" using polynomial "poly". The BCH + code is used for encoding type information and version information. + Example: Calculation of version information of 7. + f(x) is created from 7. + - 7 = 000111 in 6 bits + - f(x) = x^2 + x^2 + x^1 + g(x) is given by the standard (p. 67) + - g(x) = x^12 + x^11 + x^10 + x^9 + x^8 + x^5 + x^2 + 1 + Multiply f(x) by x^(18 - 6) + - f'(x) = f(x) * x^(18 - 6) + - f'(x) = x^14 + x^13 + x^12 + Calculate the remainder of f'(x) / g(x) + x^2 + __________________________________________________ + g(x) )x^14 + x^13 + x^12 + x^14 + x^13 + x^12 + x^11 + x^10 + x^7 + x^4 + x^2 + -------------------------------------------------- + x^11 + x^10 + x^7 + x^4 + x^2 + + The remainder is x^11 + x^10 + x^7 + x^4 + x^2 + Encode it in binary: 110010010100 + The return value is 0xc94 (1100 1001 0100) + + Since all coefficients in the polynomials are 1 or 0, we can do the calculation by bit + operations. We don't care if coefficients are positive or negative. + + The value. + The poly. + + + + + Make bit vector of type information. On success, store the result in "bits" and return true. + Encode error correction level and mask pattern. See 8.9 of + JISX0510:2004 (p.45) for details. + + The ec level. + The mask pattern. + The bits. + + + + Make bit vector of version information. On success, store the result in "bits" and return true. + See 8.10 of JISX0510:2004 (p.45) for details. + + The version. + The bits. + + + + Check if "value" is empty. + + The value. + + true if the specified value is empty; otherwise, false. + + + + + Embed the lonely dark dot at left bottom corner. JISX0510:2004 (p.46) + + The matrix. + + + + + + The x start. + The y start. + The matrix. + + + + Embed position detection patterns and surrounding vertical/horizontal separators. + + The matrix. + + + + Embed position adjustment patterns if need be. + + The version. + The matrix. + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + + + + + + Initializes a new instance of the class. + + + + + Gets or sets the mode. + + + The mode. + + + + + Gets or sets the EC level. + + + The EC level. + + + + + Gets or sets the version. + + + The version. + + + + + Gets or sets the mask pattern. + + + The mask pattern. + + + + + Gets or sets the matrix. + + + The matrix. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Check if "mask_pattern" is valid. + + The mask pattern. + + true if [is valid mask pattern] [the specified mask pattern]; otherwise, false. + + + + + The class holds the available options for the QrCodeWriter + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + . + + + + + Specifies what character encoding to use where applicable (type ) + + + + + Explicitly disables ECI segment when generating QR Code + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + + + + + Specifies the exact version of QR code to be encoded. An integer, range 1 to 40. If the data specified + cannot fit within the required version, a WriterException will be thrown. + + + + + This implementation can detect and decode QR Codes in an image. + Sean Owen + + + + + Gets the decoder. + + + + + + Locates and decodes a QR code in an image. + + a String representing the content encoded by the QR code + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a QR Code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Implementations of this interface can decode an image of a barcode in some format into + the String it encodes. For example, can + decode a QR code. The decoder may optionally receive hints from the caller which may help + it decode more quickly or accurately. + + See , which attempts to determine what barcode + format is present within the image as well, and then decodes it accordingly. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + String which the barcode encodes + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + The general exception class throw when something goes wrong during decoding of a barcode. + This includes, but is not limited to, failing checksums / error correction algorithms, being + unable to locate finder timing patterns, and so on. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class. + + The inner exception. + + + + Initializes a new instance of the class. + + The inner exception. + + + + + Renders a to a image + + + + + Gets or sets the foreground color. + + The foreground color. + + + + Gets or sets the background color. + + The background color. + + + + Gets or sets the resolution which should be used to create the bitmap + If nothing is set the current system settings are used + + + + + Gets or sets the resolution which should be used to create the bitmap + If nothing is set the current system settings are used + + + + + Gets or sets the text font. + + + The text font. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Interface for a class to convert a BitMatrix to an output image format + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + The options. + + + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + + + converts the pixel data to a bitmap object + + + + + + the generated code as byte array of BGRA pixels + + + + + the width of the image + + + + + the height of the image + + + + + Renders a to an byte array with pixel data (4 byte per pixel, BGRA) + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Renders a barcode into a Svg image + + + + + Gets or sets the foreground color. + + The foreground color. + + + + Gets or sets the background color. + + The background color. + + + + Gets or sets the font family name + + The font family name. + + + + Gets or sets the font size in pixel + + The font size in pixel. + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Represents a barcode as a Svg image + + + + + Gets or sets the content. + + + The content. + + + + + The original height of the bitmatrix for the barcode + + + + + The original width of the bitmatrix for the barcode + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The content. + + + + Gives the XML representation of the SVG image + + + + + Encapsulates the result of decoding a barcode within an image. + + + + raw text encoded by the barcode, if applicable, otherwise null + + + raw bytes encoded by the barcode, if applicable, otherwise null + + + + points related to the barcode in the image. These are typically points + identifying finder patterns or the corners of the barcode. The exact meaning is + specific to the type of barcode that was decoded. + + + + {@link BarcodeFormat} representing the format of the barcode that was decoded + + + + {@link Hashtable} mapping {@link ResultMetadataType} keys to values. May be + null. This contains optional metadata about what was detected about the barcode, + like orientation. + + + + + Gets the timestamp. + + + + + how many bits of are valid; typically 8 times its length + + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + The timestamp. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + The timestamp. + + + + Adds one metadata to the result + + The type. + The value. + + + + Adds a list of metadata to the result + + The metadata. + + + + Adds the result points. + + The new points. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Represents some type of metadata about the result of the decoding that the decoder + wishes to communicate back to the caller. + + Sean Owen + + + + Unspecified, application-specific metadata. Maps to an unspecified {@link Object}. + + + + + Denotes the likely approximate orientation of the barcode in the image. This value + is given as degrees rotated clockwise from the normal, upright orientation. + For example a 1D barcode which was found by reading top-to-bottom would be + said to have orientation "90". This key maps to an {@link Integer} whose + value is in the range [0,360). + + + + +

2D barcode formats typically encode text, but allow for a sort of 'byte mode' + which is sometimes used to encode binary data. While {@link Result} makes available + the complete raw bytes in the barcode for these formats, it does not offer the bytes + from the byte segments alone.

+

This maps to a {@link java.util.List} of byte arrays corresponding to the + raw bytes in the byte segments in the barcode, in order.

+
+
+ + + Error correction level used, if applicable. The value type depends on the + format, but is typically a String. + + + + + For some periodicals, indicates the issue number as an {@link Integer}. + + + + + For some products, indicates the suggested retail price in the barcode as a + formatted {@link String}. + + + + + For some products, the possible country of manufacture as a {@link String} denoting the + ISO country code. Some map to multiple possible countries, like "US/CA". + + + + + For some products, the extension text + + + + + If the code format supports structured append and + the current scanned code is part of one then the + sequence number is given with it. + + + + + If the code format supports structured append and + the current scanned code is part of one then the + parity is given with it. + + + + + PDF417-specific metadata + + + + + Aztec-specific metadata + + + + + Encapsulates a point of interest in an image containing a barcode. Typically, this + would be the location of a finder pattern or the corner of the barcode, for example. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The x. + The y. + + + + Gets the X. + + + + + Gets the Y. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC and + BC is less than AC and the angle between BC and BA is less than 180 degrees. + + array of three to order + + + + calculates the distance between two points + + first pattern + second pattern + + distance between two points + + + + + Returns the z component of the cross product between vectors BC and BA. + + + + Callback which is invoked when a possible result point (significant + point in the barcode image such as a corner) is found. + + + + + + + + Luminance source class which support different formats of images. + + + + + enumeration of supported bitmap format which the RGBLuminanceSource can process + + + + + format of the byte[] isn't known. RGBLuminanceSource tries to determine the best possible value + + + + + grayscale array, the byte array is a luminance array with 1 byte per pixel + + + + + grayscale array, the byte array is a luminance array with 2 bytes per pixel + + + + + 3 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels alpha, red, green and blue + + + + + 3 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green, red and alpha + + + + + 2 bytes per pixel, 5 bit red, 6 bits green and 5 bits blue + + + + + 4 bytes per pixel with the channels red, green, blue and alpha + + + + + 4 bytes for two pixels, UYVY formatted + + + + + 4 bytes for two pixels, YUYV formatted + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 1 byte per pixel (Gray8). + That means the whole array consists of the luminance values (grayscale). + + The luminance array. + The width. + The height. + if set to true [is8 bit]. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + The bitmap format. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + calculates the luminance values for the given byte array and bitmap format + + + + + + + Contains conversion support elements such as classes, interfaces and static methods. + + + + + Copies an array of chars obtained from a String into a specified array of chars + + The String to get the chars from + Position of the String to start getting the chars + Position of the String to end getting the chars + Array to return the chars + Position of the destination array of chars to start storing the chars + An array of chars + + + + Sets the capacity for the specified List + + The List which capacity will be set + The new capacity value + + + + Converts a string-Collection to an array + + The strings. + + + + + Joins all elements to one string. + + + The separator. + The values. + + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The value. + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The start index. + The end index. + The value. + + + + + + + + + + + + + + + + + + Savely gets the value of a decoding hint + if hints is null the default is returned + + + The hints. + Type of the hint. + The @default. + + + + The base class for all objects which encode/generate a barcode image. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + A base class which covers the range of exceptions which may occur when encoding a barcode using + the Writer framework. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner exc. + + + + Integer inefficiently represented internally using base-10 digits, in order to allow a + visual representation as a base-10 string. Only for internal use. + + + + + 10 numeration base for string representation, very inefficient for computations. + + + + + Maximum size for numbers is up to 10240 binary digits or approximately (safe to use) 3000 decimal digits. + The maximum size is, in fact, double the previously specified amount, in order to accommodate operations' + overflow. + + + + Integer constants + + + + The array of digits of the number. + + + + + The actual number of digits of the number. + + + + + The number sign. + + + + + Sets the number sign. + + + + + Default constructor, intializing the Base10BigInteger with zero. + + + + + Constructor creating a new Base10BigInteger as a conversion of a regular base-10 long. + + The base-10 long to be converted + + + + Constructor creating a new Base10BigInteger as a copy of an existing Base10BigInteger. + + The Base10BigInteger to be copied + + + + Determines whether the specified Base10BigInteger is equal to the current Base10BigInteger. + + The Base10BigInteger to compare with the current Base10BigInteger + True if the specified Base10BigInteger is equal to the current Base10BigInteger, + false otherwise + + + + Determines whether the specified System.Object is equal to the current Base10BigInteger. + + The System.Object to compare with the current Base10BigInteger + True if the specified System.Object is equal to the current Base10BigInteger, + false otherwise + + + + Serves as a hash function for the Base10BigInteger type. + + A hash code for the current Base10BigInteger + + + + String representation of the current Base10BigInteger, converted to its base-10 representation. + + The string representation of the current Base10BigInteger + + + + Base10BigInteger inverse with respect to addition. + + The Base10BigInteger whose opposite is to be computed + The Base10BigInteger inverse with respect to addition + + + + Greater test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a > b, false otherwise + + + + Greater or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a >= b, false otherwise + + + + Smaller test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a < b, false otherwise + + + + Smaller or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a <= b, false otherwise + + + + Computes the absolute value of a Base10BigInteger. + + The Base10BigInteger whose absolute value is to be computed + The absolute value of the given BigInteger + + + + Addition operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the addition + + + + Subtraction operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the subtraction + + + + Multiplication operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the multiplication + + + + Implicit conversion operator from long to Base10BigInteger. + + The long to be converted to a Base10BigInteger + The Base10BigInteger converted from the given long + + + + Equality test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a == b, false otherwise + + + + Inequality test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a != b, false otherwise + + + + Greater test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a > b, false otherwise + + + + Smaller test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a < b, false otherwise + + + + Greater or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a >= b, false otherwise + + + + Smaller or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a <= b, false otherwise + + + + Base10BigInteger inverse with respect to addition. + + The Base10BigInteger whose opposite is to be computed + The Base10BigInteger inverse with respect to addition + + + + Addition operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the addition + + + + Subtraction operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the subtraction + + + + Multiplication operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the multiplication + + + + Incremetation by one operation of a Base10BigInteger. + + The Base10BigInteger to be incremented by one + The Base10BigInteger result of incrementing by one + + + + Decremetation by one operation of a Base10BigInteger. + + The Base10BigInteger to be decremented by one + The Base10BigInteger result of decrementing by one + + + + Adds two BigNumbers a and b, where a >= b, a, b non-negative. + + + + + Subtracts the Base10BigInteger b from the Base10BigInteger a, where a >= b, a, b non-negative. + + + + + Multiplies two Base10BigIntegers. + + + + + .NET 2.0 class for handling of very large integers, up to 10240 binary digits or + approximately (safe to use) 3000 decimal digits. + + + + + 2^16 numeration base for internal computations, in order to benefit the most from the + 32 bit (or 64 bit) integer processor registers. + + + + + Maximum size for numbers is up to 10240 binary digits or approximately (safe to use) 3000 decimal digits. + The maximum size is, in fact, double the previously specified amount, in order to accommodate operations's + overflow. + + + + + Ratio for the convertion of a BigInteger's size to a binary digits size. + + + + Integer constants + + + + The array of digits of the number. + + + + + The actual number of digits of the number. + + + + + The number sign. + + + + + Default constructor, intializing the BigInteger with zero. + + + + + Constructor creating a new BigInteger as a conversion of a regular base-10 long. + + The base-10 long to be converted + + + + Constructor creating a new BigInteger as a copy of an existing BigInteger. + + The BigInteger to be copied + + + + Constructor creating a BigInteger instance out of a base-10 formatted string. + + The base-10 formatted string. + Invalid numeric string exception + + + + Constructor creating a positive BigInteger by extracting it's digits from a given byte array. + + The byte array + The byte array's content exceeds the maximum size of a BigInteger + exception + + + + Constructor deserializing a BigInteger. + + + + + BigInteger serializing method, which should not be called manually. + + Serialization information object + Streaming context object + Public access + + + + Determines whether the specified BigInteger is equal to the current BigInteger. + + The BigInteger to compare with the current BigInteger + True if the specified BigInteger is equal to the current BigInteger, + false otherwise + + + + Determines whether the specified System.Object is equal to the current BigInteger. + + The System.Object to compare with the current BigInteger + True if the specified System.Object is equal to the current BigInteger, + false otherwise + + + + Serves as a hash function for the BigInteger type. + + A hash code for the current BigInteger + + + + String representation of the current BigInteger, converted to its base-10 representation. + + The string representation of the current BigInteger + + + + Parses the number given by a string + + the number as a string + + + + + Compares this instance to a specified BigInteger. + + The BigInteger to compare this instance with + -1 if the current instance is smaller than the given BigInteger, + 0 if the two are equal, 1 otherwise + + + + Compares this instance to a specified object. + + The object to compare this instance with + -1 if the current instance is smaller than the given object, + 0 if the two are equal, 1 otherwise + obj is not a BigInteger exception + + + + Returns a BigInteger's size in binary digits. + + The BigInteger whose size in binary digits is to be determined + The BigInteger's size in binary digits + + + + BigInteger inverse with respect to addition. + + The BigInteger whose opposite is to be computed + The BigInteger inverse with respect to addition + + + + Greater test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a > b, false otherwise + + + + Greater or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a >= b, false otherwise + + + + Smaller test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a < b, false otherwise + + + + Smaller or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a <= b, false otherwise + + + + Computes the absolute value of a BigInteger. + + The BigInteger whose absolute value is to be computed + The absolute value of the given BigInteger + + + + Addition operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the addition + + + + Subtraction operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the subtraction + + + + Multiplication operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the multiplication + + + + Division operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the division + Cannot divide by zero exception + + + + Modulo operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the modulo + Cannot divide by zero exception + + + + Returns the power of a BigInteger base to a non-negative exponent by using the + fast exponentiation algorithm (right to left binary exponentiation). + + The BigInteger base + The non-negative exponent + The power of the BigInteger base to the non-negative exponent + Cannot raise a BigInteger to a negative power exception. + + + + Integer square root of the given BigInteger using Newton's numeric method. + + The BigInteger whose integer square root is to be computed + The integer square root of the given BigInteger + Cannot compute the integer square root of a negative number exception + + + + Euclidean algorithm for computing the greatest common divisor of two non-negative BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The greatest common divisor of the two given BigIntegers + Cannot compute the Gcd of negative BigIntegers exception + + + + Extended Euclidian Gcd algorithm, returning the greatest common divisor of two non-negative BigIntegers, + while also providing u and v, where: a*u + b*v = gcd(a,b). + + The 1st BigInteger + The 2nd BigInteger + Output BigInteger parameter, where a*u + b*v = gcd(a,b) + Output BigInteger parameter, where a*u + b*v = gcd(a,b) + The greatest common divisor of the two given BigIntegers + Cannot compute the Gcd of negative BigIntegers exception + + + + Computes the modular inverse of a given BigInteger. + + The non-zero BigInteger whose inverse is to be computed + The BigInteger modulus, which must be greater than or equal to 2 + The BigInteger equal to a^(-1) mod n + Invalid number or modulus exception + + + + Returns the power of a BigInteger to a non-negative exponent modulo n, by using the + fast exponentiation algorithm (right to left binary exponentiation) and modulo optimizations. + + The BigInteger base + The non-negative exponent + The modulus, which must be greater than or equal to 2 + The power of the BigInteger to the non-negative exponent + Invalid exponent or modulus exception + + + + Implicit conversion operator from long to BigInteger. + + The long to be converted to a BigInteger + The BigInteger converted from the given long + + + + Implicit conversion operator from int to BigInteger. + + The int to be converted to a BigInteger + The BigInteger converted from the given int + + + + Equality test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a == b, false otherwise + + + + Inequality test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a != b, false otherwise + + + + Greater test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a > b, false otherwise + + + + Smaller test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a < b, false otherwise + + + + Greater or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a >= b, false otherwise + + + + Smaller or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a <= b, false otherwise + + + + BigInteger inverse with respect to addition. + + The BigInteger whose opposite is to be computed + The BigInteger inverse with respect to addition + + + + Addition operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the addition + + + + Subtraction operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the subtraction + + + + Multiplication operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the multiplication + + + + Division operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the division + Cannot divide by zero exception + + + + Modulo operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the modulo + Cannot divide by zero exception + + + + Incremetation by one operation of a BigInteger. + + The BigInteger to be incremented by one + The BigInteger result of incrementing by one + + + + Decremetation by one operation of a BigInteger. + + The BigInteger to be decremented by one + The BigInteger result of decrementing by one + + + + Adds two BigNumbers a and b, where a >= b, a, b non-negative. + + + + + Subtracts the BigInteger b from the BigInteger a, where a >= b, a, b non-negative. + + + + + Multiplies two BigIntegers. + + + + + Divides a BigInteger by a one-digit int. + + + + + Divides a BigInteger by another BigInteger. + + + + + DivideByBigNumber auxiliary method. + + + + + DivideByBigNumber auxilary method. + + + + + DivideByBigNumber auxilary method. + + + + + BigInteger-related exception class. + + + + + BigIntegerException constructor. + + The exception message + The inner exception + + + + The number's sign, where Positive also stands for the number zero. + + +
+
diff --git a/packages/ZXing.Net.0.16.4/lib/net35/zxing.dll b/packages/ZXing.Net.0.16.4/lib/net35/zxing.dll new file mode 100644 index 0000000..d5dac04 Binary files /dev/null and b/packages/ZXing.Net.0.16.4/lib/net35/zxing.dll differ diff --git a/packages/ZXing.Net.0.16.4/lib/net40/zxing.XML b/packages/ZXing.Net.0.16.4/lib/net40/zxing.XML new file mode 100644 index 0000000..17c4a16 --- /dev/null +++ b/packages/ZXing.Net.0.16.4/lib/net40/zxing.XML @@ -0,0 +1,10947 @@ + + + + zxing + + + + + Aztec result meta data. + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + + + + + + + + + Renders an Aztec code as a + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Aztec 2D code representation + + Rustam Abdullaev + + + + Compact or full symbol indicator + + + + + Size in pixels (width and height) + + + + + Number of levels + + + + + Number of data codewords + + + + + The symbol image + + + + + represents a token for a binary shift + + + + + initializing constructor + + + + + + + + appends the byte array to the BitArray + + + + + + + string representation + + + + + + Generates Aztec 2D barcodes. + + Rustam Abdullaev + + + + Encodes the given binary content as an Aztec symbol + + input data string + Aztec symbol matrix with metadata + + + + Encodes the given binary content as an Aztec symbol + + input data string + minimal percentage of error check words (According to ISO/IEC 24778:2008, + a minimum of 23% + 3 words is recommended) + if non-zero, a user-specified value for the number of layers + + Aztec symbol matrix with metadata + + + + + This produces nearly optimal encodings of text into the first-level of + encoding used by Aztec code. + It uses a dynamic algorithm. For each prefix of the string, it determines + a set of encodings that could lead to this prefix. We repeatedly add a + character and generate a new set of optimal encodings until we have read + through the entire input. + @author Frank Yellin + @author Rustam Abdullaev + + + + + + + + + + + Convert the text represented by this High Level Encoder into a BitArray. + + text represented by this encoder encoded as a + + + + State represents all information about a sequence necessary to generate the current output. + Note that a state is immutable. + + + + + Create a new state representing this state with a latch to a (not + necessary different) mode, and then a code. + + + + + Create a new state representing this state, with a temporary shift + to a different mode to output a single value. + + + + + Create a new state representing this state, but an additional character + output in Binary Shift mode. + + + + + Create the state identical to this one, but we are no longer in + Binary Shift mode. + + + + + Returns true if "this" state is better (or equal) to be in than "that" + state under all possible circumstances. + + + + + Extends with more information specific to the Aztec format, + like the number of layers and whether it's compact. + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + Initializes a new instance of the class. + + The bits. + The points. + if set to true [compact]. + The nb datablocks. + The nb layers. + + + + The main class which implements Aztec Code decoding -- as opposed to locating and extracting + the Aztec Code from an image. + + David Olivier + + + + Decodes the specified detector result. + + The detector result. + + + + + This method is used for testing the high-level encoder + + + + + + + Gets the string encoded in the aztec code bits + + The corrected bits. + the decoded string + + + + gets the table corresponding to the char passed + + The t. + + + + + Gets the character (or string) corresponding to the passed code in the given table + + the table used + the code of the character + + + + + Performs RS error correction on an array of bits. + + The rawbits. + the corrected array + + + + Gets the array of bits from an Aztec Code matrix + + The matrix. + the array of bits + + + + Reads a code of given length and at given index in an array of bits + + The rawbits. + The start index. + The length. + + + + + Reads a code of length 8 in an array of bits, padding with zeros + + + + + + + + Packs a bit array into bytes, most significant bit first + + + + + + + Encapsulates logic that can detect an Aztec Code in an image, even if the Aztec Code + is rotated or skewed, or partially obscured. + + David Olivier + + + + Initializes a new instance of the class. + + The image. + + + + Detects an Aztec Code in an image. + + + + + Detects an Aztec Code in an image. + + if true, image is a mirror-image of original. + + encapsulating results of detecting an Aztec Code + + + + + Extracts the number of data layers and data blocks from the layer around the bull's eye + + bullEyeCornerPoints the array of bull's eye corners + + + + + Corrects the parameter bits using Reed-Solomon algorithm + + paremeter bits + compact true if this is a compact Aztec code + + + + + Finds the corners of a bull-eye centered on the passed point + This returns the centers of the diagonal points just outside the bull's eye + Returns [topRight, bottomRight, bottomLeft, topLeft] + + Center point + The corners of the bull-eye + + + + Finds a candidate center point of an Aztec code from an image + + the center point + + + + Gets the Aztec code corners from the bull's eye corners and the parameters. + + the array of bull's eye corners + the array of aztec code corners + + + + Creates a BitMatrix by sampling the provided image. + topLeft, topRight, bottomRight, and bottomLeft are the centers of the squares on the + diagonal just outside the bull's eye. + + The image. + The top left. + The bottom left. + The bottom right. + The top right. + + + + + Samples a line + + start point (inclusive) + end point (exclusive) + number of bits + the array of bits as an int (first bit is high-order bit of result) + + + + Determines whether [is white or black rectangle] [the specified p1]. + + The p1. + The p2. + The p3. + The p4. + true if the border of the rectangle passed in parameter is compound of white points only + or black points only + + + + Gets the color of a segment + + The p1. + The p2. + 1 if segment more than 90% black, -1 if segment is more than 90% white, 0 else + + + + Gets the coordinate of the first point with a different color in the given direction + + The init. + if set to true [color]. + The dx. + The dy. + + + + + Expand the square represented by the corner points by pushing out equally in all directions + + the corners of the square, which has the bull's eye at its center + the original length of the side of the square in the target bit matrix + the new length of the size of the square in the target bit matrix + the corners of the expanded square + + + + The class holds the available options for the + + + + + Representing the minimal percentage of error correction words. + Note: an Aztec symbol should have a minimum of 25% EC words. + + + + + Specifies the required number of layers for an Aztec code: + a negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + a positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + + + + + This implementation can detect and decode Aztec codes in an image. + + David Olivier + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + a String representing the content encoded by the Data Matrix code + + + + + Locates and decodes a Data Matrix code in an image. + + image of barcode to decode + passed as a {@link java.util.Hashtable} from {@link com.google.zxing.DecodeHintType} + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Enumerates barcode formats known to this package. + + Sean Owen + + + Aztec 2D barcode format. + + + CODABAR 1D format. + + + Code 39 1D format. + + + Code 93 1D format. + + + Code 128 1D format. + + + Data Matrix 2D barcode format. + + + EAN-8 1D format. + + + EAN-13 1D format. + + + ITF (Interleaved Two of Five) 1D format. + + + MaxiCode 2D barcode format. + + + PDF417 format. + + + QR Code 2D barcode format. + + + RSS 14 + + + RSS EXPANDED + + + UPC-A 1D format. + + + UPC-E 1D format. + + + UPC/EAN extension format. Not a stand-alone format. + + + MSI + + + Plessey + + + Intelligent Mail barcode + + + + UPC_A | UPC_E | EAN_13 | EAN_8 | CODABAR | CODE_39 | CODE_93 | CODE_128 | ITF | RSS_14 | RSS_EXPANDED + without MSI (to many false-positives) and IMB (not enough tested, and it looks more like a 2D) + + + + + A smart class to decode the barcode inside a bitmap object + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + A smart class to decode the barcode inside a bitmap object + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Constructor for additional image formats for one BarcodeReader class + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Optional: Gets or sets the function to create a luminance source object for a bitmap. + If null a platform specific default LuminanceSource is used + + + The function to create a luminance source object. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + A smart class to decode the barcode inside a bitmap object + + + + + represents the default function which is called to get a instance from a raw byte array + + + + + Gets or sets the options. + + + The options. + + + + + Gets the reader which should be used to find and decode the barcode. + + + The reader. + + + + + Gets or sets a method which is called if an important point is found + + + The result point callback. + + + + + event is executed if a result was found via decode + + + + + Gets or sets a value indicating whether the image should be automatically rotated. + Rotation is supported for 90, 180 and 270 degrees + + + true if image should be rotated; otherwise, false. + + + + + Gets or sets a value indicating whether the image should be automatically inverted + if no result is found in the original image. + ATTENTION: Please be carefully because it slows down the decoding process if it is used + + + true if image should be inverted; otherwise, false. + + + + + Optional: Gets or sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + The function to create a binarizer object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb array. + If null the RGBLuminanceSource is used. The handler is only called when Decode with a byte[] array is called. + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + raises the ResultFound event + + + + + + raises the ResultFound event + + + + + + calls the explicitResultPointFound action + + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + A smart class to encode some content to a barcode image + + + + + Initializes a new instance of the class. + + + + + A smart class to encode some content to raw pixel data + + + + + Initializes a new instance of the class. + + + + + A smart class to encode some content to a svg barcode image + + + + + Initializes a new instance of the class. + + + + + A base class for specific barcode writers with specific formats of barcode images. + + The type of the output. + + + + Gets or sets the renderer which should be used to render the encoded BitMatrix. + + + + + Encodes the specified contents and returns a rendered instance of the barcode. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The matrix. + + + + + A base class for specific barcode writers with specific formats of barcode images. + + + + + Gets or sets the barcode format. + The value is only suitable if the MultiFormatWriter is used. + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + + + + + + + + + + + + Encodes the specified contents and returns a BitMatrix array. + That array has to be rendered manually or with a IBarcodeRenderer. + + The contents. + + + + + The base class for luminance sources which supports + cropping and rotating based upon the luminance values. + + + + + weight of the red channel for calculating a gray scale image + + + + + weight of the green channel for calculating a gray scale image + + + + + weight of the blue channel for calculating a gray scale image + + + + + numbers of bits which for right shifting + + + + + + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + + The luminance array. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + gets the luminance matrix + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + TODO: not implemented yet + + + A rotated version of this object. + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + + Whether this subclass supports cropping. + + + + + Whether this subclass supports invertion. + + + + Inverts the luminance values (newValue = 255 - oldValue) + + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + This class hierarchy provides a set of methods to convert luminance data to 1 bit data. + It allows the algorithm to vary polymorphically, for example allowing a very expensive + thresholding technique for servers and a fast one for mobile. It also permits the implementation + to vary, e.g. a JNI version for Android and a Java fallback version for other platforms. + + dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The source. + + + + Gets the luminance source object. + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + For callers which only examine one row of pixels at a time, the same BitArray should be reused + and passed in with each call for performance. However it is legal to keep more than one row + at a time if needed. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + Converts a 2D array of luminance data to 1 bit data. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + A new concrete Binarizer implementation object. + + + + Gets the width of the luminance source object. + + + + + Gets the height of the luminance source object. + + + + + This class is the core bitmap class used by ZXing to represent 1 bit data. Reader objects + accept a BinaryBitmap and attempt to decode it. + + dswitkin@google.com (Daniel Switkin) + + + + + + + + + + The width of the bitmap. + + + + + The height of the bitmap. + + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + + The row to fetch, which must be in [0, bitmap height). + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + + Converts a 2D array of luminance data to 1 bit. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + + Whether this bitmap can be cropped. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if isCropSupported() is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + + Whether this bitmap supports counter-clockwise rotation. + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + +

See + + DoCoMo's documentation about the result types represented by subclasses of this class.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + Implements KDDI AU's address book format. See + + http://www.au.kddi.com/ezfactory/tec/two_dimensions/index.html. + (Thanks to Yuzo for translating!) + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Implements the "MECARD" address book entry format. + + Supported keys: N, SOUND, TEL, EMAIL, NOTE, ADR, BDAY, URL, plus ORG + Unsupported keys: TEL-AV, NICKNAME + + Except for TEL, multiple values for keys are also not supported; + the first one found takes precedence. + + Our understanding of the MECARD format is based on this document: + + http://www.mobicode.org.tw/files/OMIA%20Mobile%20Bar%20Code%20Standard%20v3.2.1.doc + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes contact information, like that in an address book entry. + + Sean Owen + + + + initializing constructor + + + + + + + + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + the names + + + + + the nicknames + + + + + In Japanese, the name is written in kanji, which can have multiple readings. Therefore a hint + is often provided, called furigana, which spells the name phonetically. + + The pronunciation of the getNames() field, often in hiragana or katakana. + + + + the phone numbers + + + + optional descriptions of the type of each phone number. It could be like "HOME", but, + there is no guaranteed or standard format. + + + + the e-mail addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the instant messenger addresses + + + + + the note field + + + + + the addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the title + + + + + the urls + + + + birthday formatted as yyyyMMdd (e.g. 19780917) + + + a location as a latitude/longitude pair + + + Implements the "BIZCARD" address book entry format, though this has been + largely reverse-engineered from examples observed in the wild -- still + looking for a definitive reference. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a calendar event at a certain time, optionally with attendees and a location. + + Sean Owen + + + + Gets the start. + + + + + Determines whether [is start all day]. + + if start time was specified as a whole day + + + + event end , or null if event has no duration + + + + + Gets a value indicating whether this instance is end all day. + + true if end time was specified as a whole day + + + + Parses a string as a date. RFC 2445 allows the start and end fields to be of type DATE (e.g. 20081021) + or DATE-TIME (e.g. 20081021T123000 for local time, or 20081021T123000Z for UTC). + + The string to parse + + if not a date formatted string + + + + Represents a parsed result that encodes an email message including recipients, subject and body text. + + Sean Owen + + + + the email address + + + + + the TOs + + + + + the CCs + + + + + the BCCs + + + + + the subject + + + + + the body + + + + + the mailto: uri + + + + + Represents a result that encodes an e-mail address, either as a plain address + like "joe@example.org" or a mailto: URL like "mailto:joe@example.org". + + Sean Owen + + + + Implements the "MATMSG" email message entry format. + + Supported keys: TO, SUB, BODY + + Sean Owen + + + + This implements only the most basic checking for an email address's validity -- that it contains + an '@' and contains no characters disallowed by RFC 2822. This is an overly lenient definition of + validity. We want to generally be lenient here since this class is only intended to encapsulate what's + in a barcode, not "judge" it. + + The email. + + true if it is basically a valid email address; otherwise, false. + + + + + Represents a parsed result that encodes extended product information as encoded by the RSS format, like weight, price, dates, etc. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + extension for kilogram weight type + + + + + extension for pounds weight type + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the raw text + + + + + the product id + + + + + the sscc + + + + + the lot number + + + + + the production date + + + + + the packaging date + + + + + the best before date + + + + + the expiration date + + + + + the weight + + + + + the weight type + + + + + the weight increment + + + + + the price + + + + + the price increment + + + + + the price currency + + + + + the uncommon AIs + + + + + the display representation (raw text) + + + + + Parses strings of digits that represent a RSS Extended code. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + tries to parse a text representation to a specific result object + + + + + + + Represents a parsed result that encodes a geographic coordinate, with latitude, longitude and altitude. + + Sean Owen + + + latitude in degrees + + + + longitude in degrees + + + + altitude in meters. If not specified, in the geo URI, returns 0.0 + + + + query string associated with geo URI or null if none exists + + + + the geo URI + + + + a URI link to Google Maps which display the point on the Earth described + by this instance, and sets the zoom level in a way that roughly reflects the + altitude, if specified + + + + Parses a "geo:" URI result, which specifies a location on the surface of + the Earth as well as an optional altitude above the surface. See + + http://tools.ietf.org/html/draft-mayrhofer-geo-uri-00. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a product ISBN number. + + jbreiden@google.com (Jeff Breidenbach) + + + + the ISBN number + + + + Parses strings of digits that represent a ISBN. + + + jbreiden@google.com (Jeff Breidenbach) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + See ISBN-13 For Dummies + + The result. + + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link ResultParser#parseResult(Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Represents the type of data encoded by a barcode -- from plain text, to a + URI, to an e-mail address, etc. + + Sean Owen + + + + Represents a parsed result that encodes a product by an identifier of some kind. + + dswitkin@google.com (Daniel Switkin) + + + + Parses strings of digits that represent a UPC code. + + dswitkin@google.com (Daniel Switkin) + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link #parseResult(com.google.zxing.Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Attempts to parse the raw {@link Result}'s contents as a particular type + of information (email, URL, etc.) and return a {@link ParsedResult} encapsulating + the result of parsing. + + the raw to parse + encapsulating the parsing result + + + + Parses the result. + + The result. + + + +

Parses an "sms:" URI result, which specifies a number to SMS and optional + "via" number. See + the IETF draft on this.

+ +

This actually also parses URIs starting with "mms:", "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + + Represents a parsed result that encodes an SMS message, including recipients, subject and body text. + + Sean Owen + + + +

Parses an "smsto:" URI result, whose format is not standardized but appears to be like: + {@code smsto:number(:body)}.

+

This actually also parses URIs starting with "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+
+ Sean Owen +
+ + +

Parses an "smtp:" URI result, whose format is not standardized but appears to be like: + smtp[:subject[:body]]}.

+

See http://code.google.com/p/zxing/issues/detail?id=536

+
+ Sean Owen +
+ + + Represents a parsed result that encodes a telephone number. + + Sean Owen + + + + Parses a "tel:" URI result, which specifies a phone number. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + A simple result type encapsulating a string that has no further interpretation. + + Sean Owen + + + + A simple result type encapsulating a URI that has no further interpretation. + + Sean Owen + + + true if the URI contains suspicious patterns that may suggest it intends to + mislead the user about its true nature. At the moment this looks for the presence + of user/password syntax in the host/authority portion of a URI which may be used + in attempts to make the URI's host appear to be other than it is. Example: + http://yourbank.com@phisher.com This URI connects to phisher.com but may appear + to connect to yourbank.com at first glance. + + + + Transforms a string that represents a URI into something more proper, by adding or canonicalizing + the protocol. + + + + + Tries to parse results that are a URI of some kind. + + Sean Owen + + + Parses the "URLTO" result format, which is of the form "URLTO:[title]:[url]". + This seems to be used sometimes, but I am not able to find documentation + on its origin or official format? + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Parses contact information formatted according to the VCard (2.1) format. This is not a complete + implementation but should parse information as commonly encoded in 2D barcodes. + + Sean Owen + + + Formats name fields of the form "Public;John;Q.;Reverend;III" into a form like + "Reverend John Q. Public III". + + @param names name values to format, in place + + + + Partially implements the iCalendar format's "VEVENT" format for specifying a + calendar event. See RFC 2445. This supports SUMMARY, DTSTART and DTEND fields. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a Vehicle Identification Number (VIN). + + + + + Detects a result that is likely a vehicle identification number. + @author Sean Owen + + + + + Represents a parsed result that encodes wifi network information, like SSID and password. + + Vikram Aggarwal + + + + + A simple, fast array of bits, represented compactly by an array of ints internally. + + Sean Owen + + + + size of the array, number of elements + + + + + size of the array in bytes + + + + + index accessor + + + + + + + default constructor + + + + + initializing constructor + + desired size of the array + + + + Flips bit i. + + bit to set + + + + + Gets the next set. + + first bit to check + index of first bit that is set, starting from the given index, or size if none are set + at or beyond this given index + + + + see getNextSet(int) + + index to start looking for unset bit + index of next unset bit, or if none are unset until the end + + + Sets a block of 32 bits, starting at bit i. + + + first bit to set + + the new value of the next 32 bits. Note again that the least-significant bit + corresponds to bit i, the next-least-significant to i+1, and so on. + + + + + Sets a range of bits. + + start of range, inclusive. + end of range, exclusive + + + Clears all bits (sets to false). + + + Efficient method to check if a range of bits is set, or not set. + + + start of range, inclusive. + + end of range, exclusive + + if true, checks that bits in range are set, otherwise checks that they are not set + + true iff all bits are set or not set in range, according to value argument + if end is less than start or the range is not contained in the array + + + + Appends the bit. + + The bit. + + + underlying array of ints. The first element holds the first 32 bits, and the least + significant bit is bit 0. + + + + + Appends the least-significant bits, from value, in order from most-significant to + least-significant. For example, appending 6 bits from 0x000001E will append the bits + 0, 1, 1, 1, 1, 0 in that order. + + containing bits to append + bits from value to append + + + + adds the array to the end + + + + + + XOR operation + + + + + + converts to bytes. + + first bit to start writing + array to write into. Bytes are written most-significant byte first. This is the opposite + of the internal representation, which is exposed by BitArray + position in array to start writing + how many bytes to write + + + Reverses all bits in the array. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Erstellt ein neues Objekt, das eine Kopie der aktuellen Instanz darstellt. + + + Ein neues Objekt, das eine Kopie dieser Instanz darstellt. + + + + +

Represents a 2D matrix of bits. In function arguments below, and throughout the common + module, x is the column position, and y is the row position. The ordering is always x, y. + The origin is at the top-left.

+

Internally the bits are represented in a 1-D array of 32-bit ints. However, each row begins + with a new int. This is done intentionally so that we can copy out a row into a BitArray very + efficiently.

+

The ordering of bits is row-major. Within each int, the least significant bits are used first, + meaning they represent lower x values. This is compatible with BitArray's implementation.

+
+ Sean Owen + dswitkin@google.com (Daniel Switkin) +
+ + The width of the matrix + + + + The height of the matrix + + + + This method is for compatibility with older code. It's only logical to call if the matrix + is square, so I'm throwing if that's not the case. + + + row/column dimension of this matrix + + + + + The rowsize of the matrix + + + + + Creates an empty square . + + height and width + + + + Creates an empty square . + + bit matrix width + bit matrix height + + + + Interprets a 2D array of booleans as a , where "true" means an "on" bit. + + bits of the image, as a row-major 2D array. Elements are arrays representing rows + representation of image + + +

Gets the requested bit, where true means black.

+ +
+ The horizontal component (i.e. which column) + + The vertical component (i.e. which row) + + value of given bit in matrix + +
+ + +

Flips the given bit.

+
+ The horizontal component (i.e. which column) + The vertical component (i.e. which row) +
+ + + flip all of the bits, if shouldBeFlipped is true for the coordinates + + should return true, if the bit at a given coordinate should be flipped + + + + Exclusive-or (XOR): Flip the bit in this {@code BitMatrix} if the corresponding + mask bit is set. + + The mask. + + + Clears all bits (sets to false). + + +

Sets a square region of the bit matrix to true.

+ +
+ The horizontal position to begin at (inclusive) + + The vertical position to begin at (inclusive) + + The width of the region + + The height of the region + +
+ + A fast method to retrieve one row of data from the matrix as a BitArray. + + + The row to retrieve + + An optional caller-allocated BitArray, will be allocated if null or too small + + The resulting BitArray - this reference should always be used even when passing + your own row + + + + + Sets the row. + + row to set + {@link BitArray} to copy from + + + + Modifies this {@code BitMatrix} to represent the same but rotated 180 degrees + + + + + This is useful in detecting the enclosing rectangle of a 'pure' barcode. + + {left,top,width,height} enclosing rectangle of all 1 bits, or null if it is all white + + + + This is useful in detecting a corner of a 'pure' barcode. + + {x,y} coordinate of top-left-most 1 bit, or null if it is all white + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + The line separator. + + A that represents this instance. + + + + + Clones this instance. + + + + + + Converts this ByteMatrix to a black and white bitmap. + + A black and white bitmap converted from this ByteMatrix. + + +

This provides an easy abstraction to read bits at a time from a sequence of bytes, where the + number of bits read is not often a multiple of 8.

+ +

This class is thread-safe but not reentrant. Unless the caller modifies the bytes array + it passed in, in which case all bets are off.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + bytes from which this will read bits. Bits will be read from the first byte first. + Bits are read within a byte from most-significant to least-significant bit. + + + + + index of next bit in current byte which would be read by the next call to {@link #readBits(int)}. + + + + + index of next byte in input byte array which would be read by the next call to {@link #readBits(int)}. + + + + number of bits to read + + int representing the bits read. The bits will appear as the least-significant + bits of the int + + if numBits isn't in [1,32] or more than is available + + + number of bits that can be read successfully + + + + Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1 + of ISO 18004. + + + Sean Owen + + + character set ECI value + representing ECI of given value, or null if it is legal but unsupported + + + character set ECI encoding name + representing ECI for character encoding, or null if it is legalbut unsupported + + + + Encapsulates the result of decoding a matrix of bits. This typically + applies to 2D barcode formats. For now it contains the raw bytes obtained, + as well as a String interpretation of those bytes, if applicable. + Sean Owen + + + + + raw bytes representing the result, or null if not applicable + + + + + how many bits of are valid; typically 8 times its length + + + + + text representation of the result + + + + + list of byte segments in the result, or null if not applicable + + + + + name of error correction level used, or null if not applicable + + + + + gets a value which describe if structure append data was found + + + + + number of errors corrected, or null if not applicable + + + + + gives the sequence number of the result if structured append was found + + + + + number of erasures corrected, or null if not applicable + + + + + gives the parity information if structured append was found + + + + + Miscellanseous data value for the various decoders + + The other. + + + + initializing constructor + + + + + + + + + initializing constructor + + + + + + + + + + + initializing constructor + + + + + + + + + + initializing constructor + + + + + + + + + + + + Defines an container for encoder options + + + + + Gets the data container for all options + + + + + event is raised when a value is changed + + + + + Gets or sets a flag which cause a deeper look into the bitmap + + + true if [try harder]; otherwise, false. + + + + + Image is a pure monochrome image of a barcode. + + + true if monochrome image of a barcode; otherwise, false. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + The character set. + + + + + Image is known to be of one of a few possible formats. + Maps to a {@link java.util.List} of {@link BarcodeFormat}s. + + + The possible formats. + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + true if it should assume a Code 39 check digit; otherwise, false. + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). + + + true if it should assume GS1; otherwise, false. + + + + + Assume MSI codes employ a check digit. Maps to . + + + true if it should assume a MSI check digit; otherwise, false. + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Initializes a new instance of the class. + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Encapsulates the result of detecting a barcode in an image. This includes the raw + matrix of black/white pixels corresponding to the barcode, and possibly points of interest + in the image, like the location of finder patterns or corners of the barcode in the image.

+
+ Sean Owen +
+ + + the detected bits + + + + + the pixel points where the result is found + + + + + initializing constructor + + + + + + + General math-related and numeric utility functions. + + + + + Ends up being a bit faster than {@link Math#round(float)}. This merely rounds its + argument to the nearest int, where x.5 rounds up to x+1. Semantics of this shortcut + differ slightly from {@link Math#round(float)} in that half rounds down for negative + values. -2.5 rounds to -3, not -2. For purposes here it makes no difference. + + real value to round + nearest int + + + + + + + + + + Euclidean distance between points A and B + + + + + + + + + + Euclidean distance between points A and B + + + + + values to sum + sum of values in array + + +

A somewhat generic detector that looks for a barcode-like rectangular region within an image. + It looks within a mostly white region of an image for a region of black and white, but mostly + black. It returns the four corners of the region, as best it can determine.

+ +
+ Sean Owen +
+ + + initializing constructor + + + + + +

Detects a rectangular region of black and white -- mostly black -- with a region of mostly + white, in an image.

+
+ [] describing the corners of the rectangular region. The first and + last points are opposed on the diagonal, as are the second and third. The first point will be + the topmost point and the last, the bottommost. The second point will be leftmost and the + third, the rightmost + +
+ + Attempts to locate a corner of the barcode by scanning up, down, left or right from a center + point which should be within the barcode. + + + center's x component (horizontal) + + same as deltaY but change in x per step instead + + minimum value of x + + maximum value of x + + center's y component (vertical) + + change in y per step. If scanning up this is negative; down, positive; + left or right, 0 + + minimum value of y to search through (meaningless when di == 0) + + maximum value of y + + maximum run of white pixels that can still be considered to be within + the barcode + + a encapsulating the corner that was found + + + + Computes the start and end of a region of pixels, either horizontally or vertically, that could + be part of a Data Matrix barcode. + + + if scanning horizontally, this is the row (the fixed vertical location) + where we are scanning. If scanning vertically it's the column, the fixed horizontal location + + largest run of white pixels that can still be considered part of the + barcode region + + minimum pixel location, horizontally or vertically, to consider + + maximum pixel location, horizontally or vertically, to consider + + if true, we're scanning left-right, instead of up-down + + int[] with start and end of found range, or null if no such range is found + (e.g. only white was found) + + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. By keeping track of the + last black points it encountered, it determines the corners of the barcode. + + David Olivier + + + + Creates a WhiteRectangleDetector instance + + The image. + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + Creates a WhiteRectangleDetector instance + + barcode image to find a rectangle in + initial size of search area around center + x position of search center + y position of search center + + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + + Initializes a new instance of the class. + + The image. + if image is too small + + + + Initializes a new instance of the class. + + The image. + Size of the init. + The x. + The y. + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. + + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + recenters the points of a constant distance towards the center + + bottom most point + left most point + right most point + top most point + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + Determines whether a segment contains a black point + + min value of the scanned coordinate + max value of the scanned coordinate + value of fixed coordinate + set to true if scan must be horizontal, false if vertical + + true if a black point has been found, else false. + + + + + Superclass of classes encapsulating types ECIs, according to "Extended Channel Interpretations" + 5.3 of ISO 18004. + + Sean Owen + + + + the ECI value + + + + ECI value + representing ECI of given value, or null if it is legal but unsupported + ArgumentException if ECI value is invalid + + + + Defines an container for encoder options + + + + + Gets the data container for all options + + + + + Specifies the height of the barcode image + + + + + Specifies the width of the barcode image + + + + + Don't put the content string into the output image. + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + + + + + Specifies whether the data should be encoded to the GS1 standard; + FNC1 character is added in front of the data + + + + + Initializes a new instance of the class. + + + + This Binarizer implementation uses the old ZXing global histogram approach. It is suitable + for low-end mobile devices which don't have enough CPU or memory to use a local thresholding + algorithm. However, because it picks a global black point, it cannot handle difficult shadows + and gradients. + + Faster mobile devices and all desktop applications should probably use HybridBinarizer instead. + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The source. + + + + Applies simple sharpening to the row data to improve performance of the 1D Readers. + + + + + + + + Does not sharpen the data, as this call is intended to only be used by 2D Readers. + + + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + + A new concrete Binarizer implementation object. + + + + Implementations of this class can, given locations of finder patterns for a QR code in an + image, sample the right points in the image to reconstruct the QR code, accounting for + perspective distortion. It is abstracted since it is relatively expensive and should be allowed + to take advantage of platform-specific optimized implementations, like Sun's Java Advanced + Imaging library, but which may not be available in other environments such as J2ME, and vice + versa. + + The implementation used can be controlled by calling {@link #setGridSampler(GridSampler)} + with an instance of a class which implements this interface. + + Sean Owen + + + the current implementation of + + + + Sets the implementation of used by the library. One global + instance is stored, which may sound problematic. But, the implementation provided + ought to be appropriate for the entire platform, and all uses of this library + in the whole lifetime of the JVM. For instance, an Android activity can swap in + an implementation that takes advantage of native platform libraries. + + The platform-specific object to install. + + + +

Samples an image for a square matrix of bits of the given dimension. This is used to extract + the black/white modules of a 2D barcode like a QR Code found in an image. Because this barcode + may be rotated or perspective-distorted, the caller supplies four points in the source image + that define known points in the barcode, so that the image may be sampled appropriately.

+

The last eight "from" parameters are four X/Y coordinate pairs of locations of points in + the image that define some significant points in the image to be sample. For example, + these may be the location of finder pattern in a QR Code.

+

The first eight "to" parameters are four X/Y coordinate pairs measured in the destination + , from the top left, where the known points in the image given by the "from" + parameters map to.

+

These 16 parameters define the transformation needed to sample the image.

+
+ image to sample + The dimension X. + The dimension Y. + The p1 preimage X. + The p1 preimage Y. + The p2 preimage X. + The p2 preimage Y. + The p3 preimage X. + The p3 preimage Y. + The p4 preimage X. + The p4 preimage Y. + The p1 image X. + The p1 image Y. + The p2 image X. + The p2 image Y. + The p3 image X. + The p3 image Y. + The p4 image X. + The p4 image Y. + + representing a grid of points sampled from the image within a region + defined by the "from" parameters + + ReaderException if image can't be sampled, for example, if the transformation defined +
+ + + + + + + + + + + +

Checks a set of points that have been transformed to sample points on an image against + the image's dimensions to see if the point are even within the image.

+ +

This method will actually "nudge" the endpoints back onto the image if they are found to be + barely (less than 1 pixel) off the image. This accounts for imperfect detection of finder + patterns in an image where the QR Code runs all the way to the image border.

+ +

For efficiency, the method will check points from either end of the line until one is found + to be within the image. Because the set of points are assumed to be linear, this is valid.

+ +
+ image into which the points should map + + actual points in x1,y1,...,xn,yn form + +
+ + This class implements a local thresholding algorithm, which while slower than the + GlobalHistogramBinarizer, is fairly efficient for what it does. It is designed for + high frequency images of barcodes with black data on white backgrounds. For this application, + it does a much better job than a global blackpoint with severe shadows and gradients. + However it tends to produce artifacts on lower frequency images and is therefore not + a good general purpose binarizer for uses outside ZXing. + + This class extends GlobalHistogramBinarizer, using the older histogram approach for 1D readers, + and the newer local approach for 2D readers. 1D decoding using a per-row histogram is already + inherently local, and only fails for horizontal gradients. We can revisit that problem later, + but for now it was not a win to use local blocks for 1D. + + This Binarizer is the default for the unit tests and the recommended class for library users. + dswitkin@google.com (Daniel Switkin) + + + + + gives the black matrix + + + + + initializing constructor + + + + + + creates a new instance + + + + + + + Calculates the final BitMatrix once for all requests. This could be called once from the + constructor instead, but there are some advantages to doing it lazily, such as making + profiling easier, and not doing heavy lifting when callers don't expect it. + + + + + For each 8x8 block in the image, calculate the average black point using a 5x5 grid + of the blocks around it. Also handles the corner cases (fractional blocks are computed based + on the last 8 pixels in the row/column which are also used in the previous block). + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + The black points. + The matrix. + + + + Applies a single threshold to an 8x8 block of pixels. + + The luminances. + The xoffset. + The yoffset. + The threshold. + The stride. + The matrix. + + + + Calculates a single black point for each 8x8 block of pixels and saves it away. + See the following thread for a discussion of this algorithm: + http://groups.google.com/group/zxing/browse_thread/thread/d06efa2c35a7ddc0 + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + + + +

This class implements a perspective transform in two dimensions. Given four source and four + destination points, it will compute the transformation implied between them. The code is based + directly upon section 3.4.2 of George Wolberg's "Digital Image Warping"; see pages 54-56.

+
+ Sean Owen +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Convenience method, not optimized for performance. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

This class contains utility methods for performing mathematical operations over + the Galois Fields. Operations use a given primitive polynomial in calculations.

+

Throughout this package, elements of the GF are represented as an {@code int} + for convenience and speed (but at the cost of memory). +

+
+ Sean Owen +
+ + + Create a representation of GF(size) using the given primitive polynomial. + + irreducible polynomial whose coefficients are represented by + * the bits of an int, where the least-significant bit represents the constant + * coefficient + the size of the field + the factor b in the generator polynomial can be 0- or 1-based + * (g(x) = (x+a^b)(x+a^(b+1))...(x+a^(b+2t-1))). + * In most cases it should be 1, but for QR code it is 0. + + + + Builds the monomial. + + The degree. + The coefficient. + the monomial representing coefficient * x^degree + + + + Implements both addition and subtraction -- they are the same in GF(size). + + sum/difference of a and b + + + + Exps the specified a. + + 2 to the power of a in GF(size) + + + + Logs the specified a. + + A. + base 2 log of a in GF(size) + + + + Inverses the specified a. + + multiplicative inverse of a + + + + Multiplies the specified a with b. + + A. + The b. + product of a and b in GF(size) + + + + Gets the size. + + + + + Gets the generator base. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + +

Represents a polynomial whose coefficients are elements of a GF. + Instances of this class are immutable.

+

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + the {@link GenericGF} instance representing the field to use + to perform computations + coefficients as ints representing elements of GF(size), arranged + from most significant (highest-power term) coefficient to least significant + if argument is null or empty, + or if leading coefficient is 0 and this is not a + constant polynomial (that is, it is not the monomial "0") + + + + degree of this polynomial + + + + + Gets a value indicating whether this is zero. + + true iff this polynomial is the monomial "0" + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + +

Implements Reed-Solomon decoding, as the name implies.

+ +

The algorithm will not be explained here, but the following references were helpful + in creating this implementation:

+ + + +

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+ +
+ Sean Owen + William Rucklidge + sanfordsquires +
+ + +

Decodes given set of received codewords, which include both data and error-correction + codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place, + in the input.

+
+ data and error-correction codewords + number of error-correction codewords available + false: decoding fails +
+ + + Implements Reed-Solomon encoding, as the name implies. + + Sean Owen + William Rucklidge + + + + Common string-related functions. + + Sean Owen + Alex Dupre + + + + SJIS + + + + + GB2312 + + + + + Guesses the encoding. + + bytes encoding a string, whose encoding should be guessed + decode hints if applicable + name of guessed encoding; at the moment will only guess one of: + {@link #SHIFT_JIS}, {@link #UTF8}, {@link #ISO88591}, or the platform + default encoding if none of these can possibly be correct + + + + This implementation can detect and decode Data Matrix codes in an image. + + bbrown@google.com (Brian Brown) + + + + + Locates and decodes a Data Matrix code in an image. + + + a String representing the content encoded by the Data Matrix code + + + + Locates and decodes a Data Matrix code in an image. + + + + a String representing the content encoded by the Data Matrix code + + + + does nothing here + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a Data Matrix code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + Guillaume Le Biller Added to zxing lib. + + + + encodes the content to a BitMatrix + + + + + + + + + + encodes the content to a BitMatrix + + + + + + + + + + + Encode the given symbol info to a bit matrix. + + The DataMatrix placement. + The symbol info to encode. + + + The bit matrix generated. + + + + Convert the ByteMatrix to BitMatrix. + + The input matrix. + The requested width of the image (in pixels) with the Datamatrix code + The requested height of the image (in pixels) with the Datamatrix code + The output matrix. + + + + bbrown@google.com (Brian Brown) + + + + + to parse + if dimension is < 8 or > 144 or not 0 mod 2 + + + + +

Creates the version object based on the dimension of the original bit matrix from + the datamatrix code.

+ +

See ISO 16022:2006 Table 7 - ECC 200 symbol attributes

+ + Original including alignment patterns + encapsulating the Data Matrix Code's "version" + if the dimensions of the mapping matrix are not valid + Data Matrix dimensions. +
+
+ + +

Reads the bits in the representing the mapping matrix (No alignment patterns) + in the correct order in order to reconstitute the codewords bytes contained within the + Data Matrix Code.

+ + bytes encoded within the Data Matrix Code + if the exact number of bytes expected is not read +
+
+ + +

Reads a bit of the mapping matrix accounting for boundary wrapping.

+ + Row to read in the mapping matrix + Column to read in the mapping matrix + Number of rows in the mapping matrix + Number of columns in the mapping matrix + value of the given bit in the mapping matrix +
+
+ + +

Reads the 8 bits of the standard Utah-shaped pattern.

+ +

See ISO 16022:2006, 5.8.1 Figure 6

+ + Current row in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Current column in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the utah shape +
+
+ + +

Reads the 8 bits of the special corner condition 1.

+ +

See ISO 16022:2006, Figure F.3

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 1 +
+
+ + +

Reads the 8 bits of the special corner condition 2.

+ +

See ISO 16022:2006, Figure F.4

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 2 +
+
+ + +

Reads the 8 bits of the special corner condition 3.

+ +

See ISO 16022:2006, Figure F.5

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 3 +
+
+ + +

Reads the 8 bits of the special corner condition 4.

+ +

See ISO 16022:2006, Figure F.6

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 4 +
+
+ + +

Extracts the data region from a that contains + alignment patterns.

+ + Original with alignment patterns + BitMatrix that has the alignment patterns removed +
+
+ + +

Encapsulates a block of data within a Data Matrix Code. Data Matrix Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ + bbrown@google.com (Brian Brown) +
+
+ + +

When Data Matrix Codes use multiple data blocks, they actually interleave the bytes of each of them. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ + bytes as read directly from the Data Matrix Code + version of the Data Matrix Code + DataBlocks containing original bytes, "de-interleaved" from representation in the + Data Matrix Code +
+
+ + +

Data Matrix Codes can encode text as bits in one of several modes, and can use multiple modes + in one Data Matrix Code. This class decodes the bits back into text.

+ +

See ISO 16022:2006, 5.2.1 - 5.2.9.2

+ + bbrown@google.com (Brian Brown) + Sean Owen +
+
+ + + See ISO 16022:2006, Annex C Table C.1 + The C40 Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, Annex C Table C.2 + The Text Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, 5.2.3 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.5 and Annex C, Table C.1 + + + + + See ISO 16022:2006, 5.2.6 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.7 + + + + + See ISO 16022:2006, 5.2.8 and Annex C Table C.3 + + + + + See ISO 16022:2006, 5.2.9 and Annex B, B.2 + + + + + See ISO 16022:2006, Annex B, B.2 + + + + +

The main class which implements Data Matrix Code decoding -- as opposed to locating and extracting + the Data Matrix Code from an image.

+ + bbrown@google.com (Brian Brown) +
+
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a Data Matrix Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+ + booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code + if the Data Matrix Code cannot be decoded +
+
+ + +

Decodes a Data Matrix Code represented as a . A 1 or "true" is taken + to mean a black module.

+
+ booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+ + data and error correction codewords + number of codewords that are data bytes +
+
+ + + The Version object encapsulates attributes about a particular + size Data Matrix Code. + + bbrown@google.com (Brian Brown) + + + + + returns the version numer + + + + + + returns the symbol size rows + + + + + + returns the symbols size columns + + + + + + retursn the data region size rows + + + + + + returns the data region size columns + + + + + + returns the total codewords count + + + + + +

Deduces version information from Data Matrix dimensions.

+ + Number of rows in modules + Number of columns in modules + Version for a Data Matrix Code of those dimensions + if dimensions do correspond to a valid Data Matrix size +
+
+ + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the Data Matrix code version's format.

+
+
+ + + returns the version number as string + + + + + + See ISO 16022:2006 5.5.1 Table 7 + + + + +

Encapsulates logic that can detect a Data Matrix Code in an image, even if the Data Matrix Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + +

Detects a Data Matrix Code in an image.

+
+ encapsulating results of detecting a Data Matrix Code or null +
+ + + Calculates the position of the white top right module using the output of the rectangle detector + for a rectangular matrix + + + + + Calculates the position of the white top right module using the output of the rectangle detector + for a square matrix + + + + + Increments the Integer associated with a key by one. + + + + + Counts the number of black/white transitions between two points, using something like Bresenham's algorithm. + + + + + Simply encapsulates two points and a number of transitions between them. + + + + + Orders ResultPointsAndTransitions by number of transitions, ascending. + + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Symbol Character Placement Program. Adapted from Annex M.1 in ISO/IEC 16022:2000(E). + + + + + Main constructor + + the codewords to place + the number of columns + the number of rows + + + + Places the 8 bits of a utah-shaped symbol character in ECC200. + + The row. + The col. + character position + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Enumeration for encodation types + + + + + Error Correction Code for ECC200. + + + + + Lookup table which factors to use for which number of error correction codewords. + See FACTORS. + + + + + Precomputed polynomial factors for ECC 200. + + + + + Creates the ECC200 error correction for an encoded message. + + The codewords. + information about the symbol to be encoded + the codewords with interleaved error correction. + + + + DataMatrix ECC 200 data encoder following the algorithm described in ISO/IEC 16022:200(E) in + annex S. + + + + + Padding character + + + + + mode latch to C40 encodation mode + + + + + mode latch to Base 256 encodation mode + + + + + FNC1 Codeword + + + + + Structured Append Codeword + + + + + Reader Programming + + + + + Upper Shift + + + + + 05 Macro + + + + + 06 Macro + + + + + mode latch to ANSI X.12 encodation mode + + + + + mode latch to Text encodation mode + + + + + mode latch to EDIFACT encodation mode + + + + + ECI character (Extended Channel Interpretation) + + + + + Unlatch from C40 encodation + + + + + Unlatch from X12 encodation + + + + + 05 Macro header + + + + + 06 Macro header + + + + + Macro trailer + + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + the encoded message (the char values range from 0 to 255) + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + requested shape. May be {@code SymbolShapeHint.FORCE_NONE},{@code SymbolShapeHint.FORCE_SQUARE} or {@code SymbolShapeHint.FORCE_RECTANGLE}. + the minimum symbol size constraint or null for no constraint + the maximum symbol size constraint or null for no constraint + encoding mode to start with + the encoded message (the char values range from 0 to 255) + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + Symbol info table for DataMatrix. + + + + Overrides the symbol info set used by this class. Used for testing purposes. + + @param override the symbol info set to use + + + + Enumeration for DataMatrix symbol shape hint. It can be used to force square or rectangular + symbols. + + + + + The class holds the available options for the DatamatrixWriter + + + + + Specifies the matrix shape for Data Matrix + + + + + Specifies a minimum barcode size + + + + + Specifies a maximum barcode size + + + + + Specifies the default encodation + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Encapsulates a type of hint that a caller may pass to a barcode reader to help it + more quickly or accurately decode it. It is up to implementations to decide what, + if anything, to do with the information that is supplied. + + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Unspecified, application-specific hint. Maps to an unspecified . + + + + + Image is a pure monochrome image of a barcode. Doesn't matter what it maps to; + use = true. + + + + + Image is known to be of one of a few possible formats. + Maps to a of s. + + + + + Spend more time to try to find a barcode; optimize for accuracy, not speed. + Doesn't matter what it maps to; use = true. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + + + The caller needs to be notified via callback when a possible + is found. Maps to a . + + + + + Assume MSI codes employ a check digit. Maps to . + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + Maps to . + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + 1D readers supporting rotation with TRY_HARDER enabled. + But BarcodeReader class can do auto-rotating for 1D and 2D codes. + Enabling that option prevents 1D readers doing double rotation. + BarcodeReader enables that option automatically if "global" auto-rotation is enabled. + Maps to . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to; + use . + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Simply encapsulates a width and height. + + + + + initializing constructor + + + + + + + the width + + + + + the height + + + + + + + + + + + + + + + + + + + + + + + + These are a set of hints that you may pass to Writers to specify their behavior. + + dswitkin@google.com (Daniel Switkin) + + + + Specifies the width of the barcode image + type: + + + + + Specifies the height of the barcode image + type: + + + + + Don't put the content string into the output image. + type: + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + + For Aztec it is of type , representing the minimal percentage of error correction words. + In all cases, it can also be a representation of the desired value as well. + Note: an Aztec symbol should have a minimum of 25% EC words. + For PDF417 it is of type or (between 0 and 8), + + + + + Specifies what character encoding to use where applicable. + type: + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + type: , or representation of the integer value + + + + + Specifies the aspect ratio to use. Default is 4. + type: , or 1-4. + + + + + Specifies whether to use compact mode for PDF417 + type: , or "true" or "false" + value + + + + + Specifies what compaction mode to use for PDF417. + type: or value of one of its + enum values + + + + + Specifies the minimum and maximum number of rows and columns for PDF417. + type: + + + + + Don't append ECI segment. + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + type: + + + + + Specifies the matrix shape for Data Matrix (type ) + + + + + Specifies a minimum barcode size (type ). Only applicable to Data Matrix now. + + + + + Specifies a maximum barcode size (type ). Only applicable to Data Matrix now. + + + + + if true, don't switch to codeset C for numbers + + + + + Specifies the default encodation for Data Matrix (type ) + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Specifies the required number of layers for an Aztec code. + A negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + type: , or representation of the integer value + + + + + Specifies the exact version of QR code to be encoded. + (Type , or representation of the integer value). + + + + + Specifies whether the data should be encoded to the GS1 standard + type: , or "true" or "false" + value + + + + + Thrown when a barcode was successfully detected, but some aspect of + the content did not conform to the barcode's format rules. This could have + been due to a mis-detection. + Sean Owen + + + + + + + + + + + + + + + + + + + + + + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Decodes the specified barcode bitmap which is given by a generic byte array. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Interface for a smart class to encode some content into a barcode + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents. + + The contents. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + The matrix. + + + + + A wrapper implementation of {@link LuminanceSource} which inverts the luminances it returns -- black becomes + white and vice versa, and each value becomes (255-value). + + Sean Owen + + + + Initializes a new instance of the class. + + The @delegate. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff; + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Inverts this instance. + + original delegate {@link LuminanceSource} since invert undoes itself + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + The class holds the available options for the QrCodeWriter + + + + + if true, don't switch to codeset C for numbers + + + + + This object renders a CODE93 code as a BitMatrix + + + + + + output to append to + start position + pattern to append + unused + 9 + + + + Decodes MSI barcodes. + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. + + + + + Creates a reader that can be configured to check the last character as a check digit, + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a MSI code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + This object renders a Plessey code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + One row of an RSS Expanded Stacked symbol, consisting of 1+ expanded pairs. + + + + + Did this row of the image have to be reversed (mirrored) to recognize the pairs? + + + + + Two rows are equal if they contain the same pairs in the same order. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Gets the information. + + + + + + Parses the information. + + + + + + Creates the decoder. + + The information. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Superclass of implementations that read barcodes in the RSS family of formats. + + + + + Initializes a new instance of the class. + + + + + Gets the decode finder counters. + + + + + + Gets the data character counters. + + + + + + Gets the odd rounding errors. + + + + + + Gets the even rounding errors. + + + + + + Gets the odd counts. + + + + + + Gets the even counts. + + + + + + Parses the finder value. + + The counters. + The finder patterns. + The value. + + + + + Counts the specified array. + + The array. + + + + + Increments the specified array. + + The array. + The errors. + + + + Decrements the specified array. + + The array. + The errors. + + + + Determines whether [is finder pattern] [the specified counters]. + + The counters. + + true if [is finder pattern] [the specified counters]; otherwise, false. + + + + + Encapsulates a since character value in an RSS barcode, including its checksum information. + + + + + Gets the value. + + + + + Gets the checksum portion. + + + + + Initializes a new instance of the class. + + The value. + The checksum portion. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Encapsulates an RSS barcode finder pattern, including its start/end position and row. + + + + + Gets the value. + + + + + Gets the start end. + + + + + Gets the result points. + + + + + Initializes a new instance of the class. + + The value. + The start end. + The start. + The end. + The row number. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Decodes RSS-14, including truncated and stacked variants. See ISO/IEC 24724:2006. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Adapted from listings in ISO/IEC 24724 Appendix B and Appendix G. + + + + + Gets the RS svalue. + + The widths. + Width of the max. + if set to true [no narrow]. + + + + + This object renders an UPC-E code as a {@link BitMatrix}. + @author 0979097955s@gmail.com (RX) + + + + +

Decodes Codabar barcodes.

+ + Bas Vijfwinkel +
+
+ + These represent the encodings of characters, as patterns of wide and narrow bars. The 7 least-significant bits of + each int correspond to the pattern of wide and narrow, with 1s representing "wide" and 0s representing narrow. + + + + Records the size of all runs of white and black pixels, starting with white. + This is just like recordPattern, except it records all the counters, and + uses our builtin "counters" member for storage. + + row to count from + + + + This class renders CodaBar as []. + + dsbnatut@gmail.com (Kazuki Nishiura) + + + +

Decodes Code 128 barcodes.

+ + Sean Owen +
+
+ + + This object renders a CODE128 code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + +

Decodes Code 39 barcodes. Supports "Full ASCII Code 39" if USE_CODE_39_EXTENDED_MODE is set.

+ Sean Owen + @see Code93Reader +
+
+ + + Returns a string with all possible characters + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. It will not decoded "extended Code 39" sequences. + + + + + Creates a reader that can be configured to check the last character as a check digit. + It will not decoded "extended Code 39" sequences. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + + Creates a reader that can be configured to check the last character as a check digit, + or optionally attempt to decode "extended Code 39" sequences that are used to encode + the full ASCII character set. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + if true, will attempt to decode extended Code 39 sequences in the text. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + +

Decodes Code 93 barcodes.

+ Sean Owen + +
+
+ + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + +

Implements decoding of the EAN-13 format.

+ + dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Initializes a new instance of the class. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + Get the format of this decoder. + The 1D format. + + + + + Based on pattern of odd-even ('L' and 'G') patterns used to encoded the explicitly-encoded + digits in a barcode, determines the implicitly encoded first digit and adds it to the + result string. + + string to insert decoded first digit into + int whose bits indicates the pattern of odd/even L/G patterns used to + encode digits + -1 if first digit cannot be determined + + + + This object renders an EAN13 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Implements decoding of the EAN-8 format.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Get the format of this decoder. + The 1D format. + + + + + This object renders an EAN8 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + + + a byte array of horizontal pixels (false = white, true = black) + + + + + Records EAN prefix to GS1 Member Organization, where the member organization + correlates strongly with a country. This is an imperfect means of identifying + a country of origin by EAN-13 barcode value. See + + http://en.wikipedia.org/wiki/List_of_GS1_country_codes. + + Sean Owen + + + + +

Implements decoding of the ITF format, or Interleaved Two of Five.

+ +

This Reader will scan ITF barcodes of certain lengths only. + At the moment it reads length 6, 8, 10, 12, 14, 16, 18, 20, 24, 44 and 48 as these have appeared "in the wild". Not all + lengths are scanned, especially shorter ones, to avoid false positives. This in turn is due to a lack of + required checksum function.

+ +

The checksum is optional and is not applied by this Reader. The consumer of the decoded + value will have to apply a checksum if required.

+ +

http://en.wikipedia.org/wiki/Interleaved_2_of_5 + is a great reference for Interleaved 2 of 5 information.

+ + kevin.osullivan@sita.aero, SITA Lab. +
+
+ + + Valid ITF lengths. Anything longer than the largest value is also allowed. + + + + + Start/end guard pattern. + + Note: The end pattern is reversed because the row is reversed before + searching for the END_PATTERN + + + + + Patterns of Wide / Narrow lines to indicate each digit + + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + + row of black/white values to search + offset of start pattern + The payload end. + to append decoded chars to + + false, if decoding could not complete successfully + + + + + Identify where the start of the middle / payload section starts. + + row of black/white values to search + Array, containing index of start of 'start block' and end of 'start block' + + + + The start & end patterns must be pre/post fixed by a quiet zone. This + zone must be at least 10 times the width of a narrow line. Scan back until + we either get to the start of the barcode or match the necessary number of + quiet zone pixels. + + Note: Its assumed the row is reversed when using this method to find + quiet zone after the end pattern. + + ref: http://www.barcode-1.net/i25code.html + + bit array representing the scanned barcode. + index into row of the start or end pattern. + false, if the quiet zone cannot be found + + + + Skip all whitespace until we get to the first black line. + + row of black/white values to search + index of the first black line or -1 if no black lines are found in the row. + + + + Identify where the end of the middle / payload section ends. + + row of black/white values to search + Array, containing index of start of 'end block' and end of 'end + block' or null, if nothing found + + + + + row of black/white values to search + position to start search + pattern of counts of number of black and white pixels that are being searched for as a pattern + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a sequence of ITF black/white lines into single + digit. + + the counts of runs of observed black/white/black/... values + The decoded digit + + false, if digit cannot be decoded + + + + + This object renders a ITF code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code bool[]} of horizontal pixels (false = white, true = black) + + + + + + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

A reader that can read all available UPC/EAN formats. If a caller wants to try to + read all such formats, it is most efficient to use this implementation rather than invoke + individual readers.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Encapsulates functionality and implementation that is common to one-dimensional barcodes.

+ dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + a byte array of horizontal pixels (0 = white, 1 = black) + + + + Appends the given pattern to the target array starting at pos. + + encode black/white pattern into this array + position to start encoding at in target + lengths of black/white runs to encode + starting color - false for white, true for black + the number of elements added to target. + + + + Gets the default margin. + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + + barcode contents to encode + a bool[] of horizontal pixels (false = white, true = black) + + + + Calculates the checksum digit modulo10. + + The contents. + + + + + Encapsulates functionality and implementation that is common to all families + of one-dimensional barcodes. + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + + + + + + + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + Note that we don't try rotation without the try harder flag, even if rotation was supported. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + We're going to examine rows from the middle outward, searching alternately above and below the + middle, and farther out each time. rowStep is the number of rows between each successive + attempt above and below the middle. So we'd scan row middle, then middle - rowStep, then + middle + rowStep, then middle - (2 * rowStep), etc. + rowStep is bigger as the image is taller, but is always at least 1. We've somewhat arbitrarily + decided that moving up and down by about 1/16 of the image is pretty good; we try more of the + image if "trying harder". + + The image to decode + Any hints that were requested + The contents of the decoded barcode + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the pattern in reverse. + + The row. + The start. + The counters. + + + + + Determines how closely a set of observed counts of runs of black/white values matches a given + target pattern. This is reported as the ratio of the total variance from the expected pattern + proportions across all pattern elements, to the length of the pattern. + + observed counters + expected pattern + The most any counter can differ before we give up + ratio of total variance between counters and pattern compared to total pattern size, + where the ratio has been multiplied by 256. So, 0 means no variance (perfect match); 256 means + the total variance between counters and patterns equals the pattern length, higher values mean + even more variance + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + +

Implements decoding of the UPC-A format.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen +
+
+ + +

Like decodeRow(int, BitArray, java.util.Map), but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ + + + + +
+ + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Decodes the specified image. + + The image. + The hints. + + + + + Get the format of this decoder. + The 1D format. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + This object renders a UPC-A code as a . + qwandor@google.com (Andrew Walbran) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + @see UPCEANExtension5Support + + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + + + @see UPCEANExtension2Support + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + one {@link ResultMetadataType} to appropriate value, or {@code null} if not known + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Start/end guard pattern. + + + + + Pattern marking the middle of a UPC/EAN pattern, separating the two halves. + + + + + end guard pattern. + + + + + "Odd", or "L" patterns used to encode UPC/EAN digits. + + + + + As above but also including the "even", or "G" patterns used to encode UPC/EAN digits. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + +

Like , but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ row index into the image + encoding of the row of the barcode image + start/end column where the opening start pattern was found + optional hints that influence decoding + encapsulating the result of decoding a barcode in the row +
+ + + + string of digits to check + see + + + + Computes the UPC/EAN checksum on a string of digits, and reports + whether the checksum is correct or not. + + string of digits to check + true iff string of digits passes the UPC/EAN checksum algorithm + + + + Decodes the end. + + The row. + The end start. + + + + + + row of black/white values to search + position to start search + if true, indicates that the pattern specifies white/black/white/... + pixel counts, otherwise, it is interpreted as black/white/black/... + pattern of counts of number of black and white pixels that are being + searched for as a pattern + array of counters, as long as pattern, to re-use + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a single UPC/EAN-encoded digit. + + row of black/white values to decode + the counts of runs of observed black/white/black/... values + horizontal offset to start decoding from + the set of patterns to use to decode -- sometimes different encodings + for the digits 0-9 are used, and this indicates the encodings for 0 to 9 that should + be used + horizontal offset of first pixel beyond the decoded digit + + + + Get the format of this decoder. + + The 1D format. + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ aripollak@gmail.com (Ari Pollak) + dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Gets the default margin. + + + + +

Implements decoding of the UPC-E format.

+

Thisis a great reference for + UPC-E information.

+ Sean Owen +
+
+ + + The pattern that marks the middle, and end, of a UPC-E pattern. + There is no "second half" to a UPC-E barcode. + + + + + See L_AND_G_PATTERNS these values similarly represent patterns of + even-odd parity encodings of digits that imply both the number system (0 or 1) + used, and the check digit. + + + + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Decodes the end. + + The row. + The end start. + + + + + see checkStandardUPCEANChecksum(String) + + + + + + + Determines the num sys and check digit. + + The result string. + The lg pattern found. + + + + + Get the format of this decoder. + The 1D format. + + + + + Expands a UPC-E value back into its full, equivalent UPC-A code value. + + UPC-E code as string of digits + equivalent UPC-A code as string of digits + + + + + This object renders a CODE39 code as a . + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + implements an Intelligent Mail barcode + Rishabh Hatgadkar + + + + + Metadata about a PDF417 Barcode + + Guenther Grau + + + + A Barcode Value for the PDF417 barcode. + The scanner will iterate through the bitmatrix, + and given the different methods or iterations + will increment a given barcode value's confidence. + + When done, this will return the values of highest confidence. + + Guenther Grau + + + + Incremenets the Confidence for a given value. (Adds an occurance of a value) + + + Value. + + + + Determines the maximum occurrence of a set value and returns all values which were set with this occurrence. + + an array of int, containing the values with the highest occurrence, or null, if no value was set. + + + + Returns the confience value for a given barcode value + + Barcode value. + + + + A Bounding Box helper class + + Guenther Grau + + + + Initializes a new instance of the class. + returns null if the corner points don't match up correctly + + The image. + The top left. + The bottom left. + The top right. + The bottom right. + + + + + Creates the specified box. + + The box. + + + + + Initializes a new instance of the class. + Will throw an exception if the corner points don't match up correctly + + Image. + Top left. + Top right. + Bottom left. + Bottom right. + + + + Merge two Bounding Boxes, getting the left corners of left, and the right corners of right + (Images should be the same) + + Left. + Right. + + + + Adds the missing rows. + + The missing rows. + Missing start rows. + Missing end rows. + If set to true is left. + + + + Calculates the minimum and maximum X & Y values based on the corner points. + + + + + If we adjust the width, set a new right corner coordinate and recalculate + + Bottom right. + + + + A Codeword in the PDF417 barcode + + Guenther Grau + + + + Default value for the RowNumber (-1 being an invalid real number) + + + + + Initializes a new instance of the class. + + Start x. + End x. + Bucket. + Value. + + + + Gets the width. + + The width. + + + + Gets a value indicating whether this instance has valid row number. + + true if this instance has valid row number; otherwise, false. + + + + Determines whether this instance is valid row number the specified rowNumber. + + true if this instance is valid row number the specified rowNumber; otherwise, false. + Row number. + + + + Sets the row number as the row's indicator column. + + + + + Returns a that represents the current . + + A that represents the current . + + + +

This class contains the methods for decoding the PDF417 codewords.

+ + SITA Lab (kevin.osullivan@sita.aero) +
+
+ + + Table containing values for the exponent of 900. + This is used in the numeric compaction decode algorithm. + + + + + Text Compaction mode (see 5.4.1.5) permits all printable ASCII characters to be + encoded, i.e. values 32 - 126 inclusive in accordance with ISO/IEC 646 (IRV), as + well as selected control characters. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + The Text Compaction mode includes all the printable ASCII characters + (i.e. values from 32 to 126) and three ASCII control characters: HT or tab + (ASCII value 9), LF or line feed (ASCII value 10), and CR or carriage + return (ASCII value 13). The Text Compaction mode also includes various latch + and shift characters which are used exclusively within the mode. The Text + Compaction mode encodes up to 2 characters per codeword. The compaction rules + for converting data into PDF417 codewords are defined in 5.4.2.2. The sub-mode + switches are defined in 5.4.2.3. + + The text compaction data. + The byte compaction data if there + was a mode shift. + The size of the text compaction and byte compaction data. + The decoded data is appended to the result. + + + + + Byte Compaction mode (see 5.4.3) permits all 256 possible 8-bit byte values to be encoded. + This includes all ASCII characters value 0 to 127 inclusive and provides for international + character set support. + + The byte compaction mode i.e. 901 or 924 + The array of codewords (data + error) + Currently active character encoding + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Numeric Compaction mode (see 5.4.4) permits efficient encoding of numeric data strings. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Convert a list of Numeric Compacted codewords from Base 900 to Base 10. + EXAMPLE + Encode the fifteen digit numeric string 000213298174000 + Prefix the numeric string with a 1 and set the initial value of + t = 1 000 213 298 174 000 + Calculate codeword 0 + d0 = 1 000 213 298 174 000 mod 900 = 200 + + t = 1 000 213 298 174 000 div 900 = 1 111 348 109 082 + Calculate codeword 1 + d1 = 1 111 348 109 082 mod 900 = 282 + + t = 1 111 348 109 082 div 900 = 1 234 831 232 + Calculate codeword 2 + d2 = 1 234 831 232 mod 900 = 632 + + t = 1 234 831 232 div 900 = 1 372 034 + Calculate codeword 3 + d3 = 1 372 034 mod 900 = 434 + + t = 1 372 034 div 900 = 1 524 + Calculate codeword 4 + d4 = 1 524 mod 900 = 624 + + t = 1 524 div 900 = 1 + Calculate codeword 5 + d5 = 1 mod 900 = 1 + t = 1 div 900 = 0 + Codeword sequence is: 1, 624, 434, 632, 282, 200 + + Decode the above codewords involves + 1 x 900 power of 5 + 624 x 900 power of 4 + 434 x 900 power of 3 + + 632 x 900 power of 2 + 282 x 900 power of 1 + 200 x 900 power of 0 = 1000213298174000 + + Remove leading 1 => Result is 000213298174000 + The array of codewords + The number of codewords + The decoded string representing the Numeric data. + + + + + + + Guenther Grau + + + + Returns the DetectionResult Columns. This does a fair bit of calculation, so call it sparingly. + + The detection result columns. + + + + Adjusts the indicator column row numbers. + + Detection result column. + + + + return number of codewords which don't have a valid row number. Note that the count is not accurate as codewords . + will be counted several times. It just serves as an indicator to see when we can stop adjusting row numbers + + The row numbers. + + + + Adjusts the row numbers by row. + + The row numbers by row. + + + + Adjusts the row numbers from both Row Indicators + + zero + + + + Adjusts the row numbers from Right Row Indicator. + + The unadjusted row count. + + + + Adjusts the row numbers from Left Row Indicator. + + Unadjusted row Count. + + + + Adjusts the row number if valid. + + The invalid rows + Row indicator row number. + Invalid row counts. + Codeword. + + + + Adjusts the row numbers. + + Barcode column. + Codewords row. + Codewords. + + + + Adjusts the row number. + + true, if row number was adjusted, false otherwise. + Codeword. + Other codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + The maximum distance to search in the codeword array in both the positive and negative directions + + + + + The Bounding Box around the column (in the BitMatrix) + + The box. + + + + The Codewords the Box encodes for, offset by the Box minY. + Remember to Access this ONLY through GetCodeword(imageRow) if you're accessing it in that manner. + + The codewords. + + + + Initializes a new instance of the class. + + The Bounding Box around the column (in the BitMatrix) + + + + Converts the Image's Row to the index in the Codewords array + + The Codeword Index. + Image row. + + + + Converts the Codeword array index into a Row in the Image (BitMatrix) + + The Image Row. + Codeword index. + + + + Gets the codeword for a given row + + The codeword. + Image row. + + + + Gets the codeword closest to the specified row in the image + + Image row. + + + + Sets the codeword for an image row + + Image row. + Codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + Gets or sets a value indicating whether this instance is the left indicator + + true if this instance is left; otherwise, false. + + + + Initializes a new instance of the class. + + Box. + If set to true is left. + + + + Sets the Row Numbers as Inidicator Columns + + + + + TODO implement properly + TODO maybe we should add missing codewords to store the correct row number to make + finding row numbers for other columns easier + use row height count to make detection of invalid row numbers more reliable + + The indicator column row numbers. + Metadata. + + + + Gets the row heights. + + The row heights. + + + + Adjusts the in omplete indicator column row numbers. + + Metadata. + + + + Gets the barcode metadata. + + The barcode metadata. + + + + Prune the codewords which do not match the metadata + TODO Maybe we should keep the incorrect codewords for the start and end positions? + + Codewords. + Metadata. + + + + Returns a that represents the current . + + A that represents the current . + + + + + + Guenther Grau + creatale GmbH (christoph.schulz@creatale.de) + + + + The ratios table + + + + + Initializes the class & Pre-computes the symbol ratio table. + + + + + Gets the decoded value. + + The decoded value. + Module bit count. + + + + Samples the bit counts. + + The bit counts. + Module bit count. + + + + Gets the decoded codeword value. + + The decoded codeword value. + Module bit count. + + + + Gets the bit value. + + The bit value. + Module bit count. + + + + Gets the closest decoded value. + + The closest decoded value. + Module bit count. + + + + + + Guenther Grau + + + + Decode the specified image, imageTopLeft, imageBottomLeft, imageTopRight, imageBottomRight, minCodewordWidth + and maxCodewordWidth. + TODO: don't pass in minCodewordWidth and maxCodewordWidth, pass in barcode columns for start and stop pattern + columns. That way width can be deducted from the pattern column. + This approach also allows to detect more details about the barcode, e.g. if a bar type (white or black) is wider + than it should be. This can happen if the scanner used a bad blackpoint. + + Image. + Image top left. + Image bottom left. + Image top right. + Image bottom right. + Minimum codeword width. + Max codeword width. + + + + Merge the specified leftRowIndicatorColumn and rightRowIndicatorColumn. + + Left row indicator column. + Right row indicator column. + + + + Adjusts the bounding box. + + The bounding box. + Row indicator column. + + + + Gets the barcode metadata. + + The barcode metadata. + Left row indicator column. + Right row indicator column. + + + + Gets the row indicator column. + + The row indicator column. + Image. + Bounding box. + Start point. + If set to true left to right. + Minimum codeword width. + Max codeword width. + + + + Adjusts the codeword count. + + Detection result. + Barcode matrix. + + + + Creates the decoder result. + + The decoder result. + Detection result. + + + + This method deals with the fact, that the decoding process doesn't always yield a single most likely value. The + current error correction implementation doesn't deal with erasures very well, so it's better to provide a value + for these ambiguous codewords instead of treating it as an erasure. The problem is that we don't know which of + the ambiguous values to choose. We try decode using the first value, and if that fails, we use another of the + ambiguous values and try to decode again. This usually only happens on very hard to read and decode barcodes, + so decoding the normal barcodes is not affected by this. + + The decoder result from ambiguous values. + Ec level. + Codewords. + contains the indexes of erasures. + array with the indexes that have more than one most likely value. + two dimensional array that contains the ambiguous values. The first dimension must + be the same Length as the ambiguousIndexes array. + + + + Creates the barcode matrix. + + The barcode matrix. + Detection result. + + + + Tests to see if the Barcode Column is Valid + + true, if barcode column is valid, false otherwise. + Detection result. + Barcode column. + + + + Gets the start column. + + The start column. + Detection result. + Barcode column. + Image row. + If set to true left to right. + + + + Detects the codeword. + + The codeword. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + Minimum codeword width. + Max codeword width. + + + + Gets the module bit count. + + The module bit count. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + + + + Gets the number of EC code words. + + The number of EC code words. + Barcode EC level. + + + + Adjusts the codeword start column. + + The codeword start column. + Image. + Minimum column. + Max column. + If set to true left to right. + Codeword start column. + Image row. + + + + Checks the codeword for any skew. + + true, if codeword is within the skew, false otherwise. + Codeword size. + Minimum codeword width. + Max codeword width. + + + + Decodes the codewords. + + The codewords. + Codewords. + Ec level. + Erasures. + + + + Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place. + + The errors. + data and error correction codewords. + positions of any known erasures. + number of error correction codewords that are available in codewords. + + + + Verifies that all is well with the the codeword array. + + Codewords. + Number EC codewords. + + + + Gets the bit count for codeword. + + The bit count for codeword. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Module bit count. + + + + Returns a that represents the jagged array. + + A that represents the jagged array. + Barcode matrix as a jagged array. + + + + PDF 417 Detector Result class. Skipped private backing stores. + Guenther Grau + + + + + Initializes a new instance of the class. + + Bits. + Points. + + + + defines the level of the error correction / count of error correction codewords + + + + +

PDF417 error correction implementation.

+

This example + is quite useful in understanding the algorithm.

+ Sean Owen + +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the specified received. + + received codewords + number of those codewords used for EC + location of erasures + The error locations count. + + + + + Runs the euclidean algorithm (Greatest Common Divisor) until r's degree is less than R/2 + + The euclidean algorithm. + + + + Finds the error locations as a direct application of Chien's search + + The error locations. + Error locator. + + + + Finds the error magnitudes by directly applying Forney's Formula + + The error magnitudes. + Error evaluator. + Error locator. + Error locations. + + + +

A field based on powers of a generator integer, modulo some modulus.

+ +
+ Sean Owen +
+ + + + + Sean Owen + + + + Gets the coefficients. + + The coefficients. + + + + degree of this polynomial + + + + + Gets a value indicating whether this instance is zero. + + true if this polynomial is the monomial "0" + + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + + + Adds another Modulus + + Other. + + + + Subtract another Modulus + + Other. + + + + Multiply by another Modulus + + Other. + + + + Returns a Negative version of this instance + + + + + Multiply by a Scalar. + + Scalar. + + + + Multiplies by a Monomial + + The by monomial. + Degree. + Coefficient. + + + + Returns a that represents the current . + + A that represents the current . + + + +

Encapsulates logic that can detect a PDF417 Code in an image, even if the + PDF417 Code is rotated or skewed, or partially obscured.

+ + SITA Lab (kevin.osullivan@sita.aero) + dswitkin@google.com (Daniel Switkin) + Guenther Grau +
+
+ + + B S B S B S B S Bar/Space pattern + 11111111 0 1 0 1 0 1 000. + + + + + 1111111 0 1 000 1 0 1 00 1 + + + + + if we set the value too low, then we don't detect the correct height of the bar if the start patterns are damaged. + if we set the value too high, then we might detect the start pattern from a neighbor barcode. + + + + + A PDF471 barcode should have at least 3 rows, with each row being >= 3 times the module width. Therefore it should be at least + 9 pixels tall. To be conservative, we use about half the size to ensure we don't miss it. + + + + +

Detects a PDF417 Code in an image. Only checks 0 and 180 degree rotations.

+
+ barcode image to decode + optional hints to detector + if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned + + encapsulating results of detecting a PDF417 code + +
+ + + Detects PDF417 codes in an image. Only checks 0 degree rotation (so rotate the matrix and check again outside of this method) + + multiple if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned. + bit matrix to detect barcodes in. + List of ResultPoint arrays containing the coordinates of found barcodes + + + + Locate the vertices and the codewords area of a black blob using the Start and Stop patterns as locators. + + Matrix. + Start row. + Start column. + an array containing the vertices: + vertices[0] x, y top left barcode + vertices[1] x, y bottom left barcode + vertices[2] x, y top right barcode + vertices[3] x, y bottom right barcode + vertices[4] x, y top left codeword area + vertices[5] x, y bottom left codeword area + vertices[6] x, y top right codeword area + vertices[7] x, y bottom right codeword area + + + + + Copies the temp data to the final result + + Result. + Temp result. + Destination indexes. + + + + Finds the rows with the given pattern. + + The rows with pattern. + Matrix. + Height. + Width. + Start row. + Start column. + Pattern. + + + + Finds the guard pattern. Uses System.Linq.Enumerable.Repeat to fill in counters. This might be a performance issue? + + start/end horizontal offset of guard pattern, as an array of two ints. + matrix row of black/white values to search + column x position to start search. + row y position to start search. + width the number of pixels to search on this row. + If set to true search the white patterns first. + pattern of counts of number of black and white pixels that are being searched for as a pattern. + counters array of counters, as long as pattern, to re-use . + + + + Determines how closely a set of observed counts of runs of black/white. + values matches a given target pattern. This is reported as the ratio of + the total variance from the expected pattern proportions across all + pattern elements, to the length of the pattern. + + + ratio of total variance between counters and pattern compared to + total pattern size, where the ratio has been multiplied by 256. + So, 0 means no variance (perfect match); 256 means the total + variance between counters and patterns equals the pattern length, + higher values mean even more variance + + observed counters. + expected pattern. + The most any counter can differ before we give up. + + + + Holds all of the information for a barcode in a format where it can be easily accessible + + Jacob Haynes + + + + + the height of the matrix (Rows) + the width of the matrix (Cols) + + + + + Jacob Haynes + + + + + Creates a Barcode row of the width + + The width. + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + A boolean which is true if the bar black false if it is white + How many spots wide the bar is. + + + + + This function scales the row + + How much you want the image to be scaled, must be greater than or equal to 1. + the scaled row + + + + + Represents possible PDF417 barcode compaction types. + + + + + + + + + + + + + + + + + + + + + + + + + Data object to specify the minimum and maximum number of rows and columns for a PDF417 barcode. + @author qwandor@google.com (Andrew Walbran) + + + + + Initializes a new instance of the class. + + The min cols. + The max cols. + The min rows. + The max rows. + + + + Gets the min cols. + + + + + Gets the max cols. + + + + + Gets the min rows. + + + + + Gets the max rows. + + + + + Top-level class for the logic part of the PDF417 implementation. + + + + + The start pattern (17 bits) + + + + + The stop pattern (18 bits) + + + + + The codeword table from the Annex A of ISO/IEC 15438:2001(E). + + + + + Calculates the necessary number of rows as described in annex Q of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol (r) + + + + Calculates the number of pad codewords as described in 4.9.2 of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol + the number of pad codewords + + + + Generates the barcode logic. + + the message to encode + PDF417 error correction level to use + + + + Determine optimal nr of columns and rows for the specified number of + codewords. + + number of code words + number of error correction code words + The longest dimension of the barcode, used for columns + The short dimension of the barcode, used for rows + The height of a row, will alter this parameter if aspectRatio>4 (aspectRatio==AUTO) + dimension object containing cols as width and rows as height + + + + Sets max/min row/col values + + maximum allowed columns + minimum allowed columns + maximum allowed rows + minimum allowed rows + + + + Sets compaction to values stored in enum + + compaction mode to use + + + + Sets compact to be true or false + + if true, enables compaction + + + + Sets output encoding. + + sets character encoding to use + + + + Sets the disable eci. + + if set to true don't add an ECI segment for different encodings than default. + + + + PDF417 error correction code following the algorithm described in ISO/IEC 15438:2001(E) in + chapter 4.10. + + + + + Tables of coefficients for calculating error correction words + (see annex F, ISO/IEC 15438:2001(E)) + + + + + Determines the number of error correction codewords for a specified error correction + level. + + the error correction level (0-8) + the number of codewords generated for error correction + + + + Determines the error correction level for AUTO + + The error correction level (0-9) + The number of codewords for AUTO errorCorrectionLevel + the number of codewords generated for error correction + + + + Returns the recommended minimum error correction level as described in annex E of + ISO/IEC 15438:2001(E). + + the number of data codewords + the recommended minimum error correction level + + + + Generates the error correction codewords according to 4.10 in ISO/IEC 15438:2001(E). + + the data codewords + the error correction level (0-8) + the String representing the error correction codewords + + + + defines the level of the error correction / count of error correction codewords + + + + + PDF417 high-level encoder following the algorithm described in ISO/IEC 15438:2001(E) in + annex P. + + + + + code for Text compaction + + + + + code for Byte compaction + + + + + code for Numeric compaction + + + + + Text compaction submode Alpha + + + + + Text compaction submode Lower + + + + + Text compaction submode Mixed + + + + + Text compaction submode Punctuation + + + + + mode latch to Text Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters NOT a multiple of 6) + + + + + mode latch to Numeric Compaction mode + + + + + mode shift to Byte Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters a multiple of 6) + + + + + identifier for a user defined Extended Channel Interpretation (ECI) + + + + + identifier for a general purpose ECO format + + + + + identifier for an ECI of a character set of code page + + + + + Raw code table for text compaction Mixed sub-mode + + + + + Raw code table for text compaction: Punctuation sub-mode + + + + + Performs high-level encoding of a PDF417 message using the algorithm described in annex P + of ISO/IEC 15438:2001(E). If byte compaction has been selected, then only byte compaction + is used. + + the message + compaction mode to use + character encoding used to encode in default or byte compaction + or null for default / not applicable + if true, don't add an ECI segment for different encodings than default + the encoded message (the char values range from 0 to 928) + + + + Encode parts of the message using Text Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.2. + + the message + the start position within the message + the number of characters to encode + receives the encoded codewords + should normally be SUBMODE_ALPHA + the text submode in which this method ends + + + + + Encode parts of the message using Byte Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.3. The Unicode characters will be converted to binary using the cp437 + codepage. + + the message converted to a byte array + the start position within the message + the number of bytes to encode + the mode from which this method starts + receives the encoded codewords + + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using text compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using binary compaction. + + the message + the message converted to a byte array + the start position within the message + + the requested character count + + + + The class holds the available options for the + + + + + Specifies whether to use compact mode for PDF417 (type ). + + + + + Specifies what compaction mode to use for PDF417 (type + ). + + + + + Specifies the minimum and maximum number of rows and columns for PDF417 (type + ). + + + + + Specifies what degree of error correction to use + + + + + Specifies what degree of error correction to use + + + + + Specifies what character encoding to use where applicable (type {@link String}) + + + + + Explicitly disables ECI segment when generating PDF417 Code + That is against the specification but some + readers have problems if the charset is switched from + CP437 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use different encodings + and the ECI segment is omitted. + + + + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Maximum Codewords (Data + Error). + + + + + Gets the bit count sum. + + The bit count sum. + Module bit count. + + + + Converts an ICollection<int> to an int[] + Carry-over from Java. Will likely remove and replace with the Generic .ToArray() method. + + The int array. + List. + + + + Translate the symbol into a codeword + + the codeword corresponding to the symbol. + encoded symbol to translate to a codeword + + + + The sorted table of all possible symbols. Extracted from the PDF417 + specification. The index of a symbol in this table corresponds to the + index into the codeword table. + + + + + This table contains to codewords for all symbols. + + + + + PDF 417 result meta data. + Guenther Grau + + + + + The Segment ID represents the segment of the whole file distributed over different symbols. + + + + + Is the same for each related PDF417 symbol + + + + + always null + + + + + true if it is the last segment + + + + + count of segments, -1 if not set + + + + + Filename of the encoded file + + + + + filesize in bytes of the encoded file + returns filesize in bytes, -1 if not set + + + + + 16-bit CRC checksum using CCITT-16 + returns crc checksum, -1 if not set + + + + + unix epock timestamp, elapsed seconds since 1970-01-01 + returns elapsed seconds, -1 if not set + + + + + Jacob Haynes + qwandor@google.com (Andrew Walbran) + + + + + default white space (margin) around the code + + + + + default error correction level + + + + + default aspect ratio + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The height of a row in the barcode + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Takes encoder, accounts for width/height, and retrieves bit matrix + + + + + This takes an array holding the values of the PDF 417 + + a byte array of information with 0 is black, and 1 is white + border around the barcode + BitMatrix of the input + + + + Takes and rotates the it 90 degrees + + + + + This implementation can detect and decode PDF417 codes in an image. + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Locates and decodes a PDF417 code in an image. + + a String representing the content encoded by the PDF417 code + if a PDF417 cannot be decoded + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + **Note** this will return the FIRST barcode discovered if there are many. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Locates and decodes Multiple PDF417 codes in an image. + + an array of Strings representing the content encoded by the PDF417 codes + + + + + Locates and decodes multiple barcodes in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcodes encode + + + + + Decode the specified image, with the hints and optionally multiple barcodes. + Based on Owen's Comments in , this method has been modified to continue silently + if a barcode was not decoded where it was detected instead of throwing a new exception object. + + Image. + Hints. + If set to true multiple. + + + + Gets the maximum width of the barcode + + The max width. + P1. + P2. + + + + Gets the minimum width of the barcode + + The minimum width. + P1. + P2. + + + + Gets the maximum width of the codeword. + + The max codeword width. + P. + + + + Gets the minimum width of the codeword. + + The minimum codeword width. + P. + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Meta-data container for QR Code decoding. Instances of this class may be used to convey information back to the + decoding caller. Callers are expected to process this. + + + + + Initializes a new instance of the class. + + if set to true [mirrored]. + + + + true if the QR Code was mirrored. + + + + + Apply the result points' order correction due to mirroring. + + Array of points to apply mirror correction to. + + + Sean Owen + + + {@link BitMatrix} to parse + ReaderException if dimension is not >= 21 and 1 mod 4 + + +

Reads format information from one of its two locations within the QR Code.

+ +
+ {@link FormatInformation} encapsulating the QR Code's format info + + ReaderException if both format information locations cannot be parsed as + the valid encoding of format information + +
+ +

Reads version information from one of its two locations within the QR Code.

+ +
+ {@link Version} encapsulating the QR Code's version + + ReaderException if both version information locations cannot be parsed as + the valid encoding of version information + +
+ +

Reads the bits in the {@link BitMatrix} representing the finder pattern in the + correct order in order to reconstruct the codewords bytes contained within the + QR Code.

+ +
+ bytes encoded within the QR Code + + ReaderException if the exact number of bytes expected is not read +
+ + Revert the mask removal done while reading the code words. The bit matrix should revert to its original state. + + + Prepare the parser for a mirrored operation. + This flag has effect only on the {@link #readFormatInformation()} and the + {@link #readVersion()}. Before proceeding with {@link #readCodewords()} the + {@link #mirror()} method should be called. + + @param mirror Whether to read version and format information mirrored. + + + Mirror the bit matrix in order to attempt a second reading. + + +

Encapsulates a block of data within a QR Code. QR Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

When QR Codes use multiple data blocks, they are actually interleaved. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ +
+ bytes as read directly from the QR Code + + version of the QR Code + + error-correction level of the QR Code + + {@link DataBlock}s containing original bytes, "de-interleaved" from representation in the + QR Code + +
+ +

Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations + of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix, + including areas used for finder patterns, timing patterns, etc. These areas should be unused + after the point they are unmasked anyway.

+ +

Note that the diagram in section 6.8.1 is misleading since it indicates that i is column position + and j is row position. In fact, as the text says, i is row position and j is column position.

+ +
+ Sean Owen +
+ + See ISO 18004:2006 6.8.1 + + +

Implementations of this method reverse the data masking process applied to a QR Code and + make its bits ready to read.

+
+ + representation of QR Code bits + dimension of QR Code, represented by bits, being unmasked +
+ +

QR Codes can encode text as bits in one of several modes, and can use multiple modes + in one QR Code. This class decodes the bits back into text.

+ +

See ISO 18004:2006, 6.4.3 - 6.4.7

+ Sean Owen +
+
+ + + See ISO 18004:2006, 6.4.4 Table 5 + + + + + See specification GBT 18284-2000 + + The bits. + The result. + The count. + + + + +

The main class which implements QR Code decoding -- as opposed to locating and extracting + the QR Code from an image.

+
+ + Sean Owen + +
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a QR Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Decodes a QR Code represented as a {@link BitMatrix}. A 1 or "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+
+ data and error correction codewords + number of codewords that are data bytes + +
+ + +

See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels + defined by the QR code standard.

+
+ Sean Owen +
+ + L = ~7% correction + + + M = ~15% correction + + + Q = ~25% correction + + + H = ~30% correction + + + + Gets the bits. + + + + + Gets the name. + + + + + Ordinals this instance. + + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Fors the bits. + + int containing the two bits encoding a QR Code's error correction level + + representing the encoded error correction level + + + +

Encapsulates a QR Code's format information, including the data mask used and + error correction level.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + +
+ + See ISO 18004:2006, Annex C, Table C.1 + + + Offset i holds the number of 1 bits in the binary representation of i + + + + Decodes the format information. + + format info indicator, with mask still applied + The masked format info2. + + information about the format it specifies, or null + if doesn't seem to match any known pattern + + + + +

See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which + data can be encoded to bits in the QR code standard.

+
+ Sean Owen +
+ + + Gets the name. + + + + + enumeration for encoding modes + + + + + + + + + + numeric encoding + + + + + alpha-numeric encoding + + + + + structured append + + + + + byte mode encoding + + + + + ECI segment + + + + + Kanji mode + + + + + FNC1 char, first position + + + + + FNC1 char, second position + + + + + Hanzi mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See GBT 18284-2000; "Hanzi" is a transliteration of this mode name. + + + + Fors the bits. + + four bits encoding a QR Code data mode + + encoded by these bits + + if bits do not correspond to a known mode + + + version in question + + number of bits used, in this QR Code symbol {@link Version}, to encode the + count of characters that will follow encoded in this {@link Mode} + + + + + Gets the bits. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + See ISO 18004:2006 Annex D + + Sean Owen + + + See ISO 18004:2006 Annex D. + Element i represents the raw version bits that specify version i + 7 + + + + + Gets the version number. + + + + + Gets the alignment pattern centers. + + + + + Gets the total codewords. + + + + + Gets the dimension for version. + + + + + Gets the EC blocks for level. + + The ec level. + + + +

Deduces version information purely from QR Code dimensions.

+ +
+ dimension in modules + + for a QR Code of that dimension or null +
+ + + Gets the version for number. + + The version number. + + + + See ISO 18004:2006 Annex E + + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + + Gets the EC codewords per block. + + + + + Gets the num blocks. + + + + + Gets the total EC codewords. + + + + + Gets the EC blocks. + + + + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the QR code version's format.

+
+
+ + + Gets the count. + + + + + Gets the data codewords. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + See ISO 18004:2006 6.5.1 Table 9 + + +

Encapsulates an alignment pattern, which are the smaller square patterns found in + all but the simplest QR Codes.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Determines if this alignment pattern "about equals" an alignment pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing an average of the two. + + The i. + The j. + New size of the module. + + + +

This class attempts to find alignment patterns in a QR Code. Alignment patterns look like finder + patterns but are smaller and appear at regular intervals throughout the image.

+ +

At the moment this only looks for the bottom-right alignment pattern.

+ +

This is mostly a simplified copy of {@link FinderPatternFinder}. It is copied, + pasted and stripped down here for maximum performance but does unfortunately duplicate + some code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Creates a finder that will look in a portion of the whole image.

+ +
+ image to search + + left column from which to start searching + + top row from which to start searching + + width of region to search + + height of region to search + + estimated module size so far + + callback function which is called, when a result point is found +
+ +

This method attempts to find the bottom-right alignment pattern in the image. It is a bit messy since + it's pretty performance-critical and so is written to be fast foremost.

+ +
+ if found +
+ + Given a count of black/white/black pixels just seen and an end position, + figures the location of the center of this black/white/black run. + + + + count of black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/1 ratios + used by alignment patterns to be considered a match + + + + +

After a horizontal scan finds a potential alignment pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + alignment pattern to see if the same proportion is detected.

+
+ row where an alignment pattern was detected + center of the section that appears to cross an alignment pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of alignment pattern, or null if not found + +
+ +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will see if this pattern had been + found on a previous horizontal scan. If so, we consider it confirmed and conclude we have + found the alignment pattern.

+ +
+ reading state module counts from horizontal scan + + row where alignment pattern may be found + + end of possible alignment pattern in row + + {@link AlignmentPattern} if we have found the same pattern twice, or null if not + +
+ + +

Encapsulates logic that can detect a QR Code in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + + Gets the image. + + + + + Gets the result point callback. + + + + +

Detects a QR Code in an image.

+
+ + encapsulating results of detecting a QR Code + +
+ + +

Detects a QR Code in an image.

+
+ optional hints to detector + + encapsulating results of detecting a QR Code + +
+ + + Processes the finder pattern info. + + The info. + + + +

Computes the dimension (number of modules on a size) of the QR Code based on the position + of the finder patterns and estimated module size.

+
+
+ + +

Computes an average estimated module size based on estimated derived from the positions + of the three finder patterns.

+
+ detected top-left finder pattern center + detected top-right finder pattern center + detected bottom-left finder pattern center + estimated module size +
+ +

Estimates module size based on two finder patterns -- it uses + {@link #sizeOfBlackWhiteBlackRunBothWays(int, int, int, int)} to figure the + width of each, measuring along the axis between their centers.

+
+
+ + See {@link #sizeOfBlackWhiteBlackRun(int, int, int, int)}; computes the total width of + a finder pattern by looking for a black-white-black run from the center in the direction + of another point (another finder pattern center), and in the opposite direction too. + + + +

This method traces a line from a point in the image, in the direction towards another point. + It begins in a black region, and keeps going until it finds white, then black, then white again. + It reports the distance from the start to this point.

+ +

This is used when figuring out how wide a finder pattern is, when the finder pattern + may be skewed or rotated.

+
+
+ + +

Attempts to locate an alignment pattern in a limited region of the image, which is + guessed to contain it. This method uses {@link AlignmentPattern}.

+
+ estimated module size so far + x coordinate of center of area probably containing alignment pattern + y coordinate of above + number of pixels in all directions to search from the center + + if found, or null otherwise + +
+ + +

Encapsulates a finder pattern, which are the three square patterns found in + the corners of QR Codes. It also encapsulates a count of similar finder patterns, + as a convenience to the finder's bookkeeping.

+
+ Sean Owen +
+ + + Gets the size of the estimated module. + + + The size of the estimated module. + + + +

Determines if this finder pattern "about equals" a finder pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing a weighted average + based on count. + + The i. + The j. + New size of the module. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+
+ Sean Owen +
+ + + 1 pixel/module times 3 modules/center + + + + + support up to version 20 for mobile clients + + + + +

Creates a finder that will search the image for three finder patterns.

+
+ image to search +
+ + + Initializes a new instance of the class. + + The image. + The result point callback. + + + + Gets the image. + + + + + Gets the possible centers. + + + + Given a count of black/white/black/white/black pixels just seen and an end position, + figures the location of the center of this run. + + + + count of black/white/black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/3/1/1 ratios + used by finder patterns to be considered a match + + + + + + count of black/white/black/white/black pixels just read + true if the proportions of the counts is close enough to the 1/1/3/1/1 ratios + by finder patterns to be considered a match + + + + After a vertical and horizontal scan finds a potential finder pattern, this method + "cross-cross-cross-checks" by scanning down diagonally through the center of the possible + finder pattern to see if the same proportion is detected. + @param maxCount maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + @param originalStateCountTotal The original state count total. + + row where a finder pattern was detected + center of the section that appears to cross a finder pattern + true if proportions are withing expected limits + + + +

After a horizontal scan finds a potential finder pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + finder pattern to see if the same proportion is detected.

+
+ row where a finder pattern was detected + center of the section that appears to cross a finder pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of finder pattern, or null if not found + +
+ +

Like {@link #crossCheckVertical(int, int, int, int)}, and in fact is basically identical, + except it reads horizontally instead of vertically. This is used to cross-cross + check a vertical cross check and locate the real center of the alignment pattern.

+
+
+ + + @see #handlePossibleCenter(int[], int, int) + + reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + ignored + true if a finder pattern candidate was found this time + + + +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will, ah, cross-cross-check + with another horizontal scan. This is needed primarily to locate the real horizontal + center of the pattern in cases of extreme skew. + And then we cross-cross-cross check with another diagonal scan.

+ If that succeeds the finder pattern location is added to a list that tracks + the number of times each location has been nearly-matched as a finder pattern. + Each additional find is more evidence that the location is in fact a finder + pattern center +
+ reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + + true if a finder pattern candidate was found this time + +
+ + number of rows we could safely skip during scanning, based on the first + two finder patterns that have been located. In some cases their position will + allow us to infer that the third pattern must lie below a certain point farther + down in the image. + + + + true iff we have found at least 3 finder patterns that have been detected + at least {@link #CENTER_QUORUM} times each, and, the estimated module size of the + candidates is "pretty similar" + + + + the 3 best {@link FinderPattern}s from our list of candidates. The "best" are + those that have been detected at least {@link #CENTER_QUORUM} times, and whose module + size differs from the average among those patterns the least + + + + + Orders by furthest from average + + + +

Orders by {@link FinderPattern#getCount()}, descending.

+
+ + +

Encapsulates information about finder patterns in an image, including the location of + the three finder patterns, and their estimated module size.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The pattern centers. + + + + Gets the bottom left. + + + + + Gets the top left. + + + + + Gets the top right. + + + + + JAVAPORT: The original code was a 2D array of ints, but since it only ever gets assigned + 0, 1 and 2 I'm going to use less memory and go with bytes. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Gets the height. + + + + + Gets the width. + + + + + Gets or sets the with the specified x. + + + + + an internal representation as bytes, in row-major order. array[y][x] represents point (x,y) + + + + + Sets the specified x. + + The x. + The y. + The value. + + + + Sets the specified x. + + The x. + The y. + if set to true [value]. + + + + Clears the specified value. + + The value. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + Encode "bytes" with the error correction level "ecLevel". The encoding mode will be chosen + internally by chooseMode(). On success, store the result in "qrCode". + We recommend you to use QRCode.EC_LEVEL_L (the lowest level) for + "getECLevel" since our primary use is to show QR code on desktop screens. We don't need very + strong error correction for this purpose. + Note that there is no way to encode bytes in MODE_KANJI. We might want to add EncodeWithMode() + with which clients can specify the encoding mode. For now, we don't need the functionality. + + text to encode + error correction level to use + representing the encoded QR code + + + + Encodes the specified content. + + The content. + The ec level. + The hints. + + + + + Decides the smallest version of QR code that will contain all of the provided data. + + if the data cannot fit in any version + + + + Gets the alphanumeric code. + + The code. + the code point of the table used in alphanumeric mode or + -1 if there is no corresponding code in the table. + + + + Chooses the mode. + + The content. + + + + + Choose the best mode by examining the content. Note that 'encoding' is used as a hint; + if it is Shift_JIS, and the input is only double-byte Kanji, then we return {@link Mode#KANJI}. + + The content. + The encoding. + + + + + true if the number of input bits will fit in a code with the specified version and error correction level. + + + + Terminate bits as described in 8.4.8 and 8.4.9 of JISX0510:2004 (p.24). + + The num data bytes. + The bits. + + + + Get number of data bytes and number of error correction bytes for block id "blockID". Store + the result in "numDataBytesInBlock", and "numECBytesInBlock". See table 12 in 8.5.1 of + JISX0510:2004 (p.30) + + The num total bytes. + The num data bytes. + The num RS blocks. + The block ID. + The num data bytes in block. + The num EC bytes in block. + + + + Interleave "bits" with corresponding error correction bytes. On success, store the result in + "result". The interleave rule is complicated. See 8.6 of JISX0510:2004 (p.37) for details. + + The bits. + The num total bytes. + The num data bytes. + The num RS blocks. + + + + + Append mode info. On success, store the result in "bits". + + The mode. + The bits. + + + + Append length info. On success, store the result in "bits". + + The num letters. + The version. + The mode. + The bits. + + + + Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits". + + The content. + The mode. + The bits. + The encoding. + + + + + + Satoru Takabayashi + Daniel Switkin + Sean Owen + + + + Apply mask penalty rule 1 and return the penalty. Find repetitive cells with the same color and + give penalty to them. Example: 00000 or 11111. + + The matrix. + + + + + Apply mask penalty rule 2 and return the penalty. Find 2x2 blocks with the same color and give + penalty to them. This is actually equivalent to the spec's rule, which is to find MxN blocks and give a + penalty proportional to (M-1)x(N-1), because this is the number of 2x2 blocks inside such a block. + + The matrix. + + + + + Apply mask penalty rule 3 and return the penalty. Find consecutive cells of 00001011101 or + 10111010000, and give penalty to them. If we find patterns like 000010111010000, we give + penalties twice (i.e. 40 * 2). + + The matrix. + + + + + Apply mask penalty rule 4 and return the penalty. Calculate the ratio of dark cells and give + penalty if the ratio is far from 50%. It gives 10 penalty for 5% distance. + + The matrix. + + + + + Return the mask bit for "getMaskPattern" at "x" and "y". See 8.8 of JISX0510:2004 for mask + pattern conditions. + + The mask pattern. + The x. + The y. + + + + + Helper function for applyMaskPenaltyRule1. We need this for doing this calculation in both + vertical and horizontal orders respectively. + + The matrix. + if set to true [is horizontal]. + + + + + + + + satorux@google.com (Satoru Takabayashi) - creator + + + + + Set all cells to 2. 2 means that the cell is empty (not set yet). + + JAVAPORT: We shouldn't need to do this at all. The code should be rewritten to begin encoding + with the ByteMatrix initialized all to zero. + + The matrix. + + + + Build 2D matrix of QR Code from "dataBits" with "ecLevel", "version" and "getMaskPattern". On + success, store the result in "matrix" and return true. + + The data bits. + The ec level. + The version. + The mask pattern. + The matrix. + + + + Embed basic patterns. On success, modify the matrix and return true. + The basic patterns are: + - Position detection patterns + - Timing patterns + - Dark dot at the left bottom corner + - Position adjustment patterns, if need be + + The version. + The matrix. + + + + Embed type information. On success, modify the matrix. + + The ec level. + The mask pattern. + The matrix. + + + + Embed version information if need be. On success, modify the matrix and return true. + See 8.10 of JISX0510:2004 (p.47) for how to embed version information. + + The version. + The matrix. + + + + Embed "dataBits" using "getMaskPattern". On success, modify the matrix and return true. + For debugging purposes, it skips masking process if "getMaskPattern" is -1. + See 8.7 of JISX0510:2004 (p.38) for how to embed data bits. + + The data bits. + The mask pattern. + The matrix. + + + + Return the position of the most significant bit set (to one) in the "value". The most + significant bit is position 32. If there is no bit set, return 0. Examples: + - findMSBSet(0) => 0 + - findMSBSet(1) => 1 + - findMSBSet(255) => 8 + + The value_ renamed. + + + + + Calculate BCH (Bose-Chaudhuri-Hocquenghem) code for "value" using polynomial "poly". The BCH + code is used for encoding type information and version information. + Example: Calculation of version information of 7. + f(x) is created from 7. + - 7 = 000111 in 6 bits + - f(x) = x^2 + x^2 + x^1 + g(x) is given by the standard (p. 67) + - g(x) = x^12 + x^11 + x^10 + x^9 + x^8 + x^5 + x^2 + 1 + Multiply f(x) by x^(18 - 6) + - f'(x) = f(x) * x^(18 - 6) + - f'(x) = x^14 + x^13 + x^12 + Calculate the remainder of f'(x) / g(x) + x^2 + __________________________________________________ + g(x) )x^14 + x^13 + x^12 + x^14 + x^13 + x^12 + x^11 + x^10 + x^7 + x^4 + x^2 + -------------------------------------------------- + x^11 + x^10 + x^7 + x^4 + x^2 + + The remainder is x^11 + x^10 + x^7 + x^4 + x^2 + Encode it in binary: 110010010100 + The return value is 0xc94 (1100 1001 0100) + + Since all coefficients in the polynomials are 1 or 0, we can do the calculation by bit + operations. We don't care if coefficients are positive or negative. + + The value. + The poly. + + + + + Make bit vector of type information. On success, store the result in "bits" and return true. + Encode error correction level and mask pattern. See 8.9 of + JISX0510:2004 (p.45) for details. + + The ec level. + The mask pattern. + The bits. + + + + Make bit vector of version information. On success, store the result in "bits" and return true. + See 8.10 of JISX0510:2004 (p.45) for details. + + The version. + The bits. + + + + Check if "value" is empty. + + The value. + + true if the specified value is empty; otherwise, false. + + + + + Embed the lonely dark dot at left bottom corner. JISX0510:2004 (p.46) + + The matrix. + + + + + + The x start. + The y start. + The matrix. + + + + Embed position detection patterns and surrounding vertical/horizontal separators. + + The matrix. + + + + Embed position adjustment patterns if need be. + + The version. + The matrix. + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + + + + + + Initializes a new instance of the class. + + + + + Gets or sets the mode. + + + The mode. + + + + + Gets or sets the EC level. + + + The EC level. + + + + + Gets or sets the version. + + + The version. + + + + + Gets or sets the mask pattern. + + + The mask pattern. + + + + + Gets or sets the matrix. + + + The matrix. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Check if "mask_pattern" is valid. + + The mask pattern. + + true if [is valid mask pattern] [the specified mask pattern]; otherwise, false. + + + + + The class holds the available options for the QrCodeWriter + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + . + + + + + Specifies what character encoding to use where applicable (type ) + + + + + Explicitly disables ECI segment when generating QR Code + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + + + + + Specifies the exact version of QR code to be encoded. An integer, range 1 to 40. If the data specified + cannot fit within the required version, a WriterException will be thrown. + + + + + This implementation can detect and decode QR Codes in an image. + Sean Owen + + + + + Gets the decoder. + + + + + + Locates and decodes a QR code in an image. + + a String representing the content encoded by the QR code + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a QR Code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Renders a to a image + + + + + Gets or sets the foreground color. + + The foreground color. + + + + Gets or sets the background color. + + The background color. + + + + Gets or sets the resolution which should be used to create the bitmap + If nothing is set the current system settings are used + + + + + Gets or sets the resolution which should be used to create the bitmap + If nothing is set the current system settings are used + + + + + Gets or sets the text font. + + + The text font. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Interface for a class to convert a BitMatrix to an output image format + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + The options. + + + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + + + converts the pixel data to a bitmap object + + + + + + the generated code as byte array of BGRA pixels + + + + + the width of the image + + + + + the height of the image + + + + + Renders a to an byte array with pixel data (4 byte per pixel, BGRA) + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Renders a barcode into a Svg image + + + + + Gets or sets the foreground color. + + The foreground color. + + + + Gets or sets the background color. + + The background color. + + + + Gets or sets the font family name + + The font family name. + + + + Gets or sets the font size in pixel + + The font size in pixel. + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Represents a barcode as a Svg image + + + + + Gets or sets the content. + + + The content. + + + + + The original height of the bitmatrix for the barcode + + + + + The original width of the bitmatrix for the barcode + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The content. + + + + Gives the XML representation of the SVG image + + + + + Interface for a smart class to encode some content into a barcode + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents. + + The contents. + + + + + The purpose of this class hierarchy is to abstract different bitmap implementations across + platforms into a standard interface for requesting greyscale luminance values. The interface + only provides immutable methods; therefore crop and rotation create copies. This is to ensure + that one Reader does not modify the original luminance source and leave it in an unknown state + for other Readers in the chain. + + dswitkin@google.com (Daniel Switkin) + + + + initializing constructor + + + + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff + + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + The width of the bitmap. + + + The height of the bitmap. + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + Whether this subclass supports counter-clockwise rotation. + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + + Whether this subclass supports invertion. + + + + inverts the luminance values, not supported here. has to implemented in sub classes + + + + + + + + + + + + mike32767 + Manuel Kasten + + + + + to parse + + + + +

MaxiCodes can encode text or structured information as bits in one of several modes, + with multiple character sets in one code. This class decodes the bits back into text.

+ + mike32767 + Manuel Kasten +
+
+ + +

The main class which implements MaxiCode decoding -- as opposed to locating and extracting + the MaxiCode from an image.

+ + Manuel Kasten +
+
+ + + This implementation can detect and decode a MaxiCode in an image. + + + + + Locates and decodes a MaxiCode in an image. + + a String representing the content encoded by the MaxiCode + if a MaxiCode cannot be decoded + + + + + Locates and decodes a MaxiCode within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + + MultiFormatReader is a convenience class and the main entry point into the library for most uses. + By default it attempts to decode all barcode formats that the library supports. Optionally, you + can provide a hints object to request different behavior, for example only decoding QR codes. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + This version of decode honors the intent of Reader.decode(BinaryBitmap) in that it + passes null as a hint to the decoders. However, that makes it inefficient to call repeatedly. + Use setHints() followed by decodeWithState() for continuous scan applications. + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the hints provided. Does not honor existing state. + + + The pixel data to decode + + The hints to use, clearing the previous state. + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the state set up by calling setHints() previously. Continuous scan + clients will get a large speed increase by using this instead of decode(). + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls + to decodeWithState(image) can reuse the same set of readers without reallocating memory. This + is important for performance in continuous scan clients. + + + + + + resets all specific readers + + + + This is a factory class which finds the appropriate Writer subclass for the BarcodeFormat + requested and encodes the barcode with the supplied contents. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Gets the collection of supported writers. + + + + + encode the given data + + + + + + + + + + encode the given data + + + + + + + + + + + This class attempts to decode a barcode from an image, not by scanning the whole image, + but by scanning subsets of the image. This is important when there may be multiple barcodes in + an image, and detecting a barcode may find parts of multiple barcode and fail to decode + (e.g. QR Codes). Instead this scans the four quadrants of the image -- and also the center + 'quadrant' to cover the case where a barcode is found in the center. + + + + + + Initializes a new instance of the class. + + The @delegate. + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Attempts to locate multiple barcodes in an image by repeatedly decoding portion of the image. + After one barcode is found, the areas left, above, right and below the barcode's + {@link com.google.zxing.ResultPoint}s are scanned, recursively.

+

A caller may want to also employ {@link ByQuadrantReader} when attempting to find multiple + 2D barcodes, like QR Codes, in an image, where the presence of multiple barcodes might prevent + detecting any one of them.

+

That is, instead of passing a {@link Reader} a caller might pass + new ByQuadrantReader(reader).

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The @delegate. + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Implementation of this interface attempt to read several barcodes from one image. + Sean Owen + + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + +

Encapsulates logic that can detect one or more QR Codes in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+ + Sean Owen + Hannes Erven +
+
+ + + Initializes a new instance of the class. + + The image. + + + + Detects the multi. + + The hints. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +

In contrast to , this class will return an array of all possible + QR code locations in the image.

+ +

Use the TRY_HARDER hint to ask for a more thorough detection.

+ + Sean Owen + Hannes Erven +
+
+ + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF_PERCENT percent in their + estimated modules sizes. + + + + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF pixels/module in their + estimated modules sizes. + + + + + A comparator that orders FinderPatterns by their estimated module size. + + + + +

Creates a finder that will search the image for three finder patterns.

+ + image to search +
+
+ + + + the 3 best s from our list of candidates. The "best" are + those that have been detected at least CENTER_QUORUM times, and whose module + size differs from the average among those patterns the least + + + + + This implementation can detect and decode multiple QR Codes in an image. + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + This object extends LuminanceSource around an array of YUV data returned from the camera driver, + with the option to crop to a rectangle within the full data. This can be used to exclude + superfluous pixels around the perimeter and speed up decoding. + It works for any pixel format where the Y channel is planar and appears first, including + YCbCr_420_SP and YCbCr_422_SP. + @author dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The yuv data. + Width of the data. + Height of the data. + The left. + The top. + The width. + The height. + if set to true [reverse horiz]. + + + + Initializes a new instance of the class. + + The luminances. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + + + + + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Renders the cropped greyscale bitmap. + + + + + + width of image from {@link #renderThumbnail()} + + + + + height of image from {@link #renderThumbnail()} + + + + + creates a new instance + + + + + + + + + Implementations of this interface can decode an image of a barcode in some format into + the String it encodes. For example, can + decode a QR code. The decoder may optionally receive hints from the caller which may help + it decode more quickly or accurately. + + See , which attempts to determine what barcode + format is present within the image as well, and then decodes it accordingly. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + String which the barcode encodes + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + The general exception class throw when something goes wrong during decoding of a barcode. + This includes, but is not limited to, failing checksums / error correction algorithms, being + unable to locate finder timing patterns, and so on. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class. + + The inner exception. + + + + Initializes a new instance of the class. + + The inner exception. + + + + + Encapsulates the result of decoding a barcode within an image. + + + + raw text encoded by the barcode, if applicable, otherwise null + + + raw bytes encoded by the barcode, if applicable, otherwise null + + + + points related to the barcode in the image. These are typically points + identifying finder patterns or the corners of the barcode. The exact meaning is + specific to the type of barcode that was decoded. + + + + {@link BarcodeFormat} representing the format of the barcode that was decoded + + + + {@link Hashtable} mapping {@link ResultMetadataType} keys to values. May be + null. This contains optional metadata about what was detected about the barcode, + like orientation. + + + + + Gets the timestamp. + + + + + how many bits of are valid; typically 8 times its length + + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + The timestamp. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + The timestamp. + + + + Adds one metadata to the result + + The type. + The value. + + + + Adds a list of metadata to the result + + The metadata. + + + + Adds the result points. + + The new points. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Represents some type of metadata about the result of the decoding that the decoder + wishes to communicate back to the caller. + + Sean Owen + + + + Unspecified, application-specific metadata. Maps to an unspecified {@link Object}. + + + + + Denotes the likely approximate orientation of the barcode in the image. This value + is given as degrees rotated clockwise from the normal, upright orientation. + For example a 1D barcode which was found by reading top-to-bottom would be + said to have orientation "90". This key maps to an {@link Integer} whose + value is in the range [0,360). + + + + +

2D barcode formats typically encode text, but allow for a sort of 'byte mode' + which is sometimes used to encode binary data. While {@link Result} makes available + the complete raw bytes in the barcode for these formats, it does not offer the bytes + from the byte segments alone.

+

This maps to a {@link java.util.List} of byte arrays corresponding to the + raw bytes in the byte segments in the barcode, in order.

+
+
+ + + Error correction level used, if applicable. The value type depends on the + format, but is typically a String. + + + + + For some periodicals, indicates the issue number as an {@link Integer}. + + + + + For some products, indicates the suggested retail price in the barcode as a + formatted {@link String}. + + + + + For some products, the possible country of manufacture as a {@link String} denoting the + ISO country code. Some map to multiple possible countries, like "US/CA". + + + + + For some products, the extension text + + + + + If the code format supports structured append and + the current scanned code is part of one then the + sequence number is given with it. + + + + + If the code format supports structured append and + the current scanned code is part of one then the + parity is given with it. + + + + + PDF417-specific metadata + + + + + Aztec-specific metadata + + + + + Encapsulates a point of interest in an image containing a barcode. Typically, this + would be the location of a finder pattern or the corner of the barcode, for example. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The x. + The y. + + + + Gets the X. + + + + + Gets the Y. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC and + BC is less than AC and the angle between BC and BA is less than 180 degrees. + + array of three to order + + + + calculates the distance between two points + + first pattern + second pattern + + distance between two points + + + + + Returns the z component of the cross product between vectors BC and BA. + + + + Callback which is invoked when a possible result point (significant + point in the barcode image such as a corner) is found. + + + + + + + + Luminance source class which support different formats of images. + + + + + enumeration of supported bitmap format which the RGBLuminanceSource can process + + + + + format of the byte[] isn't known. RGBLuminanceSource tries to determine the best possible value + + + + + grayscale array, the byte array is a luminance array with 1 byte per pixel + + + + + grayscale array, the byte array is a luminance array with 2 bytes per pixel + + + + + 3 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels alpha, red, green and blue + + + + + 3 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green, red and alpha + + + + + 2 bytes per pixel, 5 bit red, 6 bits green and 5 bits blue + + + + + 4 bytes per pixel with the channels red, green, blue and alpha + + + + + 4 bytes for two pixels, UYVY formatted + + + + + 4 bytes for two pixels, YUYV formatted + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 1 byte per pixel (Gray8). + That means the whole array consists of the luminance values (grayscale). + + The luminance array. + The width. + The height. + if set to true [is8 bit]. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + The bitmap format. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + calculates the luminance values for the given byte array and bitmap format + + + + + + + class which represents the luminance values for a bitmap object + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class + with the image of a Bitmap instance + + The bitmap. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + Contains conversion support elements such as classes, interfaces and static methods. + + + + + Copies an array of chars obtained from a String into a specified array of chars + + The String to get the chars from + Position of the String to start getting the chars + Position of the String to end getting the chars + Array to return the chars + Position of the destination array of chars to start storing the chars + An array of chars + + + + Sets the capacity for the specified List + + The List which capacity will be set + The new capacity value + + + + Converts a string-Collection to an array + + The strings. + + + + + Joins all elements to one string. + + + The separator. + The values. + + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The value. + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The start index. + The end index. + The value. + + + + + + + + + + + + + + + + + + Savely gets the value of a decoding hint + if hints is null the default is returned + + + The hints. + Type of the hint. + The @default. + + + + The base class for all objects which encode/generate a barcode image. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + A base class which covers the range of exceptions which may occur when encoding a barcode using + the Writer framework. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner exc. + +
+
diff --git a/packages/ZXing.Net.0.16.4/lib/net40/zxing.dll b/packages/ZXing.Net.0.16.4/lib/net40/zxing.dll new file mode 100644 index 0000000..aa7bcf1 Binary files /dev/null and b/packages/ZXing.Net.0.16.4/lib/net40/zxing.dll differ diff --git a/packages/ZXing.Net.0.16.4/lib/net40/zxing.presentation.XML b/packages/ZXing.Net.0.16.4/lib/net40/zxing.presentation.XML new file mode 100644 index 0000000..a95132f --- /dev/null +++ b/packages/ZXing.Net.0.16.4/lib/net40/zxing.presentation.XML @@ -0,0 +1,195 @@ + + + + zxing.presentation + + + + + A smart class to decode the barcode inside a bitmap object which is derived from BitmapSource + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, default is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, default is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + The create RGB luminance source. + + + + A smart class to encode some content to a barcode image + + + + + Initializes a new instance of the class. + + + + + A smart class to encode some content to a barcode image into a geometry + Autor: Rob Fonseca-Ensor + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + + The bitmap. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + Renders a barcode into a geometry + Autor: Rob Fonseca-Ensor + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Renders a to a + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + + Gets or sets the font family. + + + The font family. + + + + + Gets or sets the size of the font. + + + The size of the font. + + + + + Gets or sets the font stretch. + + + The font stretch. + + + + + Gets or sets the font style. + + + The font style. + + + + + Gets or sets the font weight. + + + The font weight. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + diff --git a/packages/ZXing.Net.0.16.4/lib/net40/zxing.presentation.dll b/packages/ZXing.Net.0.16.4/lib/net40/zxing.presentation.dll new file mode 100644 index 0000000..f57d46c Binary files /dev/null and b/packages/ZXing.Net.0.16.4/lib/net40/zxing.presentation.dll differ diff --git a/packages/ZXing.Net.0.16.4/lib/net45/zxing.XML b/packages/ZXing.Net.0.16.4/lib/net45/zxing.XML new file mode 100644 index 0000000..fc53753 --- /dev/null +++ b/packages/ZXing.Net.0.16.4/lib/net45/zxing.XML @@ -0,0 +1,10947 @@ + + + + zxing + + + + + Extends with more information specific to the Aztec format, + like the number of layers and whether it's compact. + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + Initializes a new instance of the class. + + The bits. + The points. + if set to true [compact]. + The nb datablocks. + The nb layers. + + + + The main class which implements Aztec Code decoding -- as opposed to locating and extracting + the Aztec Code from an image. + + David Olivier + + + + Decodes the specified detector result. + + The detector result. + + + + + This method is used for testing the high-level encoder + + + + + + + Gets the string encoded in the aztec code bits + + The corrected bits. + the decoded string + + + + gets the table corresponding to the char passed + + The t. + + + + + Gets the character (or string) corresponding to the passed code in the given table + + the table used + the code of the character + + + + + Performs RS error correction on an array of bits. + + The rawbits. + the corrected array + + + + Gets the array of bits from an Aztec Code matrix + + The matrix. + the array of bits + + + + Reads a code of given length and at given index in an array of bits + + The rawbits. + The start index. + The length. + + + + + Reads a code of length 8 in an array of bits, padding with zeros + + + + + + + + Packs a bit array into bytes, most significant bit first + + + + + + + Encapsulates logic that can detect an Aztec Code in an image, even if the Aztec Code + is rotated or skewed, or partially obscured. + + David Olivier + + + + Initializes a new instance of the class. + + The image. + + + + Detects an Aztec Code in an image. + + + + + Detects an Aztec Code in an image. + + if true, image is a mirror-image of original. + + encapsulating results of detecting an Aztec Code + + + + + Extracts the number of data layers and data blocks from the layer around the bull's eye + + bullEyeCornerPoints the array of bull's eye corners + + + + + Corrects the parameter bits using Reed-Solomon algorithm + + paremeter bits + compact true if this is a compact Aztec code + + + + + Finds the corners of a bull-eye centered on the passed point + This returns the centers of the diagonal points just outside the bull's eye + Returns [topRight, bottomRight, bottomLeft, topLeft] + + Center point + The corners of the bull-eye + + + + Finds a candidate center point of an Aztec code from an image + + the center point + + + + Gets the Aztec code corners from the bull's eye corners and the parameters. + + the array of bull's eye corners + the array of aztec code corners + + + + Creates a BitMatrix by sampling the provided image. + topLeft, topRight, bottomRight, and bottomLeft are the centers of the squares on the + diagonal just outside the bull's eye. + + The image. + The top left. + The bottom left. + The bottom right. + The top right. + + + + + Samples a line + + start point (inclusive) + end point (exclusive) + number of bits + the array of bits as an int (first bit is high-order bit of result) + + + + Determines whether [is white or black rectangle] [the specified p1]. + + The p1. + The p2. + The p3. + The p4. + true if the border of the rectangle passed in parameter is compound of white points only + or black points only + + + + Gets the color of a segment + + The p1. + The p2. + 1 if segment more than 90% black, -1 if segment is more than 90% white, 0 else + + + + Gets the coordinate of the first point with a different color in the given direction + + The init. + if set to true [color]. + The dx. + The dy. + + + + + Expand the square represented by the corner points by pushing out equally in all directions + + the corners of the square, which has the bull's eye at its center + the original length of the side of the square in the target bit matrix + the new length of the size of the square in the target bit matrix + the corners of the expanded square + + + + Aztec 2D code representation + + Rustam Abdullaev + + + + Compact or full symbol indicator + + + + + Size in pixels (width and height) + + + + + Number of levels + + + + + Number of data codewords + + + + + The symbol image + + + + + represents a token for a binary shift + + + + + initializing constructor + + + + + + + + appends the byte array to the BitArray + + + + + + + string representation + + + + + + Generates Aztec 2D barcodes. + + Rustam Abdullaev + + + + Encodes the given binary content as an Aztec symbol + + input data string + Aztec symbol matrix with metadata + + + + Encodes the given binary content as an Aztec symbol + + input data string + minimal percentage of error check words (According to ISO/IEC 24778:2008, + a minimum of 23% + 3 words is recommended) + if non-zero, a user-specified value for the number of layers + + Aztec symbol matrix with metadata + + + + + This produces nearly optimal encodings of text into the first-level of + encoding used by Aztec code. + It uses a dynamic algorithm. For each prefix of the string, it determines + a set of encodings that could lead to this prefix. We repeatedly add a + character and generate a new set of optimal encodings until we have read + through the entire input. + @author Frank Yellin + @author Rustam Abdullaev + + + + + + + + + + + Convert the text represented by this High Level Encoder into a BitArray. + + text represented by this encoder encoded as a + + + + State represents all information about a sequence necessary to generate the current output. + Note that a state is immutable. + + + + + Create a new state representing this state with a latch to a (not + necessary different) mode, and then a code. + + + + + Create a new state representing this state, with a temporary shift + to a different mode to output a single value. + + + + + Create a new state representing this state, but an additional character + output in Binary Shift mode. + + + + + Create the state identical to this one, but we are no longer in + Binary Shift mode. + + + + + Returns true if "this" state is better (or equal) to be in than "that" + state under all possible circumstances. + + + + + This implementation can detect and decode Aztec codes in an image. + + David Olivier + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + a String representing the content encoded by the Data Matrix code + + + + + Locates and decodes a Data Matrix code in an image. + + image of barcode to decode + passed as a {@link java.util.Hashtable} from {@link com.google.zxing.DecodeHintType} + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Aztec result meta data. + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + + + + + + + + + Renders an Aztec code as a + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + The class holds the available options for the + + + + + Representing the minimal percentage of error correction words. + Note: an Aztec symbol should have a minimum of 25% EC words. + + + + + Specifies the required number of layers for an Aztec code: + a negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + a positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + + + + + Enumerates barcode formats known to this package. + + Sean Owen + + + Aztec 2D barcode format. + + + CODABAR 1D format. + + + Code 39 1D format. + + + Code 93 1D format. + + + Code 128 1D format. + + + Data Matrix 2D barcode format. + + + EAN-8 1D format. + + + EAN-13 1D format. + + + ITF (Interleaved Two of Five) 1D format. + + + MaxiCode 2D barcode format. + + + PDF417 format. + + + QR Code 2D barcode format. + + + RSS 14 + + + RSS EXPANDED + + + UPC-A 1D format. + + + UPC-E 1D format. + + + UPC/EAN extension format. Not a stand-alone format. + + + MSI + + + Plessey + + + Intelligent Mail barcode + + + + UPC_A | UPC_E | EAN_13 | EAN_8 | CODABAR | CODE_39 | CODE_93 | CODE_128 | ITF | RSS_14 | RSS_EXPANDED + without MSI (to many false-positives) and IMB (not enough tested, and it looks more like a 2D) + + + + + A smart class to decode the barcode inside a bitmap object + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + A smart class to decode the barcode inside a bitmap object + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Constructor for additional image formats for one BarcodeReader class + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Optional: Gets or sets the function to create a luminance source object for a bitmap. + If null a platform specific default LuminanceSource is used + + + The function to create a luminance source object. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + A smart class to decode the barcode inside a bitmap object + + + + + represents the default function which is called to get a instance from a raw byte array + + + + + Gets or sets the options. + + + The options. + + + + + Gets the reader which should be used to find and decode the barcode. + + + The reader. + + + + + Gets or sets a method which is called if an important point is found + + + The result point callback. + + + + + event is executed if a result was found via decode + + + + + Gets or sets a value indicating whether the image should be automatically rotated. + Rotation is supported for 90, 180 and 270 degrees + + + true if image should be rotated; otherwise, false. + + + + + Gets or sets a value indicating whether the image should be automatically inverted + if no result is found in the original image. + ATTENTION: Please be carefully because it slows down the decoding process if it is used + + + true if image should be inverted; otherwise, false. + + + + + Optional: Gets or sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + The function to create a binarizer object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb array. + If null the RGBLuminanceSource is used. The handler is only called when Decode with a byte[] array is called. + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + raises the ResultFound event + + + + + + raises the ResultFound event + + + + + + calls the explicitResultPointFound action + + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + A smart class to encode some content to a barcode image + + + + + Initializes a new instance of the class. + + + + + A smart class to encode some content to raw pixel data + + + + + Initializes a new instance of the class. + + + + + A smart class to encode some content to a svg barcode image + + + + + Initializes a new instance of the class. + + + + + A base class for specific barcode writers with specific formats of barcode images. + + The type of the output. + + + + Gets or sets the renderer which should be used to render the encoded BitMatrix. + + + + + Encodes the specified contents and returns a rendered instance of the barcode. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The matrix. + + + + + A base class for specific barcode writers with specific formats of barcode images. + + + + + Gets or sets the barcode format. + The value is only suitable if the MultiFormatWriter is used. + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + + + + + + + + + + + + Encodes the specified contents and returns a BitMatrix array. + That array has to be rendered manually or with a IBarcodeRenderer. + + The contents. + + + + + The base class for luminance sources which supports + cropping and rotating based upon the luminance values. + + + + + weight of the red channel for calculating a gray scale image + + + + + weight of the green channel for calculating a gray scale image + + + + + weight of the blue channel for calculating a gray scale image + + + + + numbers of bits which for right shifting + + + + + + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + + The luminance array. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + gets the luminance matrix + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + TODO: not implemented yet + + + A rotated version of this object. + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + + Whether this subclass supports cropping. + + + + + Whether this subclass supports invertion. + + + + Inverts the luminance values (newValue = 255 - oldValue) + + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + This class hierarchy provides a set of methods to convert luminance data to 1 bit data. + It allows the algorithm to vary polymorphically, for example allowing a very expensive + thresholding technique for servers and a fast one for mobile. It also permits the implementation + to vary, e.g. a JNI version for Android and a Java fallback version for other platforms. + + dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The source. + + + + Gets the luminance source object. + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + For callers which only examine one row of pixels at a time, the same BitArray should be reused + and passed in with each call for performance. However it is legal to keep more than one row + at a time if needed. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + Converts a 2D array of luminance data to 1 bit data. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + A new concrete Binarizer implementation object. + + + + Gets the width of the luminance source object. + + + + + Gets the height of the luminance source object. + + + + + This class is the core bitmap class used by ZXing to represent 1 bit data. Reader objects + accept a BinaryBitmap and attempt to decode it. + + dswitkin@google.com (Daniel Switkin) + + + + + + + + + + The width of the bitmap. + + + + + The height of the bitmap. + + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + + The row to fetch, which must be in [0, bitmap height). + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + + Converts a 2D array of luminance data to 1 bit. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + + Whether this bitmap can be cropped. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if isCropSupported() is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + + Whether this bitmap supports counter-clockwise rotation. + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + class which represents the luminance values for a bitmap object + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class + with the image of a Bitmap instance + + The bitmap. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + +

See + + DoCoMo's documentation about the result types represented by subclasses of this class.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + Implements KDDI AU's address book format. See + + http://www.au.kddi.com/ezfactory/tec/two_dimensions/index.html. + (Thanks to Yuzo for translating!) + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Implements the "MECARD" address book entry format. + + Supported keys: N, SOUND, TEL, EMAIL, NOTE, ADR, BDAY, URL, plus ORG + Unsupported keys: TEL-AV, NICKNAME + + Except for TEL, multiple values for keys are also not supported; + the first one found takes precedence. + + Our understanding of the MECARD format is based on this document: + + http://www.mobicode.org.tw/files/OMIA%20Mobile%20Bar%20Code%20Standard%20v3.2.1.doc + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes contact information, like that in an address book entry. + + Sean Owen + + + + initializing constructor + + + + + + + + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + the names + + + + + the nicknames + + + + + In Japanese, the name is written in kanji, which can have multiple readings. Therefore a hint + is often provided, called furigana, which spells the name phonetically. + + The pronunciation of the getNames() field, often in hiragana or katakana. + + + + the phone numbers + + + + optional descriptions of the type of each phone number. It could be like "HOME", but, + there is no guaranteed or standard format. + + + + the e-mail addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the instant messenger addresses + + + + + the note field + + + + + the addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the title + + + + + the urls + + + + birthday formatted as yyyyMMdd (e.g. 19780917) + + + a location as a latitude/longitude pair + + + Implements the "BIZCARD" address book entry format, though this has been + largely reverse-engineered from examples observed in the wild -- still + looking for a definitive reference. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a calendar event at a certain time, optionally with attendees and a location. + + Sean Owen + + + + Gets the start. + + + + + Determines whether [is start all day]. + + if start time was specified as a whole day + + + + event end , or null if event has no duration + + + + + Gets a value indicating whether this instance is end all day. + + true if end time was specified as a whole day + + + + Parses a string as a date. RFC 2445 allows the start and end fields to be of type DATE (e.g. 20081021) + or DATE-TIME (e.g. 20081021T123000 for local time, or 20081021T123000Z for UTC). + + The string to parse + + if not a date formatted string + + + + Represents a parsed result that encodes an email message including recipients, subject and body text. + + Sean Owen + + + + the email address + + + + + the TOs + + + + + the CCs + + + + + the BCCs + + + + + the subject + + + + + the body + + + + + the mailto: uri + + + + + Represents a result that encodes an e-mail address, either as a plain address + like "joe@example.org" or a mailto: URL like "mailto:joe@example.org". + + Sean Owen + + + + Implements the "MATMSG" email message entry format. + + Supported keys: TO, SUB, BODY + + Sean Owen + + + + This implements only the most basic checking for an email address's validity -- that it contains + an '@' and contains no characters disallowed by RFC 2822. This is an overly lenient definition of + validity. We want to generally be lenient here since this class is only intended to encapsulate what's + in a barcode, not "judge" it. + + The email. + + true if it is basically a valid email address; otherwise, false. + + + + + Represents a parsed result that encodes extended product information as encoded by the RSS format, like weight, price, dates, etc. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + extension for kilogram weight type + + + + + extension for pounds weight type + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the raw text + + + + + the product id + + + + + the sscc + + + + + the lot number + + + + + the production date + + + + + the packaging date + + + + + the best before date + + + + + the expiration date + + + + + the weight + + + + + the weight type + + + + + the weight increment + + + + + the price + + + + + the price increment + + + + + the price currency + + + + + the uncommon AIs + + + + + the display representation (raw text) + + + + + Parses strings of digits that represent a RSS Extended code. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + tries to parse a text representation to a specific result object + + + + + + + Represents a parsed result that encodes a geographic coordinate, with latitude, longitude and altitude. + + Sean Owen + + + latitude in degrees + + + + longitude in degrees + + + + altitude in meters. If not specified, in the geo URI, returns 0.0 + + + + query string associated with geo URI or null if none exists + + + + the geo URI + + + + a URI link to Google Maps which display the point on the Earth described + by this instance, and sets the zoom level in a way that roughly reflects the + altitude, if specified + + + + Parses a "geo:" URI result, which specifies a location on the surface of + the Earth as well as an optional altitude above the surface. See + + http://tools.ietf.org/html/draft-mayrhofer-geo-uri-00. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a product ISBN number. + + jbreiden@google.com (Jeff Breidenbach) + + + + the ISBN number + + + + Parses strings of digits that represent a ISBN. + + + jbreiden@google.com (Jeff Breidenbach) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + See ISBN-13 For Dummies + + The result. + + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link ResultParser#parseResult(Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Represents the type of data encoded by a barcode -- from plain text, to a + URI, to an e-mail address, etc. + + Sean Owen + + + + Represents a parsed result that encodes a product by an identifier of some kind. + + dswitkin@google.com (Daniel Switkin) + + + + Parses strings of digits that represent a UPC code. + + dswitkin@google.com (Daniel Switkin) + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link #parseResult(com.google.zxing.Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Attempts to parse the raw {@link Result}'s contents as a particular type + of information (email, URL, etc.) and return a {@link ParsedResult} encapsulating + the result of parsing. + + the raw to parse + encapsulating the parsing result + + + + Parses the result. + + The result. + + + +

Parses an "sms:" URI result, which specifies a number to SMS and optional + "via" number. See + the IETF draft on this.

+ +

This actually also parses URIs starting with "mms:", "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + + Represents a parsed result that encodes an SMS message, including recipients, subject and body text. + + Sean Owen + + + +

Parses an "smsto:" URI result, whose format is not standardized but appears to be like: + {@code smsto:number(:body)}.

+

This actually also parses URIs starting with "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+
+ Sean Owen +
+ + +

Parses an "smtp:" URI result, whose format is not standardized but appears to be like: + smtp[:subject[:body]]}.

+

See http://code.google.com/p/zxing/issues/detail?id=536

+
+ Sean Owen +
+ + + Represents a parsed result that encodes a telephone number. + + Sean Owen + + + + Parses a "tel:" URI result, which specifies a phone number. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + A simple result type encapsulating a string that has no further interpretation. + + Sean Owen + + + + A simple result type encapsulating a URI that has no further interpretation. + + Sean Owen + + + true if the URI contains suspicious patterns that may suggest it intends to + mislead the user about its true nature. At the moment this looks for the presence + of user/password syntax in the host/authority portion of a URI which may be used + in attempts to make the URI's host appear to be other than it is. Example: + http://yourbank.com@phisher.com This URI connects to phisher.com but may appear + to connect to yourbank.com at first glance. + + + + Transforms a string that represents a URI into something more proper, by adding or canonicalizing + the protocol. + + + + + Tries to parse results that are a URI of some kind. + + Sean Owen + + + Parses the "URLTO" result format, which is of the form "URLTO:[title]:[url]". + This seems to be used sometimes, but I am not able to find documentation + on its origin or official format? + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Parses contact information formatted according to the VCard (2.1) format. This is not a complete + implementation but should parse information as commonly encoded in 2D barcodes. + + Sean Owen + + + Formats name fields of the form "Public;John;Q.;Reverend;III" into a form like + "Reverend John Q. Public III". + + @param names name values to format, in place + + + + Partially implements the iCalendar format's "VEVENT" format for specifying a + calendar event. See RFC 2445. This supports SUMMARY, DTSTART and DTEND fields. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a Vehicle Identification Number (VIN). + + + + + Detects a result that is likely a vehicle identification number. + @author Sean Owen + + + + + Represents a parsed result that encodes wifi network information, like SSID and password. + + Vikram Aggarwal + + + + + A simple, fast array of bits, represented compactly by an array of ints internally. + + Sean Owen + + + + size of the array, number of elements + + + + + size of the array in bytes + + + + + index accessor + + + + + + + default constructor + + + + + initializing constructor + + desired size of the array + + + + Flips bit i. + + bit to set + + + + + Gets the next set. + + first bit to check + index of first bit that is set, starting from the given index, or size if none are set + at or beyond this given index + + + + see getNextSet(int) + + index to start looking for unset bit + index of next unset bit, or if none are unset until the end + + + Sets a block of 32 bits, starting at bit i. + + + first bit to set + + the new value of the next 32 bits. Note again that the least-significant bit + corresponds to bit i, the next-least-significant to i+1, and so on. + + + + + Sets a range of bits. + + start of range, inclusive. + end of range, exclusive + + + Clears all bits (sets to false). + + + Efficient method to check if a range of bits is set, or not set. + + + start of range, inclusive. + + end of range, exclusive + + if true, checks that bits in range are set, otherwise checks that they are not set + + true iff all bits are set or not set in range, according to value argument + if end is less than start or the range is not contained in the array + + + + Appends the bit. + + The bit. + + + underlying array of ints. The first element holds the first 32 bits, and the least + significant bit is bit 0. + + + + + Appends the least-significant bits, from value, in order from most-significant to + least-significant. For example, appending 6 bits from 0x000001E will append the bits + 0, 1, 1, 1, 1, 0 in that order. + + containing bits to append + bits from value to append + + + + adds the array to the end + + + + + + XOR operation + + + + + + converts to bytes. + + first bit to start writing + array to write into. Bytes are written most-significant byte first. This is the opposite + of the internal representation, which is exposed by BitArray + position in array to start writing + how many bytes to write + + + Reverses all bits in the array. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Erstellt ein neues Objekt, das eine Kopie der aktuellen Instanz darstellt. + + + Ein neues Objekt, das eine Kopie dieser Instanz darstellt. + + + + +

Represents a 2D matrix of bits. In function arguments below, and throughout the common + module, x is the column position, and y is the row position. The ordering is always x, y. + The origin is at the top-left.

+

Internally the bits are represented in a 1-D array of 32-bit ints. However, each row begins + with a new int. This is done intentionally so that we can copy out a row into a BitArray very + efficiently.

+

The ordering of bits is row-major. Within each int, the least significant bits are used first, + meaning they represent lower x values. This is compatible with BitArray's implementation.

+
+ Sean Owen + dswitkin@google.com (Daniel Switkin) +
+ + The width of the matrix + + + + The height of the matrix + + + + This method is for compatibility with older code. It's only logical to call if the matrix + is square, so I'm throwing if that's not the case. + + + row/column dimension of this matrix + + + + + The rowsize of the matrix + + + + + Creates an empty square . + + height and width + + + + Creates an empty square . + + bit matrix width + bit matrix height + + + + Interprets a 2D array of booleans as a , where "true" means an "on" bit. + + bits of the image, as a row-major 2D array. Elements are arrays representing rows + representation of image + + +

Gets the requested bit, where true means black.

+ +
+ The horizontal component (i.e. which column) + + The vertical component (i.e. which row) + + value of given bit in matrix + +
+ + +

Flips the given bit.

+
+ The horizontal component (i.e. which column) + The vertical component (i.e. which row) +
+ + + flip all of the bits, if shouldBeFlipped is true for the coordinates + + should return true, if the bit at a given coordinate should be flipped + + + + Exclusive-or (XOR): Flip the bit in this {@code BitMatrix} if the corresponding + mask bit is set. + + The mask. + + + Clears all bits (sets to false). + + +

Sets a square region of the bit matrix to true.

+ +
+ The horizontal position to begin at (inclusive) + + The vertical position to begin at (inclusive) + + The width of the region + + The height of the region + +
+ + A fast method to retrieve one row of data from the matrix as a BitArray. + + + The row to retrieve + + An optional caller-allocated BitArray, will be allocated if null or too small + + The resulting BitArray - this reference should always be used even when passing + your own row + + + + + Sets the row. + + row to set + {@link BitArray} to copy from + + + + Modifies this {@code BitMatrix} to represent the same but rotated 180 degrees + + + + + This is useful in detecting the enclosing rectangle of a 'pure' barcode. + + {left,top,width,height} enclosing rectangle of all 1 bits, or null if it is all white + + + + This is useful in detecting a corner of a 'pure' barcode. + + {x,y} coordinate of top-left-most 1 bit, or null if it is all white + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + The line separator. + + A that represents this instance. + + + + + Clones this instance. + + + + + + Converts this ByteMatrix to a black and white bitmap. + + A black and white bitmap converted from this ByteMatrix. + + +

This provides an easy abstraction to read bits at a time from a sequence of bytes, where the + number of bits read is not often a multiple of 8.

+ +

This class is thread-safe but not reentrant. Unless the caller modifies the bytes array + it passed in, in which case all bets are off.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + bytes from which this will read bits. Bits will be read from the first byte first. + Bits are read within a byte from most-significant to least-significant bit. + + + + + index of next bit in current byte which would be read by the next call to {@link #readBits(int)}. + + + + + index of next byte in input byte array which would be read by the next call to {@link #readBits(int)}. + + + + number of bits to read + + int representing the bits read. The bits will appear as the least-significant + bits of the int + + if numBits isn't in [1,32] or more than is available + + + number of bits that can be read successfully + + + + Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1 + of ISO 18004. + + + Sean Owen + + + character set ECI value + representing ECI of given value, or null if it is legal but unsupported + + + character set ECI encoding name + representing ECI for character encoding, or null if it is legalbut unsupported + + + + Encapsulates the result of decoding a matrix of bits. This typically + applies to 2D barcode formats. For now it contains the raw bytes obtained, + as well as a String interpretation of those bytes, if applicable. + Sean Owen + + + + + raw bytes representing the result, or null if not applicable + + + + + how many bits of are valid; typically 8 times its length + + + + + text representation of the result + + + + + list of byte segments in the result, or null if not applicable + + + + + name of error correction level used, or null if not applicable + + + + + gets a value which describe if structure append data was found + + + + + number of errors corrected, or null if not applicable + + + + + gives the sequence number of the result if structured append was found + + + + + number of erasures corrected, or null if not applicable + + + + + gives the parity information if structured append was found + + + + + Miscellanseous data value for the various decoders + + The other. + + + + initializing constructor + + + + + + + + + initializing constructor + + + + + + + + + + + initializing constructor + + + + + + + + + + initializing constructor + + + + + + + + + + + + Defines an container for encoder options + + + + + Gets the data container for all options + + + + + event is raised when a value is changed + + + + + Gets or sets a flag which cause a deeper look into the bitmap + + + true if [try harder]; otherwise, false. + + + + + Image is a pure monochrome image of a barcode. + + + true if monochrome image of a barcode; otherwise, false. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + The character set. + + + + + Image is known to be of one of a few possible formats. + Maps to a {@link java.util.List} of {@link BarcodeFormat}s. + + + The possible formats. + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + true if it should assume a Code 39 check digit; otherwise, false. + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). + + + true if it should assume GS1; otherwise, false. + + + + + Assume MSI codes employ a check digit. Maps to . + + + true if it should assume a MSI check digit; otherwise, false. + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Initializes a new instance of the class. + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Encapsulates the result of detecting a barcode in an image. This includes the raw + matrix of black/white pixels corresponding to the barcode, and possibly points of interest + in the image, like the location of finder patterns or corners of the barcode in the image.

+
+ Sean Owen +
+ + + the detected bits + + + + + the pixel points where the result is found + + + + + initializing constructor + + + + + + + General math-related and numeric utility functions. + + + + + Ends up being a bit faster than {@link Math#round(float)}. This merely rounds its + argument to the nearest int, where x.5 rounds up to x+1. Semantics of this shortcut + differ slightly from {@link Math#round(float)} in that half rounds down for negative + values. -2.5 rounds to -3, not -2. For purposes here it makes no difference. + + real value to round + nearest int + + + + + + + + + + Euclidean distance between points A and B + + + + + + + + + + Euclidean distance between points A and B + + + + + values to sum + sum of values in array + + +

A somewhat generic detector that looks for a barcode-like rectangular region within an image. + It looks within a mostly white region of an image for a region of black and white, but mostly + black. It returns the four corners of the region, as best it can determine.

+ +
+ Sean Owen +
+ + + initializing constructor + + + + + +

Detects a rectangular region of black and white -- mostly black -- with a region of mostly + white, in an image.

+
+ [] describing the corners of the rectangular region. The first and + last points are opposed on the diagonal, as are the second and third. The first point will be + the topmost point and the last, the bottommost. The second point will be leftmost and the + third, the rightmost + +
+ + Attempts to locate a corner of the barcode by scanning up, down, left or right from a center + point which should be within the barcode. + + + center's x component (horizontal) + + same as deltaY but change in x per step instead + + minimum value of x + + maximum value of x + + center's y component (vertical) + + change in y per step. If scanning up this is negative; down, positive; + left or right, 0 + + minimum value of y to search through (meaningless when di == 0) + + maximum value of y + + maximum run of white pixels that can still be considered to be within + the barcode + + a encapsulating the corner that was found + + + + Computes the start and end of a region of pixels, either horizontally or vertically, that could + be part of a Data Matrix barcode. + + + if scanning horizontally, this is the row (the fixed vertical location) + where we are scanning. If scanning vertically it's the column, the fixed horizontal location + + largest run of white pixels that can still be considered part of the + barcode region + + minimum pixel location, horizontally or vertically, to consider + + maximum pixel location, horizontally or vertically, to consider + + if true, we're scanning left-right, instead of up-down + + int[] with start and end of found range, or null if no such range is found + (e.g. only white was found) + + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. By keeping track of the + last black points it encountered, it determines the corners of the barcode. + + David Olivier + + + + Creates a WhiteRectangleDetector instance + + The image. + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + Creates a WhiteRectangleDetector instance + + barcode image to find a rectangle in + initial size of search area around center + x position of search center + y position of search center + + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + + Initializes a new instance of the class. + + The image. + if image is too small + + + + Initializes a new instance of the class. + + The image. + Size of the init. + The x. + The y. + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. + + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + recenters the points of a constant distance towards the center + + bottom most point + left most point + right most point + top most point + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + Determines whether a segment contains a black point + + min value of the scanned coordinate + max value of the scanned coordinate + value of fixed coordinate + set to true if scan must be horizontal, false if vertical + + true if a black point has been found, else false. + + + + + Superclass of classes encapsulating types ECIs, according to "Extended Channel Interpretations" + 5.3 of ISO 18004. + + Sean Owen + + + + the ECI value + + + + ECI value + representing ECI of given value, or null if it is legal but unsupported + ArgumentException if ECI value is invalid + + + + Defines an container for encoder options + + + + + Gets the data container for all options + + + + + Specifies the height of the barcode image + + + + + Specifies the width of the barcode image + + + + + Don't put the content string into the output image. + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + + + + + Specifies whether the data should be encoded to the GS1 standard; + FNC1 character is added in front of the data + + + + + Initializes a new instance of the class. + + + + This Binarizer implementation uses the old ZXing global histogram approach. It is suitable + for low-end mobile devices which don't have enough CPU or memory to use a local thresholding + algorithm. However, because it picks a global black point, it cannot handle difficult shadows + and gradients. + + Faster mobile devices and all desktop applications should probably use HybridBinarizer instead. + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The source. + + + + Applies simple sharpening to the row data to improve performance of the 1D Readers. + + + + + + + + Does not sharpen the data, as this call is intended to only be used by 2D Readers. + + + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + + A new concrete Binarizer implementation object. + + + + Implementations of this class can, given locations of finder patterns for a QR code in an + image, sample the right points in the image to reconstruct the QR code, accounting for + perspective distortion. It is abstracted since it is relatively expensive and should be allowed + to take advantage of platform-specific optimized implementations, like Sun's Java Advanced + Imaging library, but which may not be available in other environments such as J2ME, and vice + versa. + + The implementation used can be controlled by calling {@link #setGridSampler(GridSampler)} + with an instance of a class which implements this interface. + + Sean Owen + + + the current implementation of + + + + Sets the implementation of used by the library. One global + instance is stored, which may sound problematic. But, the implementation provided + ought to be appropriate for the entire platform, and all uses of this library + in the whole lifetime of the JVM. For instance, an Android activity can swap in + an implementation that takes advantage of native platform libraries. + + The platform-specific object to install. + + + +

Samples an image for a square matrix of bits of the given dimension. This is used to extract + the black/white modules of a 2D barcode like a QR Code found in an image. Because this barcode + may be rotated or perspective-distorted, the caller supplies four points in the source image + that define known points in the barcode, so that the image may be sampled appropriately.

+

The last eight "from" parameters are four X/Y coordinate pairs of locations of points in + the image that define some significant points in the image to be sample. For example, + these may be the location of finder pattern in a QR Code.

+

The first eight "to" parameters are four X/Y coordinate pairs measured in the destination + , from the top left, where the known points in the image given by the "from" + parameters map to.

+

These 16 parameters define the transformation needed to sample the image.

+
+ image to sample + The dimension X. + The dimension Y. + The p1 preimage X. + The p1 preimage Y. + The p2 preimage X. + The p2 preimage Y. + The p3 preimage X. + The p3 preimage Y. + The p4 preimage X. + The p4 preimage Y. + The p1 image X. + The p1 image Y. + The p2 image X. + The p2 image Y. + The p3 image X. + The p3 image Y. + The p4 image X. + The p4 image Y. + + representing a grid of points sampled from the image within a region + defined by the "from" parameters + + ReaderException if image can't be sampled, for example, if the transformation defined +
+ + + + + + + + + + + +

Checks a set of points that have been transformed to sample points on an image against + the image's dimensions to see if the point are even within the image.

+ +

This method will actually "nudge" the endpoints back onto the image if they are found to be + barely (less than 1 pixel) off the image. This accounts for imperfect detection of finder + patterns in an image where the QR Code runs all the way to the image border.

+ +

For efficiency, the method will check points from either end of the line until one is found + to be within the image. Because the set of points are assumed to be linear, this is valid.

+ +
+ image into which the points should map + + actual points in x1,y1,...,xn,yn form + +
+ + This class implements a local thresholding algorithm, which while slower than the + GlobalHistogramBinarizer, is fairly efficient for what it does. It is designed for + high frequency images of barcodes with black data on white backgrounds. For this application, + it does a much better job than a global blackpoint with severe shadows and gradients. + However it tends to produce artifacts on lower frequency images and is therefore not + a good general purpose binarizer for uses outside ZXing. + + This class extends GlobalHistogramBinarizer, using the older histogram approach for 1D readers, + and the newer local approach for 2D readers. 1D decoding using a per-row histogram is already + inherently local, and only fails for horizontal gradients. We can revisit that problem later, + but for now it was not a win to use local blocks for 1D. + + This Binarizer is the default for the unit tests and the recommended class for library users. + dswitkin@google.com (Daniel Switkin) + + + + + gives the black matrix + + + + + initializing constructor + + + + + + creates a new instance + + + + + + + Calculates the final BitMatrix once for all requests. This could be called once from the + constructor instead, but there are some advantages to doing it lazily, such as making + profiling easier, and not doing heavy lifting when callers don't expect it. + + + + + For each 8x8 block in the image, calculate the average black point using a 5x5 grid + of the blocks around it. Also handles the corner cases (fractional blocks are computed based + on the last 8 pixels in the row/column which are also used in the previous block). + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + The black points. + The matrix. + + + + Applies a single threshold to an 8x8 block of pixels. + + The luminances. + The xoffset. + The yoffset. + The threshold. + The stride. + The matrix. + + + + Calculates a single black point for each 8x8 block of pixels and saves it away. + See the following thread for a discussion of this algorithm: + http://groups.google.com/group/zxing/browse_thread/thread/d06efa2c35a7ddc0 + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + + + +

This class implements a perspective transform in two dimensions. Given four source and four + destination points, it will compute the transformation implied between them. The code is based + directly upon section 3.4.2 of George Wolberg's "Digital Image Warping"; see pages 54-56.

+
+ Sean Owen +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Convenience method, not optimized for performance. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

This class contains utility methods for performing mathematical operations over + the Galois Fields. Operations use a given primitive polynomial in calculations.

+

Throughout this package, elements of the GF are represented as an {@code int} + for convenience and speed (but at the cost of memory). +

+
+ Sean Owen +
+ + + Create a representation of GF(size) using the given primitive polynomial. + + irreducible polynomial whose coefficients are represented by + * the bits of an int, where the least-significant bit represents the constant + * coefficient + the size of the field + the factor b in the generator polynomial can be 0- or 1-based + * (g(x) = (x+a^b)(x+a^(b+1))...(x+a^(b+2t-1))). + * In most cases it should be 1, but for QR code it is 0. + + + + Builds the monomial. + + The degree. + The coefficient. + the monomial representing coefficient * x^degree + + + + Implements both addition and subtraction -- they are the same in GF(size). + + sum/difference of a and b + + + + Exps the specified a. + + 2 to the power of a in GF(size) + + + + Logs the specified a. + + A. + base 2 log of a in GF(size) + + + + Inverses the specified a. + + multiplicative inverse of a + + + + Multiplies the specified a with b. + + A. + The b. + product of a and b in GF(size) + + + + Gets the size. + + + + + Gets the generator base. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + +

Represents a polynomial whose coefficients are elements of a GF. + Instances of this class are immutable.

+

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + the {@link GenericGF} instance representing the field to use + to perform computations + coefficients as ints representing elements of GF(size), arranged + from most significant (highest-power term) coefficient to least significant + if argument is null or empty, + or if leading coefficient is 0 and this is not a + constant polynomial (that is, it is not the monomial "0") + + + + degree of this polynomial + + + + + Gets a value indicating whether this is zero. + + true iff this polynomial is the monomial "0" + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + +

Implements Reed-Solomon decoding, as the name implies.

+ +

The algorithm will not be explained here, but the following references were helpful + in creating this implementation:

+ + + +

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+ +
+ Sean Owen + William Rucklidge + sanfordsquires +
+ + +

Decodes given set of received codewords, which include both data and error-correction + codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place, + in the input.

+
+ data and error-correction codewords + number of error-correction codewords available + false: decoding fails +
+ + + Implements Reed-Solomon encoding, as the name implies. + + Sean Owen + William Rucklidge + + + + Common string-related functions. + + Sean Owen + Alex Dupre + + + + SJIS + + + + + GB2312 + + + + + Guesses the encoding. + + bytes encoding a string, whose encoding should be guessed + decode hints if applicable + name of guessed encoding; at the moment will only guess one of: + {@link #SHIFT_JIS}, {@link #UTF8}, {@link #ISO88591}, or the platform + default encoding if none of these can possibly be correct + + + + This implementation can detect and decode Data Matrix codes in an image. + + bbrown@google.com (Brian Brown) + + + + + Locates and decodes a Data Matrix code in an image. + + + a String representing the content encoded by the Data Matrix code + + + + Locates and decodes a Data Matrix code in an image. + + + + a String representing the content encoded by the Data Matrix code + + + + does nothing here + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a Data Matrix code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + Guillaume Le Biller Added to zxing lib. + + + + encodes the content to a BitMatrix + + + + + + + + + + encodes the content to a BitMatrix + + + + + + + + + + + Encode the given symbol info to a bit matrix. + + The DataMatrix placement. + The symbol info to encode. + + + The bit matrix generated. + + + + Convert the ByteMatrix to BitMatrix. + + The input matrix. + The requested width of the image (in pixels) with the Datamatrix code + The requested height of the image (in pixels) with the Datamatrix code + The output matrix. + + + + bbrown@google.com (Brian Brown) + + + + + to parse + if dimension is < 8 or > 144 or not 0 mod 2 + + + + +

Creates the version object based on the dimension of the original bit matrix from + the datamatrix code.

+ +

See ISO 16022:2006 Table 7 - ECC 200 symbol attributes

+ + Original including alignment patterns + encapsulating the Data Matrix Code's "version" + if the dimensions of the mapping matrix are not valid + Data Matrix dimensions. +
+
+ + +

Reads the bits in the representing the mapping matrix (No alignment patterns) + in the correct order in order to reconstitute the codewords bytes contained within the + Data Matrix Code.

+ + bytes encoded within the Data Matrix Code + if the exact number of bytes expected is not read +
+
+ + +

Reads a bit of the mapping matrix accounting for boundary wrapping.

+ + Row to read in the mapping matrix + Column to read in the mapping matrix + Number of rows in the mapping matrix + Number of columns in the mapping matrix + value of the given bit in the mapping matrix +
+
+ + +

Reads the 8 bits of the standard Utah-shaped pattern.

+ +

See ISO 16022:2006, 5.8.1 Figure 6

+ + Current row in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Current column in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the utah shape +
+
+ + +

Reads the 8 bits of the special corner condition 1.

+ +

See ISO 16022:2006, Figure F.3

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 1 +
+
+ + +

Reads the 8 bits of the special corner condition 2.

+ +

See ISO 16022:2006, Figure F.4

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 2 +
+
+ + +

Reads the 8 bits of the special corner condition 3.

+ +

See ISO 16022:2006, Figure F.5

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 3 +
+
+ + +

Reads the 8 bits of the special corner condition 4.

+ +

See ISO 16022:2006, Figure F.6

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 4 +
+
+ + +

Extracts the data region from a that contains + alignment patterns.

+ + Original with alignment patterns + BitMatrix that has the alignment patterns removed +
+
+ + +

Encapsulates a block of data within a Data Matrix Code. Data Matrix Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ + bbrown@google.com (Brian Brown) +
+
+ + +

When Data Matrix Codes use multiple data blocks, they actually interleave the bytes of each of them. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ + bytes as read directly from the Data Matrix Code + version of the Data Matrix Code + DataBlocks containing original bytes, "de-interleaved" from representation in the + Data Matrix Code +
+
+ + +

Data Matrix Codes can encode text as bits in one of several modes, and can use multiple modes + in one Data Matrix Code. This class decodes the bits back into text.

+ +

See ISO 16022:2006, 5.2.1 - 5.2.9.2

+ + bbrown@google.com (Brian Brown) + Sean Owen +
+
+ + + See ISO 16022:2006, Annex C Table C.1 + The C40 Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, Annex C Table C.2 + The Text Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, 5.2.3 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.5 and Annex C, Table C.1 + + + + + See ISO 16022:2006, 5.2.6 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.7 + + + + + See ISO 16022:2006, 5.2.8 and Annex C Table C.3 + + + + + See ISO 16022:2006, 5.2.9 and Annex B, B.2 + + + + + See ISO 16022:2006, Annex B, B.2 + + + + +

The main class which implements Data Matrix Code decoding -- as opposed to locating and extracting + the Data Matrix Code from an image.

+ + bbrown@google.com (Brian Brown) +
+
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a Data Matrix Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+ + booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code + if the Data Matrix Code cannot be decoded +
+
+ + +

Decodes a Data Matrix Code represented as a . A 1 or "true" is taken + to mean a black module.

+
+ booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+ + data and error correction codewords + number of codewords that are data bytes +
+
+ + + The Version object encapsulates attributes about a particular + size Data Matrix Code. + + bbrown@google.com (Brian Brown) + + + + + returns the version numer + + + + + + returns the symbol size rows + + + + + + returns the symbols size columns + + + + + + retursn the data region size rows + + + + + + returns the data region size columns + + + + + + returns the total codewords count + + + + + +

Deduces version information from Data Matrix dimensions.

+ + Number of rows in modules + Number of columns in modules + Version for a Data Matrix Code of those dimensions + if dimensions do correspond to a valid Data Matrix size +
+
+ + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the Data Matrix code version's format.

+
+
+ + + returns the version number as string + + + + + + See ISO 16022:2006 5.5.1 Table 7 + + + + +

Encapsulates logic that can detect a Data Matrix Code in an image, even if the Data Matrix Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + +

Detects a Data Matrix Code in an image.

+
+ encapsulating results of detecting a Data Matrix Code or null +
+ + + Calculates the position of the white top right module using the output of the rectangle detector + for a rectangular matrix + + + + + Calculates the position of the white top right module using the output of the rectangle detector + for a square matrix + + + + + Increments the Integer associated with a key by one. + + + + + Counts the number of black/white transitions between two points, using something like Bresenham's algorithm. + + + + + Simply encapsulates two points and a number of transitions between them. + + + + + Orders ResultPointsAndTransitions by number of transitions, ascending. + + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Symbol Character Placement Program. Adapted from Annex M.1 in ISO/IEC 16022:2000(E). + + + + + Main constructor + + the codewords to place + the number of columns + the number of rows + + + + Places the 8 bits of a utah-shaped symbol character in ECC200. + + The row. + The col. + character position + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Enumeration for encodation types + + + + + Error Correction Code for ECC200. + + + + + Lookup table which factors to use for which number of error correction codewords. + See FACTORS. + + + + + Precomputed polynomial factors for ECC 200. + + + + + Creates the ECC200 error correction for an encoded message. + + The codewords. + information about the symbol to be encoded + the codewords with interleaved error correction. + + + + DataMatrix ECC 200 data encoder following the algorithm described in ISO/IEC 16022:200(E) in + annex S. + + + + + Padding character + + + + + mode latch to C40 encodation mode + + + + + mode latch to Base 256 encodation mode + + + + + FNC1 Codeword + + + + + Structured Append Codeword + + + + + Reader Programming + + + + + Upper Shift + + + + + 05 Macro + + + + + 06 Macro + + + + + mode latch to ANSI X.12 encodation mode + + + + + mode latch to Text encodation mode + + + + + mode latch to EDIFACT encodation mode + + + + + ECI character (Extended Channel Interpretation) + + + + + Unlatch from C40 encodation + + + + + Unlatch from X12 encodation + + + + + 05 Macro header + + + + + 06 Macro header + + + + + Macro trailer + + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + the encoded message (the char values range from 0 to 255) + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + requested shape. May be {@code SymbolShapeHint.FORCE_NONE},{@code SymbolShapeHint.FORCE_SQUARE} or {@code SymbolShapeHint.FORCE_RECTANGLE}. + the minimum symbol size constraint or null for no constraint + the maximum symbol size constraint or null for no constraint + encoding mode to start with + the encoded message (the char values range from 0 to 255) + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + Symbol info table for DataMatrix. + + + + Overrides the symbol info set used by this class. Used for testing purposes. + + @param override the symbol info set to use + + + + Enumeration for DataMatrix symbol shape hint. It can be used to force square or rectangular + symbols. + + + + + The class holds the available options for the DatamatrixWriter + + + + + Specifies the matrix shape for Data Matrix + + + + + Specifies a minimum barcode size + + + + + Specifies a maximum barcode size + + + + + Specifies the default encodation + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Encapsulates a type of hint that a caller may pass to a barcode reader to help it + more quickly or accurately decode it. It is up to implementations to decide what, + if anything, to do with the information that is supplied. + + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Unspecified, application-specific hint. Maps to an unspecified . + + + + + Image is a pure monochrome image of a barcode. Doesn't matter what it maps to; + use = true. + + + + + Image is known to be of one of a few possible formats. + Maps to a of s. + + + + + Spend more time to try to find a barcode; optimize for accuracy, not speed. + Doesn't matter what it maps to; use = true. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + + + The caller needs to be notified via callback when a possible + is found. Maps to a . + + + + + Assume MSI codes employ a check digit. Maps to . + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + Maps to . + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + 1D readers supporting rotation with TRY_HARDER enabled. + But BarcodeReader class can do auto-rotating for 1D and 2D codes. + Enabling that option prevents 1D readers doing double rotation. + BarcodeReader enables that option automatically if "global" auto-rotation is enabled. + Maps to . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to; + use . + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Simply encapsulates a width and height. + + + + + initializing constructor + + + + + + + the width + + + + + the height + + + + + + + + + + + + + + + + + + + + + + + + These are a set of hints that you may pass to Writers to specify their behavior. + + dswitkin@google.com (Daniel Switkin) + + + + Specifies the width of the barcode image + type: + + + + + Specifies the height of the barcode image + type: + + + + + Don't put the content string into the output image. + type: + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + + For Aztec it is of type , representing the minimal percentage of error correction words. + In all cases, it can also be a representation of the desired value as well. + Note: an Aztec symbol should have a minimum of 25% EC words. + For PDF417 it is of type or (between 0 and 8), + + + + + Specifies what character encoding to use where applicable. + type: + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + type: , or representation of the integer value + + + + + Specifies the aspect ratio to use. Default is 4. + type: , or 1-4. + + + + + Specifies whether to use compact mode for PDF417 + type: , or "true" or "false" + value + + + + + Specifies what compaction mode to use for PDF417. + type: or value of one of its + enum values + + + + + Specifies the minimum and maximum number of rows and columns for PDF417. + type: + + + + + Don't append ECI segment. + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + type: + + + + + Specifies the matrix shape for Data Matrix (type ) + + + + + Specifies a minimum barcode size (type ). Only applicable to Data Matrix now. + + + + + Specifies a maximum barcode size (type ). Only applicable to Data Matrix now. + + + + + if true, don't switch to codeset C for numbers + + + + + Specifies the default encodation for Data Matrix (type ) + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Specifies the required number of layers for an Aztec code. + A negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + type: , or representation of the integer value + + + + + Specifies the exact version of QR code to be encoded. + (Type , or representation of the integer value). + + + + + Specifies whether the data should be encoded to the GS1 standard + type: , or "true" or "false" + value + + + + + Thrown when a barcode was successfully detected, but some aspect of + the content did not conform to the barcode's format rules. This could have + been due to a mis-detection. + Sean Owen + + + + + + + + + + + + + + + + + + + + + + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Decodes the specified barcode bitmap which is given by a generic byte array. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Interface for a smart class to encode some content into a barcode + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents. + + The contents. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + The matrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents. + + The contents. + + + + + implements an Intelligent Mail barcode + Rishabh Hatgadkar + + + + + A wrapper implementation of {@link LuminanceSource} which inverts the luminances it returns -- black becomes + white and vice versa, and each value becomes (255-value). + + Sean Owen + + + + Initializes a new instance of the class. + + The @delegate. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff; + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Inverts this instance. + + original delegate {@link LuminanceSource} since invert undoes itself + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + The purpose of this class hierarchy is to abstract different bitmap implementations across + platforms into a standard interface for requesting greyscale luminance values. The interface + only provides immutable methods; therefore crop and rotation create copies. This is to ensure + that one Reader does not modify the original luminance source and leave it in an unknown state + for other Readers in the chain. + + dswitkin@google.com (Daniel Switkin) + + + + initializing constructor + + + + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff + + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + The width of the bitmap. + + + The height of the bitmap. + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + Whether this subclass supports counter-clockwise rotation. + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + + Whether this subclass supports invertion. + + + + inverts the luminance values, not supported here. has to implemented in sub classes + + + + + + + + + + + + mike32767 + Manuel Kasten + + + + + to parse + + + + +

MaxiCodes can encode text or structured information as bits in one of several modes, + with multiple character sets in one code. This class decodes the bits back into text.

+ + mike32767 + Manuel Kasten +
+
+ + +

The main class which implements MaxiCode decoding -- as opposed to locating and extracting + the MaxiCode from an image.

+ + Manuel Kasten +
+
+ + + This implementation can detect and decode a MaxiCode in an image. + + + + + Locates and decodes a MaxiCode in an image. + + a String representing the content encoded by the MaxiCode + if a MaxiCode cannot be decoded + + + + + Locates and decodes a MaxiCode within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + + MultiFormatReader is a convenience class and the main entry point into the library for most uses. + By default it attempts to decode all barcode formats that the library supports. Optionally, you + can provide a hints object to request different behavior, for example only decoding QR codes. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + This version of decode honors the intent of Reader.decode(BinaryBitmap) in that it + passes null as a hint to the decoders. However, that makes it inefficient to call repeatedly. + Use setHints() followed by decodeWithState() for continuous scan applications. + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the hints provided. Does not honor existing state. + + + The pixel data to decode + + The hints to use, clearing the previous state. + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the state set up by calling setHints() previously. Continuous scan + clients will get a large speed increase by using this instead of decode(). + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls + to decodeWithState(image) can reuse the same set of readers without reallocating memory. This + is important for performance in continuous scan clients. + + + + + + resets all specific readers + + + + This is a factory class which finds the appropriate Writer subclass for the BarcodeFormat + requested and encodes the barcode with the supplied contents. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Gets the collection of supported writers. + + + + + encode the given data + + + + + + + + + + encode the given data + + + + + + + + + + + This class attempts to decode a barcode from an image, not by scanning the whole image, + but by scanning subsets of the image. This is important when there may be multiple barcodes in + an image, and detecting a barcode may find parts of multiple barcode and fail to decode + (e.g. QR Codes). Instead this scans the four quadrants of the image -- and also the center + 'quadrant' to cover the case where a barcode is found in the center. + + + + + + Initializes a new instance of the class. + + The @delegate. + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Attempts to locate multiple barcodes in an image by repeatedly decoding portion of the image. + After one barcode is found, the areas left, above, right and below the barcode's + {@link com.google.zxing.ResultPoint}s are scanned, recursively.

+

A caller may want to also employ {@link ByQuadrantReader} when attempting to find multiple + 2D barcodes, like QR Codes, in an image, where the presence of multiple barcodes might prevent + detecting any one of them.

+

That is, instead of passing a {@link Reader} a caller might pass + new ByQuadrantReader(reader).

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The @delegate. + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Implementation of this interface attempt to read several barcodes from one image. + Sean Owen + + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + +

Encapsulates logic that can detect one or more QR Codes in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+ + Sean Owen + Hannes Erven +
+
+ + + Initializes a new instance of the class. + + The image. + + + + Detects the multi. + + The hints. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +

In contrast to , this class will return an array of all possible + QR code locations in the image.

+ +

Use the TRY_HARDER hint to ask for a more thorough detection.

+ + Sean Owen + Hannes Erven +
+
+ + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF_PERCENT percent in their + estimated modules sizes. + + + + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF pixels/module in their + estimated modules sizes. + + + + + A comparator that orders FinderPatterns by their estimated module size. + + + + +

Creates a finder that will search the image for three finder patterns.

+ + image to search +
+
+ + + + the 3 best s from our list of candidates. The "best" are + those that have been detected at least CENTER_QUORUM times, and whose module + size differs from the average among those patterns the least + + + + + This implementation can detect and decode multiple QR Codes in an image. + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + +

Decodes Codabar barcodes.

+ + Bas Vijfwinkel +
+
+ + These represent the encodings of characters, as patterns of wide and narrow bars. The 7 least-significant bits of + each int correspond to the pattern of wide and narrow, with 1s representing "wide" and 0s representing narrow. + + + + Records the size of all runs of white and black pixels, starting with white. + This is just like recordPattern, except it records all the counters, and + uses our builtin "counters" member for storage. + + row to count from + + + + This class renders CodaBar as []. + + dsbnatut@gmail.com (Kazuki Nishiura) + + + + The class holds the available options for the QrCodeWriter + + + + + if true, don't switch to codeset C for numbers + + + + +

Decodes Code 128 barcodes.

+ + Sean Owen +
+
+ + + This object renders a CODE128 code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + +

Decodes Code 39 barcodes. Supports "Full ASCII Code 39" if USE_CODE_39_EXTENDED_MODE is set.

+ Sean Owen + @see Code93Reader +
+
+ + + Returns a string with all possible characters + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. It will not decoded "extended Code 39" sequences. + + + + + Creates a reader that can be configured to check the last character as a check digit. + It will not decoded "extended Code 39" sequences. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + + Creates a reader that can be configured to check the last character as a check digit, + or optionally attempt to decode "extended Code 39" sequences that are used to encode + the full ASCII character set. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + if true, will attempt to decode extended Code 39 sequences in the text. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a CODE39 code as a . + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Decodes Code 93 barcodes.

+ Sean Owen + +
+
+ + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a CODE93 code as a BitMatrix + + + + + + output to append to + start position + pattern to append + unused + 9 + + + +

Implements decoding of the EAN-13 format.

+ + dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Initializes a new instance of the class. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + Get the format of this decoder. + The 1D format. + + + + + Based on pattern of odd-even ('L' and 'G') patterns used to encoded the explicitly-encoded + digits in a barcode, determines the implicitly encoded first digit and adds it to the + result string. + + string to insert decoded first digit into + int whose bits indicates the pattern of odd/even L/G patterns used to + encode digits + -1 if first digit cannot be determined + + + + This object renders an EAN13 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Implements decoding of the EAN-8 format.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Get the format of this decoder. + The 1D format. + + + + + This object renders an EAN8 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + + + a byte array of horizontal pixels (false = white, true = black) + + + + + Records EAN prefix to GS1 Member Organization, where the member organization + correlates strongly with a country. This is an imperfect means of identifying + a country of origin by EAN-13 barcode value. See + + http://en.wikipedia.org/wiki/List_of_GS1_country_codes. + + Sean Owen + + + + +

Implements decoding of the ITF format, or Interleaved Two of Five.

+ +

This Reader will scan ITF barcodes of certain lengths only. + At the moment it reads length 6, 8, 10, 12, 14, 16, 18, 20, 24, 44 and 48 as these have appeared "in the wild". Not all + lengths are scanned, especially shorter ones, to avoid false positives. This in turn is due to a lack of + required checksum function.

+ +

The checksum is optional and is not applied by this Reader. The consumer of the decoded + value will have to apply a checksum if required.

+ +

http://en.wikipedia.org/wiki/Interleaved_2_of_5 + is a great reference for Interleaved 2 of 5 information.

+ + kevin.osullivan@sita.aero, SITA Lab. +
+
+ + + Valid ITF lengths. Anything longer than the largest value is also allowed. + + + + + Start/end guard pattern. + + Note: The end pattern is reversed because the row is reversed before + searching for the END_PATTERN + + + + + Patterns of Wide / Narrow lines to indicate each digit + + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + + row of black/white values to search + offset of start pattern + The payload end. + to append decoded chars to + + false, if decoding could not complete successfully + + + + + Identify where the start of the middle / payload section starts. + + row of black/white values to search + Array, containing index of start of 'start block' and end of 'start block' + + + + The start & end patterns must be pre/post fixed by a quiet zone. This + zone must be at least 10 times the width of a narrow line. Scan back until + we either get to the start of the barcode or match the necessary number of + quiet zone pixels. + + Note: Its assumed the row is reversed when using this method to find + quiet zone after the end pattern. + + ref: http://www.barcode-1.net/i25code.html + + bit array representing the scanned barcode. + index into row of the start or end pattern. + false, if the quiet zone cannot be found + + + + Skip all whitespace until we get to the first black line. + + row of black/white values to search + index of the first black line or -1 if no black lines are found in the row. + + + + Identify where the end of the middle / payload section ends. + + row of black/white values to search + Array, containing index of start of 'end block' and end of 'end + block' or null, if nothing found + + + + + row of black/white values to search + position to start search + pattern of counts of number of black and white pixels that are being searched for as a pattern + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a sequence of ITF black/white lines into single + digit. + + the counts of runs of observed black/white/black/... values + The decoded digit + + false, if digit cannot be decoded + + + + + This object renders a ITF code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code bool[]} of horizontal pixels (false = white, true = black) + + + + + + + Decodes MSI barcodes. + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. + + + + + Creates a reader that can be configured to check the last character as a check digit, + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a MSI code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + This object renders a Plessey code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

A reader that can read all available UPC/EAN formats. If a caller wants to try to + read all such formats, it is most efficient to use this implementation rather than invoke + individual readers.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Encapsulates functionality and implementation that is common to one-dimensional barcodes.

+ dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + a byte array of horizontal pixels (0 = white, 1 = black) + + + + Appends the given pattern to the target array starting at pos. + + encode black/white pattern into this array + position to start encoding at in target + lengths of black/white runs to encode + starting color - false for white, true for black + the number of elements added to target. + + + + Gets the default margin. + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + + barcode contents to encode + a bool[] of horizontal pixels (false = white, true = black) + + + + Calculates the checksum digit modulo10. + + The contents. + + + + + Encapsulates functionality and implementation that is common to all families + of one-dimensional barcodes. + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + + + + + + + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + Note that we don't try rotation without the try harder flag, even if rotation was supported. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + We're going to examine rows from the middle outward, searching alternately above and below the + middle, and farther out each time. rowStep is the number of rows between each successive + attempt above and below the middle. So we'd scan row middle, then middle - rowStep, then + middle + rowStep, then middle - (2 * rowStep), etc. + rowStep is bigger as the image is taller, but is always at least 1. We've somewhat arbitrarily + decided that moving up and down by about 1/16 of the image is pretty good; we try more of the + image if "trying harder". + + The image to decode + Any hints that were requested + The contents of the decoded barcode + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the pattern in reverse. + + The row. + The start. + The counters. + + + + + Determines how closely a set of observed counts of runs of black/white values matches a given + target pattern. This is reported as the ratio of the total variance from the expected pattern + proportions across all pattern elements, to the length of the pattern. + + observed counters + expected pattern + The most any counter can differ before we give up + ratio of total variance between counters and pattern compared to total pattern size, + where the ratio has been multiplied by 256. So, 0 means no variance (perfect match); 256 means + the total variance between counters and patterns equals the pattern length, higher values mean + even more variance + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + Superclass of implementations that read barcodes in the RSS family of formats. + + + + + Initializes a new instance of the class. + + + + + Gets the decode finder counters. + + + + + + Gets the data character counters. + + + + + + Gets the odd rounding errors. + + + + + + Gets the even rounding errors. + + + + + + Gets the odd counts. + + + + + + Gets the even counts. + + + + + + Parses the finder value. + + The counters. + The finder patterns. + The value. + + + + + Counts the specified array. + + The array. + + + + + Increments the specified array. + + The array. + The errors. + + + + Decrements the specified array. + + The array. + The errors. + + + + Determines whether [is finder pattern] [the specified counters]. + + The counters. + + true if [is finder pattern] [the specified counters]; otherwise, false. + + + + + Encapsulates a since character value in an RSS barcode, including its checksum information. + + + + + Gets the value. + + + + + Gets the checksum portion. + + + + + Initializes a new instance of the class. + + The value. + The checksum portion. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Gets the information. + + + + + + Parses the information. + + + + + + Creates the decoder. + + The information. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + One row of an RSS Expanded Stacked symbol, consisting of 1+ expanded pairs. + + + + + Did this row of the image have to be reversed (mirrored) to recognize the pairs? + + + + + Two rows are equal if they contain the same pairs in the same order. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Encapsulates an RSS barcode finder pattern, including its start/end position and row. + + + + + Gets the value. + + + + + Gets the start end. + + + + + Gets the result points. + + + + + Initializes a new instance of the class. + + The value. + The start end. + The start. + The end. + The row number. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Decodes RSS-14, including truncated and stacked variants. See ISO/IEC 24724:2006. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Adapted from listings in ISO/IEC 24724 Appendix B and Appendix G. + + + + + Gets the RS svalue. + + The widths. + Width of the max. + if set to true [no narrow]. + + + + +

Implements decoding of the UPC-A format.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen +
+
+ + +

Like decodeRow(int, BitArray, java.util.Map), but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ + + + + +
+ + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Decodes the specified image. + + The image. + The hints. + + + + + Get the format of this decoder. + The 1D format. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + This object renders a UPC-A code as a . + qwandor@google.com (Andrew Walbran) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + @see UPCEANExtension5Support + + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + + + @see UPCEANExtension2Support + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + one {@link ResultMetadataType} to appropriate value, or {@code null} if not known + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Start/end guard pattern. + + + + + Pattern marking the middle of a UPC/EAN pattern, separating the two halves. + + + + + end guard pattern. + + + + + "Odd", or "L" patterns used to encode UPC/EAN digits. + + + + + As above but also including the "even", or "G" patterns used to encode UPC/EAN digits. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + +

Like , but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ row index into the image + encoding of the row of the barcode image + start/end column where the opening start pattern was found + optional hints that influence decoding + encapsulating the result of decoding a barcode in the row +
+ + + + string of digits to check + see + + + + Computes the UPC/EAN checksum on a string of digits, and reports + whether the checksum is correct or not. + + string of digits to check + true iff string of digits passes the UPC/EAN checksum algorithm + + + + Decodes the end. + + The row. + The end start. + + + + + + row of black/white values to search + position to start search + if true, indicates that the pattern specifies white/black/white/... + pixel counts, otherwise, it is interpreted as black/white/black/... + pattern of counts of number of black and white pixels that are being + searched for as a pattern + array of counters, as long as pattern, to re-use + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a single UPC/EAN-encoded digit. + + row of black/white values to decode + the counts of runs of observed black/white/black/... values + horizontal offset to start decoding from + the set of patterns to use to decode -- sometimes different encodings + for the digits 0-9 are used, and this indicates the encodings for 0 to 9 that should + be used + horizontal offset of first pixel beyond the decoded digit + + + + Get the format of this decoder. + + The 1D format. + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ aripollak@gmail.com (Ari Pollak) + dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Gets the default margin. + + + + +

Implements decoding of the UPC-E format.

+

Thisis a great reference for + UPC-E information.

+ Sean Owen +
+
+ + + The pattern that marks the middle, and end, of a UPC-E pattern. + There is no "second half" to a UPC-E barcode. + + + + + See L_AND_G_PATTERNS these values similarly represent patterns of + even-odd parity encodings of digits that imply both the number system (0 or 1) + used, and the check digit. + + + + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Decodes the end. + + The row. + The end start. + + + + + see checkStandardUPCEANChecksum(String) + + + + + + + Determines the num sys and check digit. + + The result string. + The lg pattern found. + + + + + Get the format of this decoder. + The 1D format. + + + + + Expands a UPC-E value back into its full, equivalent UPC-A code value. + + UPC-E code as string of digits + equivalent UPC-A code as string of digits + + + + + This object renders an UPC-E code as a {@link BitMatrix}. + @author 0979097955s@gmail.com (RX) + + + + + Metadata about a PDF417 Barcode + + Guenther Grau + + + + A Barcode Value for the PDF417 barcode. + The scanner will iterate through the bitmatrix, + and given the different methods or iterations + will increment a given barcode value's confidence. + + When done, this will return the values of highest confidence. + + Guenther Grau + + + + Incremenets the Confidence for a given value. (Adds an occurance of a value) + + + Value. + + + + Determines the maximum occurrence of a set value and returns all values which were set with this occurrence. + + an array of int, containing the values with the highest occurrence, or null, if no value was set. + + + + Returns the confience value for a given barcode value + + Barcode value. + + + + A Bounding Box helper class + + Guenther Grau + + + + Initializes a new instance of the class. + returns null if the corner points don't match up correctly + + The image. + The top left. + The bottom left. + The top right. + The bottom right. + + + + + Creates the specified box. + + The box. + + + + + Initializes a new instance of the class. + Will throw an exception if the corner points don't match up correctly + + Image. + Top left. + Top right. + Bottom left. + Bottom right. + + + + Merge two Bounding Boxes, getting the left corners of left, and the right corners of right + (Images should be the same) + + Left. + Right. + + + + Adds the missing rows. + + The missing rows. + Missing start rows. + Missing end rows. + If set to true is left. + + + + Calculates the minimum and maximum X & Y values based on the corner points. + + + + + If we adjust the width, set a new right corner coordinate and recalculate + + Bottom right. + + + + A Codeword in the PDF417 barcode + + Guenther Grau + + + + Default value for the RowNumber (-1 being an invalid real number) + + + + + Initializes a new instance of the class. + + Start x. + End x. + Bucket. + Value. + + + + Gets the width. + + The width. + + + + Gets a value indicating whether this instance has valid row number. + + true if this instance has valid row number; otherwise, false. + + + + Determines whether this instance is valid row number the specified rowNumber. + + true if this instance is valid row number the specified rowNumber; otherwise, false. + Row number. + + + + Sets the row number as the row's indicator column. + + + + + Returns a that represents the current . + + A that represents the current . + + + +

This class contains the methods for decoding the PDF417 codewords.

+ + SITA Lab (kevin.osullivan@sita.aero) +
+
+ + + Table containing values for the exponent of 900. + This is used in the numeric compaction decode algorithm. + + + + + Text Compaction mode (see 5.4.1.5) permits all printable ASCII characters to be + encoded, i.e. values 32 - 126 inclusive in accordance with ISO/IEC 646 (IRV), as + well as selected control characters. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + The Text Compaction mode includes all the printable ASCII characters + (i.e. values from 32 to 126) and three ASCII control characters: HT or tab + (ASCII value 9), LF or line feed (ASCII value 10), and CR or carriage + return (ASCII value 13). The Text Compaction mode also includes various latch + and shift characters which are used exclusively within the mode. The Text + Compaction mode encodes up to 2 characters per codeword. The compaction rules + for converting data into PDF417 codewords are defined in 5.4.2.2. The sub-mode + switches are defined in 5.4.2.3. + + The text compaction data. + The byte compaction data if there + was a mode shift. + The size of the text compaction and byte compaction data. + The decoded data is appended to the result. + + + + + Byte Compaction mode (see 5.4.3) permits all 256 possible 8-bit byte values to be encoded. + This includes all ASCII characters value 0 to 127 inclusive and provides for international + character set support. + + The byte compaction mode i.e. 901 or 924 + The array of codewords (data + error) + Currently active character encoding + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Numeric Compaction mode (see 5.4.4) permits efficient encoding of numeric data strings. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Convert a list of Numeric Compacted codewords from Base 900 to Base 10. + EXAMPLE + Encode the fifteen digit numeric string 000213298174000 + Prefix the numeric string with a 1 and set the initial value of + t = 1 000 213 298 174 000 + Calculate codeword 0 + d0 = 1 000 213 298 174 000 mod 900 = 200 + + t = 1 000 213 298 174 000 div 900 = 1 111 348 109 082 + Calculate codeword 1 + d1 = 1 111 348 109 082 mod 900 = 282 + + t = 1 111 348 109 082 div 900 = 1 234 831 232 + Calculate codeword 2 + d2 = 1 234 831 232 mod 900 = 632 + + t = 1 234 831 232 div 900 = 1 372 034 + Calculate codeword 3 + d3 = 1 372 034 mod 900 = 434 + + t = 1 372 034 div 900 = 1 524 + Calculate codeword 4 + d4 = 1 524 mod 900 = 624 + + t = 1 524 div 900 = 1 + Calculate codeword 5 + d5 = 1 mod 900 = 1 + t = 1 div 900 = 0 + Codeword sequence is: 1, 624, 434, 632, 282, 200 + + Decode the above codewords involves + 1 x 900 power of 5 + 624 x 900 power of 4 + 434 x 900 power of 3 + + 632 x 900 power of 2 + 282 x 900 power of 1 + 200 x 900 power of 0 = 1000213298174000 + + Remove leading 1 => Result is 000213298174000 + The array of codewords + The number of codewords + The decoded string representing the Numeric data. + + + + + + + Guenther Grau + + + + Returns the DetectionResult Columns. This does a fair bit of calculation, so call it sparingly. + + The detection result columns. + + + + Adjusts the indicator column row numbers. + + Detection result column. + + + + return number of codewords which don't have a valid row number. Note that the count is not accurate as codewords . + will be counted several times. It just serves as an indicator to see when we can stop adjusting row numbers + + The row numbers. + + + + Adjusts the row numbers by row. + + The row numbers by row. + + + + Adjusts the row numbers from both Row Indicators + + zero + + + + Adjusts the row numbers from Right Row Indicator. + + The unadjusted row count. + + + + Adjusts the row numbers from Left Row Indicator. + + Unadjusted row Count. + + + + Adjusts the row number if valid. + + The invalid rows + Row indicator row number. + Invalid row counts. + Codeword. + + + + Adjusts the row numbers. + + Barcode column. + Codewords row. + Codewords. + + + + Adjusts the row number. + + true, if row number was adjusted, false otherwise. + Codeword. + Other codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + The maximum distance to search in the codeword array in both the positive and negative directions + + + + + The Bounding Box around the column (in the BitMatrix) + + The box. + + + + The Codewords the Box encodes for, offset by the Box minY. + Remember to Access this ONLY through GetCodeword(imageRow) if you're accessing it in that manner. + + The codewords. + + + + Initializes a new instance of the class. + + The Bounding Box around the column (in the BitMatrix) + + + + Converts the Image's Row to the index in the Codewords array + + The Codeword Index. + Image row. + + + + Converts the Codeword array index into a Row in the Image (BitMatrix) + + The Image Row. + Codeword index. + + + + Gets the codeword for a given row + + The codeword. + Image row. + + + + Gets the codeword closest to the specified row in the image + + Image row. + + + + Sets the codeword for an image row + + Image row. + Codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + Gets or sets a value indicating whether this instance is the left indicator + + true if this instance is left; otherwise, false. + + + + Initializes a new instance of the class. + + Box. + If set to true is left. + + + + Sets the Row Numbers as Inidicator Columns + + + + + TODO implement properly + TODO maybe we should add missing codewords to store the correct row number to make + finding row numbers for other columns easier + use row height count to make detection of invalid row numbers more reliable + + The indicator column row numbers. + Metadata. + + + + Gets the row heights. + + The row heights. + + + + Adjusts the in omplete indicator column row numbers. + + Metadata. + + + + Gets the barcode metadata. + + The barcode metadata. + + + + Prune the codewords which do not match the metadata + TODO Maybe we should keep the incorrect codewords for the start and end positions? + + Codewords. + Metadata. + + + + Returns a that represents the current . + + A that represents the current . + + + +

PDF417 error correction implementation.

+

This example + is quite useful in understanding the algorithm.

+ Sean Owen + +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the specified received. + + received codewords + number of those codewords used for EC + location of erasures + The error locations count. + + + + + Runs the euclidean algorithm (Greatest Common Divisor) until r's degree is less than R/2 + + The euclidean algorithm. + + + + Finds the error locations as a direct application of Chien's search + + The error locations. + Error locator. + + + + Finds the error magnitudes by directly applying Forney's Formula + + The error magnitudes. + Error evaluator. + Error locator. + Error locations. + + + +

A field based on powers of a generator integer, modulo some modulus.

+ +
+ Sean Owen +
+ + + + + Sean Owen + + + + Gets the coefficients. + + The coefficients. + + + + degree of this polynomial + + + + + Gets a value indicating whether this instance is zero. + + true if this polynomial is the monomial "0" + + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + + + Adds another Modulus + + Other. + + + + Subtract another Modulus + + Other. + + + + Multiply by another Modulus + + Other. + + + + Returns a Negative version of this instance + + + + + Multiply by a Scalar. + + Scalar. + + + + Multiplies by a Monomial + + The by monomial. + Degree. + Coefficient. + + + + Returns a that represents the current . + + A that represents the current . + + + + + + Guenther Grau + creatale GmbH (christoph.schulz@creatale.de) + + + + The ratios table + + + + + Initializes the class & Pre-computes the symbol ratio table. + + + + + Gets the decoded value. + + The decoded value. + Module bit count. + + + + Samples the bit counts. + + The bit counts. + Module bit count. + + + + Gets the decoded codeword value. + + The decoded codeword value. + Module bit count. + + + + Gets the bit value. + + The bit value. + Module bit count. + + + + Gets the closest decoded value. + + The closest decoded value. + Module bit count. + + + + + + Guenther Grau + + + + Decode the specified image, imageTopLeft, imageBottomLeft, imageTopRight, imageBottomRight, minCodewordWidth + and maxCodewordWidth. + TODO: don't pass in minCodewordWidth and maxCodewordWidth, pass in barcode columns for start and stop pattern + columns. That way width can be deducted from the pattern column. + This approach also allows to detect more details about the barcode, e.g. if a bar type (white or black) is wider + than it should be. This can happen if the scanner used a bad blackpoint. + + Image. + Image top left. + Image bottom left. + Image top right. + Image bottom right. + Minimum codeword width. + Max codeword width. + + + + Merge the specified leftRowIndicatorColumn and rightRowIndicatorColumn. + + Left row indicator column. + Right row indicator column. + + + + Adjusts the bounding box. + + The bounding box. + Row indicator column. + + + + Gets the barcode metadata. + + The barcode metadata. + Left row indicator column. + Right row indicator column. + + + + Gets the row indicator column. + + The row indicator column. + Image. + Bounding box. + Start point. + If set to true left to right. + Minimum codeword width. + Max codeword width. + + + + Adjusts the codeword count. + + Detection result. + Barcode matrix. + + + + Creates the decoder result. + + The decoder result. + Detection result. + + + + This method deals with the fact, that the decoding process doesn't always yield a single most likely value. The + current error correction implementation doesn't deal with erasures very well, so it's better to provide a value + for these ambiguous codewords instead of treating it as an erasure. The problem is that we don't know which of + the ambiguous values to choose. We try decode using the first value, and if that fails, we use another of the + ambiguous values and try to decode again. This usually only happens on very hard to read and decode barcodes, + so decoding the normal barcodes is not affected by this. + + The decoder result from ambiguous values. + Ec level. + Codewords. + contains the indexes of erasures. + array with the indexes that have more than one most likely value. + two dimensional array that contains the ambiguous values. The first dimension must + be the same Length as the ambiguousIndexes array. + + + + Creates the barcode matrix. + + The barcode matrix. + Detection result. + + + + Tests to see if the Barcode Column is Valid + + true, if barcode column is valid, false otherwise. + Detection result. + Barcode column. + + + + Gets the start column. + + The start column. + Detection result. + Barcode column. + Image row. + If set to true left to right. + + + + Detects the codeword. + + The codeword. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + Minimum codeword width. + Max codeword width. + + + + Gets the module bit count. + + The module bit count. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + + + + Gets the number of EC code words. + + The number of EC code words. + Barcode EC level. + + + + Adjusts the codeword start column. + + The codeword start column. + Image. + Minimum column. + Max column. + If set to true left to right. + Codeword start column. + Image row. + + + + Checks the codeword for any skew. + + true, if codeword is within the skew, false otherwise. + Codeword size. + Minimum codeword width. + Max codeword width. + + + + Decodes the codewords. + + The codewords. + Codewords. + Ec level. + Erasures. + + + + Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place. + + The errors. + data and error correction codewords. + positions of any known erasures. + number of error correction codewords that are available in codewords. + + + + Verifies that all is well with the the codeword array. + + Codewords. + Number EC codewords. + + + + Gets the bit count for codeword. + + The bit count for codeword. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Module bit count. + + + + Returns a that represents the jagged array. + + A that represents the jagged array. + Barcode matrix as a jagged array. + + + +

Encapsulates logic that can detect a PDF417 Code in an image, even if the + PDF417 Code is rotated or skewed, or partially obscured.

+ + SITA Lab (kevin.osullivan@sita.aero) + dswitkin@google.com (Daniel Switkin) + Guenther Grau +
+
+ + + B S B S B S B S Bar/Space pattern + 11111111 0 1 0 1 0 1 000. + + + + + 1111111 0 1 000 1 0 1 00 1 + + + + + if we set the value too low, then we don't detect the correct height of the bar if the start patterns are damaged. + if we set the value too high, then we might detect the start pattern from a neighbor barcode. + + + + + A PDF471 barcode should have at least 3 rows, with each row being >= 3 times the module width. Therefore it should be at least + 9 pixels tall. To be conservative, we use about half the size to ensure we don't miss it. + + + + +

Detects a PDF417 Code in an image. Only checks 0 and 180 degree rotations.

+
+ barcode image to decode + optional hints to detector + if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned + + encapsulating results of detecting a PDF417 code + +
+ + + Detects PDF417 codes in an image. Only checks 0 degree rotation (so rotate the matrix and check again outside of this method) + + multiple if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned. + bit matrix to detect barcodes in. + List of ResultPoint arrays containing the coordinates of found barcodes + + + + Locate the vertices and the codewords area of a black blob using the Start and Stop patterns as locators. + + Matrix. + Start row. + Start column. + an array containing the vertices: + vertices[0] x, y top left barcode + vertices[1] x, y bottom left barcode + vertices[2] x, y top right barcode + vertices[3] x, y bottom right barcode + vertices[4] x, y top left codeword area + vertices[5] x, y bottom left codeword area + vertices[6] x, y top right codeword area + vertices[7] x, y bottom right codeword area + + + + + Copies the temp data to the final result + + Result. + Temp result. + Destination indexes. + + + + Finds the rows with the given pattern. + + The rows with pattern. + Matrix. + Height. + Width. + Start row. + Start column. + Pattern. + + + + Finds the guard pattern. Uses System.Linq.Enumerable.Repeat to fill in counters. This might be a performance issue? + + start/end horizontal offset of guard pattern, as an array of two ints. + matrix row of black/white values to search + column x position to start search. + row y position to start search. + width the number of pixels to search on this row. + If set to true search the white patterns first. + pattern of counts of number of black and white pixels that are being searched for as a pattern. + counters array of counters, as long as pattern, to re-use . + + + + Determines how closely a set of observed counts of runs of black/white. + values matches a given target pattern. This is reported as the ratio of + the total variance from the expected pattern proportions across all + pattern elements, to the length of the pattern. + + + ratio of total variance between counters and pattern compared to + total pattern size, where the ratio has been multiplied by 256. + So, 0 means no variance (perfect match); 256 means the total + variance between counters and patterns equals the pattern length, + higher values mean even more variance + + observed counters. + expected pattern. + The most any counter can differ before we give up. + + + + PDF 417 Detector Result class. Skipped private backing stores. + Guenther Grau + + + + + Initializes a new instance of the class. + + Bits. + Points. + + + + defines the level of the error correction / count of error correction codewords + + + + + Holds all of the information for a barcode in a format where it can be easily accessible + + Jacob Haynes + + + + + the height of the matrix (Rows) + the width of the matrix (Cols) + + + + + Jacob Haynes + + + + + Creates a Barcode row of the width + + The width. + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + A boolean which is true if the bar black false if it is white + How many spots wide the bar is. + + + + + This function scales the row + + How much you want the image to be scaled, must be greater than or equal to 1. + the scaled row + + + + + Represents possible PDF417 barcode compaction types. + + + + + + + + + + + + + + + + + + + + + + + + + Data object to specify the minimum and maximum number of rows and columns for a PDF417 barcode. + @author qwandor@google.com (Andrew Walbran) + + + + + Initializes a new instance of the class. + + The min cols. + The max cols. + The min rows. + The max rows. + + + + Gets the min cols. + + + + + Gets the max cols. + + + + + Gets the min rows. + + + + + Gets the max rows. + + + + + Top-level class for the logic part of the PDF417 implementation. + + + + + The start pattern (17 bits) + + + + + The stop pattern (18 bits) + + + + + The codeword table from the Annex A of ISO/IEC 15438:2001(E). + + + + + Calculates the necessary number of rows as described in annex Q of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol (r) + + + + Calculates the number of pad codewords as described in 4.9.2 of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol + the number of pad codewords + + + + Generates the barcode logic. + + the message to encode + PDF417 error correction level to use + + + + Determine optimal nr of columns and rows for the specified number of + codewords. + + number of code words + number of error correction code words + The longest dimension of the barcode, used for columns + The short dimension of the barcode, used for rows + The height of a row, will alter this parameter if aspectRatio>4 (aspectRatio==AUTO) + dimension object containing cols as width and rows as height + + + + Sets max/min row/col values + + maximum allowed columns + minimum allowed columns + maximum allowed rows + minimum allowed rows + + + + Sets compaction to values stored in enum + + compaction mode to use + + + + Sets compact to be true or false + + if true, enables compaction + + + + Sets output encoding. + + sets character encoding to use + + + + Sets the disable eci. + + if set to true don't add an ECI segment for different encodings than default. + + + + PDF417 error correction code following the algorithm described in ISO/IEC 15438:2001(E) in + chapter 4.10. + + + + + Tables of coefficients for calculating error correction words + (see annex F, ISO/IEC 15438:2001(E)) + + + + + Determines the number of error correction codewords for a specified error correction + level. + + the error correction level (0-8) + the number of codewords generated for error correction + + + + Determines the error correction level for AUTO + + The error correction level (0-9) + The number of codewords for AUTO errorCorrectionLevel + the number of codewords generated for error correction + + + + Returns the recommended minimum error correction level as described in annex E of + ISO/IEC 15438:2001(E). + + the number of data codewords + the recommended minimum error correction level + + + + Generates the error correction codewords according to 4.10 in ISO/IEC 15438:2001(E). + + the data codewords + the error correction level (0-8) + the String representing the error correction codewords + + + + defines the level of the error correction / count of error correction codewords + + + + + PDF417 high-level encoder following the algorithm described in ISO/IEC 15438:2001(E) in + annex P. + + + + + code for Text compaction + + + + + code for Byte compaction + + + + + code for Numeric compaction + + + + + Text compaction submode Alpha + + + + + Text compaction submode Lower + + + + + Text compaction submode Mixed + + + + + Text compaction submode Punctuation + + + + + mode latch to Text Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters NOT a multiple of 6) + + + + + mode latch to Numeric Compaction mode + + + + + mode shift to Byte Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters a multiple of 6) + + + + + identifier for a user defined Extended Channel Interpretation (ECI) + + + + + identifier for a general purpose ECO format + + + + + identifier for an ECI of a character set of code page + + + + + Raw code table for text compaction Mixed sub-mode + + + + + Raw code table for text compaction: Punctuation sub-mode + + + + + Performs high-level encoding of a PDF417 message using the algorithm described in annex P + of ISO/IEC 15438:2001(E). If byte compaction has been selected, then only byte compaction + is used. + + the message + compaction mode to use + character encoding used to encode in default or byte compaction + or null for default / not applicable + if true, don't add an ECI segment for different encodings than default + the encoded message (the char values range from 0 to 928) + + + + Encode parts of the message using Text Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.2. + + the message + the start position within the message + the number of characters to encode + receives the encoded codewords + should normally be SUBMODE_ALPHA + the text submode in which this method ends + + + + + Encode parts of the message using Byte Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.3. The Unicode characters will be converted to binary using the cp437 + codepage. + + the message converted to a byte array + the start position within the message + the number of bytes to encode + the mode from which this method starts + receives the encoded codewords + + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using text compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using binary compaction. + + the message + the message converted to a byte array + the start position within the message + + the requested character count + + + + The class holds the available options for the + + + + + Specifies whether to use compact mode for PDF417 (type ). + + + + + Specifies what compaction mode to use for PDF417 (type + ). + + + + + Specifies the minimum and maximum number of rows and columns for PDF417 (type + ). + + + + + Specifies what degree of error correction to use + + + + + Specifies what degree of error correction to use + + + + + Specifies what character encoding to use where applicable (type {@link String}) + + + + + Explicitly disables ECI segment when generating PDF417 Code + That is against the specification but some + readers have problems if the charset is switched from + CP437 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use different encodings + and the ECI segment is omitted. + + + + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Maximum Codewords (Data + Error). + + + + + Gets the bit count sum. + + The bit count sum. + Module bit count. + + + + Converts an ICollection<int> to an int[] + Carry-over from Java. Will likely remove and replace with the Generic .ToArray() method. + + The int array. + List. + + + + Translate the symbol into a codeword + + the codeword corresponding to the symbol. + encoded symbol to translate to a codeword + + + + The sorted table of all possible symbols. Extracted from the PDF417 + specification. The index of a symbol in this table corresponds to the + index into the codeword table. + + + + + This table contains to codewords for all symbols. + + + + + This implementation can detect and decode PDF417 codes in an image. + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Locates and decodes a PDF417 code in an image. + + a String representing the content encoded by the PDF417 code + if a PDF417 cannot be decoded + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + **Note** this will return the FIRST barcode discovered if there are many. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Locates and decodes Multiple PDF417 codes in an image. + + an array of Strings representing the content encoded by the PDF417 codes + + + + + Locates and decodes multiple barcodes in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcodes encode + + + + + Decode the specified image, with the hints and optionally multiple barcodes. + Based on Owen's Comments in , this method has been modified to continue silently + if a barcode was not decoded where it was detected instead of throwing a new exception object. + + Image. + Hints. + If set to true multiple. + + + + Gets the maximum width of the barcode + + The max width. + P1. + P2. + + + + Gets the minimum width of the barcode + + The minimum width. + P1. + P2. + + + + Gets the maximum width of the codeword. + + The max codeword width. + P. + + + + Gets the minimum width of the codeword. + + The minimum codeword width. + P. + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + PDF 417 result meta data. + Guenther Grau + + + + + The Segment ID represents the segment of the whole file distributed over different symbols. + + + + + Is the same for each related PDF417 symbol + + + + + always null + + + + + true if it is the last segment + + + + + count of segments, -1 if not set + + + + + Filename of the encoded file + + + + + filesize in bytes of the encoded file + returns filesize in bytes, -1 if not set + + + + + 16-bit CRC checksum using CCITT-16 + returns crc checksum, -1 if not set + + + + + unix epock timestamp, elapsed seconds since 1970-01-01 + returns elapsed seconds, -1 if not set + + + + + Jacob Haynes + qwandor@google.com (Andrew Walbran) + + + + + default white space (margin) around the code + + + + + default error correction level + + + + + default aspect ratio + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The height of a row in the barcode + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Takes encoder, accounts for width/height, and retrieves bit matrix + + + + + This takes an array holding the values of the PDF 417 + + a byte array of information with 0 is black, and 1 is white + border around the barcode + BitMatrix of the input + + + + Takes and rotates the it 90 degrees + + + + + This object extends LuminanceSource around an array of YUV data returned from the camera driver, + with the option to crop to a rectangle within the full data. This can be used to exclude + superfluous pixels around the perimeter and speed up decoding. + It works for any pixel format where the Y channel is planar and appears first, including + YCbCr_420_SP and YCbCr_422_SP. + @author dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The yuv data. + Width of the data. + Height of the data. + The left. + The top. + The width. + The height. + if set to true [reverse horiz]. + + + + Initializes a new instance of the class. + + The luminances. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + + + + + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Renders the cropped greyscale bitmap. + + + + + + width of image from {@link #renderThumbnail()} + + + + + height of image from {@link #renderThumbnail()} + + + + + creates a new instance + + + + + + + + Sean Owen + + + {@link BitMatrix} to parse + ReaderException if dimension is not >= 21 and 1 mod 4 + + +

Reads format information from one of its two locations within the QR Code.

+ +
+ {@link FormatInformation} encapsulating the QR Code's format info + + ReaderException if both format information locations cannot be parsed as + the valid encoding of format information + +
+ +

Reads version information from one of its two locations within the QR Code.

+ +
+ {@link Version} encapsulating the QR Code's version + + ReaderException if both version information locations cannot be parsed as + the valid encoding of version information + +
+ +

Reads the bits in the {@link BitMatrix} representing the finder pattern in the + correct order in order to reconstruct the codewords bytes contained within the + QR Code.

+ +
+ bytes encoded within the QR Code + + ReaderException if the exact number of bytes expected is not read +
+ + Revert the mask removal done while reading the code words. The bit matrix should revert to its original state. + + + Prepare the parser for a mirrored operation. + This flag has effect only on the {@link #readFormatInformation()} and the + {@link #readVersion()}. Before proceeding with {@link #readCodewords()} the + {@link #mirror()} method should be called. + + @param mirror Whether to read version and format information mirrored. + + + Mirror the bit matrix in order to attempt a second reading. + + +

Encapsulates a block of data within a QR Code. QR Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

When QR Codes use multiple data blocks, they are actually interleaved. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ +
+ bytes as read directly from the QR Code + + version of the QR Code + + error-correction level of the QR Code + + {@link DataBlock}s containing original bytes, "de-interleaved" from representation in the + QR Code + +
+ +

Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations + of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix, + including areas used for finder patterns, timing patterns, etc. These areas should be unused + after the point they are unmasked anyway.

+ +

Note that the diagram in section 6.8.1 is misleading since it indicates that i is column position + and j is row position. In fact, as the text says, i is row position and j is column position.

+ +
+ Sean Owen +
+ + See ISO 18004:2006 6.8.1 + + +

Implementations of this method reverse the data masking process applied to a QR Code and + make its bits ready to read.

+
+ + representation of QR Code bits + dimension of QR Code, represented by bits, being unmasked +
+ +

QR Codes can encode text as bits in one of several modes, and can use multiple modes + in one QR Code. This class decodes the bits back into text.

+ +

See ISO 18004:2006, 6.4.3 - 6.4.7

+ Sean Owen +
+
+ + + See ISO 18004:2006, 6.4.4 Table 5 + + + + + See specification GBT 18284-2000 + + The bits. + The result. + The count. + + + + +

The main class which implements QR Code decoding -- as opposed to locating and extracting + the QR Code from an image.

+
+ + Sean Owen + +
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a QR Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Decodes a QR Code represented as a {@link BitMatrix}. A 1 or "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+
+ data and error correction codewords + number of codewords that are data bytes + +
+ + +

See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels + defined by the QR code standard.

+
+ Sean Owen +
+ + L = ~7% correction + + + M = ~15% correction + + + Q = ~25% correction + + + H = ~30% correction + + + + Gets the bits. + + + + + Gets the name. + + + + + Ordinals this instance. + + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Fors the bits. + + int containing the two bits encoding a QR Code's error correction level + + representing the encoded error correction level + + + +

Encapsulates a QR Code's format information, including the data mask used and + error correction level.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + +
+ + See ISO 18004:2006, Annex C, Table C.1 + + + Offset i holds the number of 1 bits in the binary representation of i + + + + Decodes the format information. + + format info indicator, with mask still applied + The masked format info2. + + information about the format it specifies, or null + if doesn't seem to match any known pattern + + + + +

See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which + data can be encoded to bits in the QR code standard.

+
+ Sean Owen +
+ + + Gets the name. + + + + + enumeration for encoding modes + + + + + + + + + + numeric encoding + + + + + alpha-numeric encoding + + + + + structured append + + + + + byte mode encoding + + + + + ECI segment + + + + + Kanji mode + + + + + FNC1 char, first position + + + + + FNC1 char, second position + + + + + Hanzi mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See GBT 18284-2000; "Hanzi" is a transliteration of this mode name. + + + + Fors the bits. + + four bits encoding a QR Code data mode + + encoded by these bits + + if bits do not correspond to a known mode + + + version in question + + number of bits used, in this QR Code symbol {@link Version}, to encode the + count of characters that will follow encoded in this {@link Mode} + + + + + Gets the bits. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Meta-data container for QR Code decoding. Instances of this class may be used to convey information back to the + decoding caller. Callers are expected to process this. + + + + + Initializes a new instance of the class. + + if set to true [mirrored]. + + + + true if the QR Code was mirrored. + + + + + Apply the result points' order correction due to mirroring. + + Array of points to apply mirror correction to. + + + + See ISO 18004:2006 Annex D + + Sean Owen + + + See ISO 18004:2006 Annex D. + Element i represents the raw version bits that specify version i + 7 + + + + + Gets the version number. + + + + + Gets the alignment pattern centers. + + + + + Gets the total codewords. + + + + + Gets the dimension for version. + + + + + Gets the EC blocks for level. + + The ec level. + + + +

Deduces version information purely from QR Code dimensions.

+ +
+ dimension in modules + + for a QR Code of that dimension or null +
+ + + Gets the version for number. + + The version number. + + + + See ISO 18004:2006 Annex E + + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + + Gets the EC codewords per block. + + + + + Gets the num blocks. + + + + + Gets the total EC codewords. + + + + + Gets the EC blocks. + + + + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the QR code version's format.

+
+
+ + + Gets the count. + + + + + Gets the data codewords. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + See ISO 18004:2006 6.5.1 Table 9 + + +

Encapsulates an alignment pattern, which are the smaller square patterns found in + all but the simplest QR Codes.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Determines if this alignment pattern "about equals" an alignment pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing an average of the two. + + The i. + The j. + New size of the module. + + + +

This class attempts to find alignment patterns in a QR Code. Alignment patterns look like finder + patterns but are smaller and appear at regular intervals throughout the image.

+ +

At the moment this only looks for the bottom-right alignment pattern.

+ +

This is mostly a simplified copy of {@link FinderPatternFinder}. It is copied, + pasted and stripped down here for maximum performance but does unfortunately duplicate + some code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Creates a finder that will look in a portion of the whole image.

+ +
+ image to search + + left column from which to start searching + + top row from which to start searching + + width of region to search + + height of region to search + + estimated module size so far + + callback function which is called, when a result point is found +
+ +

This method attempts to find the bottom-right alignment pattern in the image. It is a bit messy since + it's pretty performance-critical and so is written to be fast foremost.

+ +
+ if found +
+ + Given a count of black/white/black pixels just seen and an end position, + figures the location of the center of this black/white/black run. + + + + count of black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/1 ratios + used by alignment patterns to be considered a match + + + + +

After a horizontal scan finds a potential alignment pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + alignment pattern to see if the same proportion is detected.

+
+ row where an alignment pattern was detected + center of the section that appears to cross an alignment pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of alignment pattern, or null if not found + +
+ +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will see if this pattern had been + found on a previous horizontal scan. If so, we consider it confirmed and conclude we have + found the alignment pattern.

+ +
+ reading state module counts from horizontal scan + + row where alignment pattern may be found + + end of possible alignment pattern in row + + {@link AlignmentPattern} if we have found the same pattern twice, or null if not + +
+ + +

Encapsulates logic that can detect a QR Code in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + + Gets the image. + + + + + Gets the result point callback. + + + + +

Detects a QR Code in an image.

+
+ + encapsulating results of detecting a QR Code + +
+ + +

Detects a QR Code in an image.

+
+ optional hints to detector + + encapsulating results of detecting a QR Code + +
+ + + Processes the finder pattern info. + + The info. + + + +

Computes the dimension (number of modules on a size) of the QR Code based on the position + of the finder patterns and estimated module size.

+
+
+ + +

Computes an average estimated module size based on estimated derived from the positions + of the three finder patterns.

+
+ detected top-left finder pattern center + detected top-right finder pattern center + detected bottom-left finder pattern center + estimated module size +
+ +

Estimates module size based on two finder patterns -- it uses + {@link #sizeOfBlackWhiteBlackRunBothWays(int, int, int, int)} to figure the + width of each, measuring along the axis between their centers.

+
+
+ + See {@link #sizeOfBlackWhiteBlackRun(int, int, int, int)}; computes the total width of + a finder pattern by looking for a black-white-black run from the center in the direction + of another point (another finder pattern center), and in the opposite direction too. + + + +

This method traces a line from a point in the image, in the direction towards another point. + It begins in a black region, and keeps going until it finds white, then black, then white again. + It reports the distance from the start to this point.

+ +

This is used when figuring out how wide a finder pattern is, when the finder pattern + may be skewed or rotated.

+
+
+ + +

Attempts to locate an alignment pattern in a limited region of the image, which is + guessed to contain it. This method uses {@link AlignmentPattern}.

+
+ estimated module size so far + x coordinate of center of area probably containing alignment pattern + y coordinate of above + number of pixels in all directions to search from the center + + if found, or null otherwise + +
+ + +

Encapsulates a finder pattern, which are the three square patterns found in + the corners of QR Codes. It also encapsulates a count of similar finder patterns, + as a convenience to the finder's bookkeeping.

+
+ Sean Owen +
+ + + Gets the size of the estimated module. + + + The size of the estimated module. + + + +

Determines if this finder pattern "about equals" a finder pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing a weighted average + based on count. + + The i. + The j. + New size of the module. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+
+ Sean Owen +
+ + + 1 pixel/module times 3 modules/center + + + + + support up to version 20 for mobile clients + + + + +

Creates a finder that will search the image for three finder patterns.

+
+ image to search +
+ + + Initializes a new instance of the class. + + The image. + The result point callback. + + + + Gets the image. + + + + + Gets the possible centers. + + + + Given a count of black/white/black/white/black pixels just seen and an end position, + figures the location of the center of this run. + + + + count of black/white/black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/3/1/1 ratios + used by finder patterns to be considered a match + + + + + + count of black/white/black/white/black pixels just read + true if the proportions of the counts is close enough to the 1/1/3/1/1 ratios + by finder patterns to be considered a match + + + + After a vertical and horizontal scan finds a potential finder pattern, this method + "cross-cross-cross-checks" by scanning down diagonally through the center of the possible + finder pattern to see if the same proportion is detected. + @param maxCount maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + @param originalStateCountTotal The original state count total. + + row where a finder pattern was detected + center of the section that appears to cross a finder pattern + true if proportions are withing expected limits + + + +

After a horizontal scan finds a potential finder pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + finder pattern to see if the same proportion is detected.

+
+ row where a finder pattern was detected + center of the section that appears to cross a finder pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of finder pattern, or null if not found + +
+ +

Like {@link #crossCheckVertical(int, int, int, int)}, and in fact is basically identical, + except it reads horizontally instead of vertically. This is used to cross-cross + check a vertical cross check and locate the real center of the alignment pattern.

+
+
+ + + @see #handlePossibleCenter(int[], int, int) + + reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + ignored + true if a finder pattern candidate was found this time + + + +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will, ah, cross-cross-check + with another horizontal scan. This is needed primarily to locate the real horizontal + center of the pattern in cases of extreme skew. + And then we cross-cross-cross check with another diagonal scan.

+ If that succeeds the finder pattern location is added to a list that tracks + the number of times each location has been nearly-matched as a finder pattern. + Each additional find is more evidence that the location is in fact a finder + pattern center +
+ reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + + true if a finder pattern candidate was found this time + +
+ + number of rows we could safely skip during scanning, based on the first + two finder patterns that have been located. In some cases their position will + allow us to infer that the third pattern must lie below a certain point farther + down in the image. + + + + true iff we have found at least 3 finder patterns that have been detected + at least {@link #CENTER_QUORUM} times each, and, the estimated module size of the + candidates is "pretty similar" + + + + the 3 best {@link FinderPattern}s from our list of candidates. The "best" are + those that have been detected at least {@link #CENTER_QUORUM} times, and whose module + size differs from the average among those patterns the least + + + + + Orders by furthest from average + + + +

Orders by {@link FinderPattern#getCount()}, descending.

+
+ + +

Encapsulates information about finder patterns in an image, including the location of + the three finder patterns, and their estimated module size.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The pattern centers. + + + + Gets the bottom left. + + + + + Gets the top left. + + + + + Gets the top right. + + + + + JAVAPORT: The original code was a 2D array of ints, but since it only ever gets assigned + 0, 1 and 2 I'm going to use less memory and go with bytes. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Gets the height. + + + + + Gets the width. + + + + + Gets or sets the with the specified x. + + + + + an internal representation as bytes, in row-major order. array[y][x] represents point (x,y) + + + + + Sets the specified x. + + The x. + The y. + The value. + + + + Sets the specified x. + + The x. + The y. + if set to true [value]. + + + + Clears the specified value. + + The value. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + Encode "bytes" with the error correction level "ecLevel". The encoding mode will be chosen + internally by chooseMode(). On success, store the result in "qrCode". + We recommend you to use QRCode.EC_LEVEL_L (the lowest level) for + "getECLevel" since our primary use is to show QR code on desktop screens. We don't need very + strong error correction for this purpose. + Note that there is no way to encode bytes in MODE_KANJI. We might want to add EncodeWithMode() + with which clients can specify the encoding mode. For now, we don't need the functionality. + + text to encode + error correction level to use + representing the encoded QR code + + + + Encodes the specified content. + + The content. + The ec level. + The hints. + + + + + Decides the smallest version of QR code that will contain all of the provided data. + + if the data cannot fit in any version + + + + Gets the alphanumeric code. + + The code. + the code point of the table used in alphanumeric mode or + -1 if there is no corresponding code in the table. + + + + Chooses the mode. + + The content. + + + + + Choose the best mode by examining the content. Note that 'encoding' is used as a hint; + if it is Shift_JIS, and the input is only double-byte Kanji, then we return {@link Mode#KANJI}. + + The content. + The encoding. + + + + + true if the number of input bits will fit in a code with the specified version and error correction level. + + + + Terminate bits as described in 8.4.8 and 8.4.9 of JISX0510:2004 (p.24). + + The num data bytes. + The bits. + + + + Get number of data bytes and number of error correction bytes for block id "blockID". Store + the result in "numDataBytesInBlock", and "numECBytesInBlock". See table 12 in 8.5.1 of + JISX0510:2004 (p.30) + + The num total bytes. + The num data bytes. + The num RS blocks. + The block ID. + The num data bytes in block. + The num EC bytes in block. + + + + Interleave "bits" with corresponding error correction bytes. On success, store the result in + "result". The interleave rule is complicated. See 8.6 of JISX0510:2004 (p.37) for details. + + The bits. + The num total bytes. + The num data bytes. + The num RS blocks. + + + + + Append mode info. On success, store the result in "bits". + + The mode. + The bits. + + + + Append length info. On success, store the result in "bits". + + The num letters. + The version. + The mode. + The bits. + + + + Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits". + + The content. + The mode. + The bits. + The encoding. + + + + + + Satoru Takabayashi + Daniel Switkin + Sean Owen + + + + Apply mask penalty rule 1 and return the penalty. Find repetitive cells with the same color and + give penalty to them. Example: 00000 or 11111. + + The matrix. + + + + + Apply mask penalty rule 2 and return the penalty. Find 2x2 blocks with the same color and give + penalty to them. This is actually equivalent to the spec's rule, which is to find MxN blocks and give a + penalty proportional to (M-1)x(N-1), because this is the number of 2x2 blocks inside such a block. + + The matrix. + + + + + Apply mask penalty rule 3 and return the penalty. Find consecutive cells of 00001011101 or + 10111010000, and give penalty to them. If we find patterns like 000010111010000, we give + penalties twice (i.e. 40 * 2). + + The matrix. + + + + + Apply mask penalty rule 4 and return the penalty. Calculate the ratio of dark cells and give + penalty if the ratio is far from 50%. It gives 10 penalty for 5% distance. + + The matrix. + + + + + Return the mask bit for "getMaskPattern" at "x" and "y". See 8.8 of JISX0510:2004 for mask + pattern conditions. + + The mask pattern. + The x. + The y. + + + + + Helper function for applyMaskPenaltyRule1. We need this for doing this calculation in both + vertical and horizontal orders respectively. + + The matrix. + if set to true [is horizontal]. + + + + + + + + satorux@google.com (Satoru Takabayashi) - creator + + + + + Set all cells to 2. 2 means that the cell is empty (not set yet). + + JAVAPORT: We shouldn't need to do this at all. The code should be rewritten to begin encoding + with the ByteMatrix initialized all to zero. + + The matrix. + + + + Build 2D matrix of QR Code from "dataBits" with "ecLevel", "version" and "getMaskPattern". On + success, store the result in "matrix" and return true. + + The data bits. + The ec level. + The version. + The mask pattern. + The matrix. + + + + Embed basic patterns. On success, modify the matrix and return true. + The basic patterns are: + - Position detection patterns + - Timing patterns + - Dark dot at the left bottom corner + - Position adjustment patterns, if need be + + The version. + The matrix. + + + + Embed type information. On success, modify the matrix. + + The ec level. + The mask pattern. + The matrix. + + + + Embed version information if need be. On success, modify the matrix and return true. + See 8.10 of JISX0510:2004 (p.47) for how to embed version information. + + The version. + The matrix. + + + + Embed "dataBits" using "getMaskPattern". On success, modify the matrix and return true. + For debugging purposes, it skips masking process if "getMaskPattern" is -1. + See 8.7 of JISX0510:2004 (p.38) for how to embed data bits. + + The data bits. + The mask pattern. + The matrix. + + + + Return the position of the most significant bit set (to one) in the "value". The most + significant bit is position 32. If there is no bit set, return 0. Examples: + - findMSBSet(0) => 0 + - findMSBSet(1) => 1 + - findMSBSet(255) => 8 + + The value_ renamed. + + + + + Calculate BCH (Bose-Chaudhuri-Hocquenghem) code for "value" using polynomial "poly". The BCH + code is used for encoding type information and version information. + Example: Calculation of version information of 7. + f(x) is created from 7. + - 7 = 000111 in 6 bits + - f(x) = x^2 + x^2 + x^1 + g(x) is given by the standard (p. 67) + - g(x) = x^12 + x^11 + x^10 + x^9 + x^8 + x^5 + x^2 + 1 + Multiply f(x) by x^(18 - 6) + - f'(x) = f(x) * x^(18 - 6) + - f'(x) = x^14 + x^13 + x^12 + Calculate the remainder of f'(x) / g(x) + x^2 + __________________________________________________ + g(x) )x^14 + x^13 + x^12 + x^14 + x^13 + x^12 + x^11 + x^10 + x^7 + x^4 + x^2 + -------------------------------------------------- + x^11 + x^10 + x^7 + x^4 + x^2 + + The remainder is x^11 + x^10 + x^7 + x^4 + x^2 + Encode it in binary: 110010010100 + The return value is 0xc94 (1100 1001 0100) + + Since all coefficients in the polynomials are 1 or 0, we can do the calculation by bit + operations. We don't care if coefficients are positive or negative. + + The value. + The poly. + + + + + Make bit vector of type information. On success, store the result in "bits" and return true. + Encode error correction level and mask pattern. See 8.9 of + JISX0510:2004 (p.45) for details. + + The ec level. + The mask pattern. + The bits. + + + + Make bit vector of version information. On success, store the result in "bits" and return true. + See 8.10 of JISX0510:2004 (p.45) for details. + + The version. + The bits. + + + + Check if "value" is empty. + + The value. + + true if the specified value is empty; otherwise, false. + + + + + Embed the lonely dark dot at left bottom corner. JISX0510:2004 (p.46) + + The matrix. + + + + + + The x start. + The y start. + The matrix. + + + + Embed position detection patterns and surrounding vertical/horizontal separators. + + The matrix. + + + + Embed position adjustment patterns if need be. + + The version. + The matrix. + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + + + + + + Initializes a new instance of the class. + + + + + Gets or sets the mode. + + + The mode. + + + + + Gets or sets the EC level. + + + The EC level. + + + + + Gets or sets the version. + + + The version. + + + + + Gets or sets the mask pattern. + + + The mask pattern. + + + + + Gets or sets the matrix. + + + The matrix. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Check if "mask_pattern" is valid. + + The mask pattern. + + true if [is valid mask pattern] [the specified mask pattern]; otherwise, false. + + + + + The class holds the available options for the QrCodeWriter + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + . + + + + + Specifies what character encoding to use where applicable (type ) + + + + + Explicitly disables ECI segment when generating QR Code + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + + + + + Specifies the exact version of QR code to be encoded. An integer, range 1 to 40. If the data specified + cannot fit within the required version, a WriterException will be thrown. + + + + + This implementation can detect and decode QR Codes in an image. + Sean Owen + + + + + Gets the decoder. + + + + + + Locates and decodes a QR code in an image. + + a String representing the content encoded by the QR code + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a QR Code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Implementations of this interface can decode an image of a barcode in some format into + the String it encodes. For example, can + decode a QR code. The decoder may optionally receive hints from the caller which may help + it decode more quickly or accurately. + + See , which attempts to determine what barcode + format is present within the image as well, and then decodes it accordingly. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + String which the barcode encodes + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + The general exception class throw when something goes wrong during decoding of a barcode. + This includes, but is not limited to, failing checksums / error correction algorithms, being + unable to locate finder timing patterns, and so on. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class. + + The inner exception. + + + + Initializes a new instance of the class. + + The inner exception. + + + + + Renders a to a image + + + + + Gets or sets the foreground color. + + The foreground color. + + + + Gets or sets the background color. + + The background color. + + + + Gets or sets the resolution which should be used to create the bitmap + If nothing is set the current system settings are used + + + + + Gets or sets the resolution which should be used to create the bitmap + If nothing is set the current system settings are used + + + + + Gets or sets the text font. + + + The text font. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Interface for a class to convert a BitMatrix to an output image format + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + The options. + + + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + + + converts the pixel data to a bitmap object + + + + + + the generated code as byte array of BGRA pixels + + + + + the width of the image + + + + + the height of the image + + + + + Renders a to an byte array with pixel data (4 byte per pixel, BGRA) + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Renders a barcode into a Svg image + + + + + Gets or sets the foreground color. + + The foreground color. + + + + Gets or sets the background color. + + The background color. + + + + Gets or sets the font family name + + The font family name. + + + + Gets or sets the font size in pixel + + The font size in pixel. + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Represents a barcode as a Svg image + + + + + Gets or sets the content. + + + The content. + + + + + The original height of the bitmatrix for the barcode + + + + + The original width of the bitmatrix for the barcode + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The content. + + + + Gives the XML representation of the SVG image + + + + + Encapsulates the result of decoding a barcode within an image. + + + + raw text encoded by the barcode, if applicable, otherwise null + + + raw bytes encoded by the barcode, if applicable, otherwise null + + + + points related to the barcode in the image. These are typically points + identifying finder patterns or the corners of the barcode. The exact meaning is + specific to the type of barcode that was decoded. + + + + {@link BarcodeFormat} representing the format of the barcode that was decoded + + + + {@link Hashtable} mapping {@link ResultMetadataType} keys to values. May be + null. This contains optional metadata about what was detected about the barcode, + like orientation. + + + + + Gets the timestamp. + + + + + how many bits of are valid; typically 8 times its length + + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + The timestamp. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + The timestamp. + + + + Adds one metadata to the result + + The type. + The value. + + + + Adds a list of metadata to the result + + The metadata. + + + + Adds the result points. + + The new points. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Represents some type of metadata about the result of the decoding that the decoder + wishes to communicate back to the caller. + + Sean Owen + + + + Unspecified, application-specific metadata. Maps to an unspecified {@link Object}. + + + + + Denotes the likely approximate orientation of the barcode in the image. This value + is given as degrees rotated clockwise from the normal, upright orientation. + For example a 1D barcode which was found by reading top-to-bottom would be + said to have orientation "90". This key maps to an {@link Integer} whose + value is in the range [0,360). + + + + +

2D barcode formats typically encode text, but allow for a sort of 'byte mode' + which is sometimes used to encode binary data. While {@link Result} makes available + the complete raw bytes in the barcode for these formats, it does not offer the bytes + from the byte segments alone.

+

This maps to a {@link java.util.List} of byte arrays corresponding to the + raw bytes in the byte segments in the barcode, in order.

+
+
+ + + Error correction level used, if applicable. The value type depends on the + format, but is typically a String. + + + + + For some periodicals, indicates the issue number as an {@link Integer}. + + + + + For some products, indicates the suggested retail price in the barcode as a + formatted {@link String}. + + + + + For some products, the possible country of manufacture as a {@link String} denoting the + ISO country code. Some map to multiple possible countries, like "US/CA". + + + + + For some products, the extension text + + + + + If the code format supports structured append and + the current scanned code is part of one then the + sequence number is given with it. + + + + + If the code format supports structured append and + the current scanned code is part of one then the + parity is given with it. + + + + + PDF417-specific metadata + + + + + Aztec-specific metadata + + + + + Encapsulates a point of interest in an image containing a barcode. Typically, this + would be the location of a finder pattern or the corner of the barcode, for example. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The x. + The y. + + + + Gets the X. + + + + + Gets the Y. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC and + BC is less than AC and the angle between BC and BA is less than 180 degrees. + + array of three to order + + + + calculates the distance between two points + + first pattern + second pattern + + distance between two points + + + + + Returns the z component of the cross product between vectors BC and BA. + + + + Callback which is invoked when a possible result point (significant + point in the barcode image such as a corner) is found. + + + + + + + + Luminance source class which support different formats of images. + + + + + enumeration of supported bitmap format which the RGBLuminanceSource can process + + + + + format of the byte[] isn't known. RGBLuminanceSource tries to determine the best possible value + + + + + grayscale array, the byte array is a luminance array with 1 byte per pixel + + + + + grayscale array, the byte array is a luminance array with 2 bytes per pixel + + + + + 3 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels alpha, red, green and blue + + + + + 3 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green, red and alpha + + + + + 2 bytes per pixel, 5 bit red, 6 bits green and 5 bits blue + + + + + 4 bytes per pixel with the channels red, green, blue and alpha + + + + + 4 bytes for two pixels, UYVY formatted + + + + + 4 bytes for two pixels, YUYV formatted + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 1 byte per pixel (Gray8). + That means the whole array consists of the luminance values (grayscale). + + The luminance array. + The width. + The height. + if set to true [is8 bit]. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + The bitmap format. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + calculates the luminance values for the given byte array and bitmap format + + + + + + + Contains conversion support elements such as classes, interfaces and static methods. + + + + + Copies an array of chars obtained from a String into a specified array of chars + + The String to get the chars from + Position of the String to start getting the chars + Position of the String to end getting the chars + Array to return the chars + Position of the destination array of chars to start storing the chars + An array of chars + + + + Sets the capacity for the specified List + + The List which capacity will be set + The new capacity value + + + + Converts a string-Collection to an array + + The strings. + + + + + Joins all elements to one string. + + + The separator. + The values. + + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The value. + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The start index. + The end index. + The value. + + + + + + + + + + + + + + + + + + Savely gets the value of a decoding hint + if hints is null the default is returned + + + The hints. + Type of the hint. + The @default. + + + + The base class for all objects which encode/generate a barcode image. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + A base class which covers the range of exceptions which may occur when encoding a barcode using + the Writer framework. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner exc. + +
+
diff --git a/packages/ZXing.Net.0.16.4/lib/net45/zxing.dll b/packages/ZXing.Net.0.16.4/lib/net45/zxing.dll new file mode 100644 index 0000000..60e92af Binary files /dev/null and b/packages/ZXing.Net.0.16.4/lib/net45/zxing.dll differ diff --git a/packages/ZXing.Net.0.16.4/lib/net45/zxing.presentation.XML b/packages/ZXing.Net.0.16.4/lib/net45/zxing.presentation.XML new file mode 100644 index 0000000..a95132f --- /dev/null +++ b/packages/ZXing.Net.0.16.4/lib/net45/zxing.presentation.XML @@ -0,0 +1,195 @@ + + + + zxing.presentation + + + + + A smart class to decode the barcode inside a bitmap object which is derived from BitmapSource + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, default is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, default is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + The create RGB luminance source. + + + + A smart class to encode some content to a barcode image + + + + + Initializes a new instance of the class. + + + + + A smart class to encode some content to a barcode image into a geometry + Autor: Rob Fonseca-Ensor + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + + The bitmap. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + Renders a barcode into a geometry + Autor: Rob Fonseca-Ensor + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Renders a to a + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + + Gets or sets the font family. + + + The font family. + + + + + Gets or sets the size of the font. + + + The size of the font. + + + + + Gets or sets the font stretch. + + + The font stretch. + + + + + Gets or sets the font style. + + + The font style. + + + + + Gets or sets the font weight. + + + The font weight. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + diff --git a/packages/ZXing.Net.0.16.4/lib/net45/zxing.presentation.dll b/packages/ZXing.Net.0.16.4/lib/net45/zxing.presentation.dll new file mode 100644 index 0000000..4b21b29 Binary files /dev/null and b/packages/ZXing.Net.0.16.4/lib/net45/zxing.presentation.dll differ diff --git a/packages/ZXing.Net.0.16.4/lib/net461/zxing.XML b/packages/ZXing.Net.0.16.4/lib/net461/zxing.XML new file mode 100644 index 0000000..a28c9e9 --- /dev/null +++ b/packages/ZXing.Net.0.16.4/lib/net461/zxing.XML @@ -0,0 +1,10934 @@ + + + + zxing + + + + + Extends with more information specific to the Aztec format, + like the number of layers and whether it's compact. + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + Initializes a new instance of the class. + + The bits. + The points. + if set to true [compact]. + The nb datablocks. + The nb layers. + + + + The main class which implements Aztec Code decoding -- as opposed to locating and extracting + the Aztec Code from an image. + + David Olivier + + + + Decodes the specified detector result. + + The detector result. + + + + + This method is used for testing the high-level encoder + + + + + + + Gets the string encoded in the aztec code bits + + The corrected bits. + the decoded string + + + + gets the table corresponding to the char passed + + The t. + + + + + Gets the character (or string) corresponding to the passed code in the given table + + the table used + the code of the character + + + + + Performs RS error correction on an array of bits. + + The rawbits. + the corrected array + + + + Gets the array of bits from an Aztec Code matrix + + The matrix. + the array of bits + + + + Reads a code of given length and at given index in an array of bits + + The rawbits. + The start index. + The length. + + + + + Reads a code of length 8 in an array of bits, padding with zeros + + + + + + + + Packs a bit array into bytes, most significant bit first + + + + + + + Encapsulates logic that can detect an Aztec Code in an image, even if the Aztec Code + is rotated or skewed, or partially obscured. + + David Olivier + + + + Initializes a new instance of the class. + + The image. + + + + Detects an Aztec Code in an image. + + + + + Detects an Aztec Code in an image. + + if true, image is a mirror-image of original. + + encapsulating results of detecting an Aztec Code + + + + + Extracts the number of data layers and data blocks from the layer around the bull's eye + + bullEyeCornerPoints the array of bull's eye corners + + + + + Corrects the parameter bits using Reed-Solomon algorithm + + paremeter bits + compact true if this is a compact Aztec code + + + + + Finds the corners of a bull-eye centered on the passed point + This returns the centers of the diagonal points just outside the bull's eye + Returns [topRight, bottomRight, bottomLeft, topLeft] + + Center point + The corners of the bull-eye + + + + Finds a candidate center point of an Aztec code from an image + + the center point + + + + Gets the Aztec code corners from the bull's eye corners and the parameters. + + the array of bull's eye corners + the array of aztec code corners + + + + Creates a BitMatrix by sampling the provided image. + topLeft, topRight, bottomRight, and bottomLeft are the centers of the squares on the + diagonal just outside the bull's eye. + + The image. + The top left. + The bottom left. + The bottom right. + The top right. + + + + + Samples a line + + start point (inclusive) + end point (exclusive) + number of bits + the array of bits as an int (first bit is high-order bit of result) + + + + Determines whether [is white or black rectangle] [the specified p1]. + + The p1. + The p2. + The p3. + The p4. + true if the border of the rectangle passed in parameter is compound of white points only + or black points only + + + + Gets the color of a segment + + The p1. + The p2. + 1 if segment more than 90% black, -1 if segment is more than 90% white, 0 else + + + + Gets the coordinate of the first point with a different color in the given direction + + The init. + if set to true [color]. + The dx. + The dy. + + + + + Expand the square represented by the corner points by pushing out equally in all directions + + the corners of the square, which has the bull's eye at its center + the original length of the side of the square in the target bit matrix + the new length of the size of the square in the target bit matrix + the corners of the expanded square + + + + Aztec 2D code representation + + Rustam Abdullaev + + + + Compact or full symbol indicator + + + + + Size in pixels (width and height) + + + + + Number of levels + + + + + Number of data codewords + + + + + The symbol image + + + + + represents a token for a binary shift + + + + + initializing constructor + + + + + + + + appends the byte array to the BitArray + + + + + + + string representation + + + + + + Generates Aztec 2D barcodes. + + Rustam Abdullaev + + + + Encodes the given binary content as an Aztec symbol + + input data string + Aztec symbol matrix with metadata + + + + Encodes the given binary content as an Aztec symbol + + input data string + minimal percentage of error check words (According to ISO/IEC 24778:2008, + a minimum of 23% + 3 words is recommended) + if non-zero, a user-specified value for the number of layers + + Aztec symbol matrix with metadata + + + + + This produces nearly optimal encodings of text into the first-level of + encoding used by Aztec code. + It uses a dynamic algorithm. For each prefix of the string, it determines + a set of encodings that could lead to this prefix. We repeatedly add a + character and generate a new set of optimal encodings until we have read + through the entire input. + @author Frank Yellin + @author Rustam Abdullaev + + + + + + + + + + + Convert the text represented by this High Level Encoder into a BitArray. + + text represented by this encoder encoded as a + + + + State represents all information about a sequence necessary to generate the current output. + Note that a state is immutable. + + + + + Create a new state representing this state with a latch to a (not + necessary different) mode, and then a code. + + + + + Create a new state representing this state, with a temporary shift + to a different mode to output a single value. + + + + + Create a new state representing this state, but an additional character + output in Binary Shift mode. + + + + + Create the state identical to this one, but we are no longer in + Binary Shift mode. + + + + + Returns true if "this" state is better (or equal) to be in than "that" + state under all possible circumstances. + + + + + This implementation can detect and decode Aztec codes in an image. + + David Olivier + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + a String representing the content encoded by the Data Matrix code + + + + + Locates and decodes a Data Matrix code in an image. + + image of barcode to decode + passed as a {@link java.util.Hashtable} from {@link com.google.zxing.DecodeHintType} + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Aztec result meta data. + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + + + + + + + + + Renders an Aztec code as a + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + The class holds the available options for the + + + + + Representing the minimal percentage of error correction words. + Note: an Aztec symbol should have a minimum of 25% EC words. + + + + + Specifies the required number of layers for an Aztec code: + a negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + a positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + + + + + Enumerates barcode formats known to this package. + + Sean Owen + + + Aztec 2D barcode format. + + + CODABAR 1D format. + + + Code 39 1D format. + + + Code 93 1D format. + + + Code 128 1D format. + + + Data Matrix 2D barcode format. + + + EAN-8 1D format. + + + EAN-13 1D format. + + + ITF (Interleaved Two of Five) 1D format. + + + MaxiCode 2D barcode format. + + + PDF417 format. + + + QR Code 2D barcode format. + + + RSS 14 + + + RSS EXPANDED + + + UPC-A 1D format. + + + UPC-E 1D format. + + + UPC/EAN extension format. Not a stand-alone format. + + + MSI + + + Plessey + + + Intelligent Mail barcode + + + + UPC_A | UPC_E | EAN_13 | EAN_8 | CODABAR | CODE_39 | CODE_93 | CODE_128 | ITF | RSS_14 | RSS_EXPANDED + without MSI (to many false-positives) and IMB (not enough tested, and it looks more like a 2D) + + + + + A smart class to decode the barcode inside a bitmap object + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + A smart class to decode the barcode inside a bitmap object + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Constructor for additional image formats for one BarcodeReader class + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Optional: Gets or sets the function to create a luminance source object for a bitmap. + If null a platform specific default LuminanceSource is used + + + The function to create a luminance source object. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + A smart class to decode the barcode inside a bitmap object + + + + + represents the default function which is called to get a instance from a raw byte array + + + + + Gets or sets the options. + + + The options. + + + + + Gets the reader which should be used to find and decode the barcode. + + + The reader. + + + + + Gets or sets a method which is called if an important point is found + + + The result point callback. + + + + + event is executed if a result was found via decode + + + + + Gets or sets a value indicating whether the image should be automatically rotated. + Rotation is supported for 90, 180 and 270 degrees + + + true if image should be rotated; otherwise, false. + + + + + Gets or sets a value indicating whether the image should be automatically inverted + if no result is found in the original image. + ATTENTION: Please be carefully because it slows down the decoding process if it is used + + + true if image should be inverted; otherwise, false. + + + + + Optional: Gets or sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + The function to create a binarizer object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb array. + If null the RGBLuminanceSource is used. The handler is only called when Decode with a byte[] array is called. + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + raises the ResultFound event + + + + + + raises the ResultFound event + + + + + + calls the explicitResultPointFound action + + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + A smart class to encode some content to a barcode image + + + + + Initializes a new instance of the class. + + + + + A smart class to encode some content to raw pixel data + + + + + Initializes a new instance of the class. + + + + + A smart class to encode some content to a svg barcode image + + + + + Initializes a new instance of the class. + + + + + A base class for specific barcode writers with specific formats of barcode images. + + The type of the output. + + + + Gets or sets the renderer which should be used to render the encoded BitMatrix. + + + + + Encodes the specified contents and returns a rendered instance of the barcode. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The matrix. + + + + + A base class for specific barcode writers with specific formats of barcode images. + + + + + Gets or sets the barcode format. + The value is only suitable if the MultiFormatWriter is used. + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + + + + + + + + + + + + Encodes the specified contents and returns a BitMatrix array. + That array has to be rendered manually or with a IBarcodeRenderer. + + The contents. + + + + + The base class for luminance sources which supports + cropping and rotating based upon the luminance values. + + + + + weight of the red channel for calculating a gray scale image + + + + + weight of the green channel for calculating a gray scale image + + + + + weight of the blue channel for calculating a gray scale image + + + + + numbers of bits which for right shifting + + + + + + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + + The luminance array. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + gets the luminance matrix + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + TODO: not implemented yet + + + A rotated version of this object. + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + + Whether this subclass supports cropping. + + + + + Whether this subclass supports invertion. + + + + Inverts the luminance values (newValue = 255 - oldValue) + + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + This class hierarchy provides a set of methods to convert luminance data to 1 bit data. + It allows the algorithm to vary polymorphically, for example allowing a very expensive + thresholding technique for servers and a fast one for mobile. It also permits the implementation + to vary, e.g. a JNI version for Android and a Java fallback version for other platforms. + + dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The source. + + + + Gets the luminance source object. + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + For callers which only examine one row of pixels at a time, the same BitArray should be reused + and passed in with each call for performance. However it is legal to keep more than one row + at a time if needed. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + Converts a 2D array of luminance data to 1 bit data. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + A new concrete Binarizer implementation object. + + + + Gets the width of the luminance source object. + + + + + Gets the height of the luminance source object. + + + + + This class is the core bitmap class used by ZXing to represent 1 bit data. Reader objects + accept a BinaryBitmap and attempt to decode it. + + dswitkin@google.com (Daniel Switkin) + + + + + + + + + + The width of the bitmap. + + + + + The height of the bitmap. + + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + + The row to fetch, which must be in [0, bitmap height). + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + + Converts a 2D array of luminance data to 1 bit. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + + Whether this bitmap can be cropped. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if isCropSupported() is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + + Whether this bitmap supports counter-clockwise rotation. + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + class which represents the luminance values for a bitmap object + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class + with the image of a Bitmap instance + + The bitmap. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + +

See + + DoCoMo's documentation about the result types represented by subclasses of this class.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + Implements KDDI AU's address book format. See + + http://www.au.kddi.com/ezfactory/tec/two_dimensions/index.html. + (Thanks to Yuzo for translating!) + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Implements the "MECARD" address book entry format. + + Supported keys: N, SOUND, TEL, EMAIL, NOTE, ADR, BDAY, URL, plus ORG + Unsupported keys: TEL-AV, NICKNAME + + Except for TEL, multiple values for keys are also not supported; + the first one found takes precedence. + + Our understanding of the MECARD format is based on this document: + + http://www.mobicode.org.tw/files/OMIA%20Mobile%20Bar%20Code%20Standard%20v3.2.1.doc + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes contact information, like that in an address book entry. + + Sean Owen + + + + initializing constructor + + + + + + + + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + the names + + + + + the nicknames + + + + + In Japanese, the name is written in kanji, which can have multiple readings. Therefore a hint + is often provided, called furigana, which spells the name phonetically. + + The pronunciation of the getNames() field, often in hiragana or katakana. + + + + the phone numbers + + + + optional descriptions of the type of each phone number. It could be like "HOME", but, + there is no guaranteed or standard format. + + + + the e-mail addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the instant messenger addresses + + + + + the note field + + + + + the addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the title + + + + + the urls + + + + birthday formatted as yyyyMMdd (e.g. 19780917) + + + a location as a latitude/longitude pair + + + Implements the "BIZCARD" address book entry format, though this has been + largely reverse-engineered from examples observed in the wild -- still + looking for a definitive reference. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a calendar event at a certain time, optionally with attendees and a location. + + Sean Owen + + + + Gets the start. + + + + + Determines whether [is start all day]. + + if start time was specified as a whole day + + + + event end , or null if event has no duration + + + + + Gets a value indicating whether this instance is end all day. + + true if end time was specified as a whole day + + + + Parses a string as a date. RFC 2445 allows the start and end fields to be of type DATE (e.g. 20081021) + or DATE-TIME (e.g. 20081021T123000 for local time, or 20081021T123000Z for UTC). + + The string to parse + + if not a date formatted string + + + + Represents a parsed result that encodes an email message including recipients, subject and body text. + + Sean Owen + + + + the email address + + + + + the TOs + + + + + the CCs + + + + + the BCCs + + + + + the subject + + + + + the body + + + + + the mailto: uri + + + + + Represents a result that encodes an e-mail address, either as a plain address + like "joe@example.org" or a mailto: URL like "mailto:joe@example.org". + + Sean Owen + + + + Implements the "MATMSG" email message entry format. + + Supported keys: TO, SUB, BODY + + Sean Owen + + + + This implements only the most basic checking for an email address's validity -- that it contains + an '@' and contains no characters disallowed by RFC 2822. This is an overly lenient definition of + validity. We want to generally be lenient here since this class is only intended to encapsulate what's + in a barcode, not "judge" it. + + The email. + + true if it is basically a valid email address; otherwise, false. + + + + + Represents a parsed result that encodes extended product information as encoded by the RSS format, like weight, price, dates, etc. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + extension for kilogram weight type + + + + + extension for pounds weight type + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the raw text + + + + + the product id + + + + + the sscc + + + + + the lot number + + + + + the production date + + + + + the packaging date + + + + + the best before date + + + + + the expiration date + + + + + the weight + + + + + the weight type + + + + + the weight increment + + + + + the price + + + + + the price increment + + + + + the price currency + + + + + the uncommon AIs + + + + + the display representation (raw text) + + + + + Parses strings of digits that represent a RSS Extended code. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + tries to parse a text representation to a specific result object + + + + + + + Represents a parsed result that encodes a geographic coordinate, with latitude, longitude and altitude. + + Sean Owen + + + latitude in degrees + + + + longitude in degrees + + + + altitude in meters. If not specified, in the geo URI, returns 0.0 + + + + query string associated with geo URI or null if none exists + + + + the geo URI + + + + a URI link to Google Maps which display the point on the Earth described + by this instance, and sets the zoom level in a way that roughly reflects the + altitude, if specified + + + + Parses a "geo:" URI result, which specifies a location on the surface of + the Earth as well as an optional altitude above the surface. See + + http://tools.ietf.org/html/draft-mayrhofer-geo-uri-00. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a product ISBN number. + + jbreiden@google.com (Jeff Breidenbach) + + + + the ISBN number + + + + Parses strings of digits that represent a ISBN. + + + jbreiden@google.com (Jeff Breidenbach) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + See ISBN-13 For Dummies + + The result. + + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link ResultParser#parseResult(Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Represents the type of data encoded by a barcode -- from plain text, to a + URI, to an e-mail address, etc. + + Sean Owen + + + + Represents a parsed result that encodes a product by an identifier of some kind. + + dswitkin@google.com (Daniel Switkin) + + + + Parses strings of digits that represent a UPC code. + + dswitkin@google.com (Daniel Switkin) + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link #parseResult(com.google.zxing.Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Attempts to parse the raw {@link Result}'s contents as a particular type + of information (email, URL, etc.) and return a {@link ParsedResult} encapsulating + the result of parsing. + + the raw to parse + encapsulating the parsing result + + + + Parses the result. + + The result. + + + +

Parses an "sms:" URI result, which specifies a number to SMS and optional + "via" number. See + the IETF draft on this.

+ +

This actually also parses URIs starting with "mms:", "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + + Represents a parsed result that encodes an SMS message, including recipients, subject and body text. + + Sean Owen + + + +

Parses an "smsto:" URI result, whose format is not standardized but appears to be like: + {@code smsto:number(:body)}.

+

This actually also parses URIs starting with "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+
+ Sean Owen +
+ + +

Parses an "smtp:" URI result, whose format is not standardized but appears to be like: + smtp[:subject[:body]]}.

+

See http://code.google.com/p/zxing/issues/detail?id=536

+
+ Sean Owen +
+ + + Represents a parsed result that encodes a telephone number. + + Sean Owen + + + + Parses a "tel:" URI result, which specifies a phone number. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + A simple result type encapsulating a string that has no further interpretation. + + Sean Owen + + + + A simple result type encapsulating a URI that has no further interpretation. + + Sean Owen + + + true if the URI contains suspicious patterns that may suggest it intends to + mislead the user about its true nature. At the moment this looks for the presence + of user/password syntax in the host/authority portion of a URI which may be used + in attempts to make the URI's host appear to be other than it is. Example: + http://yourbank.com@phisher.com This URI connects to phisher.com but may appear + to connect to yourbank.com at first glance. + + + + Transforms a string that represents a URI into something more proper, by adding or canonicalizing + the protocol. + + + + + Tries to parse results that are a URI of some kind. + + Sean Owen + + + Parses the "URLTO" result format, which is of the form "URLTO:[title]:[url]". + This seems to be used sometimes, but I am not able to find documentation + on its origin or official format? + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Parses contact information formatted according to the VCard (2.1) format. This is not a complete + implementation but should parse information as commonly encoded in 2D barcodes. + + Sean Owen + + + Formats name fields of the form "Public;John;Q.;Reverend;III" into a form like + "Reverend John Q. Public III". + + @param names name values to format, in place + + + + Partially implements the iCalendar format's "VEVENT" format for specifying a + calendar event. See RFC 2445. This supports SUMMARY, DTSTART and DTEND fields. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a Vehicle Identification Number (VIN). + + + + + Detects a result that is likely a vehicle identification number. + @author Sean Owen + + + + + Represents a parsed result that encodes wifi network information, like SSID and password. + + Vikram Aggarwal + + + + + A simple, fast array of bits, represented compactly by an array of ints internally. + + Sean Owen + + + + size of the array, number of elements + + + + + size of the array in bytes + + + + + index accessor + + + + + + + default constructor + + + + + initializing constructor + + desired size of the array + + + + Flips bit i. + + bit to set + + + + + Gets the next set. + + first bit to check + index of first bit that is set, starting from the given index, or size if none are set + at or beyond this given index + + + + see getNextSet(int) + + index to start looking for unset bit + index of next unset bit, or if none are unset until the end + + + Sets a block of 32 bits, starting at bit i. + + + first bit to set + + the new value of the next 32 bits. Note again that the least-significant bit + corresponds to bit i, the next-least-significant to i+1, and so on. + + + + + Sets a range of bits. + + start of range, inclusive. + end of range, exclusive + + + Clears all bits (sets to false). + + + Efficient method to check if a range of bits is set, or not set. + + + start of range, inclusive. + + end of range, exclusive + + if true, checks that bits in range are set, otherwise checks that they are not set + + true iff all bits are set or not set in range, according to value argument + if end is less than start or the range is not contained in the array + + + + Appends the bit. + + The bit. + + + underlying array of ints. The first element holds the first 32 bits, and the least + significant bit is bit 0. + + + + + Appends the least-significant bits, from value, in order from most-significant to + least-significant. For example, appending 6 bits from 0x000001E will append the bits + 0, 1, 1, 1, 1, 0 in that order. + + containing bits to append + bits from value to append + + + + adds the array to the end + + + + + + XOR operation + + + + + + converts to bytes. + + first bit to start writing + array to write into. Bytes are written most-significant byte first. This is the opposite + of the internal representation, which is exposed by BitArray + position in array to start writing + how many bytes to write + + + Reverses all bits in the array. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Erstellt ein neues Objekt, das eine Kopie der aktuellen Instanz darstellt. + + + Ein neues Objekt, das eine Kopie dieser Instanz darstellt. + + + + +

Represents a 2D matrix of bits. In function arguments below, and throughout the common + module, x is the column position, and y is the row position. The ordering is always x, y. + The origin is at the top-left.

+

Internally the bits are represented in a 1-D array of 32-bit ints. However, each row begins + with a new int. This is done intentionally so that we can copy out a row into a BitArray very + efficiently.

+

The ordering of bits is row-major. Within each int, the least significant bits are used first, + meaning they represent lower x values. This is compatible with BitArray's implementation.

+
+ Sean Owen + dswitkin@google.com (Daniel Switkin) +
+ + The width of the matrix + + + + The height of the matrix + + + + This method is for compatibility with older code. It's only logical to call if the matrix + is square, so I'm throwing if that's not the case. + + + row/column dimension of this matrix + + + + + The rowsize of the matrix + + + + + Creates an empty square . + + height and width + + + + Creates an empty square . + + bit matrix width + bit matrix height + + + + Interprets a 2D array of booleans as a , where "true" means an "on" bit. + + bits of the image, as a row-major 2D array. Elements are arrays representing rows + representation of image + + +

Gets the requested bit, where true means black.

+ +
+ The horizontal component (i.e. which column) + + The vertical component (i.e. which row) + + value of given bit in matrix + +
+ + +

Flips the given bit.

+
+ The horizontal component (i.e. which column) + The vertical component (i.e. which row) +
+ + + flip all of the bits, if shouldBeFlipped is true for the coordinates + + should return true, if the bit at a given coordinate should be flipped + + + + Exclusive-or (XOR): Flip the bit in this {@code BitMatrix} if the corresponding + mask bit is set. + + The mask. + + + Clears all bits (sets to false). + + +

Sets a square region of the bit matrix to true.

+ +
+ The horizontal position to begin at (inclusive) + + The vertical position to begin at (inclusive) + + The width of the region + + The height of the region + +
+ + A fast method to retrieve one row of data from the matrix as a BitArray. + + + The row to retrieve + + An optional caller-allocated BitArray, will be allocated if null or too small + + The resulting BitArray - this reference should always be used even when passing + your own row + + + + + Sets the row. + + row to set + {@link BitArray} to copy from + + + + Modifies this {@code BitMatrix} to represent the same but rotated 180 degrees + + + + + This is useful in detecting the enclosing rectangle of a 'pure' barcode. + + {left,top,width,height} enclosing rectangle of all 1 bits, or null if it is all white + + + + This is useful in detecting a corner of a 'pure' barcode. + + {x,y} coordinate of top-left-most 1 bit, or null if it is all white + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + The line separator. + + A that represents this instance. + + + + + Clones this instance. + + + + + + Converts this ByteMatrix to a black and white bitmap. + + A black and white bitmap converted from this ByteMatrix. + + +

This provides an easy abstraction to read bits at a time from a sequence of bytes, where the + number of bits read is not often a multiple of 8.

+ +

This class is thread-safe but not reentrant. Unless the caller modifies the bytes array + it passed in, in which case all bets are off.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + bytes from which this will read bits. Bits will be read from the first byte first. + Bits are read within a byte from most-significant to least-significant bit. + + + + + index of next bit in current byte which would be read by the next call to {@link #readBits(int)}. + + + + + index of next byte in input byte array which would be read by the next call to {@link #readBits(int)}. + + + + number of bits to read + + int representing the bits read. The bits will appear as the least-significant + bits of the int + + if numBits isn't in [1,32] or more than is available + + + number of bits that can be read successfully + + + + Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1 + of ISO 18004. + + + Sean Owen + + + character set ECI value + representing ECI of given value, or null if it is legal but unsupported + + + character set ECI encoding name + representing ECI for character encoding, or null if it is legalbut unsupported + + + + Encapsulates the result of decoding a matrix of bits. This typically + applies to 2D barcode formats. For now it contains the raw bytes obtained, + as well as a String interpretation of those bytes, if applicable. + Sean Owen + + + + + raw bytes representing the result, or null if not applicable + + + + + how many bits of are valid; typically 8 times its length + + + + + text representation of the result + + + + + list of byte segments in the result, or null if not applicable + + + + + name of error correction level used, or null if not applicable + + + + + gets a value which describe if structure append data was found + + + + + number of errors corrected, or null if not applicable + + + + + gives the sequence number of the result if structured append was found + + + + + number of erasures corrected, or null if not applicable + + + + + gives the parity information if structured append was found + + + + + Miscellanseous data value for the various decoders + + The other. + + + + initializing constructor + + + + + + + + + initializing constructor + + + + + + + + + + + initializing constructor + + + + + + + + + + initializing constructor + + + + + + + + + + + + Defines an container for encoder options + + + + + Gets the data container for all options + + + + + event is raised when a value is changed + + + + + Gets or sets a flag which cause a deeper look into the bitmap + + + true if [try harder]; otherwise, false. + + + + + Image is a pure monochrome image of a barcode. + + + true if monochrome image of a barcode; otherwise, false. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + The character set. + + + + + Image is known to be of one of a few possible formats. + Maps to a {@link java.util.List} of {@link BarcodeFormat}s. + + + The possible formats. + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + true if it should assume a Code 39 check digit; otherwise, false. + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). + + + true if it should assume GS1; otherwise, false. + + + + + Assume MSI codes employ a check digit. Maps to . + + + true if it should assume a MSI check digit; otherwise, false. + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Initializes a new instance of the class. + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Encapsulates the result of detecting a barcode in an image. This includes the raw + matrix of black/white pixels corresponding to the barcode, and possibly points of interest + in the image, like the location of finder patterns or corners of the barcode in the image.

+
+ Sean Owen +
+ + + the detected bits + + + + + the pixel points where the result is found + + + + + initializing constructor + + + + + + + General math-related and numeric utility functions. + + + + + Ends up being a bit faster than {@link Math#round(float)}. This merely rounds its + argument to the nearest int, where x.5 rounds up to x+1. Semantics of this shortcut + differ slightly from {@link Math#round(float)} in that half rounds down for negative + values. -2.5 rounds to -3, not -2. For purposes here it makes no difference. + + real value to round + nearest int + + + + + + + + + + Euclidean distance between points A and B + + + + + + + + + + Euclidean distance between points A and B + + + + + values to sum + sum of values in array + + +

A somewhat generic detector that looks for a barcode-like rectangular region within an image. + It looks within a mostly white region of an image for a region of black and white, but mostly + black. It returns the four corners of the region, as best it can determine.

+ +
+ Sean Owen +
+ + + initializing constructor + + + + + +

Detects a rectangular region of black and white -- mostly black -- with a region of mostly + white, in an image.

+
+ [] describing the corners of the rectangular region. The first and + last points are opposed on the diagonal, as are the second and third. The first point will be + the topmost point and the last, the bottommost. The second point will be leftmost and the + third, the rightmost + +
+ + Attempts to locate a corner of the barcode by scanning up, down, left or right from a center + point which should be within the barcode. + + + center's x component (horizontal) + + same as deltaY but change in x per step instead + + minimum value of x + + maximum value of x + + center's y component (vertical) + + change in y per step. If scanning up this is negative; down, positive; + left or right, 0 + + minimum value of y to search through (meaningless when di == 0) + + maximum value of y + + maximum run of white pixels that can still be considered to be within + the barcode + + a encapsulating the corner that was found + + + + Computes the start and end of a region of pixels, either horizontally or vertically, that could + be part of a Data Matrix barcode. + + + if scanning horizontally, this is the row (the fixed vertical location) + where we are scanning. If scanning vertically it's the column, the fixed horizontal location + + largest run of white pixels that can still be considered part of the + barcode region + + minimum pixel location, horizontally or vertically, to consider + + maximum pixel location, horizontally or vertically, to consider + + if true, we're scanning left-right, instead of up-down + + int[] with start and end of found range, or null if no such range is found + (e.g. only white was found) + + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. By keeping track of the + last black points it encountered, it determines the corners of the barcode. + + David Olivier + + + + Creates a WhiteRectangleDetector instance + + The image. + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + Creates a WhiteRectangleDetector instance + + barcode image to find a rectangle in + initial size of search area around center + x position of search center + y position of search center + + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + + Initializes a new instance of the class. + + The image. + if image is too small + + + + Initializes a new instance of the class. + + The image. + Size of the init. + The x. + The y. + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. + + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + recenters the points of a constant distance towards the center + + bottom most point + left most point + right most point + top most point + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + Determines whether a segment contains a black point + + min value of the scanned coordinate + max value of the scanned coordinate + value of fixed coordinate + set to true if scan must be horizontal, false if vertical + + true if a black point has been found, else false. + + + + + Superclass of classes encapsulating types ECIs, according to "Extended Channel Interpretations" + 5.3 of ISO 18004. + + Sean Owen + + + + the ECI value + + + + ECI value + representing ECI of given value, or null if it is legal but unsupported + ArgumentException if ECI value is invalid + + + + Defines an container for encoder options + + + + + Gets the data container for all options + + + + + Specifies the height of the barcode image + + + + + Specifies the width of the barcode image + + + + + Don't put the content string into the output image. + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + + + + + Specifies whether the data should be encoded to the GS1 standard; + FNC1 character is added in front of the data + + + + + Initializes a new instance of the class. + + + + This Binarizer implementation uses the old ZXing global histogram approach. It is suitable + for low-end mobile devices which don't have enough CPU or memory to use a local thresholding + algorithm. However, because it picks a global black point, it cannot handle difficult shadows + and gradients. + + Faster mobile devices and all desktop applications should probably use HybridBinarizer instead. + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The source. + + + + Applies simple sharpening to the row data to improve performance of the 1D Readers. + + + + + + + + Does not sharpen the data, as this call is intended to only be used by 2D Readers. + + + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + + A new concrete Binarizer implementation object. + + + + Implementations of this class can, given locations of finder patterns for a QR code in an + image, sample the right points in the image to reconstruct the QR code, accounting for + perspective distortion. It is abstracted since it is relatively expensive and should be allowed + to take advantage of platform-specific optimized implementations, like Sun's Java Advanced + Imaging library, but which may not be available in other environments such as J2ME, and vice + versa. + + The implementation used can be controlled by calling {@link #setGridSampler(GridSampler)} + with an instance of a class which implements this interface. + + Sean Owen + + + the current implementation of + + + + Sets the implementation of used by the library. One global + instance is stored, which may sound problematic. But, the implementation provided + ought to be appropriate for the entire platform, and all uses of this library + in the whole lifetime of the JVM. For instance, an Android activity can swap in + an implementation that takes advantage of native platform libraries. + + The platform-specific object to install. + + + +

Samples an image for a square matrix of bits of the given dimension. This is used to extract + the black/white modules of a 2D barcode like a QR Code found in an image. Because this barcode + may be rotated or perspective-distorted, the caller supplies four points in the source image + that define known points in the barcode, so that the image may be sampled appropriately.

+

The last eight "from" parameters are four X/Y coordinate pairs of locations of points in + the image that define some significant points in the image to be sample. For example, + these may be the location of finder pattern in a QR Code.

+

The first eight "to" parameters are four X/Y coordinate pairs measured in the destination + , from the top left, where the known points in the image given by the "from" + parameters map to.

+

These 16 parameters define the transformation needed to sample the image.

+
+ image to sample + The dimension X. + The dimension Y. + The p1 preimage X. + The p1 preimage Y. + The p2 preimage X. + The p2 preimage Y. + The p3 preimage X. + The p3 preimage Y. + The p4 preimage X. + The p4 preimage Y. + The p1 image X. + The p1 image Y. + The p2 image X. + The p2 image Y. + The p3 image X. + The p3 image Y. + The p4 image X. + The p4 image Y. + + representing a grid of points sampled from the image within a region + defined by the "from" parameters + + ReaderException if image can't be sampled, for example, if the transformation defined +
+ + + + + + + + + + + +

Checks a set of points that have been transformed to sample points on an image against + the image's dimensions to see if the point are even within the image.

+ +

This method will actually "nudge" the endpoints back onto the image if they are found to be + barely (less than 1 pixel) off the image. This accounts for imperfect detection of finder + patterns in an image where the QR Code runs all the way to the image border.

+ +

For efficiency, the method will check points from either end of the line until one is found + to be within the image. Because the set of points are assumed to be linear, this is valid.

+ +
+ image into which the points should map + + actual points in x1,y1,...,xn,yn form + +
+ + This class implements a local thresholding algorithm, which while slower than the + GlobalHistogramBinarizer, is fairly efficient for what it does. It is designed for + high frequency images of barcodes with black data on white backgrounds. For this application, + it does a much better job than a global blackpoint with severe shadows and gradients. + However it tends to produce artifacts on lower frequency images and is therefore not + a good general purpose binarizer for uses outside ZXing. + + This class extends GlobalHistogramBinarizer, using the older histogram approach for 1D readers, + and the newer local approach for 2D readers. 1D decoding using a per-row histogram is already + inherently local, and only fails for horizontal gradients. We can revisit that problem later, + but for now it was not a win to use local blocks for 1D. + + This Binarizer is the default for the unit tests and the recommended class for library users. + dswitkin@google.com (Daniel Switkin) + + + + + gives the black matrix + + + + + initializing constructor + + + + + + creates a new instance + + + + + + + Calculates the final BitMatrix once for all requests. This could be called once from the + constructor instead, but there are some advantages to doing it lazily, such as making + profiling easier, and not doing heavy lifting when callers don't expect it. + + + + + For each 8x8 block in the image, calculate the average black point using a 5x5 grid + of the blocks around it. Also handles the corner cases (fractional blocks are computed based + on the last 8 pixels in the row/column which are also used in the previous block). + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + The black points. + The matrix. + + + + Applies a single threshold to an 8x8 block of pixels. + + The luminances. + The xoffset. + The yoffset. + The threshold. + The stride. + The matrix. + + + + Calculates a single black point for each 8x8 block of pixels and saves it away. + See the following thread for a discussion of this algorithm: + http://groups.google.com/group/zxing/browse_thread/thread/d06efa2c35a7ddc0 + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + + + +

This class implements a perspective transform in two dimensions. Given four source and four + destination points, it will compute the transformation implied between them. The code is based + directly upon section 3.4.2 of George Wolberg's "Digital Image Warping"; see pages 54-56.

+
+ Sean Owen +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Convenience method, not optimized for performance. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

This class contains utility methods for performing mathematical operations over + the Galois Fields. Operations use a given primitive polynomial in calculations.

+

Throughout this package, elements of the GF are represented as an {@code int} + for convenience and speed (but at the cost of memory). +

+
+ Sean Owen +
+ + + Create a representation of GF(size) using the given primitive polynomial. + + irreducible polynomial whose coefficients are represented by + * the bits of an int, where the least-significant bit represents the constant + * coefficient + the size of the field + the factor b in the generator polynomial can be 0- or 1-based + * (g(x) = (x+a^b)(x+a^(b+1))...(x+a^(b+2t-1))). + * In most cases it should be 1, but for QR code it is 0. + + + + Builds the monomial. + + The degree. + The coefficient. + the monomial representing coefficient * x^degree + + + + Implements both addition and subtraction -- they are the same in GF(size). + + sum/difference of a and b + + + + Exps the specified a. + + 2 to the power of a in GF(size) + + + + Logs the specified a. + + A. + base 2 log of a in GF(size) + + + + Inverses the specified a. + + multiplicative inverse of a + + + + Multiplies the specified a with b. + + A. + The b. + product of a and b in GF(size) + + + + Gets the size. + + + + + Gets the generator base. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + +

Represents a polynomial whose coefficients are elements of a GF. + Instances of this class are immutable.

+

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + the {@link GenericGF} instance representing the field to use + to perform computations + coefficients as ints representing elements of GF(size), arranged + from most significant (highest-power term) coefficient to least significant + if argument is null or empty, + or if leading coefficient is 0 and this is not a + constant polynomial (that is, it is not the monomial "0") + + + + degree of this polynomial + + + + + Gets a value indicating whether this is zero. + + true iff this polynomial is the monomial "0" + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + +

Implements Reed-Solomon decoding, as the name implies.

+ +

The algorithm will not be explained here, but the following references were helpful + in creating this implementation:

+ + + +

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+ +
+ Sean Owen + William Rucklidge + sanfordsquires +
+ + +

Decodes given set of received codewords, which include both data and error-correction + codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place, + in the input.

+
+ data and error-correction codewords + number of error-correction codewords available + false: decoding fails +
+ + + Implements Reed-Solomon encoding, as the name implies. + + Sean Owen + William Rucklidge + + + + Common string-related functions. + + Sean Owen + Alex Dupre + + + + SJIS + + + + + GB2312 + + + + + Guesses the encoding. + + bytes encoding a string, whose encoding should be guessed + decode hints if applicable + name of guessed encoding; at the moment will only guess one of: + {@link #SHIFT_JIS}, {@link #UTF8}, {@link #ISO88591}, or the platform + default encoding if none of these can possibly be correct + + + + This implementation can detect and decode Data Matrix codes in an image. + + bbrown@google.com (Brian Brown) + + + + + Locates and decodes a Data Matrix code in an image. + + + a String representing the content encoded by the Data Matrix code + + + + Locates and decodes a Data Matrix code in an image. + + + + a String representing the content encoded by the Data Matrix code + + + + does nothing here + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a Data Matrix code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + Guillaume Le Biller Added to zxing lib. + + + + encodes the content to a BitMatrix + + + + + + + + + + encodes the content to a BitMatrix + + + + + + + + + + + Encode the given symbol info to a bit matrix. + + The DataMatrix placement. + The symbol info to encode. + + + The bit matrix generated. + + + + Convert the ByteMatrix to BitMatrix. + + The input matrix. + The requested width of the image (in pixels) with the Datamatrix code + The requested height of the image (in pixels) with the Datamatrix code + The output matrix. + + + + bbrown@google.com (Brian Brown) + + + + + to parse + if dimension is < 8 or > 144 or not 0 mod 2 + + + + +

Creates the version object based on the dimension of the original bit matrix from + the datamatrix code.

+ +

See ISO 16022:2006 Table 7 - ECC 200 symbol attributes

+ + Original including alignment patterns + encapsulating the Data Matrix Code's "version" + if the dimensions of the mapping matrix are not valid + Data Matrix dimensions. +
+
+ + +

Reads the bits in the representing the mapping matrix (No alignment patterns) + in the correct order in order to reconstitute the codewords bytes contained within the + Data Matrix Code.

+ + bytes encoded within the Data Matrix Code + if the exact number of bytes expected is not read +
+
+ + +

Reads a bit of the mapping matrix accounting for boundary wrapping.

+ + Row to read in the mapping matrix + Column to read in the mapping matrix + Number of rows in the mapping matrix + Number of columns in the mapping matrix + value of the given bit in the mapping matrix +
+
+ + +

Reads the 8 bits of the standard Utah-shaped pattern.

+ +

See ISO 16022:2006, 5.8.1 Figure 6

+ + Current row in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Current column in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the utah shape +
+
+ + +

Reads the 8 bits of the special corner condition 1.

+ +

See ISO 16022:2006, Figure F.3

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 1 +
+
+ + +

Reads the 8 bits of the special corner condition 2.

+ +

See ISO 16022:2006, Figure F.4

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 2 +
+
+ + +

Reads the 8 bits of the special corner condition 3.

+ +

See ISO 16022:2006, Figure F.5

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 3 +
+
+ + +

Reads the 8 bits of the special corner condition 4.

+ +

See ISO 16022:2006, Figure F.6

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 4 +
+
+ + +

Extracts the data region from a that contains + alignment patterns.

+ + Original with alignment patterns + BitMatrix that has the alignment patterns removed +
+
+ + +

Encapsulates a block of data within a Data Matrix Code. Data Matrix Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ + bbrown@google.com (Brian Brown) +
+
+ + +

When Data Matrix Codes use multiple data blocks, they actually interleave the bytes of each of them. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ + bytes as read directly from the Data Matrix Code + version of the Data Matrix Code + DataBlocks containing original bytes, "de-interleaved" from representation in the + Data Matrix Code +
+
+ + +

Data Matrix Codes can encode text as bits in one of several modes, and can use multiple modes + in one Data Matrix Code. This class decodes the bits back into text.

+ +

See ISO 16022:2006, 5.2.1 - 5.2.9.2

+ + bbrown@google.com (Brian Brown) + Sean Owen +
+
+ + + See ISO 16022:2006, Annex C Table C.1 + The C40 Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, Annex C Table C.2 + The Text Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, 5.2.3 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.5 and Annex C, Table C.1 + + + + + See ISO 16022:2006, 5.2.6 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.7 + + + + + See ISO 16022:2006, 5.2.8 and Annex C Table C.3 + + + + + See ISO 16022:2006, 5.2.9 and Annex B, B.2 + + + + + See ISO 16022:2006, Annex B, B.2 + + + + +

The main class which implements Data Matrix Code decoding -- as opposed to locating and extracting + the Data Matrix Code from an image.

+ + bbrown@google.com (Brian Brown) +
+
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a Data Matrix Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+ + booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code + if the Data Matrix Code cannot be decoded +
+
+ + +

Decodes a Data Matrix Code represented as a . A 1 or "true" is taken + to mean a black module.

+
+ booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+ + data and error correction codewords + number of codewords that are data bytes +
+
+ + + The Version object encapsulates attributes about a particular + size Data Matrix Code. + + bbrown@google.com (Brian Brown) + + + + + returns the version numer + + + + + + returns the symbol size rows + + + + + + returns the symbols size columns + + + + + + retursn the data region size rows + + + + + + returns the data region size columns + + + + + + returns the total codewords count + + + + + +

Deduces version information from Data Matrix dimensions.

+ + Number of rows in modules + Number of columns in modules + Version for a Data Matrix Code of those dimensions + if dimensions do correspond to a valid Data Matrix size +
+
+ + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the Data Matrix code version's format.

+
+
+ + + returns the version number as string + + + + + + See ISO 16022:2006 5.5.1 Table 7 + + + + +

Encapsulates logic that can detect a Data Matrix Code in an image, even if the Data Matrix Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + +

Detects a Data Matrix Code in an image.

+
+ encapsulating results of detecting a Data Matrix Code or null +
+ + + Calculates the position of the white top right module using the output of the rectangle detector + for a rectangular matrix + + + + + Calculates the position of the white top right module using the output of the rectangle detector + for a square matrix + + + + + Increments the Integer associated with a key by one. + + + + + Counts the number of black/white transitions between two points, using something like Bresenham's algorithm. + + + + + Simply encapsulates two points and a number of transitions between them. + + + + + Orders ResultPointsAndTransitions by number of transitions, ascending. + + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Symbol Character Placement Program. Adapted from Annex M.1 in ISO/IEC 16022:2000(E). + + + + + Main constructor + + the codewords to place + the number of columns + the number of rows + + + + Places the 8 bits of a utah-shaped symbol character in ECC200. + + The row. + The col. + character position + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Enumeration for encodation types + + + + + Error Correction Code for ECC200. + + + + + Lookup table which factors to use for which number of error correction codewords. + See FACTORS. + + + + + Precomputed polynomial factors for ECC 200. + + + + + Creates the ECC200 error correction for an encoded message. + + The codewords. + information about the symbol to be encoded + the codewords with interleaved error correction. + + + + DataMatrix ECC 200 data encoder following the algorithm described in ISO/IEC 16022:200(E) in + annex S. + + + + + Padding character + + + + + mode latch to C40 encodation mode + + + + + mode latch to Base 256 encodation mode + + + + + FNC1 Codeword + + + + + Structured Append Codeword + + + + + Reader Programming + + + + + Upper Shift + + + + + 05 Macro + + + + + 06 Macro + + + + + mode latch to ANSI X.12 encodation mode + + + + + mode latch to Text encodation mode + + + + + mode latch to EDIFACT encodation mode + + + + + ECI character (Extended Channel Interpretation) + + + + + Unlatch from C40 encodation + + + + + Unlatch from X12 encodation + + + + + 05 Macro header + + + + + 06 Macro header + + + + + Macro trailer + + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + the encoded message (the char values range from 0 to 255) + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + requested shape. May be {@code SymbolShapeHint.FORCE_NONE},{@code SymbolShapeHint.FORCE_SQUARE} or {@code SymbolShapeHint.FORCE_RECTANGLE}. + the minimum symbol size constraint or null for no constraint + the maximum symbol size constraint or null for no constraint + encoding mode to start with + the encoded message (the char values range from 0 to 255) + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + Symbol info table for DataMatrix. + + + + Overrides the symbol info set used by this class. Used for testing purposes. + + @param override the symbol info set to use + + + + Enumeration for DataMatrix symbol shape hint. It can be used to force square or rectangular + symbols. + + + + + The class holds the available options for the DatamatrixWriter + + + + + Specifies the matrix shape for Data Matrix + + + + + Specifies a minimum barcode size + + + + + Specifies a maximum barcode size + + + + + Specifies the default encodation + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Encapsulates a type of hint that a caller may pass to a barcode reader to help it + more quickly or accurately decode it. It is up to implementations to decide what, + if anything, to do with the information that is supplied. + + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Unspecified, application-specific hint. Maps to an unspecified . + + + + + Image is a pure monochrome image of a barcode. Doesn't matter what it maps to; + use = true. + + + + + Image is known to be of one of a few possible formats. + Maps to a of s. + + + + + Spend more time to try to find a barcode; optimize for accuracy, not speed. + Doesn't matter what it maps to; use = true. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + + + The caller needs to be notified via callback when a possible + is found. Maps to a . + + + + + Assume MSI codes employ a check digit. Maps to . + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + Maps to . + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + 1D readers supporting rotation with TRY_HARDER enabled. + But BarcodeReader class can do auto-rotating for 1D and 2D codes. + Enabling that option prevents 1D readers doing double rotation. + BarcodeReader enables that option automatically if "global" auto-rotation is enabled. + Maps to . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to; + use . + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Simply encapsulates a width and height. + + + + + initializing constructor + + + + + + + the width + + + + + the height + + + + + + + + + + + + + + + + + + + + + + + + These are a set of hints that you may pass to Writers to specify their behavior. + + dswitkin@google.com (Daniel Switkin) + + + + Specifies the width of the barcode image + type: + + + + + Specifies the height of the barcode image + type: + + + + + Don't put the content string into the output image. + type: + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + + For Aztec it is of type , representing the minimal percentage of error correction words. + In all cases, it can also be a representation of the desired value as well. + Note: an Aztec symbol should have a minimum of 25% EC words. + For PDF417 it is of type or (between 0 and 8), + + + + + Specifies what character encoding to use where applicable. + type: + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + type: , or representation of the integer value + + + + + Specifies the aspect ratio to use. Default is 4. + type: , or 1-4. + + + + + Specifies whether to use compact mode for PDF417 + type: , or "true" or "false" + value + + + + + Specifies what compaction mode to use for PDF417. + type: or value of one of its + enum values + + + + + Specifies the minimum and maximum number of rows and columns for PDF417. + type: + + + + + Don't append ECI segment. + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + type: + + + + + Specifies the matrix shape for Data Matrix (type ) + + + + + Specifies a minimum barcode size (type ). Only applicable to Data Matrix now. + + + + + Specifies a maximum barcode size (type ). Only applicable to Data Matrix now. + + + + + if true, don't switch to codeset C for numbers + + + + + Specifies the default encodation for Data Matrix (type ) + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Specifies the required number of layers for an Aztec code. + A negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + type: , or representation of the integer value + + + + + Specifies the exact version of QR code to be encoded. + (Type , or representation of the integer value). + + + + + Specifies whether the data should be encoded to the GS1 standard + type: , or "true" or "false" + value + + + + + Thrown when a barcode was successfully detected, but some aspect of + the content did not conform to the barcode's format rules. This could have + been due to a mis-detection. + Sean Owen + + + + + + + + + + + + + + + + + + + + + + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Decodes the specified barcode bitmap which is given by a generic byte array. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents. + + The contents. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + The matrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents. + + The contents. + + + + + implements an Intelligent Mail barcode + Rishabh Hatgadkar + + + + + A wrapper implementation of {@link LuminanceSource} which inverts the luminances it returns -- black becomes + white and vice versa, and each value becomes (255-value). + + Sean Owen + + + + Initializes a new instance of the class. + + The @delegate. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff; + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Inverts this instance. + + original delegate {@link LuminanceSource} since invert undoes itself + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + The purpose of this class hierarchy is to abstract different bitmap implementations across + platforms into a standard interface for requesting greyscale luminance values. The interface + only provides immutable methods; therefore crop and rotation create copies. This is to ensure + that one Reader does not modify the original luminance source and leave it in an unknown state + for other Readers in the chain. + + dswitkin@google.com (Daniel Switkin) + + + + initializing constructor + + + + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff + + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + The width of the bitmap. + + + The height of the bitmap. + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + Whether this subclass supports counter-clockwise rotation. + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + + Whether this subclass supports invertion. + + + + inverts the luminance values, not supported here. has to implemented in sub classes + + + + + + + + + + + + mike32767 + Manuel Kasten + + + + + to parse + + + + +

MaxiCodes can encode text or structured information as bits in one of several modes, + with multiple character sets in one code. This class decodes the bits back into text.

+ + mike32767 + Manuel Kasten +
+
+ + +

The main class which implements MaxiCode decoding -- as opposed to locating and extracting + the MaxiCode from an image.

+ + Manuel Kasten +
+
+ + + This implementation can detect and decode a MaxiCode in an image. + + + + + Locates and decodes a MaxiCode in an image. + + a String representing the content encoded by the MaxiCode + if a MaxiCode cannot be decoded + + + + + Locates and decodes a MaxiCode within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + + MultiFormatReader is a convenience class and the main entry point into the library for most uses. + By default it attempts to decode all barcode formats that the library supports. Optionally, you + can provide a hints object to request different behavior, for example only decoding QR codes. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + This version of decode honors the intent of Reader.decode(BinaryBitmap) in that it + passes null as a hint to the decoders. However, that makes it inefficient to call repeatedly. + Use setHints() followed by decodeWithState() for continuous scan applications. + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the hints provided. Does not honor existing state. + + + The pixel data to decode + + The hints to use, clearing the previous state. + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the state set up by calling setHints() previously. Continuous scan + clients will get a large speed increase by using this instead of decode(). + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls + to decodeWithState(image) can reuse the same set of readers without reallocating memory. This + is important for performance in continuous scan clients. + + + + + + resets all specific readers + + + + This is a factory class which finds the appropriate Writer subclass for the BarcodeFormat + requested and encodes the barcode with the supplied contents. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Gets the collection of supported writers. + + + + + encode the given data + + + + + + + + + + encode the given data + + + + + + + + + + + This class attempts to decode a barcode from an image, not by scanning the whole image, + but by scanning subsets of the image. This is important when there may be multiple barcodes in + an image, and detecting a barcode may find parts of multiple barcode and fail to decode + (e.g. QR Codes). Instead this scans the four quadrants of the image -- and also the center + 'quadrant' to cover the case where a barcode is found in the center. + + + + + + Initializes a new instance of the class. + + The @delegate. + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Attempts to locate multiple barcodes in an image by repeatedly decoding portion of the image. + After one barcode is found, the areas left, above, right and below the barcode's + {@link com.google.zxing.ResultPoint}s are scanned, recursively.

+

A caller may want to also employ {@link ByQuadrantReader} when attempting to find multiple + 2D barcodes, like QR Codes, in an image, where the presence of multiple barcodes might prevent + detecting any one of them.

+

That is, instead of passing a {@link Reader} a caller might pass + new ByQuadrantReader(reader).

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The @delegate. + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Implementation of this interface attempt to read several barcodes from one image. + Sean Owen + + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + +

Encapsulates logic that can detect one or more QR Codes in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+ + Sean Owen + Hannes Erven +
+
+ + + Initializes a new instance of the class. + + The image. + + + + Detects the multi. + + The hints. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +

In contrast to , this class will return an array of all possible + QR code locations in the image.

+ +

Use the TRY_HARDER hint to ask for a more thorough detection.

+ + Sean Owen + Hannes Erven +
+
+ + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF_PERCENT percent in their + estimated modules sizes. + + + + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF pixels/module in their + estimated modules sizes. + + + + + A comparator that orders FinderPatterns by their estimated module size. + + + + +

Creates a finder that will search the image for three finder patterns.

+ + image to search +
+
+ + + + the 3 best s from our list of candidates. The "best" are + those that have been detected at least CENTER_QUORUM times, and whose module + size differs from the average among those patterns the least + + + + + This implementation can detect and decode multiple QR Codes in an image. + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + +

Decodes Codabar barcodes.

+ + Bas Vijfwinkel +
+
+ + These represent the encodings of characters, as patterns of wide and narrow bars. The 7 least-significant bits of + each int correspond to the pattern of wide and narrow, with 1s representing "wide" and 0s representing narrow. + + + + Records the size of all runs of white and black pixels, starting with white. + This is just like recordPattern, except it records all the counters, and + uses our builtin "counters" member for storage. + + row to count from + + + + This class renders CodaBar as []. + + dsbnatut@gmail.com (Kazuki Nishiura) + + + + The class holds the available options for the QrCodeWriter + + + + + if true, don't switch to codeset C for numbers + + + + +

Decodes Code 128 barcodes.

+ + Sean Owen +
+
+ + + This object renders a CODE128 code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + +

Decodes Code 39 barcodes. Supports "Full ASCII Code 39" if USE_CODE_39_EXTENDED_MODE is set.

+ Sean Owen + @see Code93Reader +
+
+ + + Returns a string with all possible characters + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. It will not decoded "extended Code 39" sequences. + + + + + Creates a reader that can be configured to check the last character as a check digit. + It will not decoded "extended Code 39" sequences. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + + Creates a reader that can be configured to check the last character as a check digit, + or optionally attempt to decode "extended Code 39" sequences that are used to encode + the full ASCII character set. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + if true, will attempt to decode extended Code 39 sequences in the text. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a CODE39 code as a . + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Decodes Code 93 barcodes.

+ Sean Owen + +
+
+ + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a CODE93 code as a BitMatrix + + + + + + output to append to + start position + pattern to append + unused + 9 + + + +

Implements decoding of the EAN-13 format.

+ + dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Initializes a new instance of the class. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + Get the format of this decoder. + The 1D format. + + + + + Based on pattern of odd-even ('L' and 'G') patterns used to encoded the explicitly-encoded + digits in a barcode, determines the implicitly encoded first digit and adds it to the + result string. + + string to insert decoded first digit into + int whose bits indicates the pattern of odd/even L/G patterns used to + encode digits + -1 if first digit cannot be determined + + + + This object renders an EAN13 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Implements decoding of the EAN-8 format.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Get the format of this decoder. + The 1D format. + + + + + This object renders an EAN8 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + + + a byte array of horizontal pixels (false = white, true = black) + + + + + Records EAN prefix to GS1 Member Organization, where the member organization + correlates strongly with a country. This is an imperfect means of identifying + a country of origin by EAN-13 barcode value. See + + http://en.wikipedia.org/wiki/List_of_GS1_country_codes. + + Sean Owen + + + + +

Implements decoding of the ITF format, or Interleaved Two of Five.

+ +

This Reader will scan ITF barcodes of certain lengths only. + At the moment it reads length 6, 8, 10, 12, 14, 16, 18, 20, 24, 44 and 48 as these have appeared "in the wild". Not all + lengths are scanned, especially shorter ones, to avoid false positives. This in turn is due to a lack of + required checksum function.

+ +

The checksum is optional and is not applied by this Reader. The consumer of the decoded + value will have to apply a checksum if required.

+ +

http://en.wikipedia.org/wiki/Interleaved_2_of_5 + is a great reference for Interleaved 2 of 5 information.

+ + kevin.osullivan@sita.aero, SITA Lab. +
+
+ + + Valid ITF lengths. Anything longer than the largest value is also allowed. + + + + + Start/end guard pattern. + + Note: The end pattern is reversed because the row is reversed before + searching for the END_PATTERN + + + + + Patterns of Wide / Narrow lines to indicate each digit + + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + + row of black/white values to search + offset of start pattern + The payload end. + to append decoded chars to + + false, if decoding could not complete successfully + + + + + Identify where the start of the middle / payload section starts. + + row of black/white values to search + Array, containing index of start of 'start block' and end of 'start block' + + + + The start & end patterns must be pre/post fixed by a quiet zone. This + zone must be at least 10 times the width of a narrow line. Scan back until + we either get to the start of the barcode or match the necessary number of + quiet zone pixels. + + Note: Its assumed the row is reversed when using this method to find + quiet zone after the end pattern. + + ref: http://www.barcode-1.net/i25code.html + + bit array representing the scanned barcode. + index into row of the start or end pattern. + false, if the quiet zone cannot be found + + + + Skip all whitespace until we get to the first black line. + + row of black/white values to search + index of the first black line or -1 if no black lines are found in the row. + + + + Identify where the end of the middle / payload section ends. + + row of black/white values to search + Array, containing index of start of 'end block' and end of 'end + block' or null, if nothing found + + + + + row of black/white values to search + position to start search + pattern of counts of number of black and white pixels that are being searched for as a pattern + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a sequence of ITF black/white lines into single + digit. + + the counts of runs of observed black/white/black/... values + The decoded digit + + false, if digit cannot be decoded + + + + + This object renders a ITF code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code bool[]} of horizontal pixels (false = white, true = black) + + + + + + + Decodes MSI barcodes. + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. + + + + + Creates a reader that can be configured to check the last character as a check digit, + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a MSI code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + This object renders a Plessey code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

A reader that can read all available UPC/EAN formats. If a caller wants to try to + read all such formats, it is most efficient to use this implementation rather than invoke + individual readers.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Encapsulates functionality and implementation that is common to one-dimensional barcodes.

+ dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + a byte array of horizontal pixels (0 = white, 1 = black) + + + + Appends the given pattern to the target array starting at pos. + + encode black/white pattern into this array + position to start encoding at in target + lengths of black/white runs to encode + starting color - false for white, true for black + the number of elements added to target. + + + + Gets the default margin. + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + + barcode contents to encode + a bool[] of horizontal pixels (false = white, true = black) + + + + Calculates the checksum digit modulo10. + + The contents. + + + + + Encapsulates functionality and implementation that is common to all families + of one-dimensional barcodes. + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + + + + + + + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + Note that we don't try rotation without the try harder flag, even if rotation was supported. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + We're going to examine rows from the middle outward, searching alternately above and below the + middle, and farther out each time. rowStep is the number of rows between each successive + attempt above and below the middle. So we'd scan row middle, then middle - rowStep, then + middle + rowStep, then middle - (2 * rowStep), etc. + rowStep is bigger as the image is taller, but is always at least 1. We've somewhat arbitrarily + decided that moving up and down by about 1/16 of the image is pretty good; we try more of the + image if "trying harder". + + The image to decode + Any hints that were requested + The contents of the decoded barcode + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the pattern in reverse. + + The row. + The start. + The counters. + + + + + Determines how closely a set of observed counts of runs of black/white values matches a given + target pattern. This is reported as the ratio of the total variance from the expected pattern + proportions across all pattern elements, to the length of the pattern. + + observed counters + expected pattern + The most any counter can differ before we give up + ratio of total variance between counters and pattern compared to total pattern size, + where the ratio has been multiplied by 256. So, 0 means no variance (perfect match); 256 means + the total variance between counters and patterns equals the pattern length, higher values mean + even more variance + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + Superclass of implementations that read barcodes in the RSS family of formats. + + + + + Initializes a new instance of the class. + + + + + Gets the decode finder counters. + + + + + + Gets the data character counters. + + + + + + Gets the odd rounding errors. + + + + + + Gets the even rounding errors. + + + + + + Gets the odd counts. + + + + + + Gets the even counts. + + + + + + Parses the finder value. + + The counters. + The finder patterns. + The value. + + + + + Counts the specified array. + + The array. + + + + + Increments the specified array. + + The array. + The errors. + + + + Decrements the specified array. + + The array. + The errors. + + + + Determines whether [is finder pattern] [the specified counters]. + + The counters. + + true if [is finder pattern] [the specified counters]; otherwise, false. + + + + + Encapsulates a since character value in an RSS barcode, including its checksum information. + + + + + Gets the value. + + + + + Gets the checksum portion. + + + + + Initializes a new instance of the class. + + The value. + The checksum portion. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Gets the information. + + + + + + Parses the information. + + + + + + Creates the decoder. + + The information. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + One row of an RSS Expanded Stacked symbol, consisting of 1+ expanded pairs. + + + + + Did this row of the image have to be reversed (mirrored) to recognize the pairs? + + + + + Two rows are equal if they contain the same pairs in the same order. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Encapsulates an RSS barcode finder pattern, including its start/end position and row. + + + + + Gets the value. + + + + + Gets the start end. + + + + + Gets the result points. + + + + + Initializes a new instance of the class. + + The value. + The start end. + The start. + The end. + The row number. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Decodes RSS-14, including truncated and stacked variants. See ISO/IEC 24724:2006. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Adapted from listings in ISO/IEC 24724 Appendix B and Appendix G. + + + + + Gets the RS svalue. + + The widths. + Width of the max. + if set to true [no narrow]. + + + + +

Implements decoding of the UPC-A format.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen +
+
+ + +

Like decodeRow(int, BitArray, java.util.Map), but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ + + + + +
+ + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Decodes the specified image. + + The image. + The hints. + + + + + Get the format of this decoder. + The 1D format. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + This object renders a UPC-A code as a . + qwandor@google.com (Andrew Walbran) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + @see UPCEANExtension5Support + + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + + + @see UPCEANExtension2Support + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + one {@link ResultMetadataType} to appropriate value, or {@code null} if not known + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Start/end guard pattern. + + + + + Pattern marking the middle of a UPC/EAN pattern, separating the two halves. + + + + + end guard pattern. + + + + + "Odd", or "L" patterns used to encode UPC/EAN digits. + + + + + As above but also including the "even", or "G" patterns used to encode UPC/EAN digits. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + +

Like , but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ row index into the image + encoding of the row of the barcode image + start/end column where the opening start pattern was found + optional hints that influence decoding + encapsulating the result of decoding a barcode in the row +
+ + + + string of digits to check + see + + + + Computes the UPC/EAN checksum on a string of digits, and reports + whether the checksum is correct or not. + + string of digits to check + true iff string of digits passes the UPC/EAN checksum algorithm + + + + Decodes the end. + + The row. + The end start. + + + + + + row of black/white values to search + position to start search + if true, indicates that the pattern specifies white/black/white/... + pixel counts, otherwise, it is interpreted as black/white/black/... + pattern of counts of number of black and white pixels that are being + searched for as a pattern + array of counters, as long as pattern, to re-use + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a single UPC/EAN-encoded digit. + + row of black/white values to decode + the counts of runs of observed black/white/black/... values + horizontal offset to start decoding from + the set of patterns to use to decode -- sometimes different encodings + for the digits 0-9 are used, and this indicates the encodings for 0 to 9 that should + be used + horizontal offset of first pixel beyond the decoded digit + + + + Get the format of this decoder. + + The 1D format. + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ aripollak@gmail.com (Ari Pollak) + dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Gets the default margin. + + + + +

Implements decoding of the UPC-E format.

+

Thisis a great reference for + UPC-E information.

+ Sean Owen +
+
+ + + The pattern that marks the middle, and end, of a UPC-E pattern. + There is no "second half" to a UPC-E barcode. + + + + + See L_AND_G_PATTERNS these values similarly represent patterns of + even-odd parity encodings of digits that imply both the number system (0 or 1) + used, and the check digit. + + + + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Decodes the end. + + The row. + The end start. + + + + + see checkStandardUPCEANChecksum(String) + + + + + + + Determines the num sys and check digit. + + The result string. + The lg pattern found. + + + + + Get the format of this decoder. + The 1D format. + + + + + Expands a UPC-E value back into its full, equivalent UPC-A code value. + + UPC-E code as string of digits + equivalent UPC-A code as string of digits + + + + + This object renders an UPC-E code as a {@link BitMatrix}. + @author 0979097955s@gmail.com (RX) + + + + + Metadata about a PDF417 Barcode + + Guenther Grau + + + + A Barcode Value for the PDF417 barcode. + The scanner will iterate through the bitmatrix, + and given the different methods or iterations + will increment a given barcode value's confidence. + + When done, this will return the values of highest confidence. + + Guenther Grau + + + + Incremenets the Confidence for a given value. (Adds an occurance of a value) + + + Value. + + + + Determines the maximum occurrence of a set value and returns all values which were set with this occurrence. + + an array of int, containing the values with the highest occurrence, or null, if no value was set. + + + + Returns the confience value for a given barcode value + + Barcode value. + + + + A Bounding Box helper class + + Guenther Grau + + + + Initializes a new instance of the class. + returns null if the corner points don't match up correctly + + The image. + The top left. + The bottom left. + The top right. + The bottom right. + + + + + Creates the specified box. + + The box. + + + + + Initializes a new instance of the class. + Will throw an exception if the corner points don't match up correctly + + Image. + Top left. + Top right. + Bottom left. + Bottom right. + + + + Merge two Bounding Boxes, getting the left corners of left, and the right corners of right + (Images should be the same) + + Left. + Right. + + + + Adds the missing rows. + + The missing rows. + Missing start rows. + Missing end rows. + If set to true is left. + + + + Calculates the minimum and maximum X & Y values based on the corner points. + + + + + If we adjust the width, set a new right corner coordinate and recalculate + + Bottom right. + + + + A Codeword in the PDF417 barcode + + Guenther Grau + + + + Default value for the RowNumber (-1 being an invalid real number) + + + + + Initializes a new instance of the class. + + Start x. + End x. + Bucket. + Value. + + + + Gets the width. + + The width. + + + + Gets a value indicating whether this instance has valid row number. + + true if this instance has valid row number; otherwise, false. + + + + Determines whether this instance is valid row number the specified rowNumber. + + true if this instance is valid row number the specified rowNumber; otherwise, false. + Row number. + + + + Sets the row number as the row's indicator column. + + + + + Returns a that represents the current . + + A that represents the current . + + + +

This class contains the methods for decoding the PDF417 codewords.

+ + SITA Lab (kevin.osullivan@sita.aero) +
+
+ + + Table containing values for the exponent of 900. + This is used in the numeric compaction decode algorithm. + + + + + Text Compaction mode (see 5.4.1.5) permits all printable ASCII characters to be + encoded, i.e. values 32 - 126 inclusive in accordance with ISO/IEC 646 (IRV), as + well as selected control characters. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + The Text Compaction mode includes all the printable ASCII characters + (i.e. values from 32 to 126) and three ASCII control characters: HT or tab + (ASCII value 9), LF or line feed (ASCII value 10), and CR or carriage + return (ASCII value 13). The Text Compaction mode also includes various latch + and shift characters which are used exclusively within the mode. The Text + Compaction mode encodes up to 2 characters per codeword. The compaction rules + for converting data into PDF417 codewords are defined in 5.4.2.2. The sub-mode + switches are defined in 5.4.2.3. + + The text compaction data. + The byte compaction data if there + was a mode shift. + The size of the text compaction and byte compaction data. + The decoded data is appended to the result. + + + + + Byte Compaction mode (see 5.4.3) permits all 256 possible 8-bit byte values to be encoded. + This includes all ASCII characters value 0 to 127 inclusive and provides for international + character set support. + + The byte compaction mode i.e. 901 or 924 + The array of codewords (data + error) + Currently active character encoding + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Numeric Compaction mode (see 5.4.4) permits efficient encoding of numeric data strings. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Convert a list of Numeric Compacted codewords from Base 900 to Base 10. + EXAMPLE + Encode the fifteen digit numeric string 000213298174000 + Prefix the numeric string with a 1 and set the initial value of + t = 1 000 213 298 174 000 + Calculate codeword 0 + d0 = 1 000 213 298 174 000 mod 900 = 200 + + t = 1 000 213 298 174 000 div 900 = 1 111 348 109 082 + Calculate codeword 1 + d1 = 1 111 348 109 082 mod 900 = 282 + + t = 1 111 348 109 082 div 900 = 1 234 831 232 + Calculate codeword 2 + d2 = 1 234 831 232 mod 900 = 632 + + t = 1 234 831 232 div 900 = 1 372 034 + Calculate codeword 3 + d3 = 1 372 034 mod 900 = 434 + + t = 1 372 034 div 900 = 1 524 + Calculate codeword 4 + d4 = 1 524 mod 900 = 624 + + t = 1 524 div 900 = 1 + Calculate codeword 5 + d5 = 1 mod 900 = 1 + t = 1 div 900 = 0 + Codeword sequence is: 1, 624, 434, 632, 282, 200 + + Decode the above codewords involves + 1 x 900 power of 5 + 624 x 900 power of 4 + 434 x 900 power of 3 + + 632 x 900 power of 2 + 282 x 900 power of 1 + 200 x 900 power of 0 = 1000213298174000 + + Remove leading 1 => Result is 000213298174000 + The array of codewords + The number of codewords + The decoded string representing the Numeric data. + + + + + + + Guenther Grau + + + + Returns the DetectionResult Columns. This does a fair bit of calculation, so call it sparingly. + + The detection result columns. + + + + Adjusts the indicator column row numbers. + + Detection result column. + + + + return number of codewords which don't have a valid row number. Note that the count is not accurate as codewords . + will be counted several times. It just serves as an indicator to see when we can stop adjusting row numbers + + The row numbers. + + + + Adjusts the row numbers by row. + + The row numbers by row. + + + + Adjusts the row numbers from both Row Indicators + + zero + + + + Adjusts the row numbers from Right Row Indicator. + + The unadjusted row count. + + + + Adjusts the row numbers from Left Row Indicator. + + Unadjusted row Count. + + + + Adjusts the row number if valid. + + The invalid rows + Row indicator row number. + Invalid row counts. + Codeword. + + + + Adjusts the row numbers. + + Barcode column. + Codewords row. + Codewords. + + + + Adjusts the row number. + + true, if row number was adjusted, false otherwise. + Codeword. + Other codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + The maximum distance to search in the codeword array in both the positive and negative directions + + + + + The Bounding Box around the column (in the BitMatrix) + + The box. + + + + The Codewords the Box encodes for, offset by the Box minY. + Remember to Access this ONLY through GetCodeword(imageRow) if you're accessing it in that manner. + + The codewords. + + + + Initializes a new instance of the class. + + The Bounding Box around the column (in the BitMatrix) + + + + Converts the Image's Row to the index in the Codewords array + + The Codeword Index. + Image row. + + + + Converts the Codeword array index into a Row in the Image (BitMatrix) + + The Image Row. + Codeword index. + + + + Gets the codeword for a given row + + The codeword. + Image row. + + + + Gets the codeword closest to the specified row in the image + + Image row. + + + + Sets the codeword for an image row + + Image row. + Codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + Gets or sets a value indicating whether this instance is the left indicator + + true if this instance is left; otherwise, false. + + + + Initializes a new instance of the class. + + Box. + If set to true is left. + + + + Sets the Row Numbers as Inidicator Columns + + + + + TODO implement properly + TODO maybe we should add missing codewords to store the correct row number to make + finding row numbers for other columns easier + use row height count to make detection of invalid row numbers more reliable + + The indicator column row numbers. + Metadata. + + + + Gets the row heights. + + The row heights. + + + + Adjusts the in omplete indicator column row numbers. + + Metadata. + + + + Gets the barcode metadata. + + The barcode metadata. + + + + Prune the codewords which do not match the metadata + TODO Maybe we should keep the incorrect codewords for the start and end positions? + + Codewords. + Metadata. + + + + Returns a that represents the current . + + A that represents the current . + + + +

PDF417 error correction implementation.

+

This example + is quite useful in understanding the algorithm.

+ Sean Owen + +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the specified received. + + received codewords + number of those codewords used for EC + location of erasures + The error locations count. + + + + + Runs the euclidean algorithm (Greatest Common Divisor) until r's degree is less than R/2 + + The euclidean algorithm. + + + + Finds the error locations as a direct application of Chien's search + + The error locations. + Error locator. + + + + Finds the error magnitudes by directly applying Forney's Formula + + The error magnitudes. + Error evaluator. + Error locator. + Error locations. + + + +

A field based on powers of a generator integer, modulo some modulus.

+ +
+ Sean Owen +
+ + + + + Sean Owen + + + + Gets the coefficients. + + The coefficients. + + + + degree of this polynomial + + + + + Gets a value indicating whether this instance is zero. + + true if this polynomial is the monomial "0" + + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + + + Adds another Modulus + + Other. + + + + Subtract another Modulus + + Other. + + + + Multiply by another Modulus + + Other. + + + + Returns a Negative version of this instance + + + + + Multiply by a Scalar. + + Scalar. + + + + Multiplies by a Monomial + + The by monomial. + Degree. + Coefficient. + + + + Returns a that represents the current . + + A that represents the current . + + + + + + Guenther Grau + creatale GmbH (christoph.schulz@creatale.de) + + + + The ratios table + + + + + Initializes the class & Pre-computes the symbol ratio table. + + + + + Gets the decoded value. + + The decoded value. + Module bit count. + + + + Samples the bit counts. + + The bit counts. + Module bit count. + + + + Gets the decoded codeword value. + + The decoded codeword value. + Module bit count. + + + + Gets the bit value. + + The bit value. + Module bit count. + + + + Gets the closest decoded value. + + The closest decoded value. + Module bit count. + + + + + + Guenther Grau + + + + Decode the specified image, imageTopLeft, imageBottomLeft, imageTopRight, imageBottomRight, minCodewordWidth + and maxCodewordWidth. + TODO: don't pass in minCodewordWidth and maxCodewordWidth, pass in barcode columns for start and stop pattern + columns. That way width can be deducted from the pattern column. + This approach also allows to detect more details about the barcode, e.g. if a bar type (white or black) is wider + than it should be. This can happen if the scanner used a bad blackpoint. + + Image. + Image top left. + Image bottom left. + Image top right. + Image bottom right. + Minimum codeword width. + Max codeword width. + + + + Merge the specified leftRowIndicatorColumn and rightRowIndicatorColumn. + + Left row indicator column. + Right row indicator column. + + + + Adjusts the bounding box. + + The bounding box. + Row indicator column. + + + + Gets the barcode metadata. + + The barcode metadata. + Left row indicator column. + Right row indicator column. + + + + Gets the row indicator column. + + The row indicator column. + Image. + Bounding box. + Start point. + If set to true left to right. + Minimum codeword width. + Max codeword width. + + + + Adjusts the codeword count. + + Detection result. + Barcode matrix. + + + + Creates the decoder result. + + The decoder result. + Detection result. + + + + This method deals with the fact, that the decoding process doesn't always yield a single most likely value. The + current error correction implementation doesn't deal with erasures very well, so it's better to provide a value + for these ambiguous codewords instead of treating it as an erasure. The problem is that we don't know which of + the ambiguous values to choose. We try decode using the first value, and if that fails, we use another of the + ambiguous values and try to decode again. This usually only happens on very hard to read and decode barcodes, + so decoding the normal barcodes is not affected by this. + + The decoder result from ambiguous values. + Ec level. + Codewords. + contains the indexes of erasures. + array with the indexes that have more than one most likely value. + two dimensional array that contains the ambiguous values. The first dimension must + be the same Length as the ambiguousIndexes array. + + + + Creates the barcode matrix. + + The barcode matrix. + Detection result. + + + + Tests to see if the Barcode Column is Valid + + true, if barcode column is valid, false otherwise. + Detection result. + Barcode column. + + + + Gets the start column. + + The start column. + Detection result. + Barcode column. + Image row. + If set to true left to right. + + + + Detects the codeword. + + The codeword. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + Minimum codeword width. + Max codeword width. + + + + Gets the module bit count. + + The module bit count. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + + + + Gets the number of EC code words. + + The number of EC code words. + Barcode EC level. + + + + Adjusts the codeword start column. + + The codeword start column. + Image. + Minimum column. + Max column. + If set to true left to right. + Codeword start column. + Image row. + + + + Checks the codeword for any skew. + + true, if codeword is within the skew, false otherwise. + Codeword size. + Minimum codeword width. + Max codeword width. + + + + Decodes the codewords. + + The codewords. + Codewords. + Ec level. + Erasures. + + + + Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place. + + The errors. + data and error correction codewords. + positions of any known erasures. + number of error correction codewords that are available in codewords. + + + + Verifies that all is well with the the codeword array. + + Codewords. + Number EC codewords. + + + + Gets the bit count for codeword. + + The bit count for codeword. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Module bit count. + + + + Returns a that represents the jagged array. + + A that represents the jagged array. + Barcode matrix as a jagged array. + + + +

Encapsulates logic that can detect a PDF417 Code in an image, even if the + PDF417 Code is rotated or skewed, or partially obscured.

+ + SITA Lab (kevin.osullivan@sita.aero) + dswitkin@google.com (Daniel Switkin) + Guenther Grau +
+
+ + + B S B S B S B S Bar/Space pattern + 11111111 0 1 0 1 0 1 000. + + + + + 1111111 0 1 000 1 0 1 00 1 + + + + + if we set the value too low, then we don't detect the correct height of the bar if the start patterns are damaged. + if we set the value too high, then we might detect the start pattern from a neighbor barcode. + + + + + A PDF471 barcode should have at least 3 rows, with each row being >= 3 times the module width. Therefore it should be at least + 9 pixels tall. To be conservative, we use about half the size to ensure we don't miss it. + + + + +

Detects a PDF417 Code in an image. Only checks 0 and 180 degree rotations.

+
+ barcode image to decode + optional hints to detector + if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned + + encapsulating results of detecting a PDF417 code + +
+ + + Detects PDF417 codes in an image. Only checks 0 degree rotation (so rotate the matrix and check again outside of this method) + + multiple if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned. + bit matrix to detect barcodes in. + List of ResultPoint arrays containing the coordinates of found barcodes + + + + Locate the vertices and the codewords area of a black blob using the Start and Stop patterns as locators. + + Matrix. + Start row. + Start column. + an array containing the vertices: + vertices[0] x, y top left barcode + vertices[1] x, y bottom left barcode + vertices[2] x, y top right barcode + vertices[3] x, y bottom right barcode + vertices[4] x, y top left codeword area + vertices[5] x, y bottom left codeword area + vertices[6] x, y top right codeword area + vertices[7] x, y bottom right codeword area + + + + + Copies the temp data to the final result + + Result. + Temp result. + Destination indexes. + + + + Finds the rows with the given pattern. + + The rows with pattern. + Matrix. + Height. + Width. + Start row. + Start column. + Pattern. + + + + Finds the guard pattern. Uses System.Linq.Enumerable.Repeat to fill in counters. This might be a performance issue? + + start/end horizontal offset of guard pattern, as an array of two ints. + matrix row of black/white values to search + column x position to start search. + row y position to start search. + width the number of pixels to search on this row. + If set to true search the white patterns first. + pattern of counts of number of black and white pixels that are being searched for as a pattern. + counters array of counters, as long as pattern, to re-use . + + + + Determines how closely a set of observed counts of runs of black/white. + values matches a given target pattern. This is reported as the ratio of + the total variance from the expected pattern proportions across all + pattern elements, to the length of the pattern. + + + ratio of total variance between counters and pattern compared to + total pattern size, where the ratio has been multiplied by 256. + So, 0 means no variance (perfect match); 256 means the total + variance between counters and patterns equals the pattern length, + higher values mean even more variance + + observed counters. + expected pattern. + The most any counter can differ before we give up. + + + + PDF 417 Detector Result class. Skipped private backing stores. + Guenther Grau + + + + + Initializes a new instance of the class. + + Bits. + Points. + + + + defines the level of the error correction / count of error correction codewords + + + + + Holds all of the information for a barcode in a format where it can be easily accessible + + Jacob Haynes + + + + + the height of the matrix (Rows) + the width of the matrix (Cols) + + + + + Jacob Haynes + + + + + Creates a Barcode row of the width + + The width. + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + A boolean which is true if the bar black false if it is white + How many spots wide the bar is. + + + + + This function scales the row + + How much you want the image to be scaled, must be greater than or equal to 1. + the scaled row + + + + + Represents possible PDF417 barcode compaction types. + + + + + + + + + + + + + + + + + + + + + + + + + Data object to specify the minimum and maximum number of rows and columns for a PDF417 barcode. + @author qwandor@google.com (Andrew Walbran) + + + + + Initializes a new instance of the class. + + The min cols. + The max cols. + The min rows. + The max rows. + + + + Gets the min cols. + + + + + Gets the max cols. + + + + + Gets the min rows. + + + + + Gets the max rows. + + + + + Top-level class for the logic part of the PDF417 implementation. + + + + + The start pattern (17 bits) + + + + + The stop pattern (18 bits) + + + + + The codeword table from the Annex A of ISO/IEC 15438:2001(E). + + + + + Calculates the necessary number of rows as described in annex Q of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol (r) + + + + Calculates the number of pad codewords as described in 4.9.2 of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol + the number of pad codewords + + + + Generates the barcode logic. + + the message to encode + PDF417 error correction level to use + + + + Determine optimal nr of columns and rows for the specified number of + codewords. + + number of code words + number of error correction code words + The longest dimension of the barcode, used for columns + The short dimension of the barcode, used for rows + The height of a row, will alter this parameter if aspectRatio>4 (aspectRatio==AUTO) + dimension object containing cols as width and rows as height + + + + Sets max/min row/col values + + maximum allowed columns + minimum allowed columns + maximum allowed rows + minimum allowed rows + + + + Sets compaction to values stored in enum + + compaction mode to use + + + + Sets compact to be true or false + + if true, enables compaction + + + + Sets output encoding. + + sets character encoding to use + + + + Sets the disable eci. + + if set to true don't add an ECI segment for different encodings than default. + + + + PDF417 error correction code following the algorithm described in ISO/IEC 15438:2001(E) in + chapter 4.10. + + + + + Tables of coefficients for calculating error correction words + (see annex F, ISO/IEC 15438:2001(E)) + + + + + Determines the number of error correction codewords for a specified error correction + level. + + the error correction level (0-8) + the number of codewords generated for error correction + + + + Determines the error correction level for AUTO + + The error correction level (0-9) + The number of codewords for AUTO errorCorrectionLevel + the number of codewords generated for error correction + + + + Returns the recommended minimum error correction level as described in annex E of + ISO/IEC 15438:2001(E). + + the number of data codewords + the recommended minimum error correction level + + + + Generates the error correction codewords according to 4.10 in ISO/IEC 15438:2001(E). + + the data codewords + the error correction level (0-8) + the String representing the error correction codewords + + + + defines the level of the error correction / count of error correction codewords + + + + + PDF417 high-level encoder following the algorithm described in ISO/IEC 15438:2001(E) in + annex P. + + + + + code for Text compaction + + + + + code for Byte compaction + + + + + code for Numeric compaction + + + + + Text compaction submode Alpha + + + + + Text compaction submode Lower + + + + + Text compaction submode Mixed + + + + + Text compaction submode Punctuation + + + + + mode latch to Text Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters NOT a multiple of 6) + + + + + mode latch to Numeric Compaction mode + + + + + mode shift to Byte Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters a multiple of 6) + + + + + identifier for a user defined Extended Channel Interpretation (ECI) + + + + + identifier for a general purpose ECO format + + + + + identifier for an ECI of a character set of code page + + + + + Raw code table for text compaction Mixed sub-mode + + + + + Raw code table for text compaction: Punctuation sub-mode + + + + + Performs high-level encoding of a PDF417 message using the algorithm described in annex P + of ISO/IEC 15438:2001(E). If byte compaction has been selected, then only byte compaction + is used. + + the message + compaction mode to use + character encoding used to encode in default or byte compaction + or null for default / not applicable + if true, don't add an ECI segment for different encodings than default + the encoded message (the char values range from 0 to 928) + + + + Encode parts of the message using Text Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.2. + + the message + the start position within the message + the number of characters to encode + receives the encoded codewords + should normally be SUBMODE_ALPHA + the text submode in which this method ends + + + + + Encode parts of the message using Byte Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.3. The Unicode characters will be converted to binary using the cp437 + codepage. + + the message converted to a byte array + the start position within the message + the number of bytes to encode + the mode from which this method starts + receives the encoded codewords + + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using text compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using binary compaction. + + the message + the message converted to a byte array + the start position within the message + + the requested character count + + + + The class holds the available options for the + + + + + Specifies whether to use compact mode for PDF417 (type ). + + + + + Specifies what compaction mode to use for PDF417 (type + ). + + + + + Specifies the minimum and maximum number of rows and columns for PDF417 (type + ). + + + + + Specifies what degree of error correction to use + + + + + Specifies what degree of error correction to use + + + + + Specifies what character encoding to use where applicable (type {@link String}) + + + + + Explicitly disables ECI segment when generating PDF417 Code + That is against the specification but some + readers have problems if the charset is switched from + CP437 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use different encodings + and the ECI segment is omitted. + + + + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Maximum Codewords (Data + Error). + + + + + Gets the bit count sum. + + The bit count sum. + Module bit count. + + + + Converts an ICollection<int> to an int[] + Carry-over from Java. Will likely remove and replace with the Generic .ToArray() method. + + The int array. + List. + + + + Translate the symbol into a codeword + + the codeword corresponding to the symbol. + encoded symbol to translate to a codeword + + + + The sorted table of all possible symbols. Extracted from the PDF417 + specification. The index of a symbol in this table corresponds to the + index into the codeword table. + + + + + This table contains to codewords for all symbols. + + + + + This implementation can detect and decode PDF417 codes in an image. + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Locates and decodes a PDF417 code in an image. + + a String representing the content encoded by the PDF417 code + if a PDF417 cannot be decoded + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + **Note** this will return the FIRST barcode discovered if there are many. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Locates and decodes Multiple PDF417 codes in an image. + + an array of Strings representing the content encoded by the PDF417 codes + + + + + Locates and decodes multiple barcodes in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcodes encode + + + + + Decode the specified image, with the hints and optionally multiple barcodes. + Based on Owen's Comments in , this method has been modified to continue silently + if a barcode was not decoded where it was detected instead of throwing a new exception object. + + Image. + Hints. + If set to true multiple. + + + + Gets the maximum width of the barcode + + The max width. + P1. + P2. + + + + Gets the minimum width of the barcode + + The minimum width. + P1. + P2. + + + + Gets the maximum width of the codeword. + + The max codeword width. + P. + + + + Gets the minimum width of the codeword. + + The minimum codeword width. + P. + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + PDF 417 result meta data. + Guenther Grau + + + + + The Segment ID represents the segment of the whole file distributed over different symbols. + + + + + Is the same for each related PDF417 symbol + + + + + always null + + + + + true if it is the last segment + + + + + count of segments, -1 if not set + + + + + Filename of the encoded file + + + + + filesize in bytes of the encoded file + returns filesize in bytes, -1 if not set + + + + + 16-bit CRC checksum using CCITT-16 + returns crc checksum, -1 if not set + + + + + unix epock timestamp, elapsed seconds since 1970-01-01 + returns elapsed seconds, -1 if not set + + + + + Jacob Haynes + qwandor@google.com (Andrew Walbran) + + + + + default white space (margin) around the code + + + + + default error correction level + + + + + default aspect ratio + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The height of a row in the barcode + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Takes encoder, accounts for width/height, and retrieves bit matrix + + + + + This takes an array holding the values of the PDF 417 + + a byte array of information with 0 is black, and 1 is white + border around the barcode + BitMatrix of the input + + + + Takes and rotates the it 90 degrees + + + + + This object extends LuminanceSource around an array of YUV data returned from the camera driver, + with the option to crop to a rectangle within the full data. This can be used to exclude + superfluous pixels around the perimeter and speed up decoding. + It works for any pixel format where the Y channel is planar and appears first, including + YCbCr_420_SP and YCbCr_422_SP. + @author dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The yuv data. + Width of the data. + Height of the data. + The left. + The top. + The width. + The height. + if set to true [reverse horiz]. + + + + Initializes a new instance of the class. + + The luminances. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + + + + + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Renders the cropped greyscale bitmap. + + + + + + width of image from {@link #renderThumbnail()} + + + + + height of image from {@link #renderThumbnail()} + + + + + creates a new instance + + + + + + + + Sean Owen + + + {@link BitMatrix} to parse + ReaderException if dimension is not >= 21 and 1 mod 4 + + +

Reads format information from one of its two locations within the QR Code.

+ +
+ {@link FormatInformation} encapsulating the QR Code's format info + + ReaderException if both format information locations cannot be parsed as + the valid encoding of format information + +
+ +

Reads version information from one of its two locations within the QR Code.

+ +
+ {@link Version} encapsulating the QR Code's version + + ReaderException if both version information locations cannot be parsed as + the valid encoding of version information + +
+ +

Reads the bits in the {@link BitMatrix} representing the finder pattern in the + correct order in order to reconstruct the codewords bytes contained within the + QR Code.

+ +
+ bytes encoded within the QR Code + + ReaderException if the exact number of bytes expected is not read +
+ + Revert the mask removal done while reading the code words. The bit matrix should revert to its original state. + + + Prepare the parser for a mirrored operation. + This flag has effect only on the {@link #readFormatInformation()} and the + {@link #readVersion()}. Before proceeding with {@link #readCodewords()} the + {@link #mirror()} method should be called. + + @param mirror Whether to read version and format information mirrored. + + + Mirror the bit matrix in order to attempt a second reading. + + +

Encapsulates a block of data within a QR Code. QR Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

When QR Codes use multiple data blocks, they are actually interleaved. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ +
+ bytes as read directly from the QR Code + + version of the QR Code + + error-correction level of the QR Code + + {@link DataBlock}s containing original bytes, "de-interleaved" from representation in the + QR Code + +
+ +

Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations + of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix, + including areas used for finder patterns, timing patterns, etc. These areas should be unused + after the point they are unmasked anyway.

+ +

Note that the diagram in section 6.8.1 is misleading since it indicates that i is column position + and j is row position. In fact, as the text says, i is row position and j is column position.

+ +
+ Sean Owen +
+ + See ISO 18004:2006 6.8.1 + + +

Implementations of this method reverse the data masking process applied to a QR Code and + make its bits ready to read.

+
+ + representation of QR Code bits + dimension of QR Code, represented by bits, being unmasked +
+ +

QR Codes can encode text as bits in one of several modes, and can use multiple modes + in one QR Code. This class decodes the bits back into text.

+ +

See ISO 18004:2006, 6.4.3 - 6.4.7

+ Sean Owen +
+
+ + + See ISO 18004:2006, 6.4.4 Table 5 + + + + + See specification GBT 18284-2000 + + The bits. + The result. + The count. + + + + +

The main class which implements QR Code decoding -- as opposed to locating and extracting + the QR Code from an image.

+
+ + Sean Owen + +
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a QR Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Decodes a QR Code represented as a {@link BitMatrix}. A 1 or "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+
+ data and error correction codewords + number of codewords that are data bytes + +
+ + +

See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels + defined by the QR code standard.

+
+ Sean Owen +
+ + L = ~7% correction + + + M = ~15% correction + + + Q = ~25% correction + + + H = ~30% correction + + + + Gets the bits. + + + + + Gets the name. + + + + + Ordinals this instance. + + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Fors the bits. + + int containing the two bits encoding a QR Code's error correction level + + representing the encoded error correction level + + + +

Encapsulates a QR Code's format information, including the data mask used and + error correction level.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + +
+ + See ISO 18004:2006, Annex C, Table C.1 + + + Offset i holds the number of 1 bits in the binary representation of i + + + + Decodes the format information. + + format info indicator, with mask still applied + The masked format info2. + + information about the format it specifies, or null + if doesn't seem to match any known pattern + + + + +

See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which + data can be encoded to bits in the QR code standard.

+
+ Sean Owen +
+ + + Gets the name. + + + + + enumeration for encoding modes + + + + + + + + + + numeric encoding + + + + + alpha-numeric encoding + + + + + structured append + + + + + byte mode encoding + + + + + ECI segment + + + + + Kanji mode + + + + + FNC1 char, first position + + + + + FNC1 char, second position + + + + + Hanzi mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See GBT 18284-2000; "Hanzi" is a transliteration of this mode name. + + + + Fors the bits. + + four bits encoding a QR Code data mode + + encoded by these bits + + if bits do not correspond to a known mode + + + version in question + + number of bits used, in this QR Code symbol {@link Version}, to encode the + count of characters that will follow encoded in this {@link Mode} + + + + + Gets the bits. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Meta-data container for QR Code decoding. Instances of this class may be used to convey information back to the + decoding caller. Callers are expected to process this. + + + + + Initializes a new instance of the class. + + if set to true [mirrored]. + + + + true if the QR Code was mirrored. + + + + + Apply the result points' order correction due to mirroring. + + Array of points to apply mirror correction to. + + + + See ISO 18004:2006 Annex D + + Sean Owen + + + See ISO 18004:2006 Annex D. + Element i represents the raw version bits that specify version i + 7 + + + + + Gets the version number. + + + + + Gets the alignment pattern centers. + + + + + Gets the total codewords. + + + + + Gets the dimension for version. + + + + + Gets the EC blocks for level. + + The ec level. + + + +

Deduces version information purely from QR Code dimensions.

+ +
+ dimension in modules + + for a QR Code of that dimension or null +
+ + + Gets the version for number. + + The version number. + + + + See ISO 18004:2006 Annex E + + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + + Gets the EC codewords per block. + + + + + Gets the num blocks. + + + + + Gets the total EC codewords. + + + + + Gets the EC blocks. + + + + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the QR code version's format.

+
+
+ + + Gets the count. + + + + + Gets the data codewords. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + See ISO 18004:2006 6.5.1 Table 9 + + +

Encapsulates an alignment pattern, which are the smaller square patterns found in + all but the simplest QR Codes.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Determines if this alignment pattern "about equals" an alignment pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing an average of the two. + + The i. + The j. + New size of the module. + + + +

This class attempts to find alignment patterns in a QR Code. Alignment patterns look like finder + patterns but are smaller and appear at regular intervals throughout the image.

+ +

At the moment this only looks for the bottom-right alignment pattern.

+ +

This is mostly a simplified copy of {@link FinderPatternFinder}. It is copied, + pasted and stripped down here for maximum performance but does unfortunately duplicate + some code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Creates a finder that will look in a portion of the whole image.

+ +
+ image to search + + left column from which to start searching + + top row from which to start searching + + width of region to search + + height of region to search + + estimated module size so far + + callback function which is called, when a result point is found +
+ +

This method attempts to find the bottom-right alignment pattern in the image. It is a bit messy since + it's pretty performance-critical and so is written to be fast foremost.

+ +
+ if found +
+ + Given a count of black/white/black pixels just seen and an end position, + figures the location of the center of this black/white/black run. + + + + count of black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/1 ratios + used by alignment patterns to be considered a match + + + + +

After a horizontal scan finds a potential alignment pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + alignment pattern to see if the same proportion is detected.

+
+ row where an alignment pattern was detected + center of the section that appears to cross an alignment pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of alignment pattern, or null if not found + +
+ +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will see if this pattern had been + found on a previous horizontal scan. If so, we consider it confirmed and conclude we have + found the alignment pattern.

+ +
+ reading state module counts from horizontal scan + + row where alignment pattern may be found + + end of possible alignment pattern in row + + {@link AlignmentPattern} if we have found the same pattern twice, or null if not + +
+ + +

Encapsulates logic that can detect a QR Code in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + + Gets the image. + + + + + Gets the result point callback. + + + + +

Detects a QR Code in an image.

+
+ + encapsulating results of detecting a QR Code + +
+ + +

Detects a QR Code in an image.

+
+ optional hints to detector + + encapsulating results of detecting a QR Code + +
+ + + Processes the finder pattern info. + + The info. + + + +

Computes the dimension (number of modules on a size) of the QR Code based on the position + of the finder patterns and estimated module size.

+
+
+ + +

Computes an average estimated module size based on estimated derived from the positions + of the three finder patterns.

+
+ detected top-left finder pattern center + detected top-right finder pattern center + detected bottom-left finder pattern center + estimated module size +
+ +

Estimates module size based on two finder patterns -- it uses + {@link #sizeOfBlackWhiteBlackRunBothWays(int, int, int, int)} to figure the + width of each, measuring along the axis between their centers.

+
+
+ + See {@link #sizeOfBlackWhiteBlackRun(int, int, int, int)}; computes the total width of + a finder pattern by looking for a black-white-black run from the center in the direction + of another point (another finder pattern center), and in the opposite direction too. + + + +

This method traces a line from a point in the image, in the direction towards another point. + It begins in a black region, and keeps going until it finds white, then black, then white again. + It reports the distance from the start to this point.

+ +

This is used when figuring out how wide a finder pattern is, when the finder pattern + may be skewed or rotated.

+
+
+ + +

Attempts to locate an alignment pattern in a limited region of the image, which is + guessed to contain it. This method uses {@link AlignmentPattern}.

+
+ estimated module size so far + x coordinate of center of area probably containing alignment pattern + y coordinate of above + number of pixels in all directions to search from the center + + if found, or null otherwise + +
+ + +

Encapsulates a finder pattern, which are the three square patterns found in + the corners of QR Codes. It also encapsulates a count of similar finder patterns, + as a convenience to the finder's bookkeeping.

+
+ Sean Owen +
+ + + Gets the size of the estimated module. + + + The size of the estimated module. + + + +

Determines if this finder pattern "about equals" a finder pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing a weighted average + based on count. + + The i. + The j. + New size of the module. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+
+ Sean Owen +
+ + + 1 pixel/module times 3 modules/center + + + + + support up to version 20 for mobile clients + + + + +

Creates a finder that will search the image for three finder patterns.

+
+ image to search +
+ + + Initializes a new instance of the class. + + The image. + The result point callback. + + + + Gets the image. + + + + + Gets the possible centers. + + + + Given a count of black/white/black/white/black pixels just seen and an end position, + figures the location of the center of this run. + + + + count of black/white/black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/3/1/1 ratios + used by finder patterns to be considered a match + + + + + + count of black/white/black/white/black pixels just read + true if the proportions of the counts is close enough to the 1/1/3/1/1 ratios + by finder patterns to be considered a match + + + + After a vertical and horizontal scan finds a potential finder pattern, this method + "cross-cross-cross-checks" by scanning down diagonally through the center of the possible + finder pattern to see if the same proportion is detected. + @param maxCount maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + @param originalStateCountTotal The original state count total. + + row where a finder pattern was detected + center of the section that appears to cross a finder pattern + true if proportions are withing expected limits + + + +

After a horizontal scan finds a potential finder pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + finder pattern to see if the same proportion is detected.

+
+ row where a finder pattern was detected + center of the section that appears to cross a finder pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of finder pattern, or null if not found + +
+ +

Like {@link #crossCheckVertical(int, int, int, int)}, and in fact is basically identical, + except it reads horizontally instead of vertically. This is used to cross-cross + check a vertical cross check and locate the real center of the alignment pattern.

+
+
+ + + @see #handlePossibleCenter(int[], int, int) + + reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + ignored + true if a finder pattern candidate was found this time + + + +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will, ah, cross-cross-check + with another horizontal scan. This is needed primarily to locate the real horizontal + center of the pattern in cases of extreme skew. + And then we cross-cross-cross check with another diagonal scan.

+ If that succeeds the finder pattern location is added to a list that tracks + the number of times each location has been nearly-matched as a finder pattern. + Each additional find is more evidence that the location is in fact a finder + pattern center +
+ reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + + true if a finder pattern candidate was found this time + +
+ + number of rows we could safely skip during scanning, based on the first + two finder patterns that have been located. In some cases their position will + allow us to infer that the third pattern must lie below a certain point farther + down in the image. + + + + true iff we have found at least 3 finder patterns that have been detected + at least {@link #CENTER_QUORUM} times each, and, the estimated module size of the + candidates is "pretty similar" + + + + the 3 best {@link FinderPattern}s from our list of candidates. The "best" are + those that have been detected at least {@link #CENTER_QUORUM} times, and whose module + size differs from the average among those patterns the least + + + + + Orders by furthest from average + + + +

Orders by {@link FinderPattern#getCount()}, descending.

+
+ + +

Encapsulates information about finder patterns in an image, including the location of + the three finder patterns, and their estimated module size.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The pattern centers. + + + + Gets the bottom left. + + + + + Gets the top left. + + + + + Gets the top right. + + + + + JAVAPORT: The original code was a 2D array of ints, but since it only ever gets assigned + 0, 1 and 2 I'm going to use less memory and go with bytes. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Gets the height. + + + + + Gets the width. + + + + + Gets or sets the with the specified x. + + + + + an internal representation as bytes, in row-major order. array[y][x] represents point (x,y) + + + + + Sets the specified x. + + The x. + The y. + The value. + + + + Sets the specified x. + + The x. + The y. + if set to true [value]. + + + + Clears the specified value. + + The value. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + Encode "bytes" with the error correction level "ecLevel". The encoding mode will be chosen + internally by chooseMode(). On success, store the result in "qrCode". + We recommend you to use QRCode.EC_LEVEL_L (the lowest level) for + "getECLevel" since our primary use is to show QR code on desktop screens. We don't need very + strong error correction for this purpose. + Note that there is no way to encode bytes in MODE_KANJI. We might want to add EncodeWithMode() + with which clients can specify the encoding mode. For now, we don't need the functionality. + + text to encode + error correction level to use + representing the encoded QR code + + + + Encodes the specified content. + + The content. + The ec level. + The hints. + + + + + Decides the smallest version of QR code that will contain all of the provided data. + + if the data cannot fit in any version + + + + Gets the alphanumeric code. + + The code. + the code point of the table used in alphanumeric mode or + -1 if there is no corresponding code in the table. + + + + Chooses the mode. + + The content. + + + + + Choose the best mode by examining the content. Note that 'encoding' is used as a hint; + if it is Shift_JIS, and the input is only double-byte Kanji, then we return {@link Mode#KANJI}. + + The content. + The encoding. + + + + + true if the number of input bits will fit in a code with the specified version and error correction level. + + + + Terminate bits as described in 8.4.8 and 8.4.9 of JISX0510:2004 (p.24). + + The num data bytes. + The bits. + + + + Get number of data bytes and number of error correction bytes for block id "blockID". Store + the result in "numDataBytesInBlock", and "numECBytesInBlock". See table 12 in 8.5.1 of + JISX0510:2004 (p.30) + + The num total bytes. + The num data bytes. + The num RS blocks. + The block ID. + The num data bytes in block. + The num EC bytes in block. + + + + Interleave "bits" with corresponding error correction bytes. On success, store the result in + "result". The interleave rule is complicated. See 8.6 of JISX0510:2004 (p.37) for details. + + The bits. + The num total bytes. + The num data bytes. + The num RS blocks. + + + + + Append mode info. On success, store the result in "bits". + + The mode. + The bits. + + + + Append length info. On success, store the result in "bits". + + The num letters. + The version. + The mode. + The bits. + + + + Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits". + + The content. + The mode. + The bits. + The encoding. + + + + + + Satoru Takabayashi + Daniel Switkin + Sean Owen + + + + Apply mask penalty rule 1 and return the penalty. Find repetitive cells with the same color and + give penalty to them. Example: 00000 or 11111. + + The matrix. + + + + + Apply mask penalty rule 2 and return the penalty. Find 2x2 blocks with the same color and give + penalty to them. This is actually equivalent to the spec's rule, which is to find MxN blocks and give a + penalty proportional to (M-1)x(N-1), because this is the number of 2x2 blocks inside such a block. + + The matrix. + + + + + Apply mask penalty rule 3 and return the penalty. Find consecutive cells of 00001011101 or + 10111010000, and give penalty to them. If we find patterns like 000010111010000, we give + penalties twice (i.e. 40 * 2). + + The matrix. + + + + + Apply mask penalty rule 4 and return the penalty. Calculate the ratio of dark cells and give + penalty if the ratio is far from 50%. It gives 10 penalty for 5% distance. + + The matrix. + + + + + Return the mask bit for "getMaskPattern" at "x" and "y". See 8.8 of JISX0510:2004 for mask + pattern conditions. + + The mask pattern. + The x. + The y. + + + + + Helper function for applyMaskPenaltyRule1. We need this for doing this calculation in both + vertical and horizontal orders respectively. + + The matrix. + if set to true [is horizontal]. + + + + + + + + satorux@google.com (Satoru Takabayashi) - creator + + + + + Set all cells to 2. 2 means that the cell is empty (not set yet). + + JAVAPORT: We shouldn't need to do this at all. The code should be rewritten to begin encoding + with the ByteMatrix initialized all to zero. + + The matrix. + + + + Build 2D matrix of QR Code from "dataBits" with "ecLevel", "version" and "getMaskPattern". On + success, store the result in "matrix" and return true. + + The data bits. + The ec level. + The version. + The mask pattern. + The matrix. + + + + Embed basic patterns. On success, modify the matrix and return true. + The basic patterns are: + - Position detection patterns + - Timing patterns + - Dark dot at the left bottom corner + - Position adjustment patterns, if need be + + The version. + The matrix. + + + + Embed type information. On success, modify the matrix. + + The ec level. + The mask pattern. + The matrix. + + + + Embed version information if need be. On success, modify the matrix and return true. + See 8.10 of JISX0510:2004 (p.47) for how to embed version information. + + The version. + The matrix. + + + + Embed "dataBits" using "getMaskPattern". On success, modify the matrix and return true. + For debugging purposes, it skips masking process if "getMaskPattern" is -1. + See 8.7 of JISX0510:2004 (p.38) for how to embed data bits. + + The data bits. + The mask pattern. + The matrix. + + + + Return the position of the most significant bit set (to one) in the "value". The most + significant bit is position 32. If there is no bit set, return 0. Examples: + - findMSBSet(0) => 0 + - findMSBSet(1) => 1 + - findMSBSet(255) => 8 + + The value_ renamed. + + + + + Calculate BCH (Bose-Chaudhuri-Hocquenghem) code for "value" using polynomial "poly". The BCH + code is used for encoding type information and version information. + Example: Calculation of version information of 7. + f(x) is created from 7. + - 7 = 000111 in 6 bits + - f(x) = x^2 + x^2 + x^1 + g(x) is given by the standard (p. 67) + - g(x) = x^12 + x^11 + x^10 + x^9 + x^8 + x^5 + x^2 + 1 + Multiply f(x) by x^(18 - 6) + - f'(x) = f(x) * x^(18 - 6) + - f'(x) = x^14 + x^13 + x^12 + Calculate the remainder of f'(x) / g(x) + x^2 + __________________________________________________ + g(x) )x^14 + x^13 + x^12 + x^14 + x^13 + x^12 + x^11 + x^10 + x^7 + x^4 + x^2 + -------------------------------------------------- + x^11 + x^10 + x^7 + x^4 + x^2 + + The remainder is x^11 + x^10 + x^7 + x^4 + x^2 + Encode it in binary: 110010010100 + The return value is 0xc94 (1100 1001 0100) + + Since all coefficients in the polynomials are 1 or 0, we can do the calculation by bit + operations. We don't care if coefficients are positive or negative. + + The value. + The poly. + + + + + Make bit vector of type information. On success, store the result in "bits" and return true. + Encode error correction level and mask pattern. See 8.9 of + JISX0510:2004 (p.45) for details. + + The ec level. + The mask pattern. + The bits. + + + + Make bit vector of version information. On success, store the result in "bits" and return true. + See 8.10 of JISX0510:2004 (p.45) for details. + + The version. + The bits. + + + + Check if "value" is empty. + + The value. + + true if the specified value is empty; otherwise, false. + + + + + Embed the lonely dark dot at left bottom corner. JISX0510:2004 (p.46) + + The matrix. + + + + + + The x start. + The y start. + The matrix. + + + + Embed position detection patterns and surrounding vertical/horizontal separators. + + The matrix. + + + + Embed position adjustment patterns if need be. + + The version. + The matrix. + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + + + + + + Initializes a new instance of the class. + + + + + Gets or sets the mode. + + + The mode. + + + + + Gets or sets the EC level. + + + The EC level. + + + + + Gets or sets the version. + + + The version. + + + + + Gets or sets the mask pattern. + + + The mask pattern. + + + + + Gets or sets the matrix. + + + The matrix. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Check if "mask_pattern" is valid. + + The mask pattern. + + true if [is valid mask pattern] [the specified mask pattern]; otherwise, false. + + + + + The class holds the available options for the QrCodeWriter + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + . + + + + + Specifies what character encoding to use where applicable (type ) + + + + + Explicitly disables ECI segment when generating QR Code + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + + + + + Specifies the exact version of QR code to be encoded. An integer, range 1 to 40. If the data specified + cannot fit within the required version, a WriterException will be thrown. + + + + + This implementation can detect and decode QR Codes in an image. + Sean Owen + + + + + Gets the decoder. + + + + + + Locates and decodes a QR code in an image. + + a String representing the content encoded by the QR code + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a QR Code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Implementations of this interface can decode an image of a barcode in some format into + the String it encodes. For example, can + decode a QR code. The decoder may optionally receive hints from the caller which may help + it decode more quickly or accurately. + + See , which attempts to determine what barcode + format is present within the image as well, and then decodes it accordingly. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + String which the barcode encodes + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + The general exception class throw when something goes wrong during decoding of a barcode. + This includes, but is not limited to, failing checksums / error correction algorithms, being + unable to locate finder timing patterns, and so on. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class. + + The inner exception. + + + + Initializes a new instance of the class. + + The inner exception. + + + + + Renders a to a image + + + + + Gets or sets the foreground color. + + The foreground color. + + + + Gets or sets the background color. + + The background color. + + + + Gets or sets the resolution which should be used to create the bitmap + If nothing is set the current system settings are used + + + + + Gets or sets the resolution which should be used to create the bitmap + If nothing is set the current system settings are used + + + + + Gets or sets the text font. + + + The text font. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Interface for a class to convert a BitMatrix to an output image format + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + The options. + + + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + + + converts the pixel data to a bitmap object + + + + + + the generated code as byte array of BGRA pixels + + + + + the width of the image + + + + + the height of the image + + + + + Renders a to an byte array with pixel data (4 byte per pixel, BGRA) + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Renders a barcode into a Svg image + + + + + Gets or sets the foreground color. + + The foreground color. + + + + Gets or sets the background color. + + The background color. + + + + Gets or sets the font family name + + The font family name. + + + + Gets or sets the font size in pixel + + The font size in pixel. + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Represents a barcode as a Svg image + + + + + Gets or sets the content. + + + The content. + + + + + The original height of the bitmatrix for the barcode + + + + + The original width of the bitmatrix for the barcode + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The content. + + + + Gives the XML representation of the SVG image + + + + + Encapsulates the result of decoding a barcode within an image. + + + + raw text encoded by the barcode, if applicable, otherwise null + + + raw bytes encoded by the barcode, if applicable, otherwise null + + + + points related to the barcode in the image. These are typically points + identifying finder patterns or the corners of the barcode. The exact meaning is + specific to the type of barcode that was decoded. + + + + {@link BarcodeFormat} representing the format of the barcode that was decoded + + + + {@link Hashtable} mapping {@link ResultMetadataType} keys to values. May be + null. This contains optional metadata about what was detected about the barcode, + like orientation. + + + + + Gets the timestamp. + + + + + how many bits of are valid; typically 8 times its length + + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + The timestamp. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + The timestamp. + + + + Adds one metadata to the result + + The type. + The value. + + + + Adds a list of metadata to the result + + The metadata. + + + + Adds the result points. + + The new points. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Represents some type of metadata about the result of the decoding that the decoder + wishes to communicate back to the caller. + + Sean Owen + + + + Unspecified, application-specific metadata. Maps to an unspecified {@link Object}. + + + + + Denotes the likely approximate orientation of the barcode in the image. This value + is given as degrees rotated clockwise from the normal, upright orientation. + For example a 1D barcode which was found by reading top-to-bottom would be + said to have orientation "90". This key maps to an {@link Integer} whose + value is in the range [0,360). + + + + +

2D barcode formats typically encode text, but allow for a sort of 'byte mode' + which is sometimes used to encode binary data. While {@link Result} makes available + the complete raw bytes in the barcode for these formats, it does not offer the bytes + from the byte segments alone.

+

This maps to a {@link java.util.List} of byte arrays corresponding to the + raw bytes in the byte segments in the barcode, in order.

+
+
+ + + Error correction level used, if applicable. The value type depends on the + format, but is typically a String. + + + + + For some periodicals, indicates the issue number as an {@link Integer}. + + + + + For some products, indicates the suggested retail price in the barcode as a + formatted {@link String}. + + + + + For some products, the possible country of manufacture as a {@link String} denoting the + ISO country code. Some map to multiple possible countries, like "US/CA". + + + + + For some products, the extension text + + + + + If the code format supports structured append and + the current scanned code is part of one then the + sequence number is given with it. + + + + + If the code format supports structured append and + the current scanned code is part of one then the + parity is given with it. + + + + + PDF417-specific metadata + + + + + Aztec-specific metadata + + + + + Encapsulates a point of interest in an image containing a barcode. Typically, this + would be the location of a finder pattern or the corner of the barcode, for example. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The x. + The y. + + + + Gets the X. + + + + + Gets the Y. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC and + BC is less than AC and the angle between BC and BA is less than 180 degrees. + + array of three to order + + + + calculates the distance between two points + + first pattern + second pattern + + distance between two points + + + + + Returns the z component of the cross product between vectors BC and BA. + + + + Callback which is invoked when a possible result point (significant + point in the barcode image such as a corner) is found. + + + + + + + + Luminance source class which support different formats of images. + + + + + enumeration of supported bitmap format which the RGBLuminanceSource can process + + + + + format of the byte[] isn't known. RGBLuminanceSource tries to determine the best possible value + + + + + grayscale array, the byte array is a luminance array with 1 byte per pixel + + + + + grayscale array, the byte array is a luminance array with 2 bytes per pixel + + + + + 3 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels alpha, red, green and blue + + + + + 3 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green, red and alpha + + + + + 2 bytes per pixel, 5 bit red, 6 bits green and 5 bits blue + + + + + 4 bytes per pixel with the channels red, green, blue and alpha + + + + + 4 bytes for two pixels, UYVY formatted + + + + + 4 bytes for two pixels, YUYV formatted + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 1 byte per pixel (Gray8). + That means the whole array consists of the luminance values (grayscale). + + The luminance array. + The width. + The height. + if set to true [is8 bit]. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + The bitmap format. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + calculates the luminance values for the given byte array and bitmap format + + + + + + + Contains conversion support elements such as classes, interfaces and static methods. + + + + + Copies an array of chars obtained from a String into a specified array of chars + + The String to get the chars from + Position of the String to start getting the chars + Position of the String to end getting the chars + Array to return the chars + Position of the destination array of chars to start storing the chars + An array of chars + + + + Sets the capacity for the specified List + + The List which capacity will be set + The new capacity value + + + + Converts a string-Collection to an array + + The strings. + + + + + Joins all elements to one string. + + + The separator. + The values. + + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The value. + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The start index. + The end index. + The value. + + + + + + + + + + + + + + + + + + Savely gets the value of a decoding hint + if hints is null the default is returned + + + The hints. + Type of the hint. + The @default. + + + + The base class for all objects which encode/generate a barcode image. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + A base class which covers the range of exceptions which may occur when encoding a barcode using + the Writer framework. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner exc. + +
+
diff --git a/packages/ZXing.Net.0.16.4/lib/net461/zxing.dll b/packages/ZXing.Net.0.16.4/lib/net461/zxing.dll new file mode 100644 index 0000000..d2bcce6 Binary files /dev/null and b/packages/ZXing.Net.0.16.4/lib/net461/zxing.dll differ diff --git a/packages/ZXing.Net.0.16.4/lib/net461/zxing.presentation.XML b/packages/ZXing.Net.0.16.4/lib/net461/zxing.presentation.XML new file mode 100644 index 0000000..a95132f --- /dev/null +++ b/packages/ZXing.Net.0.16.4/lib/net461/zxing.presentation.XML @@ -0,0 +1,195 @@ + + + + zxing.presentation + + + + + A smart class to decode the barcode inside a bitmap object which is derived from BitmapSource + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, default is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, default is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + The create RGB luminance source. + + + + A smart class to encode some content to a barcode image + + + + + Initializes a new instance of the class. + + + + + A smart class to encode some content to a barcode image into a geometry + Autor: Rob Fonseca-Ensor + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + + The bitmap. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + Renders a barcode into a geometry + Autor: Rob Fonseca-Ensor + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Renders a to a + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + + Gets or sets the font family. + + + The font family. + + + + + Gets or sets the size of the font. + + + The size of the font. + + + + + Gets or sets the font stretch. + + + The font stretch. + + + + + Gets or sets the font style. + + + The font style. + + + + + Gets or sets the font weight. + + + The font weight. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + diff --git a/packages/ZXing.Net.0.16.4/lib/net461/zxing.presentation.dll b/packages/ZXing.Net.0.16.4/lib/net461/zxing.presentation.dll new file mode 100644 index 0000000..b2651ad Binary files /dev/null and b/packages/ZXing.Net.0.16.4/lib/net461/zxing.presentation.dll differ diff --git a/packages/ZXing.Net.0.16.4/lib/net47/zxing.XML b/packages/ZXing.Net.0.16.4/lib/net47/zxing.XML new file mode 100644 index 0000000..a28c9e9 --- /dev/null +++ b/packages/ZXing.Net.0.16.4/lib/net47/zxing.XML @@ -0,0 +1,10934 @@ + + + + zxing + + + + + Extends with more information specific to the Aztec format, + like the number of layers and whether it's compact. + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + Initializes a new instance of the class. + + The bits. + The points. + if set to true [compact]. + The nb datablocks. + The nb layers. + + + + The main class which implements Aztec Code decoding -- as opposed to locating and extracting + the Aztec Code from an image. + + David Olivier + + + + Decodes the specified detector result. + + The detector result. + + + + + This method is used for testing the high-level encoder + + + + + + + Gets the string encoded in the aztec code bits + + The corrected bits. + the decoded string + + + + gets the table corresponding to the char passed + + The t. + + + + + Gets the character (or string) corresponding to the passed code in the given table + + the table used + the code of the character + + + + + Performs RS error correction on an array of bits. + + The rawbits. + the corrected array + + + + Gets the array of bits from an Aztec Code matrix + + The matrix. + the array of bits + + + + Reads a code of given length and at given index in an array of bits + + The rawbits. + The start index. + The length. + + + + + Reads a code of length 8 in an array of bits, padding with zeros + + + + + + + + Packs a bit array into bytes, most significant bit first + + + + + + + Encapsulates logic that can detect an Aztec Code in an image, even if the Aztec Code + is rotated or skewed, or partially obscured. + + David Olivier + + + + Initializes a new instance of the class. + + The image. + + + + Detects an Aztec Code in an image. + + + + + Detects an Aztec Code in an image. + + if true, image is a mirror-image of original. + + encapsulating results of detecting an Aztec Code + + + + + Extracts the number of data layers and data blocks from the layer around the bull's eye + + bullEyeCornerPoints the array of bull's eye corners + + + + + Corrects the parameter bits using Reed-Solomon algorithm + + paremeter bits + compact true if this is a compact Aztec code + + + + + Finds the corners of a bull-eye centered on the passed point + This returns the centers of the diagonal points just outside the bull's eye + Returns [topRight, bottomRight, bottomLeft, topLeft] + + Center point + The corners of the bull-eye + + + + Finds a candidate center point of an Aztec code from an image + + the center point + + + + Gets the Aztec code corners from the bull's eye corners and the parameters. + + the array of bull's eye corners + the array of aztec code corners + + + + Creates a BitMatrix by sampling the provided image. + topLeft, topRight, bottomRight, and bottomLeft are the centers of the squares on the + diagonal just outside the bull's eye. + + The image. + The top left. + The bottom left. + The bottom right. + The top right. + + + + + Samples a line + + start point (inclusive) + end point (exclusive) + number of bits + the array of bits as an int (first bit is high-order bit of result) + + + + Determines whether [is white or black rectangle] [the specified p1]. + + The p1. + The p2. + The p3. + The p4. + true if the border of the rectangle passed in parameter is compound of white points only + or black points only + + + + Gets the color of a segment + + The p1. + The p2. + 1 if segment more than 90% black, -1 if segment is more than 90% white, 0 else + + + + Gets the coordinate of the first point with a different color in the given direction + + The init. + if set to true [color]. + The dx. + The dy. + + + + + Expand the square represented by the corner points by pushing out equally in all directions + + the corners of the square, which has the bull's eye at its center + the original length of the side of the square in the target bit matrix + the new length of the size of the square in the target bit matrix + the corners of the expanded square + + + + Aztec 2D code representation + + Rustam Abdullaev + + + + Compact or full symbol indicator + + + + + Size in pixels (width and height) + + + + + Number of levels + + + + + Number of data codewords + + + + + The symbol image + + + + + represents a token for a binary shift + + + + + initializing constructor + + + + + + + + appends the byte array to the BitArray + + + + + + + string representation + + + + + + Generates Aztec 2D barcodes. + + Rustam Abdullaev + + + + Encodes the given binary content as an Aztec symbol + + input data string + Aztec symbol matrix with metadata + + + + Encodes the given binary content as an Aztec symbol + + input data string + minimal percentage of error check words (According to ISO/IEC 24778:2008, + a minimum of 23% + 3 words is recommended) + if non-zero, a user-specified value for the number of layers + + Aztec symbol matrix with metadata + + + + + This produces nearly optimal encodings of text into the first-level of + encoding used by Aztec code. + It uses a dynamic algorithm. For each prefix of the string, it determines + a set of encodings that could lead to this prefix. We repeatedly add a + character and generate a new set of optimal encodings until we have read + through the entire input. + @author Frank Yellin + @author Rustam Abdullaev + + + + + + + + + + + Convert the text represented by this High Level Encoder into a BitArray. + + text represented by this encoder encoded as a + + + + State represents all information about a sequence necessary to generate the current output. + Note that a state is immutable. + + + + + Create a new state representing this state with a latch to a (not + necessary different) mode, and then a code. + + + + + Create a new state representing this state, with a temporary shift + to a different mode to output a single value. + + + + + Create a new state representing this state, but an additional character + output in Binary Shift mode. + + + + + Create the state identical to this one, but we are no longer in + Binary Shift mode. + + + + + Returns true if "this" state is better (or equal) to be in than "that" + state under all possible circumstances. + + + + + This implementation can detect and decode Aztec codes in an image. + + David Olivier + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + a String representing the content encoded by the Data Matrix code + + + + + Locates and decodes a Data Matrix code in an image. + + image of barcode to decode + passed as a {@link java.util.Hashtable} from {@link com.google.zxing.DecodeHintType} + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Aztec result meta data. + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + + + + + + + + + Renders an Aztec code as a + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + The class holds the available options for the + + + + + Representing the minimal percentage of error correction words. + Note: an Aztec symbol should have a minimum of 25% EC words. + + + + + Specifies the required number of layers for an Aztec code: + a negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + a positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + + + + + Enumerates barcode formats known to this package. + + Sean Owen + + + Aztec 2D barcode format. + + + CODABAR 1D format. + + + Code 39 1D format. + + + Code 93 1D format. + + + Code 128 1D format. + + + Data Matrix 2D barcode format. + + + EAN-8 1D format. + + + EAN-13 1D format. + + + ITF (Interleaved Two of Five) 1D format. + + + MaxiCode 2D barcode format. + + + PDF417 format. + + + QR Code 2D barcode format. + + + RSS 14 + + + RSS EXPANDED + + + UPC-A 1D format. + + + UPC-E 1D format. + + + UPC/EAN extension format. Not a stand-alone format. + + + MSI + + + Plessey + + + Intelligent Mail barcode + + + + UPC_A | UPC_E | EAN_13 | EAN_8 | CODABAR | CODE_39 | CODE_93 | CODE_128 | ITF | RSS_14 | RSS_EXPANDED + without MSI (to many false-positives) and IMB (not enough tested, and it looks more like a 2D) + + + + + A smart class to decode the barcode inside a bitmap object + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + A smart class to decode the barcode inside a bitmap object + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Constructor for additional image formats for one BarcodeReader class + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Optional: Gets or sets the function to create a luminance source object for a bitmap. + If null a platform specific default LuminanceSource is used + + + The function to create a luminance source object. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + A smart class to decode the barcode inside a bitmap object + + + + + represents the default function which is called to get a instance from a raw byte array + + + + + Gets or sets the options. + + + The options. + + + + + Gets the reader which should be used to find and decode the barcode. + + + The reader. + + + + + Gets or sets a method which is called if an important point is found + + + The result point callback. + + + + + event is executed if a result was found via decode + + + + + Gets or sets a value indicating whether the image should be automatically rotated. + Rotation is supported for 90, 180 and 270 degrees + + + true if image should be rotated; otherwise, false. + + + + + Gets or sets a value indicating whether the image should be automatically inverted + if no result is found in the original image. + ATTENTION: Please be carefully because it slows down the decoding process if it is used + + + true if image should be inverted; otherwise, false. + + + + + Optional: Gets or sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + The function to create a binarizer object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb array. + If null the RGBLuminanceSource is used. The handler is only called when Decode with a byte[] array is called. + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + raises the ResultFound event + + + + + + raises the ResultFound event + + + + + + calls the explicitResultPointFound action + + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + A smart class to encode some content to a barcode image + + + + + Initializes a new instance of the class. + + + + + A smart class to encode some content to raw pixel data + + + + + Initializes a new instance of the class. + + + + + A smart class to encode some content to a svg barcode image + + + + + Initializes a new instance of the class. + + + + + A base class for specific barcode writers with specific formats of barcode images. + + The type of the output. + + + + Gets or sets the renderer which should be used to render the encoded BitMatrix. + + + + + Encodes the specified contents and returns a rendered instance of the barcode. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The matrix. + + + + + A base class for specific barcode writers with specific formats of barcode images. + + + + + Gets or sets the barcode format. + The value is only suitable if the MultiFormatWriter is used. + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + + + + + + + + + + + + Encodes the specified contents and returns a BitMatrix array. + That array has to be rendered manually or with a IBarcodeRenderer. + + The contents. + + + + + The base class for luminance sources which supports + cropping and rotating based upon the luminance values. + + + + + weight of the red channel for calculating a gray scale image + + + + + weight of the green channel for calculating a gray scale image + + + + + weight of the blue channel for calculating a gray scale image + + + + + numbers of bits which for right shifting + + + + + + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + + The luminance array. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + gets the luminance matrix + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + TODO: not implemented yet + + + A rotated version of this object. + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + + Whether this subclass supports cropping. + + + + + Whether this subclass supports invertion. + + + + Inverts the luminance values (newValue = 255 - oldValue) + + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + This class hierarchy provides a set of methods to convert luminance data to 1 bit data. + It allows the algorithm to vary polymorphically, for example allowing a very expensive + thresholding technique for servers and a fast one for mobile. It also permits the implementation + to vary, e.g. a JNI version for Android and a Java fallback version for other platforms. + + dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The source. + + + + Gets the luminance source object. + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + For callers which only examine one row of pixels at a time, the same BitArray should be reused + and passed in with each call for performance. However it is legal to keep more than one row + at a time if needed. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + Converts a 2D array of luminance data to 1 bit data. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + A new concrete Binarizer implementation object. + + + + Gets the width of the luminance source object. + + + + + Gets the height of the luminance source object. + + + + + This class is the core bitmap class used by ZXing to represent 1 bit data. Reader objects + accept a BinaryBitmap and attempt to decode it. + + dswitkin@google.com (Daniel Switkin) + + + + + + + + + + The width of the bitmap. + + + + + The height of the bitmap. + + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + + The row to fetch, which must be in [0, bitmap height). + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + + Converts a 2D array of luminance data to 1 bit. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + + Whether this bitmap can be cropped. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if isCropSupported() is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + + Whether this bitmap supports counter-clockwise rotation. + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + class which represents the luminance values for a bitmap object + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class + with the image of a Bitmap instance + + The bitmap. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + +

See + + DoCoMo's documentation about the result types represented by subclasses of this class.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + Implements KDDI AU's address book format. See + + http://www.au.kddi.com/ezfactory/tec/two_dimensions/index.html. + (Thanks to Yuzo for translating!) + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Implements the "MECARD" address book entry format. + + Supported keys: N, SOUND, TEL, EMAIL, NOTE, ADR, BDAY, URL, plus ORG + Unsupported keys: TEL-AV, NICKNAME + + Except for TEL, multiple values for keys are also not supported; + the first one found takes precedence. + + Our understanding of the MECARD format is based on this document: + + http://www.mobicode.org.tw/files/OMIA%20Mobile%20Bar%20Code%20Standard%20v3.2.1.doc + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes contact information, like that in an address book entry. + + Sean Owen + + + + initializing constructor + + + + + + + + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + the names + + + + + the nicknames + + + + + In Japanese, the name is written in kanji, which can have multiple readings. Therefore a hint + is often provided, called furigana, which spells the name phonetically. + + The pronunciation of the getNames() field, often in hiragana or katakana. + + + + the phone numbers + + + + optional descriptions of the type of each phone number. It could be like "HOME", but, + there is no guaranteed or standard format. + + + + the e-mail addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the instant messenger addresses + + + + + the note field + + + + + the addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the title + + + + + the urls + + + + birthday formatted as yyyyMMdd (e.g. 19780917) + + + a location as a latitude/longitude pair + + + Implements the "BIZCARD" address book entry format, though this has been + largely reverse-engineered from examples observed in the wild -- still + looking for a definitive reference. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a calendar event at a certain time, optionally with attendees and a location. + + Sean Owen + + + + Gets the start. + + + + + Determines whether [is start all day]. + + if start time was specified as a whole day + + + + event end , or null if event has no duration + + + + + Gets a value indicating whether this instance is end all day. + + true if end time was specified as a whole day + + + + Parses a string as a date. RFC 2445 allows the start and end fields to be of type DATE (e.g. 20081021) + or DATE-TIME (e.g. 20081021T123000 for local time, or 20081021T123000Z for UTC). + + The string to parse + + if not a date formatted string + + + + Represents a parsed result that encodes an email message including recipients, subject and body text. + + Sean Owen + + + + the email address + + + + + the TOs + + + + + the CCs + + + + + the BCCs + + + + + the subject + + + + + the body + + + + + the mailto: uri + + + + + Represents a result that encodes an e-mail address, either as a plain address + like "joe@example.org" or a mailto: URL like "mailto:joe@example.org". + + Sean Owen + + + + Implements the "MATMSG" email message entry format. + + Supported keys: TO, SUB, BODY + + Sean Owen + + + + This implements only the most basic checking for an email address's validity -- that it contains + an '@' and contains no characters disallowed by RFC 2822. This is an overly lenient definition of + validity. We want to generally be lenient here since this class is only intended to encapsulate what's + in a barcode, not "judge" it. + + The email. + + true if it is basically a valid email address; otherwise, false. + + + + + Represents a parsed result that encodes extended product information as encoded by the RSS format, like weight, price, dates, etc. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + extension for kilogram weight type + + + + + extension for pounds weight type + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the raw text + + + + + the product id + + + + + the sscc + + + + + the lot number + + + + + the production date + + + + + the packaging date + + + + + the best before date + + + + + the expiration date + + + + + the weight + + + + + the weight type + + + + + the weight increment + + + + + the price + + + + + the price increment + + + + + the price currency + + + + + the uncommon AIs + + + + + the display representation (raw text) + + + + + Parses strings of digits that represent a RSS Extended code. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + tries to parse a text representation to a specific result object + + + + + + + Represents a parsed result that encodes a geographic coordinate, with latitude, longitude and altitude. + + Sean Owen + + + latitude in degrees + + + + longitude in degrees + + + + altitude in meters. If not specified, in the geo URI, returns 0.0 + + + + query string associated with geo URI or null if none exists + + + + the geo URI + + + + a URI link to Google Maps which display the point on the Earth described + by this instance, and sets the zoom level in a way that roughly reflects the + altitude, if specified + + + + Parses a "geo:" URI result, which specifies a location on the surface of + the Earth as well as an optional altitude above the surface. See + + http://tools.ietf.org/html/draft-mayrhofer-geo-uri-00. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a product ISBN number. + + jbreiden@google.com (Jeff Breidenbach) + + + + the ISBN number + + + + Parses strings of digits that represent a ISBN. + + + jbreiden@google.com (Jeff Breidenbach) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + See ISBN-13 For Dummies + + The result. + + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link ResultParser#parseResult(Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Represents the type of data encoded by a barcode -- from plain text, to a + URI, to an e-mail address, etc. + + Sean Owen + + + + Represents a parsed result that encodes a product by an identifier of some kind. + + dswitkin@google.com (Daniel Switkin) + + + + Parses strings of digits that represent a UPC code. + + dswitkin@google.com (Daniel Switkin) + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link #parseResult(com.google.zxing.Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Attempts to parse the raw {@link Result}'s contents as a particular type + of information (email, URL, etc.) and return a {@link ParsedResult} encapsulating + the result of parsing. + + the raw to parse + encapsulating the parsing result + + + + Parses the result. + + The result. + + + +

Parses an "sms:" URI result, which specifies a number to SMS and optional + "via" number. See + the IETF draft on this.

+ +

This actually also parses URIs starting with "mms:", "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + + Represents a parsed result that encodes an SMS message, including recipients, subject and body text. + + Sean Owen + + + +

Parses an "smsto:" URI result, whose format is not standardized but appears to be like: + {@code smsto:number(:body)}.

+

This actually also parses URIs starting with "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+
+ Sean Owen +
+ + +

Parses an "smtp:" URI result, whose format is not standardized but appears to be like: + smtp[:subject[:body]]}.

+

See http://code.google.com/p/zxing/issues/detail?id=536

+
+ Sean Owen +
+ + + Represents a parsed result that encodes a telephone number. + + Sean Owen + + + + Parses a "tel:" URI result, which specifies a phone number. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + A simple result type encapsulating a string that has no further interpretation. + + Sean Owen + + + + A simple result type encapsulating a URI that has no further interpretation. + + Sean Owen + + + true if the URI contains suspicious patterns that may suggest it intends to + mislead the user about its true nature. At the moment this looks for the presence + of user/password syntax in the host/authority portion of a URI which may be used + in attempts to make the URI's host appear to be other than it is. Example: + http://yourbank.com@phisher.com This URI connects to phisher.com but may appear + to connect to yourbank.com at first glance. + + + + Transforms a string that represents a URI into something more proper, by adding or canonicalizing + the protocol. + + + + + Tries to parse results that are a URI of some kind. + + Sean Owen + + + Parses the "URLTO" result format, which is of the form "URLTO:[title]:[url]". + This seems to be used sometimes, but I am not able to find documentation + on its origin or official format? + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Parses contact information formatted according to the VCard (2.1) format. This is not a complete + implementation but should parse information as commonly encoded in 2D barcodes. + + Sean Owen + + + Formats name fields of the form "Public;John;Q.;Reverend;III" into a form like + "Reverend John Q. Public III". + + @param names name values to format, in place + + + + Partially implements the iCalendar format's "VEVENT" format for specifying a + calendar event. See RFC 2445. This supports SUMMARY, DTSTART and DTEND fields. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a Vehicle Identification Number (VIN). + + + + + Detects a result that is likely a vehicle identification number. + @author Sean Owen + + + + + Represents a parsed result that encodes wifi network information, like SSID and password. + + Vikram Aggarwal + + + + + A simple, fast array of bits, represented compactly by an array of ints internally. + + Sean Owen + + + + size of the array, number of elements + + + + + size of the array in bytes + + + + + index accessor + + + + + + + default constructor + + + + + initializing constructor + + desired size of the array + + + + Flips bit i. + + bit to set + + + + + Gets the next set. + + first bit to check + index of first bit that is set, starting from the given index, or size if none are set + at or beyond this given index + + + + see getNextSet(int) + + index to start looking for unset bit + index of next unset bit, or if none are unset until the end + + + Sets a block of 32 bits, starting at bit i. + + + first bit to set + + the new value of the next 32 bits. Note again that the least-significant bit + corresponds to bit i, the next-least-significant to i+1, and so on. + + + + + Sets a range of bits. + + start of range, inclusive. + end of range, exclusive + + + Clears all bits (sets to false). + + + Efficient method to check if a range of bits is set, or not set. + + + start of range, inclusive. + + end of range, exclusive + + if true, checks that bits in range are set, otherwise checks that they are not set + + true iff all bits are set or not set in range, according to value argument + if end is less than start or the range is not contained in the array + + + + Appends the bit. + + The bit. + + + underlying array of ints. The first element holds the first 32 bits, and the least + significant bit is bit 0. + + + + + Appends the least-significant bits, from value, in order from most-significant to + least-significant. For example, appending 6 bits from 0x000001E will append the bits + 0, 1, 1, 1, 1, 0 in that order. + + containing bits to append + bits from value to append + + + + adds the array to the end + + + + + + XOR operation + + + + + + converts to bytes. + + first bit to start writing + array to write into. Bytes are written most-significant byte first. This is the opposite + of the internal representation, which is exposed by BitArray + position in array to start writing + how many bytes to write + + + Reverses all bits in the array. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Erstellt ein neues Objekt, das eine Kopie der aktuellen Instanz darstellt. + + + Ein neues Objekt, das eine Kopie dieser Instanz darstellt. + + + + +

Represents a 2D matrix of bits. In function arguments below, and throughout the common + module, x is the column position, and y is the row position. The ordering is always x, y. + The origin is at the top-left.

+

Internally the bits are represented in a 1-D array of 32-bit ints. However, each row begins + with a new int. This is done intentionally so that we can copy out a row into a BitArray very + efficiently.

+

The ordering of bits is row-major. Within each int, the least significant bits are used first, + meaning they represent lower x values. This is compatible with BitArray's implementation.

+
+ Sean Owen + dswitkin@google.com (Daniel Switkin) +
+ + The width of the matrix + + + + The height of the matrix + + + + This method is for compatibility with older code. It's only logical to call if the matrix + is square, so I'm throwing if that's not the case. + + + row/column dimension of this matrix + + + + + The rowsize of the matrix + + + + + Creates an empty square . + + height and width + + + + Creates an empty square . + + bit matrix width + bit matrix height + + + + Interprets a 2D array of booleans as a , where "true" means an "on" bit. + + bits of the image, as a row-major 2D array. Elements are arrays representing rows + representation of image + + +

Gets the requested bit, where true means black.

+ +
+ The horizontal component (i.e. which column) + + The vertical component (i.e. which row) + + value of given bit in matrix + +
+ + +

Flips the given bit.

+
+ The horizontal component (i.e. which column) + The vertical component (i.e. which row) +
+ + + flip all of the bits, if shouldBeFlipped is true for the coordinates + + should return true, if the bit at a given coordinate should be flipped + + + + Exclusive-or (XOR): Flip the bit in this {@code BitMatrix} if the corresponding + mask bit is set. + + The mask. + + + Clears all bits (sets to false). + + +

Sets a square region of the bit matrix to true.

+ +
+ The horizontal position to begin at (inclusive) + + The vertical position to begin at (inclusive) + + The width of the region + + The height of the region + +
+ + A fast method to retrieve one row of data from the matrix as a BitArray. + + + The row to retrieve + + An optional caller-allocated BitArray, will be allocated if null or too small + + The resulting BitArray - this reference should always be used even when passing + your own row + + + + + Sets the row. + + row to set + {@link BitArray} to copy from + + + + Modifies this {@code BitMatrix} to represent the same but rotated 180 degrees + + + + + This is useful in detecting the enclosing rectangle of a 'pure' barcode. + + {left,top,width,height} enclosing rectangle of all 1 bits, or null if it is all white + + + + This is useful in detecting a corner of a 'pure' barcode. + + {x,y} coordinate of top-left-most 1 bit, or null if it is all white + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + The line separator. + + A that represents this instance. + + + + + Clones this instance. + + + + + + Converts this ByteMatrix to a black and white bitmap. + + A black and white bitmap converted from this ByteMatrix. + + +

This provides an easy abstraction to read bits at a time from a sequence of bytes, where the + number of bits read is not often a multiple of 8.

+ +

This class is thread-safe but not reentrant. Unless the caller modifies the bytes array + it passed in, in which case all bets are off.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + bytes from which this will read bits. Bits will be read from the first byte first. + Bits are read within a byte from most-significant to least-significant bit. + + + + + index of next bit in current byte which would be read by the next call to {@link #readBits(int)}. + + + + + index of next byte in input byte array which would be read by the next call to {@link #readBits(int)}. + + + + number of bits to read + + int representing the bits read. The bits will appear as the least-significant + bits of the int + + if numBits isn't in [1,32] or more than is available + + + number of bits that can be read successfully + + + + Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1 + of ISO 18004. + + + Sean Owen + + + character set ECI value + representing ECI of given value, or null if it is legal but unsupported + + + character set ECI encoding name + representing ECI for character encoding, or null if it is legalbut unsupported + + + + Encapsulates the result of decoding a matrix of bits. This typically + applies to 2D barcode formats. For now it contains the raw bytes obtained, + as well as a String interpretation of those bytes, if applicable. + Sean Owen + + + + + raw bytes representing the result, or null if not applicable + + + + + how many bits of are valid; typically 8 times its length + + + + + text representation of the result + + + + + list of byte segments in the result, or null if not applicable + + + + + name of error correction level used, or null if not applicable + + + + + gets a value which describe if structure append data was found + + + + + number of errors corrected, or null if not applicable + + + + + gives the sequence number of the result if structured append was found + + + + + number of erasures corrected, or null if not applicable + + + + + gives the parity information if structured append was found + + + + + Miscellanseous data value for the various decoders + + The other. + + + + initializing constructor + + + + + + + + + initializing constructor + + + + + + + + + + + initializing constructor + + + + + + + + + + initializing constructor + + + + + + + + + + + + Defines an container for encoder options + + + + + Gets the data container for all options + + + + + event is raised when a value is changed + + + + + Gets or sets a flag which cause a deeper look into the bitmap + + + true if [try harder]; otherwise, false. + + + + + Image is a pure monochrome image of a barcode. + + + true if monochrome image of a barcode; otherwise, false. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + The character set. + + + + + Image is known to be of one of a few possible formats. + Maps to a {@link java.util.List} of {@link BarcodeFormat}s. + + + The possible formats. + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + true if it should assume a Code 39 check digit; otherwise, false. + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). + + + true if it should assume GS1; otherwise, false. + + + + + Assume MSI codes employ a check digit. Maps to . + + + true if it should assume a MSI check digit; otherwise, false. + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Initializes a new instance of the class. + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Encapsulates the result of detecting a barcode in an image. This includes the raw + matrix of black/white pixels corresponding to the barcode, and possibly points of interest + in the image, like the location of finder patterns or corners of the barcode in the image.

+
+ Sean Owen +
+ + + the detected bits + + + + + the pixel points where the result is found + + + + + initializing constructor + + + + + + + General math-related and numeric utility functions. + + + + + Ends up being a bit faster than {@link Math#round(float)}. This merely rounds its + argument to the nearest int, where x.5 rounds up to x+1. Semantics of this shortcut + differ slightly from {@link Math#round(float)} in that half rounds down for negative + values. -2.5 rounds to -3, not -2. For purposes here it makes no difference. + + real value to round + nearest int + + + + + + + + + + Euclidean distance between points A and B + + + + + + + + + + Euclidean distance between points A and B + + + + + values to sum + sum of values in array + + +

A somewhat generic detector that looks for a barcode-like rectangular region within an image. + It looks within a mostly white region of an image for a region of black and white, but mostly + black. It returns the four corners of the region, as best it can determine.

+ +
+ Sean Owen +
+ + + initializing constructor + + + + + +

Detects a rectangular region of black and white -- mostly black -- with a region of mostly + white, in an image.

+
+ [] describing the corners of the rectangular region. The first and + last points are opposed on the diagonal, as are the second and third. The first point will be + the topmost point and the last, the bottommost. The second point will be leftmost and the + third, the rightmost + +
+ + Attempts to locate a corner of the barcode by scanning up, down, left or right from a center + point which should be within the barcode. + + + center's x component (horizontal) + + same as deltaY but change in x per step instead + + minimum value of x + + maximum value of x + + center's y component (vertical) + + change in y per step. If scanning up this is negative; down, positive; + left or right, 0 + + minimum value of y to search through (meaningless when di == 0) + + maximum value of y + + maximum run of white pixels that can still be considered to be within + the barcode + + a encapsulating the corner that was found + + + + Computes the start and end of a region of pixels, either horizontally or vertically, that could + be part of a Data Matrix barcode. + + + if scanning horizontally, this is the row (the fixed vertical location) + where we are scanning. If scanning vertically it's the column, the fixed horizontal location + + largest run of white pixels that can still be considered part of the + barcode region + + minimum pixel location, horizontally or vertically, to consider + + maximum pixel location, horizontally or vertically, to consider + + if true, we're scanning left-right, instead of up-down + + int[] with start and end of found range, or null if no such range is found + (e.g. only white was found) + + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. By keeping track of the + last black points it encountered, it determines the corners of the barcode. + + David Olivier + + + + Creates a WhiteRectangleDetector instance + + The image. + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + Creates a WhiteRectangleDetector instance + + barcode image to find a rectangle in + initial size of search area around center + x position of search center + y position of search center + + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + + Initializes a new instance of the class. + + The image. + if image is too small + + + + Initializes a new instance of the class. + + The image. + Size of the init. + The x. + The y. + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. + + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + recenters the points of a constant distance towards the center + + bottom most point + left most point + right most point + top most point + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + Determines whether a segment contains a black point + + min value of the scanned coordinate + max value of the scanned coordinate + value of fixed coordinate + set to true if scan must be horizontal, false if vertical + + true if a black point has been found, else false. + + + + + Superclass of classes encapsulating types ECIs, according to "Extended Channel Interpretations" + 5.3 of ISO 18004. + + Sean Owen + + + + the ECI value + + + + ECI value + representing ECI of given value, or null if it is legal but unsupported + ArgumentException if ECI value is invalid + + + + Defines an container for encoder options + + + + + Gets the data container for all options + + + + + Specifies the height of the barcode image + + + + + Specifies the width of the barcode image + + + + + Don't put the content string into the output image. + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + + + + + Specifies whether the data should be encoded to the GS1 standard; + FNC1 character is added in front of the data + + + + + Initializes a new instance of the class. + + + + This Binarizer implementation uses the old ZXing global histogram approach. It is suitable + for low-end mobile devices which don't have enough CPU or memory to use a local thresholding + algorithm. However, because it picks a global black point, it cannot handle difficult shadows + and gradients. + + Faster mobile devices and all desktop applications should probably use HybridBinarizer instead. + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The source. + + + + Applies simple sharpening to the row data to improve performance of the 1D Readers. + + + + + + + + Does not sharpen the data, as this call is intended to only be used by 2D Readers. + + + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + + A new concrete Binarizer implementation object. + + + + Implementations of this class can, given locations of finder patterns for a QR code in an + image, sample the right points in the image to reconstruct the QR code, accounting for + perspective distortion. It is abstracted since it is relatively expensive and should be allowed + to take advantage of platform-specific optimized implementations, like Sun's Java Advanced + Imaging library, but which may not be available in other environments such as J2ME, and vice + versa. + + The implementation used can be controlled by calling {@link #setGridSampler(GridSampler)} + with an instance of a class which implements this interface. + + Sean Owen + + + the current implementation of + + + + Sets the implementation of used by the library. One global + instance is stored, which may sound problematic. But, the implementation provided + ought to be appropriate for the entire platform, and all uses of this library + in the whole lifetime of the JVM. For instance, an Android activity can swap in + an implementation that takes advantage of native platform libraries. + + The platform-specific object to install. + + + +

Samples an image for a square matrix of bits of the given dimension. This is used to extract + the black/white modules of a 2D barcode like a QR Code found in an image. Because this barcode + may be rotated or perspective-distorted, the caller supplies four points in the source image + that define known points in the barcode, so that the image may be sampled appropriately.

+

The last eight "from" parameters are four X/Y coordinate pairs of locations of points in + the image that define some significant points in the image to be sample. For example, + these may be the location of finder pattern in a QR Code.

+

The first eight "to" parameters are four X/Y coordinate pairs measured in the destination + , from the top left, where the known points in the image given by the "from" + parameters map to.

+

These 16 parameters define the transformation needed to sample the image.

+
+ image to sample + The dimension X. + The dimension Y. + The p1 preimage X. + The p1 preimage Y. + The p2 preimage X. + The p2 preimage Y. + The p3 preimage X. + The p3 preimage Y. + The p4 preimage X. + The p4 preimage Y. + The p1 image X. + The p1 image Y. + The p2 image X. + The p2 image Y. + The p3 image X. + The p3 image Y. + The p4 image X. + The p4 image Y. + + representing a grid of points sampled from the image within a region + defined by the "from" parameters + + ReaderException if image can't be sampled, for example, if the transformation defined +
+ + + + + + + + + + + +

Checks a set of points that have been transformed to sample points on an image against + the image's dimensions to see if the point are even within the image.

+ +

This method will actually "nudge" the endpoints back onto the image if they are found to be + barely (less than 1 pixel) off the image. This accounts for imperfect detection of finder + patterns in an image where the QR Code runs all the way to the image border.

+ +

For efficiency, the method will check points from either end of the line until one is found + to be within the image. Because the set of points are assumed to be linear, this is valid.

+ +
+ image into which the points should map + + actual points in x1,y1,...,xn,yn form + +
+ + This class implements a local thresholding algorithm, which while slower than the + GlobalHistogramBinarizer, is fairly efficient for what it does. It is designed for + high frequency images of barcodes with black data on white backgrounds. For this application, + it does a much better job than a global blackpoint with severe shadows and gradients. + However it tends to produce artifacts on lower frequency images and is therefore not + a good general purpose binarizer for uses outside ZXing. + + This class extends GlobalHistogramBinarizer, using the older histogram approach for 1D readers, + and the newer local approach for 2D readers. 1D decoding using a per-row histogram is already + inherently local, and only fails for horizontal gradients. We can revisit that problem later, + but for now it was not a win to use local blocks for 1D. + + This Binarizer is the default for the unit tests and the recommended class for library users. + dswitkin@google.com (Daniel Switkin) + + + + + gives the black matrix + + + + + initializing constructor + + + + + + creates a new instance + + + + + + + Calculates the final BitMatrix once for all requests. This could be called once from the + constructor instead, but there are some advantages to doing it lazily, such as making + profiling easier, and not doing heavy lifting when callers don't expect it. + + + + + For each 8x8 block in the image, calculate the average black point using a 5x5 grid + of the blocks around it. Also handles the corner cases (fractional blocks are computed based + on the last 8 pixels in the row/column which are also used in the previous block). + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + The black points. + The matrix. + + + + Applies a single threshold to an 8x8 block of pixels. + + The luminances. + The xoffset. + The yoffset. + The threshold. + The stride. + The matrix. + + + + Calculates a single black point for each 8x8 block of pixels and saves it away. + See the following thread for a discussion of this algorithm: + http://groups.google.com/group/zxing/browse_thread/thread/d06efa2c35a7ddc0 + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + + + +

This class implements a perspective transform in two dimensions. Given four source and four + destination points, it will compute the transformation implied between them. The code is based + directly upon section 3.4.2 of George Wolberg's "Digital Image Warping"; see pages 54-56.

+
+ Sean Owen +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Convenience method, not optimized for performance. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

This class contains utility methods for performing mathematical operations over + the Galois Fields. Operations use a given primitive polynomial in calculations.

+

Throughout this package, elements of the GF are represented as an {@code int} + for convenience and speed (but at the cost of memory). +

+
+ Sean Owen +
+ + + Create a representation of GF(size) using the given primitive polynomial. + + irreducible polynomial whose coefficients are represented by + * the bits of an int, where the least-significant bit represents the constant + * coefficient + the size of the field + the factor b in the generator polynomial can be 0- or 1-based + * (g(x) = (x+a^b)(x+a^(b+1))...(x+a^(b+2t-1))). + * In most cases it should be 1, but for QR code it is 0. + + + + Builds the monomial. + + The degree. + The coefficient. + the monomial representing coefficient * x^degree + + + + Implements both addition and subtraction -- they are the same in GF(size). + + sum/difference of a and b + + + + Exps the specified a. + + 2 to the power of a in GF(size) + + + + Logs the specified a. + + A. + base 2 log of a in GF(size) + + + + Inverses the specified a. + + multiplicative inverse of a + + + + Multiplies the specified a with b. + + A. + The b. + product of a and b in GF(size) + + + + Gets the size. + + + + + Gets the generator base. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + +

Represents a polynomial whose coefficients are elements of a GF. + Instances of this class are immutable.

+

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + the {@link GenericGF} instance representing the field to use + to perform computations + coefficients as ints representing elements of GF(size), arranged + from most significant (highest-power term) coefficient to least significant + if argument is null or empty, + or if leading coefficient is 0 and this is not a + constant polynomial (that is, it is not the monomial "0") + + + + degree of this polynomial + + + + + Gets a value indicating whether this is zero. + + true iff this polynomial is the monomial "0" + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + +

Implements Reed-Solomon decoding, as the name implies.

+ +

The algorithm will not be explained here, but the following references were helpful + in creating this implementation:

+ + + +

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+ +
+ Sean Owen + William Rucklidge + sanfordsquires +
+ + +

Decodes given set of received codewords, which include both data and error-correction + codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place, + in the input.

+
+ data and error-correction codewords + number of error-correction codewords available + false: decoding fails +
+ + + Implements Reed-Solomon encoding, as the name implies. + + Sean Owen + William Rucklidge + + + + Common string-related functions. + + Sean Owen + Alex Dupre + + + + SJIS + + + + + GB2312 + + + + + Guesses the encoding. + + bytes encoding a string, whose encoding should be guessed + decode hints if applicable + name of guessed encoding; at the moment will only guess one of: + {@link #SHIFT_JIS}, {@link #UTF8}, {@link #ISO88591}, or the platform + default encoding if none of these can possibly be correct + + + + This implementation can detect and decode Data Matrix codes in an image. + + bbrown@google.com (Brian Brown) + + + + + Locates and decodes a Data Matrix code in an image. + + + a String representing the content encoded by the Data Matrix code + + + + Locates and decodes a Data Matrix code in an image. + + + + a String representing the content encoded by the Data Matrix code + + + + does nothing here + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a Data Matrix code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + Guillaume Le Biller Added to zxing lib. + + + + encodes the content to a BitMatrix + + + + + + + + + + encodes the content to a BitMatrix + + + + + + + + + + + Encode the given symbol info to a bit matrix. + + The DataMatrix placement. + The symbol info to encode. + + + The bit matrix generated. + + + + Convert the ByteMatrix to BitMatrix. + + The input matrix. + The requested width of the image (in pixels) with the Datamatrix code + The requested height of the image (in pixels) with the Datamatrix code + The output matrix. + + + + bbrown@google.com (Brian Brown) + + + + + to parse + if dimension is < 8 or > 144 or not 0 mod 2 + + + + +

Creates the version object based on the dimension of the original bit matrix from + the datamatrix code.

+ +

See ISO 16022:2006 Table 7 - ECC 200 symbol attributes

+ + Original including alignment patterns + encapsulating the Data Matrix Code's "version" + if the dimensions of the mapping matrix are not valid + Data Matrix dimensions. +
+
+ + +

Reads the bits in the representing the mapping matrix (No alignment patterns) + in the correct order in order to reconstitute the codewords bytes contained within the + Data Matrix Code.

+ + bytes encoded within the Data Matrix Code + if the exact number of bytes expected is not read +
+
+ + +

Reads a bit of the mapping matrix accounting for boundary wrapping.

+ + Row to read in the mapping matrix + Column to read in the mapping matrix + Number of rows in the mapping matrix + Number of columns in the mapping matrix + value of the given bit in the mapping matrix +
+
+ + +

Reads the 8 bits of the standard Utah-shaped pattern.

+ +

See ISO 16022:2006, 5.8.1 Figure 6

+ + Current row in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Current column in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the utah shape +
+
+ + +

Reads the 8 bits of the special corner condition 1.

+ +

See ISO 16022:2006, Figure F.3

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 1 +
+
+ + +

Reads the 8 bits of the special corner condition 2.

+ +

See ISO 16022:2006, Figure F.4

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 2 +
+
+ + +

Reads the 8 bits of the special corner condition 3.

+ +

See ISO 16022:2006, Figure F.5

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 3 +
+
+ + +

Reads the 8 bits of the special corner condition 4.

+ +

See ISO 16022:2006, Figure F.6

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 4 +
+
+ + +

Extracts the data region from a that contains + alignment patterns.

+ + Original with alignment patterns + BitMatrix that has the alignment patterns removed +
+
+ + +

Encapsulates a block of data within a Data Matrix Code. Data Matrix Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ + bbrown@google.com (Brian Brown) +
+
+ + +

When Data Matrix Codes use multiple data blocks, they actually interleave the bytes of each of them. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ + bytes as read directly from the Data Matrix Code + version of the Data Matrix Code + DataBlocks containing original bytes, "de-interleaved" from representation in the + Data Matrix Code +
+
+ + +

Data Matrix Codes can encode text as bits in one of several modes, and can use multiple modes + in one Data Matrix Code. This class decodes the bits back into text.

+ +

See ISO 16022:2006, 5.2.1 - 5.2.9.2

+ + bbrown@google.com (Brian Brown) + Sean Owen +
+
+ + + See ISO 16022:2006, Annex C Table C.1 + The C40 Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, Annex C Table C.2 + The Text Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, 5.2.3 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.5 and Annex C, Table C.1 + + + + + See ISO 16022:2006, 5.2.6 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.7 + + + + + See ISO 16022:2006, 5.2.8 and Annex C Table C.3 + + + + + See ISO 16022:2006, 5.2.9 and Annex B, B.2 + + + + + See ISO 16022:2006, Annex B, B.2 + + + + +

The main class which implements Data Matrix Code decoding -- as opposed to locating and extracting + the Data Matrix Code from an image.

+ + bbrown@google.com (Brian Brown) +
+
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a Data Matrix Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+ + booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code + if the Data Matrix Code cannot be decoded +
+
+ + +

Decodes a Data Matrix Code represented as a . A 1 or "true" is taken + to mean a black module.

+
+ booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+ + data and error correction codewords + number of codewords that are data bytes +
+
+ + + The Version object encapsulates attributes about a particular + size Data Matrix Code. + + bbrown@google.com (Brian Brown) + + + + + returns the version numer + + + + + + returns the symbol size rows + + + + + + returns the symbols size columns + + + + + + retursn the data region size rows + + + + + + returns the data region size columns + + + + + + returns the total codewords count + + + + + +

Deduces version information from Data Matrix dimensions.

+ + Number of rows in modules + Number of columns in modules + Version for a Data Matrix Code of those dimensions + if dimensions do correspond to a valid Data Matrix size +
+
+ + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the Data Matrix code version's format.

+
+
+ + + returns the version number as string + + + + + + See ISO 16022:2006 5.5.1 Table 7 + + + + +

Encapsulates logic that can detect a Data Matrix Code in an image, even if the Data Matrix Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + +

Detects a Data Matrix Code in an image.

+
+ encapsulating results of detecting a Data Matrix Code or null +
+ + + Calculates the position of the white top right module using the output of the rectangle detector + for a rectangular matrix + + + + + Calculates the position of the white top right module using the output of the rectangle detector + for a square matrix + + + + + Increments the Integer associated with a key by one. + + + + + Counts the number of black/white transitions between two points, using something like Bresenham's algorithm. + + + + + Simply encapsulates two points and a number of transitions between them. + + + + + Orders ResultPointsAndTransitions by number of transitions, ascending. + + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Symbol Character Placement Program. Adapted from Annex M.1 in ISO/IEC 16022:2000(E). + + + + + Main constructor + + the codewords to place + the number of columns + the number of rows + + + + Places the 8 bits of a utah-shaped symbol character in ECC200. + + The row. + The col. + character position + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Enumeration for encodation types + + + + + Error Correction Code for ECC200. + + + + + Lookup table which factors to use for which number of error correction codewords. + See FACTORS. + + + + + Precomputed polynomial factors for ECC 200. + + + + + Creates the ECC200 error correction for an encoded message. + + The codewords. + information about the symbol to be encoded + the codewords with interleaved error correction. + + + + DataMatrix ECC 200 data encoder following the algorithm described in ISO/IEC 16022:200(E) in + annex S. + + + + + Padding character + + + + + mode latch to C40 encodation mode + + + + + mode latch to Base 256 encodation mode + + + + + FNC1 Codeword + + + + + Structured Append Codeword + + + + + Reader Programming + + + + + Upper Shift + + + + + 05 Macro + + + + + 06 Macro + + + + + mode latch to ANSI X.12 encodation mode + + + + + mode latch to Text encodation mode + + + + + mode latch to EDIFACT encodation mode + + + + + ECI character (Extended Channel Interpretation) + + + + + Unlatch from C40 encodation + + + + + Unlatch from X12 encodation + + + + + 05 Macro header + + + + + 06 Macro header + + + + + Macro trailer + + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + the encoded message (the char values range from 0 to 255) + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + requested shape. May be {@code SymbolShapeHint.FORCE_NONE},{@code SymbolShapeHint.FORCE_SQUARE} or {@code SymbolShapeHint.FORCE_RECTANGLE}. + the minimum symbol size constraint or null for no constraint + the maximum symbol size constraint or null for no constraint + encoding mode to start with + the encoded message (the char values range from 0 to 255) + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + Symbol info table for DataMatrix. + + + + Overrides the symbol info set used by this class. Used for testing purposes. + + @param override the symbol info set to use + + + + Enumeration for DataMatrix symbol shape hint. It can be used to force square or rectangular + symbols. + + + + + The class holds the available options for the DatamatrixWriter + + + + + Specifies the matrix shape for Data Matrix + + + + + Specifies a minimum barcode size + + + + + Specifies a maximum barcode size + + + + + Specifies the default encodation + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Encapsulates a type of hint that a caller may pass to a barcode reader to help it + more quickly or accurately decode it. It is up to implementations to decide what, + if anything, to do with the information that is supplied. + + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Unspecified, application-specific hint. Maps to an unspecified . + + + + + Image is a pure monochrome image of a barcode. Doesn't matter what it maps to; + use = true. + + + + + Image is known to be of one of a few possible formats. + Maps to a of s. + + + + + Spend more time to try to find a barcode; optimize for accuracy, not speed. + Doesn't matter what it maps to; use = true. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + + + The caller needs to be notified via callback when a possible + is found. Maps to a . + + + + + Assume MSI codes employ a check digit. Maps to . + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + Maps to . + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + 1D readers supporting rotation with TRY_HARDER enabled. + But BarcodeReader class can do auto-rotating for 1D and 2D codes. + Enabling that option prevents 1D readers doing double rotation. + BarcodeReader enables that option automatically if "global" auto-rotation is enabled. + Maps to . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to; + use . + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Simply encapsulates a width and height. + + + + + initializing constructor + + + + + + + the width + + + + + the height + + + + + + + + + + + + + + + + + + + + + + + + These are a set of hints that you may pass to Writers to specify their behavior. + + dswitkin@google.com (Daniel Switkin) + + + + Specifies the width of the barcode image + type: + + + + + Specifies the height of the barcode image + type: + + + + + Don't put the content string into the output image. + type: + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + + For Aztec it is of type , representing the minimal percentage of error correction words. + In all cases, it can also be a representation of the desired value as well. + Note: an Aztec symbol should have a minimum of 25% EC words. + For PDF417 it is of type or (between 0 and 8), + + + + + Specifies what character encoding to use where applicable. + type: + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + type: , or representation of the integer value + + + + + Specifies the aspect ratio to use. Default is 4. + type: , or 1-4. + + + + + Specifies whether to use compact mode for PDF417 + type: , or "true" or "false" + value + + + + + Specifies what compaction mode to use for PDF417. + type: or value of one of its + enum values + + + + + Specifies the minimum and maximum number of rows and columns for PDF417. + type: + + + + + Don't append ECI segment. + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + type: + + + + + Specifies the matrix shape for Data Matrix (type ) + + + + + Specifies a minimum barcode size (type ). Only applicable to Data Matrix now. + + + + + Specifies a maximum barcode size (type ). Only applicable to Data Matrix now. + + + + + if true, don't switch to codeset C for numbers + + + + + Specifies the default encodation for Data Matrix (type ) + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Specifies the required number of layers for an Aztec code. + A negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + type: , or representation of the integer value + + + + + Specifies the exact version of QR code to be encoded. + (Type , or representation of the integer value). + + + + + Specifies whether the data should be encoded to the GS1 standard + type: , or "true" or "false" + value + + + + + Thrown when a barcode was successfully detected, but some aspect of + the content did not conform to the barcode's format rules. This could have + been due to a mis-detection. + Sean Owen + + + + + + + + + + + + + + + + + + + + + + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Decodes the specified barcode bitmap which is given by a generic byte array. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents. + + The contents. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + The matrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents. + + The contents. + + + + + implements an Intelligent Mail barcode + Rishabh Hatgadkar + + + + + A wrapper implementation of {@link LuminanceSource} which inverts the luminances it returns -- black becomes + white and vice versa, and each value becomes (255-value). + + Sean Owen + + + + Initializes a new instance of the class. + + The @delegate. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff; + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Inverts this instance. + + original delegate {@link LuminanceSource} since invert undoes itself + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + The purpose of this class hierarchy is to abstract different bitmap implementations across + platforms into a standard interface for requesting greyscale luminance values. The interface + only provides immutable methods; therefore crop and rotation create copies. This is to ensure + that one Reader does not modify the original luminance source and leave it in an unknown state + for other Readers in the chain. + + dswitkin@google.com (Daniel Switkin) + + + + initializing constructor + + + + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff + + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + The width of the bitmap. + + + The height of the bitmap. + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + Whether this subclass supports counter-clockwise rotation. + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + + Whether this subclass supports invertion. + + + + inverts the luminance values, not supported here. has to implemented in sub classes + + + + + + + + + + + + mike32767 + Manuel Kasten + + + + + to parse + + + + +

MaxiCodes can encode text or structured information as bits in one of several modes, + with multiple character sets in one code. This class decodes the bits back into text.

+ + mike32767 + Manuel Kasten +
+
+ + +

The main class which implements MaxiCode decoding -- as opposed to locating and extracting + the MaxiCode from an image.

+ + Manuel Kasten +
+
+ + + This implementation can detect and decode a MaxiCode in an image. + + + + + Locates and decodes a MaxiCode in an image. + + a String representing the content encoded by the MaxiCode + if a MaxiCode cannot be decoded + + + + + Locates and decodes a MaxiCode within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + + MultiFormatReader is a convenience class and the main entry point into the library for most uses. + By default it attempts to decode all barcode formats that the library supports. Optionally, you + can provide a hints object to request different behavior, for example only decoding QR codes. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + This version of decode honors the intent of Reader.decode(BinaryBitmap) in that it + passes null as a hint to the decoders. However, that makes it inefficient to call repeatedly. + Use setHints() followed by decodeWithState() for continuous scan applications. + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the hints provided. Does not honor existing state. + + + The pixel data to decode + + The hints to use, clearing the previous state. + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the state set up by calling setHints() previously. Continuous scan + clients will get a large speed increase by using this instead of decode(). + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls + to decodeWithState(image) can reuse the same set of readers without reallocating memory. This + is important for performance in continuous scan clients. + + + + + + resets all specific readers + + + + This is a factory class which finds the appropriate Writer subclass for the BarcodeFormat + requested and encodes the barcode with the supplied contents. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Gets the collection of supported writers. + + + + + encode the given data + + + + + + + + + + encode the given data + + + + + + + + + + + This class attempts to decode a barcode from an image, not by scanning the whole image, + but by scanning subsets of the image. This is important when there may be multiple barcodes in + an image, and detecting a barcode may find parts of multiple barcode and fail to decode + (e.g. QR Codes). Instead this scans the four quadrants of the image -- and also the center + 'quadrant' to cover the case where a barcode is found in the center. + + + + + + Initializes a new instance of the class. + + The @delegate. + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Attempts to locate multiple barcodes in an image by repeatedly decoding portion of the image. + After one barcode is found, the areas left, above, right and below the barcode's + {@link com.google.zxing.ResultPoint}s are scanned, recursively.

+

A caller may want to also employ {@link ByQuadrantReader} when attempting to find multiple + 2D barcodes, like QR Codes, in an image, where the presence of multiple barcodes might prevent + detecting any one of them.

+

That is, instead of passing a {@link Reader} a caller might pass + new ByQuadrantReader(reader).

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The @delegate. + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Implementation of this interface attempt to read several barcodes from one image. + Sean Owen + + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + +

Encapsulates logic that can detect one or more QR Codes in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+ + Sean Owen + Hannes Erven +
+
+ + + Initializes a new instance of the class. + + The image. + + + + Detects the multi. + + The hints. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +

In contrast to , this class will return an array of all possible + QR code locations in the image.

+ +

Use the TRY_HARDER hint to ask for a more thorough detection.

+ + Sean Owen + Hannes Erven +
+
+ + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF_PERCENT percent in their + estimated modules sizes. + + + + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF pixels/module in their + estimated modules sizes. + + + + + A comparator that orders FinderPatterns by their estimated module size. + + + + +

Creates a finder that will search the image for three finder patterns.

+ + image to search +
+
+ + + + the 3 best s from our list of candidates. The "best" are + those that have been detected at least CENTER_QUORUM times, and whose module + size differs from the average among those patterns the least + + + + + This implementation can detect and decode multiple QR Codes in an image. + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + +

Decodes Codabar barcodes.

+ + Bas Vijfwinkel +
+
+ + These represent the encodings of characters, as patterns of wide and narrow bars. The 7 least-significant bits of + each int correspond to the pattern of wide and narrow, with 1s representing "wide" and 0s representing narrow. + + + + Records the size of all runs of white and black pixels, starting with white. + This is just like recordPattern, except it records all the counters, and + uses our builtin "counters" member for storage. + + row to count from + + + + This class renders CodaBar as []. + + dsbnatut@gmail.com (Kazuki Nishiura) + + + + The class holds the available options for the QrCodeWriter + + + + + if true, don't switch to codeset C for numbers + + + + +

Decodes Code 128 barcodes.

+ + Sean Owen +
+
+ + + This object renders a CODE128 code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + +

Decodes Code 39 barcodes. Supports "Full ASCII Code 39" if USE_CODE_39_EXTENDED_MODE is set.

+ Sean Owen + @see Code93Reader +
+
+ + + Returns a string with all possible characters + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. It will not decoded "extended Code 39" sequences. + + + + + Creates a reader that can be configured to check the last character as a check digit. + It will not decoded "extended Code 39" sequences. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + + Creates a reader that can be configured to check the last character as a check digit, + or optionally attempt to decode "extended Code 39" sequences that are used to encode + the full ASCII character set. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + if true, will attempt to decode extended Code 39 sequences in the text. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a CODE39 code as a . + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Decodes Code 93 barcodes.

+ Sean Owen + +
+
+ + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a CODE93 code as a BitMatrix + + + + + + output to append to + start position + pattern to append + unused + 9 + + + +

Implements decoding of the EAN-13 format.

+ + dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Initializes a new instance of the class. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + Get the format of this decoder. + The 1D format. + + + + + Based on pattern of odd-even ('L' and 'G') patterns used to encoded the explicitly-encoded + digits in a barcode, determines the implicitly encoded first digit and adds it to the + result string. + + string to insert decoded first digit into + int whose bits indicates the pattern of odd/even L/G patterns used to + encode digits + -1 if first digit cannot be determined + + + + This object renders an EAN13 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Implements decoding of the EAN-8 format.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Get the format of this decoder. + The 1D format. + + + + + This object renders an EAN8 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + + + a byte array of horizontal pixels (false = white, true = black) + + + + + Records EAN prefix to GS1 Member Organization, where the member organization + correlates strongly with a country. This is an imperfect means of identifying + a country of origin by EAN-13 barcode value. See + + http://en.wikipedia.org/wiki/List_of_GS1_country_codes. + + Sean Owen + + + + +

Implements decoding of the ITF format, or Interleaved Two of Five.

+ +

This Reader will scan ITF barcodes of certain lengths only. + At the moment it reads length 6, 8, 10, 12, 14, 16, 18, 20, 24, 44 and 48 as these have appeared "in the wild". Not all + lengths are scanned, especially shorter ones, to avoid false positives. This in turn is due to a lack of + required checksum function.

+ +

The checksum is optional and is not applied by this Reader. The consumer of the decoded + value will have to apply a checksum if required.

+ +

http://en.wikipedia.org/wiki/Interleaved_2_of_5 + is a great reference for Interleaved 2 of 5 information.

+ + kevin.osullivan@sita.aero, SITA Lab. +
+
+ + + Valid ITF lengths. Anything longer than the largest value is also allowed. + + + + + Start/end guard pattern. + + Note: The end pattern is reversed because the row is reversed before + searching for the END_PATTERN + + + + + Patterns of Wide / Narrow lines to indicate each digit + + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + + row of black/white values to search + offset of start pattern + The payload end. + to append decoded chars to + + false, if decoding could not complete successfully + + + + + Identify where the start of the middle / payload section starts. + + row of black/white values to search + Array, containing index of start of 'start block' and end of 'start block' + + + + The start & end patterns must be pre/post fixed by a quiet zone. This + zone must be at least 10 times the width of a narrow line. Scan back until + we either get to the start of the barcode or match the necessary number of + quiet zone pixels. + + Note: Its assumed the row is reversed when using this method to find + quiet zone after the end pattern. + + ref: http://www.barcode-1.net/i25code.html + + bit array representing the scanned barcode. + index into row of the start or end pattern. + false, if the quiet zone cannot be found + + + + Skip all whitespace until we get to the first black line. + + row of black/white values to search + index of the first black line or -1 if no black lines are found in the row. + + + + Identify where the end of the middle / payload section ends. + + row of black/white values to search + Array, containing index of start of 'end block' and end of 'end + block' or null, if nothing found + + + + + row of black/white values to search + position to start search + pattern of counts of number of black and white pixels that are being searched for as a pattern + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a sequence of ITF black/white lines into single + digit. + + the counts of runs of observed black/white/black/... values + The decoded digit + + false, if digit cannot be decoded + + + + + This object renders a ITF code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code bool[]} of horizontal pixels (false = white, true = black) + + + + + + + Decodes MSI barcodes. + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. + + + + + Creates a reader that can be configured to check the last character as a check digit, + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a MSI code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + This object renders a Plessey code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

A reader that can read all available UPC/EAN formats. If a caller wants to try to + read all such formats, it is most efficient to use this implementation rather than invoke + individual readers.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Encapsulates functionality and implementation that is common to one-dimensional barcodes.

+ dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + a byte array of horizontal pixels (0 = white, 1 = black) + + + + Appends the given pattern to the target array starting at pos. + + encode black/white pattern into this array + position to start encoding at in target + lengths of black/white runs to encode + starting color - false for white, true for black + the number of elements added to target. + + + + Gets the default margin. + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + + barcode contents to encode + a bool[] of horizontal pixels (false = white, true = black) + + + + Calculates the checksum digit modulo10. + + The contents. + + + + + Encapsulates functionality and implementation that is common to all families + of one-dimensional barcodes. + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + + + + + + + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + Note that we don't try rotation without the try harder flag, even if rotation was supported. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + We're going to examine rows from the middle outward, searching alternately above and below the + middle, and farther out each time. rowStep is the number of rows between each successive + attempt above and below the middle. So we'd scan row middle, then middle - rowStep, then + middle + rowStep, then middle - (2 * rowStep), etc. + rowStep is bigger as the image is taller, but is always at least 1. We've somewhat arbitrarily + decided that moving up and down by about 1/16 of the image is pretty good; we try more of the + image if "trying harder". + + The image to decode + Any hints that were requested + The contents of the decoded barcode + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the pattern in reverse. + + The row. + The start. + The counters. + + + + + Determines how closely a set of observed counts of runs of black/white values matches a given + target pattern. This is reported as the ratio of the total variance from the expected pattern + proportions across all pattern elements, to the length of the pattern. + + observed counters + expected pattern + The most any counter can differ before we give up + ratio of total variance between counters and pattern compared to total pattern size, + where the ratio has been multiplied by 256. So, 0 means no variance (perfect match); 256 means + the total variance between counters and patterns equals the pattern length, higher values mean + even more variance + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + Superclass of implementations that read barcodes in the RSS family of formats. + + + + + Initializes a new instance of the class. + + + + + Gets the decode finder counters. + + + + + + Gets the data character counters. + + + + + + Gets the odd rounding errors. + + + + + + Gets the even rounding errors. + + + + + + Gets the odd counts. + + + + + + Gets the even counts. + + + + + + Parses the finder value. + + The counters. + The finder patterns. + The value. + + + + + Counts the specified array. + + The array. + + + + + Increments the specified array. + + The array. + The errors. + + + + Decrements the specified array. + + The array. + The errors. + + + + Determines whether [is finder pattern] [the specified counters]. + + The counters. + + true if [is finder pattern] [the specified counters]; otherwise, false. + + + + + Encapsulates a since character value in an RSS barcode, including its checksum information. + + + + + Gets the value. + + + + + Gets the checksum portion. + + + + + Initializes a new instance of the class. + + The value. + The checksum portion. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Gets the information. + + + + + + Parses the information. + + + + + + Creates the decoder. + + The information. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + One row of an RSS Expanded Stacked symbol, consisting of 1+ expanded pairs. + + + + + Did this row of the image have to be reversed (mirrored) to recognize the pairs? + + + + + Two rows are equal if they contain the same pairs in the same order. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Encapsulates an RSS barcode finder pattern, including its start/end position and row. + + + + + Gets the value. + + + + + Gets the start end. + + + + + Gets the result points. + + + + + Initializes a new instance of the class. + + The value. + The start end. + The start. + The end. + The row number. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Decodes RSS-14, including truncated and stacked variants. See ISO/IEC 24724:2006. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Adapted from listings in ISO/IEC 24724 Appendix B and Appendix G. + + + + + Gets the RS svalue. + + The widths. + Width of the max. + if set to true [no narrow]. + + + + +

Implements decoding of the UPC-A format.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen +
+
+ + +

Like decodeRow(int, BitArray, java.util.Map), but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ + + + + +
+ + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Decodes the specified image. + + The image. + The hints. + + + + + Get the format of this decoder. + The 1D format. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + This object renders a UPC-A code as a . + qwandor@google.com (Andrew Walbran) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + @see UPCEANExtension5Support + + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + + + @see UPCEANExtension2Support + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + one {@link ResultMetadataType} to appropriate value, or {@code null} if not known + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Start/end guard pattern. + + + + + Pattern marking the middle of a UPC/EAN pattern, separating the two halves. + + + + + end guard pattern. + + + + + "Odd", or "L" patterns used to encode UPC/EAN digits. + + + + + As above but also including the "even", or "G" patterns used to encode UPC/EAN digits. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + +

Like , but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ row index into the image + encoding of the row of the barcode image + start/end column where the opening start pattern was found + optional hints that influence decoding + encapsulating the result of decoding a barcode in the row +
+ + + + string of digits to check + see + + + + Computes the UPC/EAN checksum on a string of digits, and reports + whether the checksum is correct or not. + + string of digits to check + true iff string of digits passes the UPC/EAN checksum algorithm + + + + Decodes the end. + + The row. + The end start. + + + + + + row of black/white values to search + position to start search + if true, indicates that the pattern specifies white/black/white/... + pixel counts, otherwise, it is interpreted as black/white/black/... + pattern of counts of number of black and white pixels that are being + searched for as a pattern + array of counters, as long as pattern, to re-use + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a single UPC/EAN-encoded digit. + + row of black/white values to decode + the counts of runs of observed black/white/black/... values + horizontal offset to start decoding from + the set of patterns to use to decode -- sometimes different encodings + for the digits 0-9 are used, and this indicates the encodings for 0 to 9 that should + be used + horizontal offset of first pixel beyond the decoded digit + + + + Get the format of this decoder. + + The 1D format. + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ aripollak@gmail.com (Ari Pollak) + dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Gets the default margin. + + + + +

Implements decoding of the UPC-E format.

+

Thisis a great reference for + UPC-E information.

+ Sean Owen +
+
+ + + The pattern that marks the middle, and end, of a UPC-E pattern. + There is no "second half" to a UPC-E barcode. + + + + + See L_AND_G_PATTERNS these values similarly represent patterns of + even-odd parity encodings of digits that imply both the number system (0 or 1) + used, and the check digit. + + + + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Decodes the end. + + The row. + The end start. + + + + + see checkStandardUPCEANChecksum(String) + + + + + + + Determines the num sys and check digit. + + The result string. + The lg pattern found. + + + + + Get the format of this decoder. + The 1D format. + + + + + Expands a UPC-E value back into its full, equivalent UPC-A code value. + + UPC-E code as string of digits + equivalent UPC-A code as string of digits + + + + + This object renders an UPC-E code as a {@link BitMatrix}. + @author 0979097955s@gmail.com (RX) + + + + + Metadata about a PDF417 Barcode + + Guenther Grau + + + + A Barcode Value for the PDF417 barcode. + The scanner will iterate through the bitmatrix, + and given the different methods or iterations + will increment a given barcode value's confidence. + + When done, this will return the values of highest confidence. + + Guenther Grau + + + + Incremenets the Confidence for a given value. (Adds an occurance of a value) + + + Value. + + + + Determines the maximum occurrence of a set value and returns all values which were set with this occurrence. + + an array of int, containing the values with the highest occurrence, or null, if no value was set. + + + + Returns the confience value for a given barcode value + + Barcode value. + + + + A Bounding Box helper class + + Guenther Grau + + + + Initializes a new instance of the class. + returns null if the corner points don't match up correctly + + The image. + The top left. + The bottom left. + The top right. + The bottom right. + + + + + Creates the specified box. + + The box. + + + + + Initializes a new instance of the class. + Will throw an exception if the corner points don't match up correctly + + Image. + Top left. + Top right. + Bottom left. + Bottom right. + + + + Merge two Bounding Boxes, getting the left corners of left, and the right corners of right + (Images should be the same) + + Left. + Right. + + + + Adds the missing rows. + + The missing rows. + Missing start rows. + Missing end rows. + If set to true is left. + + + + Calculates the minimum and maximum X & Y values based on the corner points. + + + + + If we adjust the width, set a new right corner coordinate and recalculate + + Bottom right. + + + + A Codeword in the PDF417 barcode + + Guenther Grau + + + + Default value for the RowNumber (-1 being an invalid real number) + + + + + Initializes a new instance of the class. + + Start x. + End x. + Bucket. + Value. + + + + Gets the width. + + The width. + + + + Gets a value indicating whether this instance has valid row number. + + true if this instance has valid row number; otherwise, false. + + + + Determines whether this instance is valid row number the specified rowNumber. + + true if this instance is valid row number the specified rowNumber; otherwise, false. + Row number. + + + + Sets the row number as the row's indicator column. + + + + + Returns a that represents the current . + + A that represents the current . + + + +

This class contains the methods for decoding the PDF417 codewords.

+ + SITA Lab (kevin.osullivan@sita.aero) +
+
+ + + Table containing values for the exponent of 900. + This is used in the numeric compaction decode algorithm. + + + + + Text Compaction mode (see 5.4.1.5) permits all printable ASCII characters to be + encoded, i.e. values 32 - 126 inclusive in accordance with ISO/IEC 646 (IRV), as + well as selected control characters. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + The Text Compaction mode includes all the printable ASCII characters + (i.e. values from 32 to 126) and three ASCII control characters: HT or tab + (ASCII value 9), LF or line feed (ASCII value 10), and CR or carriage + return (ASCII value 13). The Text Compaction mode also includes various latch + and shift characters which are used exclusively within the mode. The Text + Compaction mode encodes up to 2 characters per codeword. The compaction rules + for converting data into PDF417 codewords are defined in 5.4.2.2. The sub-mode + switches are defined in 5.4.2.3. + + The text compaction data. + The byte compaction data if there + was a mode shift. + The size of the text compaction and byte compaction data. + The decoded data is appended to the result. + + + + + Byte Compaction mode (see 5.4.3) permits all 256 possible 8-bit byte values to be encoded. + This includes all ASCII characters value 0 to 127 inclusive and provides for international + character set support. + + The byte compaction mode i.e. 901 or 924 + The array of codewords (data + error) + Currently active character encoding + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Numeric Compaction mode (see 5.4.4) permits efficient encoding of numeric data strings. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Convert a list of Numeric Compacted codewords from Base 900 to Base 10. + EXAMPLE + Encode the fifteen digit numeric string 000213298174000 + Prefix the numeric string with a 1 and set the initial value of + t = 1 000 213 298 174 000 + Calculate codeword 0 + d0 = 1 000 213 298 174 000 mod 900 = 200 + + t = 1 000 213 298 174 000 div 900 = 1 111 348 109 082 + Calculate codeword 1 + d1 = 1 111 348 109 082 mod 900 = 282 + + t = 1 111 348 109 082 div 900 = 1 234 831 232 + Calculate codeword 2 + d2 = 1 234 831 232 mod 900 = 632 + + t = 1 234 831 232 div 900 = 1 372 034 + Calculate codeword 3 + d3 = 1 372 034 mod 900 = 434 + + t = 1 372 034 div 900 = 1 524 + Calculate codeword 4 + d4 = 1 524 mod 900 = 624 + + t = 1 524 div 900 = 1 + Calculate codeword 5 + d5 = 1 mod 900 = 1 + t = 1 div 900 = 0 + Codeword sequence is: 1, 624, 434, 632, 282, 200 + + Decode the above codewords involves + 1 x 900 power of 5 + 624 x 900 power of 4 + 434 x 900 power of 3 + + 632 x 900 power of 2 + 282 x 900 power of 1 + 200 x 900 power of 0 = 1000213298174000 + + Remove leading 1 => Result is 000213298174000 + The array of codewords + The number of codewords + The decoded string representing the Numeric data. + + + + + + + Guenther Grau + + + + Returns the DetectionResult Columns. This does a fair bit of calculation, so call it sparingly. + + The detection result columns. + + + + Adjusts the indicator column row numbers. + + Detection result column. + + + + return number of codewords which don't have a valid row number. Note that the count is not accurate as codewords . + will be counted several times. It just serves as an indicator to see when we can stop adjusting row numbers + + The row numbers. + + + + Adjusts the row numbers by row. + + The row numbers by row. + + + + Adjusts the row numbers from both Row Indicators + + zero + + + + Adjusts the row numbers from Right Row Indicator. + + The unadjusted row count. + + + + Adjusts the row numbers from Left Row Indicator. + + Unadjusted row Count. + + + + Adjusts the row number if valid. + + The invalid rows + Row indicator row number. + Invalid row counts. + Codeword. + + + + Adjusts the row numbers. + + Barcode column. + Codewords row. + Codewords. + + + + Adjusts the row number. + + true, if row number was adjusted, false otherwise. + Codeword. + Other codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + The maximum distance to search in the codeword array in both the positive and negative directions + + + + + The Bounding Box around the column (in the BitMatrix) + + The box. + + + + The Codewords the Box encodes for, offset by the Box minY. + Remember to Access this ONLY through GetCodeword(imageRow) if you're accessing it in that manner. + + The codewords. + + + + Initializes a new instance of the class. + + The Bounding Box around the column (in the BitMatrix) + + + + Converts the Image's Row to the index in the Codewords array + + The Codeword Index. + Image row. + + + + Converts the Codeword array index into a Row in the Image (BitMatrix) + + The Image Row. + Codeword index. + + + + Gets the codeword for a given row + + The codeword. + Image row. + + + + Gets the codeword closest to the specified row in the image + + Image row. + + + + Sets the codeword for an image row + + Image row. + Codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + Gets or sets a value indicating whether this instance is the left indicator + + true if this instance is left; otherwise, false. + + + + Initializes a new instance of the class. + + Box. + If set to true is left. + + + + Sets the Row Numbers as Inidicator Columns + + + + + TODO implement properly + TODO maybe we should add missing codewords to store the correct row number to make + finding row numbers for other columns easier + use row height count to make detection of invalid row numbers more reliable + + The indicator column row numbers. + Metadata. + + + + Gets the row heights. + + The row heights. + + + + Adjusts the in omplete indicator column row numbers. + + Metadata. + + + + Gets the barcode metadata. + + The barcode metadata. + + + + Prune the codewords which do not match the metadata + TODO Maybe we should keep the incorrect codewords for the start and end positions? + + Codewords. + Metadata. + + + + Returns a that represents the current . + + A that represents the current . + + + +

PDF417 error correction implementation.

+

This example + is quite useful in understanding the algorithm.

+ Sean Owen + +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the specified received. + + received codewords + number of those codewords used for EC + location of erasures + The error locations count. + + + + + Runs the euclidean algorithm (Greatest Common Divisor) until r's degree is less than R/2 + + The euclidean algorithm. + + + + Finds the error locations as a direct application of Chien's search + + The error locations. + Error locator. + + + + Finds the error magnitudes by directly applying Forney's Formula + + The error magnitudes. + Error evaluator. + Error locator. + Error locations. + + + +

A field based on powers of a generator integer, modulo some modulus.

+ +
+ Sean Owen +
+ + + + + Sean Owen + + + + Gets the coefficients. + + The coefficients. + + + + degree of this polynomial + + + + + Gets a value indicating whether this instance is zero. + + true if this polynomial is the monomial "0" + + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + + + Adds another Modulus + + Other. + + + + Subtract another Modulus + + Other. + + + + Multiply by another Modulus + + Other. + + + + Returns a Negative version of this instance + + + + + Multiply by a Scalar. + + Scalar. + + + + Multiplies by a Monomial + + The by monomial. + Degree. + Coefficient. + + + + Returns a that represents the current . + + A that represents the current . + + + + + + Guenther Grau + creatale GmbH (christoph.schulz@creatale.de) + + + + The ratios table + + + + + Initializes the class & Pre-computes the symbol ratio table. + + + + + Gets the decoded value. + + The decoded value. + Module bit count. + + + + Samples the bit counts. + + The bit counts. + Module bit count. + + + + Gets the decoded codeword value. + + The decoded codeword value. + Module bit count. + + + + Gets the bit value. + + The bit value. + Module bit count. + + + + Gets the closest decoded value. + + The closest decoded value. + Module bit count. + + + + + + Guenther Grau + + + + Decode the specified image, imageTopLeft, imageBottomLeft, imageTopRight, imageBottomRight, minCodewordWidth + and maxCodewordWidth. + TODO: don't pass in minCodewordWidth and maxCodewordWidth, pass in barcode columns for start and stop pattern + columns. That way width can be deducted from the pattern column. + This approach also allows to detect more details about the barcode, e.g. if a bar type (white or black) is wider + than it should be. This can happen if the scanner used a bad blackpoint. + + Image. + Image top left. + Image bottom left. + Image top right. + Image bottom right. + Minimum codeword width. + Max codeword width. + + + + Merge the specified leftRowIndicatorColumn and rightRowIndicatorColumn. + + Left row indicator column. + Right row indicator column. + + + + Adjusts the bounding box. + + The bounding box. + Row indicator column. + + + + Gets the barcode metadata. + + The barcode metadata. + Left row indicator column. + Right row indicator column. + + + + Gets the row indicator column. + + The row indicator column. + Image. + Bounding box. + Start point. + If set to true left to right. + Minimum codeword width. + Max codeword width. + + + + Adjusts the codeword count. + + Detection result. + Barcode matrix. + + + + Creates the decoder result. + + The decoder result. + Detection result. + + + + This method deals with the fact, that the decoding process doesn't always yield a single most likely value. The + current error correction implementation doesn't deal with erasures very well, so it's better to provide a value + for these ambiguous codewords instead of treating it as an erasure. The problem is that we don't know which of + the ambiguous values to choose. We try decode using the first value, and if that fails, we use another of the + ambiguous values and try to decode again. This usually only happens on very hard to read and decode barcodes, + so decoding the normal barcodes is not affected by this. + + The decoder result from ambiguous values. + Ec level. + Codewords. + contains the indexes of erasures. + array with the indexes that have more than one most likely value. + two dimensional array that contains the ambiguous values. The first dimension must + be the same Length as the ambiguousIndexes array. + + + + Creates the barcode matrix. + + The barcode matrix. + Detection result. + + + + Tests to see if the Barcode Column is Valid + + true, if barcode column is valid, false otherwise. + Detection result. + Barcode column. + + + + Gets the start column. + + The start column. + Detection result. + Barcode column. + Image row. + If set to true left to right. + + + + Detects the codeword. + + The codeword. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + Minimum codeword width. + Max codeword width. + + + + Gets the module bit count. + + The module bit count. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + + + + Gets the number of EC code words. + + The number of EC code words. + Barcode EC level. + + + + Adjusts the codeword start column. + + The codeword start column. + Image. + Minimum column. + Max column. + If set to true left to right. + Codeword start column. + Image row. + + + + Checks the codeword for any skew. + + true, if codeword is within the skew, false otherwise. + Codeword size. + Minimum codeword width. + Max codeword width. + + + + Decodes the codewords. + + The codewords. + Codewords. + Ec level. + Erasures. + + + + Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place. + + The errors. + data and error correction codewords. + positions of any known erasures. + number of error correction codewords that are available in codewords. + + + + Verifies that all is well with the the codeword array. + + Codewords. + Number EC codewords. + + + + Gets the bit count for codeword. + + The bit count for codeword. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Module bit count. + + + + Returns a that represents the jagged array. + + A that represents the jagged array. + Barcode matrix as a jagged array. + + + +

Encapsulates logic that can detect a PDF417 Code in an image, even if the + PDF417 Code is rotated or skewed, or partially obscured.

+ + SITA Lab (kevin.osullivan@sita.aero) + dswitkin@google.com (Daniel Switkin) + Guenther Grau +
+
+ + + B S B S B S B S Bar/Space pattern + 11111111 0 1 0 1 0 1 000. + + + + + 1111111 0 1 000 1 0 1 00 1 + + + + + if we set the value too low, then we don't detect the correct height of the bar if the start patterns are damaged. + if we set the value too high, then we might detect the start pattern from a neighbor barcode. + + + + + A PDF471 barcode should have at least 3 rows, with each row being >= 3 times the module width. Therefore it should be at least + 9 pixels tall. To be conservative, we use about half the size to ensure we don't miss it. + + + + +

Detects a PDF417 Code in an image. Only checks 0 and 180 degree rotations.

+
+ barcode image to decode + optional hints to detector + if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned + + encapsulating results of detecting a PDF417 code + +
+ + + Detects PDF417 codes in an image. Only checks 0 degree rotation (so rotate the matrix and check again outside of this method) + + multiple if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned. + bit matrix to detect barcodes in. + List of ResultPoint arrays containing the coordinates of found barcodes + + + + Locate the vertices and the codewords area of a black blob using the Start and Stop patterns as locators. + + Matrix. + Start row. + Start column. + an array containing the vertices: + vertices[0] x, y top left barcode + vertices[1] x, y bottom left barcode + vertices[2] x, y top right barcode + vertices[3] x, y bottom right barcode + vertices[4] x, y top left codeword area + vertices[5] x, y bottom left codeword area + vertices[6] x, y top right codeword area + vertices[7] x, y bottom right codeword area + + + + + Copies the temp data to the final result + + Result. + Temp result. + Destination indexes. + + + + Finds the rows with the given pattern. + + The rows with pattern. + Matrix. + Height. + Width. + Start row. + Start column. + Pattern. + + + + Finds the guard pattern. Uses System.Linq.Enumerable.Repeat to fill in counters. This might be a performance issue? + + start/end horizontal offset of guard pattern, as an array of two ints. + matrix row of black/white values to search + column x position to start search. + row y position to start search. + width the number of pixels to search on this row. + If set to true search the white patterns first. + pattern of counts of number of black and white pixels that are being searched for as a pattern. + counters array of counters, as long as pattern, to re-use . + + + + Determines how closely a set of observed counts of runs of black/white. + values matches a given target pattern. This is reported as the ratio of + the total variance from the expected pattern proportions across all + pattern elements, to the length of the pattern. + + + ratio of total variance between counters and pattern compared to + total pattern size, where the ratio has been multiplied by 256. + So, 0 means no variance (perfect match); 256 means the total + variance between counters and patterns equals the pattern length, + higher values mean even more variance + + observed counters. + expected pattern. + The most any counter can differ before we give up. + + + + PDF 417 Detector Result class. Skipped private backing stores. + Guenther Grau + + + + + Initializes a new instance of the class. + + Bits. + Points. + + + + defines the level of the error correction / count of error correction codewords + + + + + Holds all of the information for a barcode in a format where it can be easily accessible + + Jacob Haynes + + + + + the height of the matrix (Rows) + the width of the matrix (Cols) + + + + + Jacob Haynes + + + + + Creates a Barcode row of the width + + The width. + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + A boolean which is true if the bar black false if it is white + How many spots wide the bar is. + + + + + This function scales the row + + How much you want the image to be scaled, must be greater than or equal to 1. + the scaled row + + + + + Represents possible PDF417 barcode compaction types. + + + + + + + + + + + + + + + + + + + + + + + + + Data object to specify the minimum and maximum number of rows and columns for a PDF417 barcode. + @author qwandor@google.com (Andrew Walbran) + + + + + Initializes a new instance of the class. + + The min cols. + The max cols. + The min rows. + The max rows. + + + + Gets the min cols. + + + + + Gets the max cols. + + + + + Gets the min rows. + + + + + Gets the max rows. + + + + + Top-level class for the logic part of the PDF417 implementation. + + + + + The start pattern (17 bits) + + + + + The stop pattern (18 bits) + + + + + The codeword table from the Annex A of ISO/IEC 15438:2001(E). + + + + + Calculates the necessary number of rows as described in annex Q of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol (r) + + + + Calculates the number of pad codewords as described in 4.9.2 of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol + the number of pad codewords + + + + Generates the barcode logic. + + the message to encode + PDF417 error correction level to use + + + + Determine optimal nr of columns and rows for the specified number of + codewords. + + number of code words + number of error correction code words + The longest dimension of the barcode, used for columns + The short dimension of the barcode, used for rows + The height of a row, will alter this parameter if aspectRatio>4 (aspectRatio==AUTO) + dimension object containing cols as width and rows as height + + + + Sets max/min row/col values + + maximum allowed columns + minimum allowed columns + maximum allowed rows + minimum allowed rows + + + + Sets compaction to values stored in enum + + compaction mode to use + + + + Sets compact to be true or false + + if true, enables compaction + + + + Sets output encoding. + + sets character encoding to use + + + + Sets the disable eci. + + if set to true don't add an ECI segment for different encodings than default. + + + + PDF417 error correction code following the algorithm described in ISO/IEC 15438:2001(E) in + chapter 4.10. + + + + + Tables of coefficients for calculating error correction words + (see annex F, ISO/IEC 15438:2001(E)) + + + + + Determines the number of error correction codewords for a specified error correction + level. + + the error correction level (0-8) + the number of codewords generated for error correction + + + + Determines the error correction level for AUTO + + The error correction level (0-9) + The number of codewords for AUTO errorCorrectionLevel + the number of codewords generated for error correction + + + + Returns the recommended minimum error correction level as described in annex E of + ISO/IEC 15438:2001(E). + + the number of data codewords + the recommended minimum error correction level + + + + Generates the error correction codewords according to 4.10 in ISO/IEC 15438:2001(E). + + the data codewords + the error correction level (0-8) + the String representing the error correction codewords + + + + defines the level of the error correction / count of error correction codewords + + + + + PDF417 high-level encoder following the algorithm described in ISO/IEC 15438:2001(E) in + annex P. + + + + + code for Text compaction + + + + + code for Byte compaction + + + + + code for Numeric compaction + + + + + Text compaction submode Alpha + + + + + Text compaction submode Lower + + + + + Text compaction submode Mixed + + + + + Text compaction submode Punctuation + + + + + mode latch to Text Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters NOT a multiple of 6) + + + + + mode latch to Numeric Compaction mode + + + + + mode shift to Byte Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters a multiple of 6) + + + + + identifier for a user defined Extended Channel Interpretation (ECI) + + + + + identifier for a general purpose ECO format + + + + + identifier for an ECI of a character set of code page + + + + + Raw code table for text compaction Mixed sub-mode + + + + + Raw code table for text compaction: Punctuation sub-mode + + + + + Performs high-level encoding of a PDF417 message using the algorithm described in annex P + of ISO/IEC 15438:2001(E). If byte compaction has been selected, then only byte compaction + is used. + + the message + compaction mode to use + character encoding used to encode in default or byte compaction + or null for default / not applicable + if true, don't add an ECI segment for different encodings than default + the encoded message (the char values range from 0 to 928) + + + + Encode parts of the message using Text Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.2. + + the message + the start position within the message + the number of characters to encode + receives the encoded codewords + should normally be SUBMODE_ALPHA + the text submode in which this method ends + + + + + Encode parts of the message using Byte Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.3. The Unicode characters will be converted to binary using the cp437 + codepage. + + the message converted to a byte array + the start position within the message + the number of bytes to encode + the mode from which this method starts + receives the encoded codewords + + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using text compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using binary compaction. + + the message + the message converted to a byte array + the start position within the message + + the requested character count + + + + The class holds the available options for the + + + + + Specifies whether to use compact mode for PDF417 (type ). + + + + + Specifies what compaction mode to use for PDF417 (type + ). + + + + + Specifies the minimum and maximum number of rows and columns for PDF417 (type + ). + + + + + Specifies what degree of error correction to use + + + + + Specifies what degree of error correction to use + + + + + Specifies what character encoding to use where applicable (type {@link String}) + + + + + Explicitly disables ECI segment when generating PDF417 Code + That is against the specification but some + readers have problems if the charset is switched from + CP437 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use different encodings + and the ECI segment is omitted. + + + + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Maximum Codewords (Data + Error). + + + + + Gets the bit count sum. + + The bit count sum. + Module bit count. + + + + Converts an ICollection<int> to an int[] + Carry-over from Java. Will likely remove and replace with the Generic .ToArray() method. + + The int array. + List. + + + + Translate the symbol into a codeword + + the codeword corresponding to the symbol. + encoded symbol to translate to a codeword + + + + The sorted table of all possible symbols. Extracted from the PDF417 + specification. The index of a symbol in this table corresponds to the + index into the codeword table. + + + + + This table contains to codewords for all symbols. + + + + + This implementation can detect and decode PDF417 codes in an image. + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Locates and decodes a PDF417 code in an image. + + a String representing the content encoded by the PDF417 code + if a PDF417 cannot be decoded + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + **Note** this will return the FIRST barcode discovered if there are many. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Locates and decodes Multiple PDF417 codes in an image. + + an array of Strings representing the content encoded by the PDF417 codes + + + + + Locates and decodes multiple barcodes in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcodes encode + + + + + Decode the specified image, with the hints and optionally multiple barcodes. + Based on Owen's Comments in , this method has been modified to continue silently + if a barcode was not decoded where it was detected instead of throwing a new exception object. + + Image. + Hints. + If set to true multiple. + + + + Gets the maximum width of the barcode + + The max width. + P1. + P2. + + + + Gets the minimum width of the barcode + + The minimum width. + P1. + P2. + + + + Gets the maximum width of the codeword. + + The max codeword width. + P. + + + + Gets the minimum width of the codeword. + + The minimum codeword width. + P. + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + PDF 417 result meta data. + Guenther Grau + + + + + The Segment ID represents the segment of the whole file distributed over different symbols. + + + + + Is the same for each related PDF417 symbol + + + + + always null + + + + + true if it is the last segment + + + + + count of segments, -1 if not set + + + + + Filename of the encoded file + + + + + filesize in bytes of the encoded file + returns filesize in bytes, -1 if not set + + + + + 16-bit CRC checksum using CCITT-16 + returns crc checksum, -1 if not set + + + + + unix epock timestamp, elapsed seconds since 1970-01-01 + returns elapsed seconds, -1 if not set + + + + + Jacob Haynes + qwandor@google.com (Andrew Walbran) + + + + + default white space (margin) around the code + + + + + default error correction level + + + + + default aspect ratio + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The height of a row in the barcode + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Takes encoder, accounts for width/height, and retrieves bit matrix + + + + + This takes an array holding the values of the PDF 417 + + a byte array of information with 0 is black, and 1 is white + border around the barcode + BitMatrix of the input + + + + Takes and rotates the it 90 degrees + + + + + This object extends LuminanceSource around an array of YUV data returned from the camera driver, + with the option to crop to a rectangle within the full data. This can be used to exclude + superfluous pixels around the perimeter and speed up decoding. + It works for any pixel format where the Y channel is planar and appears first, including + YCbCr_420_SP and YCbCr_422_SP. + @author dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The yuv data. + Width of the data. + Height of the data. + The left. + The top. + The width. + The height. + if set to true [reverse horiz]. + + + + Initializes a new instance of the class. + + The luminances. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + + + + + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Renders the cropped greyscale bitmap. + + + + + + width of image from {@link #renderThumbnail()} + + + + + height of image from {@link #renderThumbnail()} + + + + + creates a new instance + + + + + + + + Sean Owen + + + {@link BitMatrix} to parse + ReaderException if dimension is not >= 21 and 1 mod 4 + + +

Reads format information from one of its two locations within the QR Code.

+ +
+ {@link FormatInformation} encapsulating the QR Code's format info + + ReaderException if both format information locations cannot be parsed as + the valid encoding of format information + +
+ +

Reads version information from one of its two locations within the QR Code.

+ +
+ {@link Version} encapsulating the QR Code's version + + ReaderException if both version information locations cannot be parsed as + the valid encoding of version information + +
+ +

Reads the bits in the {@link BitMatrix} representing the finder pattern in the + correct order in order to reconstruct the codewords bytes contained within the + QR Code.

+ +
+ bytes encoded within the QR Code + + ReaderException if the exact number of bytes expected is not read +
+ + Revert the mask removal done while reading the code words. The bit matrix should revert to its original state. + + + Prepare the parser for a mirrored operation. + This flag has effect only on the {@link #readFormatInformation()} and the + {@link #readVersion()}. Before proceeding with {@link #readCodewords()} the + {@link #mirror()} method should be called. + + @param mirror Whether to read version and format information mirrored. + + + Mirror the bit matrix in order to attempt a second reading. + + +

Encapsulates a block of data within a QR Code. QR Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

When QR Codes use multiple data blocks, they are actually interleaved. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ +
+ bytes as read directly from the QR Code + + version of the QR Code + + error-correction level of the QR Code + + {@link DataBlock}s containing original bytes, "de-interleaved" from representation in the + QR Code + +
+ +

Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations + of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix, + including areas used for finder patterns, timing patterns, etc. These areas should be unused + after the point they are unmasked anyway.

+ +

Note that the diagram in section 6.8.1 is misleading since it indicates that i is column position + and j is row position. In fact, as the text says, i is row position and j is column position.

+ +
+ Sean Owen +
+ + See ISO 18004:2006 6.8.1 + + +

Implementations of this method reverse the data masking process applied to a QR Code and + make its bits ready to read.

+
+ + representation of QR Code bits + dimension of QR Code, represented by bits, being unmasked +
+ +

QR Codes can encode text as bits in one of several modes, and can use multiple modes + in one QR Code. This class decodes the bits back into text.

+ +

See ISO 18004:2006, 6.4.3 - 6.4.7

+ Sean Owen +
+
+ + + See ISO 18004:2006, 6.4.4 Table 5 + + + + + See specification GBT 18284-2000 + + The bits. + The result. + The count. + + + + +

The main class which implements QR Code decoding -- as opposed to locating and extracting + the QR Code from an image.

+
+ + Sean Owen + +
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a QR Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Decodes a QR Code represented as a {@link BitMatrix}. A 1 or "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+
+ data and error correction codewords + number of codewords that are data bytes + +
+ + +

See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels + defined by the QR code standard.

+
+ Sean Owen +
+ + L = ~7% correction + + + M = ~15% correction + + + Q = ~25% correction + + + H = ~30% correction + + + + Gets the bits. + + + + + Gets the name. + + + + + Ordinals this instance. + + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Fors the bits. + + int containing the two bits encoding a QR Code's error correction level + + representing the encoded error correction level + + + +

Encapsulates a QR Code's format information, including the data mask used and + error correction level.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + +
+ + See ISO 18004:2006, Annex C, Table C.1 + + + Offset i holds the number of 1 bits in the binary representation of i + + + + Decodes the format information. + + format info indicator, with mask still applied + The masked format info2. + + information about the format it specifies, or null + if doesn't seem to match any known pattern + + + + +

See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which + data can be encoded to bits in the QR code standard.

+
+ Sean Owen +
+ + + Gets the name. + + + + + enumeration for encoding modes + + + + + + + + + + numeric encoding + + + + + alpha-numeric encoding + + + + + structured append + + + + + byte mode encoding + + + + + ECI segment + + + + + Kanji mode + + + + + FNC1 char, first position + + + + + FNC1 char, second position + + + + + Hanzi mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See GBT 18284-2000; "Hanzi" is a transliteration of this mode name. + + + + Fors the bits. + + four bits encoding a QR Code data mode + + encoded by these bits + + if bits do not correspond to a known mode + + + version in question + + number of bits used, in this QR Code symbol {@link Version}, to encode the + count of characters that will follow encoded in this {@link Mode} + + + + + Gets the bits. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Meta-data container for QR Code decoding. Instances of this class may be used to convey information back to the + decoding caller. Callers are expected to process this. + + + + + Initializes a new instance of the class. + + if set to true [mirrored]. + + + + true if the QR Code was mirrored. + + + + + Apply the result points' order correction due to mirroring. + + Array of points to apply mirror correction to. + + + + See ISO 18004:2006 Annex D + + Sean Owen + + + See ISO 18004:2006 Annex D. + Element i represents the raw version bits that specify version i + 7 + + + + + Gets the version number. + + + + + Gets the alignment pattern centers. + + + + + Gets the total codewords. + + + + + Gets the dimension for version. + + + + + Gets the EC blocks for level. + + The ec level. + + + +

Deduces version information purely from QR Code dimensions.

+ +
+ dimension in modules + + for a QR Code of that dimension or null +
+ + + Gets the version for number. + + The version number. + + + + See ISO 18004:2006 Annex E + + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + + Gets the EC codewords per block. + + + + + Gets the num blocks. + + + + + Gets the total EC codewords. + + + + + Gets the EC blocks. + + + + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the QR code version's format.

+
+
+ + + Gets the count. + + + + + Gets the data codewords. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + See ISO 18004:2006 6.5.1 Table 9 + + +

Encapsulates an alignment pattern, which are the smaller square patterns found in + all but the simplest QR Codes.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Determines if this alignment pattern "about equals" an alignment pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing an average of the two. + + The i. + The j. + New size of the module. + + + +

This class attempts to find alignment patterns in a QR Code. Alignment patterns look like finder + patterns but are smaller and appear at regular intervals throughout the image.

+ +

At the moment this only looks for the bottom-right alignment pattern.

+ +

This is mostly a simplified copy of {@link FinderPatternFinder}. It is copied, + pasted and stripped down here for maximum performance but does unfortunately duplicate + some code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Creates a finder that will look in a portion of the whole image.

+ +
+ image to search + + left column from which to start searching + + top row from which to start searching + + width of region to search + + height of region to search + + estimated module size so far + + callback function which is called, when a result point is found +
+ +

This method attempts to find the bottom-right alignment pattern in the image. It is a bit messy since + it's pretty performance-critical and so is written to be fast foremost.

+ +
+ if found +
+ + Given a count of black/white/black pixels just seen and an end position, + figures the location of the center of this black/white/black run. + + + + count of black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/1 ratios + used by alignment patterns to be considered a match + + + + +

After a horizontal scan finds a potential alignment pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + alignment pattern to see if the same proportion is detected.

+
+ row where an alignment pattern was detected + center of the section that appears to cross an alignment pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of alignment pattern, or null if not found + +
+ +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will see if this pattern had been + found on a previous horizontal scan. If so, we consider it confirmed and conclude we have + found the alignment pattern.

+ +
+ reading state module counts from horizontal scan + + row where alignment pattern may be found + + end of possible alignment pattern in row + + {@link AlignmentPattern} if we have found the same pattern twice, or null if not + +
+ + +

Encapsulates logic that can detect a QR Code in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + + Gets the image. + + + + + Gets the result point callback. + + + + +

Detects a QR Code in an image.

+
+ + encapsulating results of detecting a QR Code + +
+ + +

Detects a QR Code in an image.

+
+ optional hints to detector + + encapsulating results of detecting a QR Code + +
+ + + Processes the finder pattern info. + + The info. + + + +

Computes the dimension (number of modules on a size) of the QR Code based on the position + of the finder patterns and estimated module size.

+
+
+ + +

Computes an average estimated module size based on estimated derived from the positions + of the three finder patterns.

+
+ detected top-left finder pattern center + detected top-right finder pattern center + detected bottom-left finder pattern center + estimated module size +
+ +

Estimates module size based on two finder patterns -- it uses + {@link #sizeOfBlackWhiteBlackRunBothWays(int, int, int, int)} to figure the + width of each, measuring along the axis between their centers.

+
+
+ + See {@link #sizeOfBlackWhiteBlackRun(int, int, int, int)}; computes the total width of + a finder pattern by looking for a black-white-black run from the center in the direction + of another point (another finder pattern center), and in the opposite direction too. + + + +

This method traces a line from a point in the image, in the direction towards another point. + It begins in a black region, and keeps going until it finds white, then black, then white again. + It reports the distance from the start to this point.

+ +

This is used when figuring out how wide a finder pattern is, when the finder pattern + may be skewed or rotated.

+
+
+ + +

Attempts to locate an alignment pattern in a limited region of the image, which is + guessed to contain it. This method uses {@link AlignmentPattern}.

+
+ estimated module size so far + x coordinate of center of area probably containing alignment pattern + y coordinate of above + number of pixels in all directions to search from the center + + if found, or null otherwise + +
+ + +

Encapsulates a finder pattern, which are the three square patterns found in + the corners of QR Codes. It also encapsulates a count of similar finder patterns, + as a convenience to the finder's bookkeeping.

+
+ Sean Owen +
+ + + Gets the size of the estimated module. + + + The size of the estimated module. + + + +

Determines if this finder pattern "about equals" a finder pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing a weighted average + based on count. + + The i. + The j. + New size of the module. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+
+ Sean Owen +
+ + + 1 pixel/module times 3 modules/center + + + + + support up to version 20 for mobile clients + + + + +

Creates a finder that will search the image for three finder patterns.

+
+ image to search +
+ + + Initializes a new instance of the class. + + The image. + The result point callback. + + + + Gets the image. + + + + + Gets the possible centers. + + + + Given a count of black/white/black/white/black pixels just seen and an end position, + figures the location of the center of this run. + + + + count of black/white/black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/3/1/1 ratios + used by finder patterns to be considered a match + + + + + + count of black/white/black/white/black pixels just read + true if the proportions of the counts is close enough to the 1/1/3/1/1 ratios + by finder patterns to be considered a match + + + + After a vertical and horizontal scan finds a potential finder pattern, this method + "cross-cross-cross-checks" by scanning down diagonally through the center of the possible + finder pattern to see if the same proportion is detected. + @param maxCount maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + @param originalStateCountTotal The original state count total. + + row where a finder pattern was detected + center of the section that appears to cross a finder pattern + true if proportions are withing expected limits + + + +

After a horizontal scan finds a potential finder pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + finder pattern to see if the same proportion is detected.

+
+ row where a finder pattern was detected + center of the section that appears to cross a finder pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of finder pattern, or null if not found + +
+ +

Like {@link #crossCheckVertical(int, int, int, int)}, and in fact is basically identical, + except it reads horizontally instead of vertically. This is used to cross-cross + check a vertical cross check and locate the real center of the alignment pattern.

+
+
+ + + @see #handlePossibleCenter(int[], int, int) + + reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + ignored + true if a finder pattern candidate was found this time + + + +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will, ah, cross-cross-check + with another horizontal scan. This is needed primarily to locate the real horizontal + center of the pattern in cases of extreme skew. + And then we cross-cross-cross check with another diagonal scan.

+ If that succeeds the finder pattern location is added to a list that tracks + the number of times each location has been nearly-matched as a finder pattern. + Each additional find is more evidence that the location is in fact a finder + pattern center +
+ reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + + true if a finder pattern candidate was found this time + +
+ + number of rows we could safely skip during scanning, based on the first + two finder patterns that have been located. In some cases their position will + allow us to infer that the third pattern must lie below a certain point farther + down in the image. + + + + true iff we have found at least 3 finder patterns that have been detected + at least {@link #CENTER_QUORUM} times each, and, the estimated module size of the + candidates is "pretty similar" + + + + the 3 best {@link FinderPattern}s from our list of candidates. The "best" are + those that have been detected at least {@link #CENTER_QUORUM} times, and whose module + size differs from the average among those patterns the least + + + + + Orders by furthest from average + + + +

Orders by {@link FinderPattern#getCount()}, descending.

+
+ + +

Encapsulates information about finder patterns in an image, including the location of + the three finder patterns, and their estimated module size.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The pattern centers. + + + + Gets the bottom left. + + + + + Gets the top left. + + + + + Gets the top right. + + + + + JAVAPORT: The original code was a 2D array of ints, but since it only ever gets assigned + 0, 1 and 2 I'm going to use less memory and go with bytes. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Gets the height. + + + + + Gets the width. + + + + + Gets or sets the with the specified x. + + + + + an internal representation as bytes, in row-major order. array[y][x] represents point (x,y) + + + + + Sets the specified x. + + The x. + The y. + The value. + + + + Sets the specified x. + + The x. + The y. + if set to true [value]. + + + + Clears the specified value. + + The value. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + Encode "bytes" with the error correction level "ecLevel". The encoding mode will be chosen + internally by chooseMode(). On success, store the result in "qrCode". + We recommend you to use QRCode.EC_LEVEL_L (the lowest level) for + "getECLevel" since our primary use is to show QR code on desktop screens. We don't need very + strong error correction for this purpose. + Note that there is no way to encode bytes in MODE_KANJI. We might want to add EncodeWithMode() + with which clients can specify the encoding mode. For now, we don't need the functionality. + + text to encode + error correction level to use + representing the encoded QR code + + + + Encodes the specified content. + + The content. + The ec level. + The hints. + + + + + Decides the smallest version of QR code that will contain all of the provided data. + + if the data cannot fit in any version + + + + Gets the alphanumeric code. + + The code. + the code point of the table used in alphanumeric mode or + -1 if there is no corresponding code in the table. + + + + Chooses the mode. + + The content. + + + + + Choose the best mode by examining the content. Note that 'encoding' is used as a hint; + if it is Shift_JIS, and the input is only double-byte Kanji, then we return {@link Mode#KANJI}. + + The content. + The encoding. + + + + + true if the number of input bits will fit in a code with the specified version and error correction level. + + + + Terminate bits as described in 8.4.8 and 8.4.9 of JISX0510:2004 (p.24). + + The num data bytes. + The bits. + + + + Get number of data bytes and number of error correction bytes for block id "blockID". Store + the result in "numDataBytesInBlock", and "numECBytesInBlock". See table 12 in 8.5.1 of + JISX0510:2004 (p.30) + + The num total bytes. + The num data bytes. + The num RS blocks. + The block ID. + The num data bytes in block. + The num EC bytes in block. + + + + Interleave "bits" with corresponding error correction bytes. On success, store the result in + "result". The interleave rule is complicated. See 8.6 of JISX0510:2004 (p.37) for details. + + The bits. + The num total bytes. + The num data bytes. + The num RS blocks. + + + + + Append mode info. On success, store the result in "bits". + + The mode. + The bits. + + + + Append length info. On success, store the result in "bits". + + The num letters. + The version. + The mode. + The bits. + + + + Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits". + + The content. + The mode. + The bits. + The encoding. + + + + + + Satoru Takabayashi + Daniel Switkin + Sean Owen + + + + Apply mask penalty rule 1 and return the penalty. Find repetitive cells with the same color and + give penalty to them. Example: 00000 or 11111. + + The matrix. + + + + + Apply mask penalty rule 2 and return the penalty. Find 2x2 blocks with the same color and give + penalty to them. This is actually equivalent to the spec's rule, which is to find MxN blocks and give a + penalty proportional to (M-1)x(N-1), because this is the number of 2x2 blocks inside such a block. + + The matrix. + + + + + Apply mask penalty rule 3 and return the penalty. Find consecutive cells of 00001011101 or + 10111010000, and give penalty to them. If we find patterns like 000010111010000, we give + penalties twice (i.e. 40 * 2). + + The matrix. + + + + + Apply mask penalty rule 4 and return the penalty. Calculate the ratio of dark cells and give + penalty if the ratio is far from 50%. It gives 10 penalty for 5% distance. + + The matrix. + + + + + Return the mask bit for "getMaskPattern" at "x" and "y". See 8.8 of JISX0510:2004 for mask + pattern conditions. + + The mask pattern. + The x. + The y. + + + + + Helper function for applyMaskPenaltyRule1. We need this for doing this calculation in both + vertical and horizontal orders respectively. + + The matrix. + if set to true [is horizontal]. + + + + + + + + satorux@google.com (Satoru Takabayashi) - creator + + + + + Set all cells to 2. 2 means that the cell is empty (not set yet). + + JAVAPORT: We shouldn't need to do this at all. The code should be rewritten to begin encoding + with the ByteMatrix initialized all to zero. + + The matrix. + + + + Build 2D matrix of QR Code from "dataBits" with "ecLevel", "version" and "getMaskPattern". On + success, store the result in "matrix" and return true. + + The data bits. + The ec level. + The version. + The mask pattern. + The matrix. + + + + Embed basic patterns. On success, modify the matrix and return true. + The basic patterns are: + - Position detection patterns + - Timing patterns + - Dark dot at the left bottom corner + - Position adjustment patterns, if need be + + The version. + The matrix. + + + + Embed type information. On success, modify the matrix. + + The ec level. + The mask pattern. + The matrix. + + + + Embed version information if need be. On success, modify the matrix and return true. + See 8.10 of JISX0510:2004 (p.47) for how to embed version information. + + The version. + The matrix. + + + + Embed "dataBits" using "getMaskPattern". On success, modify the matrix and return true. + For debugging purposes, it skips masking process if "getMaskPattern" is -1. + See 8.7 of JISX0510:2004 (p.38) for how to embed data bits. + + The data bits. + The mask pattern. + The matrix. + + + + Return the position of the most significant bit set (to one) in the "value". The most + significant bit is position 32. If there is no bit set, return 0. Examples: + - findMSBSet(0) => 0 + - findMSBSet(1) => 1 + - findMSBSet(255) => 8 + + The value_ renamed. + + + + + Calculate BCH (Bose-Chaudhuri-Hocquenghem) code for "value" using polynomial "poly". The BCH + code is used for encoding type information and version information. + Example: Calculation of version information of 7. + f(x) is created from 7. + - 7 = 000111 in 6 bits + - f(x) = x^2 + x^2 + x^1 + g(x) is given by the standard (p. 67) + - g(x) = x^12 + x^11 + x^10 + x^9 + x^8 + x^5 + x^2 + 1 + Multiply f(x) by x^(18 - 6) + - f'(x) = f(x) * x^(18 - 6) + - f'(x) = x^14 + x^13 + x^12 + Calculate the remainder of f'(x) / g(x) + x^2 + __________________________________________________ + g(x) )x^14 + x^13 + x^12 + x^14 + x^13 + x^12 + x^11 + x^10 + x^7 + x^4 + x^2 + -------------------------------------------------- + x^11 + x^10 + x^7 + x^4 + x^2 + + The remainder is x^11 + x^10 + x^7 + x^4 + x^2 + Encode it in binary: 110010010100 + The return value is 0xc94 (1100 1001 0100) + + Since all coefficients in the polynomials are 1 or 0, we can do the calculation by bit + operations. We don't care if coefficients are positive or negative. + + The value. + The poly. + + + + + Make bit vector of type information. On success, store the result in "bits" and return true. + Encode error correction level and mask pattern. See 8.9 of + JISX0510:2004 (p.45) for details. + + The ec level. + The mask pattern. + The bits. + + + + Make bit vector of version information. On success, store the result in "bits" and return true. + See 8.10 of JISX0510:2004 (p.45) for details. + + The version. + The bits. + + + + Check if "value" is empty. + + The value. + + true if the specified value is empty; otherwise, false. + + + + + Embed the lonely dark dot at left bottom corner. JISX0510:2004 (p.46) + + The matrix. + + + + + + The x start. + The y start. + The matrix. + + + + Embed position detection patterns and surrounding vertical/horizontal separators. + + The matrix. + + + + Embed position adjustment patterns if need be. + + The version. + The matrix. + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + + + + + + Initializes a new instance of the class. + + + + + Gets or sets the mode. + + + The mode. + + + + + Gets or sets the EC level. + + + The EC level. + + + + + Gets or sets the version. + + + The version. + + + + + Gets or sets the mask pattern. + + + The mask pattern. + + + + + Gets or sets the matrix. + + + The matrix. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Check if "mask_pattern" is valid. + + The mask pattern. + + true if [is valid mask pattern] [the specified mask pattern]; otherwise, false. + + + + + The class holds the available options for the QrCodeWriter + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + . + + + + + Specifies what character encoding to use where applicable (type ) + + + + + Explicitly disables ECI segment when generating QR Code + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + + + + + Specifies the exact version of QR code to be encoded. An integer, range 1 to 40. If the data specified + cannot fit within the required version, a WriterException will be thrown. + + + + + This implementation can detect and decode QR Codes in an image. + Sean Owen + + + + + Gets the decoder. + + + + + + Locates and decodes a QR code in an image. + + a String representing the content encoded by the QR code + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a QR Code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Implementations of this interface can decode an image of a barcode in some format into + the String it encodes. For example, can + decode a QR code. The decoder may optionally receive hints from the caller which may help + it decode more quickly or accurately. + + See , which attempts to determine what barcode + format is present within the image as well, and then decodes it accordingly. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + String which the barcode encodes + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + The general exception class throw when something goes wrong during decoding of a barcode. + This includes, but is not limited to, failing checksums / error correction algorithms, being + unable to locate finder timing patterns, and so on. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class. + + The inner exception. + + + + Initializes a new instance of the class. + + The inner exception. + + + + + Renders a to a image + + + + + Gets or sets the foreground color. + + The foreground color. + + + + Gets or sets the background color. + + The background color. + + + + Gets or sets the resolution which should be used to create the bitmap + If nothing is set the current system settings are used + + + + + Gets or sets the resolution which should be used to create the bitmap + If nothing is set the current system settings are used + + + + + Gets or sets the text font. + + + The text font. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Interface for a class to convert a BitMatrix to an output image format + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + The options. + + + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + + + converts the pixel data to a bitmap object + + + + + + the generated code as byte array of BGRA pixels + + + + + the width of the image + + + + + the height of the image + + + + + Renders a to an byte array with pixel data (4 byte per pixel, BGRA) + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Renders a barcode into a Svg image + + + + + Gets or sets the foreground color. + + The foreground color. + + + + Gets or sets the background color. + + The background color. + + + + Gets or sets the font family name + + The font family name. + + + + Gets or sets the font size in pixel + + The font size in pixel. + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Represents a barcode as a Svg image + + + + + Gets or sets the content. + + + The content. + + + + + The original height of the bitmatrix for the barcode + + + + + The original width of the bitmatrix for the barcode + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The content. + + + + Gives the XML representation of the SVG image + + + + + Encapsulates the result of decoding a barcode within an image. + + + + raw text encoded by the barcode, if applicable, otherwise null + + + raw bytes encoded by the barcode, if applicable, otherwise null + + + + points related to the barcode in the image. These are typically points + identifying finder patterns or the corners of the barcode. The exact meaning is + specific to the type of barcode that was decoded. + + + + {@link BarcodeFormat} representing the format of the barcode that was decoded + + + + {@link Hashtable} mapping {@link ResultMetadataType} keys to values. May be + null. This contains optional metadata about what was detected about the barcode, + like orientation. + + + + + Gets the timestamp. + + + + + how many bits of are valid; typically 8 times its length + + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + The timestamp. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + The timestamp. + + + + Adds one metadata to the result + + The type. + The value. + + + + Adds a list of metadata to the result + + The metadata. + + + + Adds the result points. + + The new points. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Represents some type of metadata about the result of the decoding that the decoder + wishes to communicate back to the caller. + + Sean Owen + + + + Unspecified, application-specific metadata. Maps to an unspecified {@link Object}. + + + + + Denotes the likely approximate orientation of the barcode in the image. This value + is given as degrees rotated clockwise from the normal, upright orientation. + For example a 1D barcode which was found by reading top-to-bottom would be + said to have orientation "90". This key maps to an {@link Integer} whose + value is in the range [0,360). + + + + +

2D barcode formats typically encode text, but allow for a sort of 'byte mode' + which is sometimes used to encode binary data. While {@link Result} makes available + the complete raw bytes in the barcode for these formats, it does not offer the bytes + from the byte segments alone.

+

This maps to a {@link java.util.List} of byte arrays corresponding to the + raw bytes in the byte segments in the barcode, in order.

+
+
+ + + Error correction level used, if applicable. The value type depends on the + format, but is typically a String. + + + + + For some periodicals, indicates the issue number as an {@link Integer}. + + + + + For some products, indicates the suggested retail price in the barcode as a + formatted {@link String}. + + + + + For some products, the possible country of manufacture as a {@link String} denoting the + ISO country code. Some map to multiple possible countries, like "US/CA". + + + + + For some products, the extension text + + + + + If the code format supports structured append and + the current scanned code is part of one then the + sequence number is given with it. + + + + + If the code format supports structured append and + the current scanned code is part of one then the + parity is given with it. + + + + + PDF417-specific metadata + + + + + Aztec-specific metadata + + + + + Encapsulates a point of interest in an image containing a barcode. Typically, this + would be the location of a finder pattern or the corner of the barcode, for example. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The x. + The y. + + + + Gets the X. + + + + + Gets the Y. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC and + BC is less than AC and the angle between BC and BA is less than 180 degrees. + + array of three to order + + + + calculates the distance between two points + + first pattern + second pattern + + distance between two points + + + + + Returns the z component of the cross product between vectors BC and BA. + + + + Callback which is invoked when a possible result point (significant + point in the barcode image such as a corner) is found. + + + + + + + + Luminance source class which support different formats of images. + + + + + enumeration of supported bitmap format which the RGBLuminanceSource can process + + + + + format of the byte[] isn't known. RGBLuminanceSource tries to determine the best possible value + + + + + grayscale array, the byte array is a luminance array with 1 byte per pixel + + + + + grayscale array, the byte array is a luminance array with 2 bytes per pixel + + + + + 3 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels alpha, red, green and blue + + + + + 3 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green, red and alpha + + + + + 2 bytes per pixel, 5 bit red, 6 bits green and 5 bits blue + + + + + 4 bytes per pixel with the channels red, green, blue and alpha + + + + + 4 bytes for two pixels, UYVY formatted + + + + + 4 bytes for two pixels, YUYV formatted + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 1 byte per pixel (Gray8). + That means the whole array consists of the luminance values (grayscale). + + The luminance array. + The width. + The height. + if set to true [is8 bit]. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + The bitmap format. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + calculates the luminance values for the given byte array and bitmap format + + + + + + + Contains conversion support elements such as classes, interfaces and static methods. + + + + + Copies an array of chars obtained from a String into a specified array of chars + + The String to get the chars from + Position of the String to start getting the chars + Position of the String to end getting the chars + Array to return the chars + Position of the destination array of chars to start storing the chars + An array of chars + + + + Sets the capacity for the specified List + + The List which capacity will be set + The new capacity value + + + + Converts a string-Collection to an array + + The strings. + + + + + Joins all elements to one string. + + + The separator. + The values. + + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The value. + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The start index. + The end index. + The value. + + + + + + + + + + + + + + + + + + Savely gets the value of a decoding hint + if hints is null the default is returned + + + The hints. + Type of the hint. + The @default. + + + + The base class for all objects which encode/generate a barcode image. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + A base class which covers the range of exceptions which may occur when encoding a barcode using + the Writer framework. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner exc. + +
+
diff --git a/packages/ZXing.Net.0.16.4/lib/net47/zxing.dll b/packages/ZXing.Net.0.16.4/lib/net47/zxing.dll new file mode 100644 index 0000000..bf127d1 Binary files /dev/null and b/packages/ZXing.Net.0.16.4/lib/net47/zxing.dll differ diff --git a/packages/ZXing.Net.0.16.4/lib/net47/zxing.presentation.XML b/packages/ZXing.Net.0.16.4/lib/net47/zxing.presentation.XML new file mode 100644 index 0000000..a95132f --- /dev/null +++ b/packages/ZXing.Net.0.16.4/lib/net47/zxing.presentation.XML @@ -0,0 +1,195 @@ + + + + zxing.presentation + + + + + A smart class to decode the barcode inside a bitmap object which is derived from BitmapSource + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, default is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, default is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + The create RGB luminance source. + + + + A smart class to encode some content to a barcode image + + + + + Initializes a new instance of the class. + + + + + A smart class to encode some content to a barcode image into a geometry + Autor: Rob Fonseca-Ensor + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + + The bitmap. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + Renders a barcode into a geometry + Autor: Rob Fonseca-Ensor + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Renders a to a + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + + Gets or sets the font family. + + + The font family. + + + + + Gets or sets the size of the font. + + + The size of the font. + + + + + Gets or sets the font stretch. + + + The font stretch. + + + + + Gets or sets the font style. + + + The font style. + + + + + Gets or sets the font weight. + + + The font weight. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + diff --git a/packages/ZXing.Net.0.16.4/lib/net47/zxing.presentation.dll b/packages/ZXing.Net.0.16.4/lib/net47/zxing.presentation.dll new file mode 100644 index 0000000..dc4f6d1 Binary files /dev/null and b/packages/ZXing.Net.0.16.4/lib/net47/zxing.presentation.dll differ diff --git a/packages/ZXing.Net.0.16.4/lib/netstandard1.0/zxing.dll b/packages/ZXing.Net.0.16.4/lib/netstandard1.0/zxing.dll new file mode 100644 index 0000000..4e6674e Binary files /dev/null and b/packages/ZXing.Net.0.16.4/lib/netstandard1.0/zxing.dll differ diff --git a/packages/ZXing.Net.0.16.4/lib/netstandard1.0/zxing.xml b/packages/ZXing.Net.0.16.4/lib/netstandard1.0/zxing.xml new file mode 100644 index 0000000..8ca09f9 --- /dev/null +++ b/packages/ZXing.Net.0.16.4/lib/netstandard1.0/zxing.xml @@ -0,0 +1,11755 @@ + + + + zxing + + + + + Interface for a class to convert a BitMatrix to an output image format + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + The options. + + + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + + + the generated code as byte array of BGRA pixels + + + + + the width of the image + + + + + the height of the image + + + + + Renders a to an byte array with pixel data (4 byte per pixel, BGRA) + + + + + represents a color defined as ARGB byte data + + + + + the color black + + + + + the color white + + + + + value of the alpha channel + + + + + value of the red channel + + + + + value of the green channel + + + + + value of the blue channel + + + + + Initializes a new instance of the struct. + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Renders a barcode into a Svg image + + + + + represents a color value + + + + + color black + + + + + color white + + + + + alpha channel + + + + + red channel + + + + + green channel + + + + + blur channel + + + + + initializing constructor + + + + + initializing constructor + + + + + Gets or sets the foreground color. + + The foreground color. + + + + Gets or sets the background color. + + The background color. + + + + Gets or sets the font family name + + The font family name. + + + + Gets or sets the font size in pixel + + The font size in pixel. + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Represents a barcode as a Svg image + + + + + Gets or sets the content. + + + The content. + + + + + The original height of the bitmatrix for the barcode + + + + + The original width of the bitmatrix for the barcode + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The content. + + + + Gives the XML representation of the SVG image + + + + + Enumerates barcode formats known to this package. + + Sean Owen + + + Aztec 2D barcode format. + + + CODABAR 1D format. + + + Code 39 1D format. + + + Code 93 1D format. + + + Code 128 1D format. + + + Data Matrix 2D barcode format. + + + EAN-8 1D format. + + + EAN-13 1D format. + + + ITF (Interleaved Two of Five) 1D format. + + + MaxiCode 2D barcode format. + + + PDF417 format. + + + QR Code 2D barcode format. + + + RSS 14 + + + RSS EXPANDED + + + UPC-A 1D format. + + + UPC-E 1D format. + + + UPC/EAN extension format. Not a stand-alone format. + + + MSI + + + Plessey + + + Intelligent Mail barcode + + + + UPC_A | UPC_E | EAN_13 | EAN_8 | CODABAR | CODE_39 | CODE_93 | CODE_128 | ITF | RSS_14 | RSS_EXPANDED + without MSI (to many false-positives) and IMB (not enough tested, and it looks more like a 2D) + + + + + A smart class to decode the barcode inside a bitmap object or byte array with raw pixel color values + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Optional: Gets or sets the function to create a luminance source object for a bitmap. + If null a platform specific default LuminanceSource is used + + + The function to create a luminance source object. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + A smart class to decode the barcode inside a bitmap object + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Constructor for additional image formats for one BarcodeReader class + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Optional: Gets or sets the function to create a luminance source object for a bitmap. + If null a platform specific default LuminanceSource is used + + + The function to create a luminance source object. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + A smart class to decode the barcode inside a bitmap object + + + + + represents the default function which is called to get a instance from a raw byte array + + + + + Gets or sets the options. + + + The options. + + + + + Gets the reader which should be used to find and decode the barcode. + + + The reader. + + + + + Gets or sets a method which is called if an important point is found + + + The result point callback. + + + + + event is executed if a result was found via decode + + + + + Gets or sets a value indicating whether the image should be automatically rotated. + Rotation is supported for 90, 180 and 270 degrees + + + true if image should be rotated; otherwise, false. + + + + + Gets or sets a value indicating whether the image should be automatically inverted + if no result is found in the original image. + ATTENTION: Please be carefully because it slows down the decoding process if it is used + + + true if image should be inverted; otherwise, false. + + + + + Optional: Gets or sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + The function to create a binarizer object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb array. + If null the RGBLuminanceSource is used. The handler is only called when Decode with a byte[] array is called. + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + raises the ResultFound event + + + + + + raises the ResultFound event + + + + + + calls the explicitResultPointFound action + + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + A smart class to encode some content to raw pixel data + + + + + Initializes a new instance of the class. + + + + + A smart class to encode some content to a svg barcode image + + + + + Initializes a new instance of the class. + + + + + A base class for specific barcode writers with specific formats of barcode images. + + The type of the output. + + + + Gets or sets the renderer which should be used to render the encoded BitMatrix. + + + + + Encodes the specified contents and returns a rendered instance of the barcode. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The matrix. + + + + + A base class for specific barcode writers with specific formats of barcode images. + + + + + Gets or sets the barcode format. + The value is only suitable if the MultiFormatWriter is used. + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + + + + + + + + + + + + Encodes the specified contents and returns a BitMatrix array. + That array has to be rendered manually or with a IBarcodeRenderer. + + The contents. + + + + + The base class for luminance sources which supports + cropping and rotating based upon the luminance values. + + + + + weight of the red channel for calculating a gray scale image + + + + + weight of the green channel for calculating a gray scale image + + + + + weight of the blue channel for calculating a gray scale image + + + + + numbers of bits which for right shifting + + + + + + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + + The luminance array. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + gets the luminance matrix + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + TODO: not implemented yet + + + A rotated version of this object. + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + + Whether this subclass supports cropping. + + + + + Whether this subclass supports invertion. + + + + Inverts the luminance values (newValue = 255 - oldValue) + + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + This class hierarchy provides a set of methods to convert luminance data to 1 bit data. + It allows the algorithm to vary polymorphically, for example allowing a very expensive + thresholding technique for servers and a fast one for mobile. It also permits the implementation + to vary, e.g. a JNI version for Android and a Java fallback version for other platforms. + + dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The source. + + + + Gets the luminance source object. + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + For callers which only examine one row of pixels at a time, the same BitArray should be reused + and passed in with each call for performance. However it is legal to keep more than one row + at a time if needed. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + Converts a 2D array of luminance data to 1 bit data. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + A new concrete Binarizer implementation object. + + + + Gets the width of the luminance source object. + + + + + Gets the height of the luminance source object. + + + + + This class is the core bitmap class used by ZXing to represent 1 bit data. Reader objects + accept a BinaryBitmap and attempt to decode it. + + dswitkin@google.com (Daniel Switkin) + + + + + + + + + + The width of the bitmap. + + + + + The height of the bitmap. + + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + + The row to fetch, which must be in [0, bitmap height). + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + + Converts a 2D array of luminance data to 1 bit. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + + Whether this bitmap can be cropped. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if isCropSupported() is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + + Whether this bitmap supports counter-clockwise rotation. + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Encapsulates a type of hint that a caller may pass to a barcode reader to help it + more quickly or accurately decode it. It is up to implementations to decide what, + if anything, to do with the information that is supplied. + + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Unspecified, application-specific hint. Maps to an unspecified . + + + + + Image is a pure monochrome image of a barcode. Doesn't matter what it maps to; + use = true. + + + + + Image is known to be of one of a few possible formats. + Maps to a of s. + + + + + Spend more time to try to find a barcode; optimize for accuracy, not speed. + Doesn't matter what it maps to; use = true. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + + + The caller needs to be notified via callback when a possible + is found. Maps to a . + + + + + Assume MSI codes employ a check digit. Maps to . + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + Maps to . + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + 1D readers supporting rotation with TRY_HARDER enabled. + But BarcodeReader class can do auto-rotating for 1D and 2D codes. + Enabling that option prevents 1D readers doing double rotation. + BarcodeReader enables that option automatically if "global" auto-rotation is enabled. + Maps to . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to; + use . + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Simply encapsulates a width and height. + + + + + initializing constructor + + + + + + + the width + + + + + the height + + + + + + + + + + + + + + + + + + + + + + + + These are a set of hints that you may pass to Writers to specify their behavior. + + dswitkin@google.com (Daniel Switkin) + + + + Specifies the width of the barcode image + type: + + + + + Specifies the height of the barcode image + type: + + + + + Don't put the content string into the output image. + type: + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + + For Aztec it is of type , representing the minimal percentage of error correction words. + In all cases, it can also be a representation of the desired value as well. + Note: an Aztec symbol should have a minimum of 25% EC words. + For PDF417 it is of type or (between 0 and 8), + + + + + Specifies what character encoding to use where applicable. + type: + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + type: , or representation of the integer value + + + + + Specifies the aspect ratio to use. Default is 4. + type: , or 1-4. + + + + + Specifies whether to use compact mode for PDF417 + type: , or "true" or "false" + value + + + + + Specifies what compaction mode to use for PDF417. + type: or value of one of its + enum values + + + + + Specifies the minimum and maximum number of rows and columns for PDF417. + type: + + + + + Don't append ECI segment. + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + type: + + + + + Specifies the matrix shape for Data Matrix (type ) + + + + + Specifies a minimum barcode size (type ). Only applicable to Data Matrix now. + + + + + Specifies a maximum barcode size (type ). Only applicable to Data Matrix now. + + + + + if true, don't switch to codeset C for numbers + + + + + Specifies the default encodation for Data Matrix (type ) + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Specifies the required number of layers for an Aztec code. + A negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + type: , or representation of the integer value + + + + + Specifies the exact version of QR code to be encoded. + (Type , or representation of the integer value). + + + + + Specifies whether the data should be encoded to the GS1 standard + type: , or "true" or "false" + value + + + + + Thrown when a barcode was successfully detected, but some aspect of + the content did not conform to the barcode's format rules. This could have + been due to a mis-detection. + Sean Owen + + + + + + + + + + + + + + + + + + + + + + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Decodes the specified barcode bitmap which is given by a generic byte array. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents. + + The contents. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + The matrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents. + + The contents. + + + + + A wrapper implementation of {@link LuminanceSource} which inverts the luminances it returns -- black becomes + white and vice versa, and each value becomes (255-value). + + Sean Owen + + + + Initializes a new instance of the class. + + The @delegate. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff; + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Inverts this instance. + + original delegate {@link LuminanceSource} since invert undoes itself + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + The purpose of this class hierarchy is to abstract different bitmap implementations across + platforms into a standard interface for requesting greyscale luminance values. The interface + only provides immutable methods; therefore crop and rotation create copies. This is to ensure + that one Reader does not modify the original luminance source and leave it in an unknown state + for other Readers in the chain. + + dswitkin@google.com (Daniel Switkin) + + + + initializing constructor + + + + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff + + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + The width of the bitmap. + + + The height of the bitmap. + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + Whether this subclass supports counter-clockwise rotation. + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + + Whether this subclass supports invertion. + + + + inverts the luminance values, not supported here. has to implemented in sub classes + + + + + + + + + + + + MultiFormatReader is a convenience class and the main entry point into the library for most uses. + By default it attempts to decode all barcode formats that the library supports. Optionally, you + can provide a hints object to request different behavior, for example only decoding QR codes. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + This version of decode honors the intent of Reader.decode(BinaryBitmap) in that it + passes null as a hint to the decoders. However, that makes it inefficient to call repeatedly. + Use setHints() followed by decodeWithState() for continuous scan applications. + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the hints provided. Does not honor existing state. + + + The pixel data to decode + + The hints to use, clearing the previous state. + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the state set up by calling setHints() previously. Continuous scan + clients will get a large speed increase by using this instead of decode(). + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls + to decodeWithState(image) can reuse the same set of readers without reallocating memory. This + is important for performance in continuous scan clients. + + + + + + resets all specific readers + + + + This is a factory class which finds the appropriate Writer subclass for the BarcodeFormat + requested and encodes the barcode with the supplied contents. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Gets the collection of supported writers. + + + + + encode the given data + + + + + + + + + + encode the given data + + + + + + + + + + + This object extends LuminanceSource around an array of YUV data returned from the camera driver, + with the option to crop to a rectangle within the full data. This can be used to exclude + superfluous pixels around the perimeter and speed up decoding. + It works for any pixel format where the Y channel is planar and appears first, including + YCbCr_420_SP and YCbCr_422_SP. + @author dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The yuv data. + Width of the data. + Height of the data. + The left. + The top. + The width. + The height. + if set to true [reverse horiz]. + + + + Initializes a new instance of the class. + + The luminances. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + + + + + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Renders the cropped greyscale bitmap. + + + + + + width of image from {@link #renderThumbnail()} + + + + + height of image from {@link #renderThumbnail()} + + + + + creates a new instance + + + + + + + + + Implementations of this interface can decode an image of a barcode in some format into + the String it encodes. For example, can + decode a QR code. The decoder may optionally receive hints from the caller which may help + it decode more quickly or accurately. + + See , which attempts to determine what barcode + format is present within the image as well, and then decodes it accordingly. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + String which the barcode encodes + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + The general exception class throw when something goes wrong during decoding of a barcode. + This includes, but is not limited to, failing checksums / error correction algorithms, being + unable to locate finder timing patterns, and so on. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class. + + The inner exception. + + + + Initializes a new instance of the class. + + The inner exception. + + + + + Encapsulates the result of decoding a barcode within an image. + + + + raw text encoded by the barcode, if applicable, otherwise null + + + raw bytes encoded by the barcode, if applicable, otherwise null + + + + points related to the barcode in the image. These are typically points + identifying finder patterns or the corners of the barcode. The exact meaning is + specific to the type of barcode that was decoded. + + + + {@link BarcodeFormat} representing the format of the barcode that was decoded + + + + {@link Hashtable} mapping {@link ResultMetadataType} keys to values. May be + null. This contains optional metadata about what was detected about the barcode, + like orientation. + + + + + Gets the timestamp. + + + + + how many bits of are valid; typically 8 times its length + + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + The timestamp. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + The timestamp. + + + + Adds one metadata to the result + + The type. + The value. + + + + Adds a list of metadata to the result + + The metadata. + + + + Adds the result points. + + The new points. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Represents some type of metadata about the result of the decoding that the decoder + wishes to communicate back to the caller. + + Sean Owen + + + + Unspecified, application-specific metadata. Maps to an unspecified {@link Object}. + + + + + Denotes the likely approximate orientation of the barcode in the image. This value + is given as degrees rotated clockwise from the normal, upright orientation. + For example a 1D barcode which was found by reading top-to-bottom would be + said to have orientation "90". This key maps to an {@link Integer} whose + value is in the range [0,360). + + + + +

2D barcode formats typically encode text, but allow for a sort of 'byte mode' + which is sometimes used to encode binary data. While {@link Result} makes available + the complete raw bytes in the barcode for these formats, it does not offer the bytes + from the byte segments alone.

+

This maps to a {@link java.util.List} of byte arrays corresponding to the + raw bytes in the byte segments in the barcode, in order.

+
+
+ + + Error correction level used, if applicable. The value type depends on the + format, but is typically a String. + + + + + For some periodicals, indicates the issue number as an {@link Integer}. + + + + + For some products, indicates the suggested retail price in the barcode as a + formatted {@link String}. + + + + + For some products, the possible country of manufacture as a {@link String} denoting the + ISO country code. Some map to multiple possible countries, like "US/CA". + + + + + For some products, the extension text + + + + + If the code format supports structured append and + the current scanned code is part of one then the + sequence number is given with it. + + + + + If the code format supports structured append and + the current scanned code is part of one then the + parity is given with it. + + + + + PDF417-specific metadata + + + + + Aztec-specific metadata + + + + + Encapsulates a point of interest in an image containing a barcode. Typically, this + would be the location of a finder pattern or the corner of the barcode, for example. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The x. + The y. + + + + Gets the X. + + + + + Gets the Y. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC and + BC is less than AC and the angle between BC and BA is less than 180 degrees. + + array of three to order + + + + calculates the distance between two points + + first pattern + second pattern + + distance between two points + + + + + Returns the z component of the cross product between vectors BC and BA. + + + + Callback which is invoked when a possible result point (significant + point in the barcode image such as a corner) is found. + + + + + + + + Luminance source class which support different formats of images. + + + + + enumeration of supported bitmap format which the RGBLuminanceSource can process + + + + + format of the byte[] isn't known. RGBLuminanceSource tries to determine the best possible value + + + + + grayscale array, the byte array is a luminance array with 1 byte per pixel + + + + + grayscale array, the byte array is a luminance array with 2 bytes per pixel + + + + + 3 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels alpha, red, green and blue + + + + + 3 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green, red and alpha + + + + + 2 bytes per pixel, 5 bit red, 6 bits green and 5 bits blue + + + + + 4 bytes per pixel with the channels red, green, blue and alpha + + + + + 4 bytes for two pixels, UYVY formatted + + + + + 4 bytes for two pixels, YUYV formatted + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 1 byte per pixel (Gray8). + That means the whole array consists of the luminance values (grayscale). + + The luminance array. + The width. + The height. + if set to true [is8 bit]. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + The bitmap format. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + calculates the luminance values for the given byte array and bitmap format + + + + + + + Contains conversion support elements such as classes, interfaces and static methods. + + + + + Copies an array of chars obtained from a String into a specified array of chars + + The String to get the chars from + Position of the String to start getting the chars + Position of the String to end getting the chars + Array to return the chars + Position of the destination array of chars to start storing the chars + An array of chars + + + + Sets the capacity for the specified List + + The List which capacity will be set + The new capacity value + + + + Converts a string-Collection to an array + + The strings. + + + + + Joins all elements to one string. + + + The separator. + The values. + + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The value. + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The start index. + The end index. + The value. + + + + + + + + + + + + + + + + + + Savely gets the value of a decoding hint + if hints is null the default is returned + + + The hints. + Type of the hint. + The @default. + + + + The base class for all objects which encode/generate a barcode image. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + A base class which covers the range of exceptions which may occur when encoding a barcode using + the Writer framework. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner exc. + + + + Extends with more information specific to the Aztec format, + like the number of layers and whether it's compact. + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + Initializes a new instance of the class. + + The bits. + The points. + if set to true [compact]. + The nb datablocks. + The nb layers. + + + + The main class which implements Aztec Code decoding -- as opposed to locating and extracting + the Aztec Code from an image. + + David Olivier + + + + Decodes the specified detector result. + + The detector result. + + + + + This method is used for testing the high-level encoder + + + + + + + Gets the string encoded in the aztec code bits + + The corrected bits. + the decoded string + + + + gets the table corresponding to the char passed + + The t. + + + + + Gets the character (or string) corresponding to the passed code in the given table + + the table used + the code of the character + + + + + Performs RS error correction on an array of bits. + + The rawbits. + the corrected array + + + + Gets the array of bits from an Aztec Code matrix + + The matrix. + the array of bits + + + + Reads a code of given length and at given index in an array of bits + + The rawbits. + The start index. + The length. + + + + + Reads a code of length 8 in an array of bits, padding with zeros + + + + + + + + Packs a bit array into bytes, most significant bit first + + + + + + + Encapsulates logic that can detect an Aztec Code in an image, even if the Aztec Code + is rotated or skewed, or partially obscured. + + David Olivier + + + + Initializes a new instance of the class. + + The image. + + + + Detects an Aztec Code in an image. + + + + + Detects an Aztec Code in an image. + + if true, image is a mirror-image of original. + + encapsulating results of detecting an Aztec Code + + + + + Extracts the number of data layers and data blocks from the layer around the bull's eye + + bullEyeCornerPoints the array of bull's eye corners + + + + + Corrects the parameter bits using Reed-Solomon algorithm + + paremeter bits + compact true if this is a compact Aztec code + + + + + Finds the corners of a bull-eye centered on the passed point + This returns the centers of the diagonal points just outside the bull's eye + Returns [topRight, bottomRight, bottomLeft, topLeft] + + Center point + The corners of the bull-eye + + + + Finds a candidate center point of an Aztec code from an image + + the center point + + + + Gets the Aztec code corners from the bull's eye corners and the parameters. + + the array of bull's eye corners + the array of aztec code corners + + + + Creates a BitMatrix by sampling the provided image. + topLeft, topRight, bottomRight, and bottomLeft are the centers of the squares on the + diagonal just outside the bull's eye. + + The image. + The top left. + The bottom left. + The bottom right. + The top right. + + + + + Samples a line + + start point (inclusive) + end point (exclusive) + number of bits + the array of bits as an int (first bit is high-order bit of result) + + + + Determines whether [is white or black rectangle] [the specified p1]. + + The p1. + The p2. + The p3. + The p4. + true if the border of the rectangle passed in parameter is compound of white points only + or black points only + + + + Gets the color of a segment + + The p1. + The p2. + 1 if segment more than 90% black, -1 if segment is more than 90% white, 0 else + + + + Gets the coordinate of the first point with a different color in the given direction + + The init. + if set to true [color]. + The dx. + The dy. + + + + + Expand the square represented by the corner points by pushing out equally in all directions + + the corners of the square, which has the bull's eye at its center + the original length of the side of the square in the target bit matrix + the new length of the size of the square in the target bit matrix + the corners of the expanded square + + + + Aztec 2D code representation + + Rustam Abdullaev + + + + Compact or full symbol indicator + + + + + Size in pixels (width and height) + + + + + Number of levels + + + + + Number of data codewords + + + + + The symbol image + + + + + represents a token for a binary shift + + + + + initializing constructor + + + + + + + + appends the byte array to the BitArray + + + + + + + string representation + + + + + + Generates Aztec 2D barcodes. + + Rustam Abdullaev + + + + Encodes the given binary content as an Aztec symbol + + input data string + Aztec symbol matrix with metadata + + + + Encodes the given binary content as an Aztec symbol + + input data string + minimal percentage of error check words (According to ISO/IEC 24778:2008, + a minimum of 23% + 3 words is recommended) + if non-zero, a user-specified value for the number of layers + + Aztec symbol matrix with metadata + + + + + This produces nearly optimal encodings of text into the first-level of + encoding used by Aztec code. + It uses a dynamic algorithm. For each prefix of the string, it determines + a set of encodings that could lead to this prefix. We repeatedly add a + character and generate a new set of optimal encodings until we have read + through the entire input. + @author Frank Yellin + @author Rustam Abdullaev + + + + + + + + + + + Convert the text represented by this High Level Encoder into a BitArray. + + text represented by this encoder encoded as a + + + + State represents all information about a sequence necessary to generate the current output. + Note that a state is immutable. + + + + + Create a new state representing this state with a latch to a (not + necessary different) mode, and then a code. + + + + + Create a new state representing this state, with a temporary shift + to a different mode to output a single value. + + + + + Create a new state representing this state, but an additional character + output in Binary Shift mode. + + + + + Create the state identical to this one, but we are no longer in + Binary Shift mode. + + + + + Returns true if "this" state is better (or equal) to be in than "that" + state under all possible circumstances. + + + + + This implementation can detect and decode Aztec codes in an image. + + David Olivier + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + a String representing the content encoded by the Data Matrix code + + + + + Locates and decodes a Data Matrix code in an image. + + image of barcode to decode + passed as a {@link java.util.Hashtable} from {@link com.google.zxing.DecodeHintType} + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Aztec result meta data. + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + + + + + + + + + Renders an Aztec code as a + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + The class holds the available options for the + + + + + Representing the minimal percentage of error correction words. + Note: an Aztec symbol should have a minimum of 25% EC words. + + + + + Specifies the required number of layers for an Aztec code: + a negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + a positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + + + +

See + + DoCoMo's documentation about the result types represented by subclasses of this class.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + Implements KDDI AU's address book format. See + + http://www.au.kddi.com/ezfactory/tec/two_dimensions/index.html. + (Thanks to Yuzo for translating!) + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Implements the "MECARD" address book entry format. + + Supported keys: N, SOUND, TEL, EMAIL, NOTE, ADR, BDAY, URL, plus ORG + Unsupported keys: TEL-AV, NICKNAME + + Except for TEL, multiple values for keys are also not supported; + the first one found takes precedence. + + Our understanding of the MECARD format is based on this document: + + http://www.mobicode.org.tw/files/OMIA%20Mobile%20Bar%20Code%20Standard%20v3.2.1.doc + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes contact information, like that in an address book entry. + + Sean Owen + + + + initializing constructor + + + + + + + + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + the names + + + + + the nicknames + + + + + In Japanese, the name is written in kanji, which can have multiple readings. Therefore a hint + is often provided, called furigana, which spells the name phonetically. + + The pronunciation of the getNames() field, often in hiragana or katakana. + + + + the phone numbers + + + + optional descriptions of the type of each phone number. It could be like "HOME", but, + there is no guaranteed or standard format. + + + + the e-mail addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the instant messenger addresses + + + + + the note field + + + + + the addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the title + + + + + the urls + + + + birthday formatted as yyyyMMdd (e.g. 19780917) + + + a location as a latitude/longitude pair + + + Implements the "BIZCARD" address book entry format, though this has been + largely reverse-engineered from examples observed in the wild -- still + looking for a definitive reference. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a calendar event at a certain time, optionally with attendees and a location. + + Sean Owen + + + + Gets the start. + + + + + Determines whether [is start all day]. + + if start time was specified as a whole day + + + + event end , or null if event has no duration + + + + + Gets a value indicating whether this instance is end all day. + + true if end time was specified as a whole day + + + + Parses a string as a date. RFC 2445 allows the start and end fields to be of type DATE (e.g. 20081021) + or DATE-TIME (e.g. 20081021T123000 for local time, or 20081021T123000Z for UTC). + + The string to parse + + if not a date formatted string + + + + Represents a parsed result that encodes an email message including recipients, subject and body text. + + Sean Owen + + + + the email address + + + + + the TOs + + + + + the CCs + + + + + the BCCs + + + + + the subject + + + + + the body + + + + + the mailto: uri + + + + + Represents a result that encodes an e-mail address, either as a plain address + like "joe@example.org" or a mailto: URL like "mailto:joe@example.org". + + Sean Owen + + + + Implements the "MATMSG" email message entry format. + + Supported keys: TO, SUB, BODY + + Sean Owen + + + + This implements only the most basic checking for an email address's validity -- that it contains + an '@' and contains no characters disallowed by RFC 2822. This is an overly lenient definition of + validity. We want to generally be lenient here since this class is only intended to encapsulate what's + in a barcode, not "judge" it. + + The email. + + true if it is basically a valid email address; otherwise, false. + + + + + Represents a parsed result that encodes extended product information as encoded by the RSS format, like weight, price, dates, etc. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + extension for kilogram weight type + + + + + extension for pounds weight type + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the raw text + + + + + the product id + + + + + the sscc + + + + + the lot number + + + + + the production date + + + + + the packaging date + + + + + the best before date + + + + + the expiration date + + + + + the weight + + + + + the weight type + + + + + the weight increment + + + + + the price + + + + + the price increment + + + + + the price currency + + + + + the uncommon AIs + + + + + the display representation (raw text) + + + + + Parses strings of digits that represent a RSS Extended code. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + tries to parse a text representation to a specific result object + + + + + + + Represents a parsed result that encodes a geographic coordinate, with latitude, longitude and altitude. + + Sean Owen + + + latitude in degrees + + + + longitude in degrees + + + + altitude in meters. If not specified, in the geo URI, returns 0.0 + + + + query string associated with geo URI or null if none exists + + + + the geo URI + + + + a URI link to Google Maps which display the point on the Earth described + by this instance, and sets the zoom level in a way that roughly reflects the + altitude, if specified + + + + Parses a "geo:" URI result, which specifies a location on the surface of + the Earth as well as an optional altitude above the surface. See + + http://tools.ietf.org/html/draft-mayrhofer-geo-uri-00. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a product ISBN number. + + jbreiden@google.com (Jeff Breidenbach) + + + + the ISBN number + + + + Parses strings of digits that represent a ISBN. + + + jbreiden@google.com (Jeff Breidenbach) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + See ISBN-13 For Dummies + + The result. + + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link ResultParser#parseResult(Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Represents the type of data encoded by a barcode -- from plain text, to a + URI, to an e-mail address, etc. + + Sean Owen + + + + Represents a parsed result that encodes a product by an identifier of some kind. + + dswitkin@google.com (Daniel Switkin) + + + + Parses strings of digits that represent a UPC code. + + dswitkin@google.com (Daniel Switkin) + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link #parseResult(com.google.zxing.Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Attempts to parse the raw {@link Result}'s contents as a particular type + of information (email, URL, etc.) and return a {@link ParsedResult} encapsulating + the result of parsing. + + the raw to parse + encapsulating the parsing result + + + + Parses the result. + + The result. + + + +

Parses an "sms:" URI result, which specifies a number to SMS and optional + "via" number. See + the IETF draft on this.

+ +

This actually also parses URIs starting with "mms:", "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + + Represents a parsed result that encodes an SMS message, including recipients, subject and body text. + + Sean Owen + + + +

Parses an "smsto:" URI result, whose format is not standardized but appears to be like: + {@code smsto:number(:body)}.

+

This actually also parses URIs starting with "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+
+ Sean Owen +
+ + +

Parses an "smtp:" URI result, whose format is not standardized but appears to be like: + smtp[:subject[:body]]}.

+

See http://code.google.com/p/zxing/issues/detail?id=536

+
+ Sean Owen +
+ + + Represents a parsed result that encodes a telephone number. + + Sean Owen + + + + Parses a "tel:" URI result, which specifies a phone number. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + A simple result type encapsulating a string that has no further interpretation. + + Sean Owen + + + + A simple result type encapsulating a URI that has no further interpretation. + + Sean Owen + + + true if the URI contains suspicious patterns that may suggest it intends to + mislead the user about its true nature. At the moment this looks for the presence + of user/password syntax in the host/authority portion of a URI which may be used + in attempts to make the URI's host appear to be other than it is. Example: + http://yourbank.com@phisher.com This URI connects to phisher.com but may appear + to connect to yourbank.com at first glance. + + + + Transforms a string that represents a URI into something more proper, by adding or canonicalizing + the protocol. + + + + + Tries to parse results that are a URI of some kind. + + Sean Owen + + + Parses the "URLTO" result format, which is of the form "URLTO:[title]:[url]". + This seems to be used sometimes, but I am not able to find documentation + on its origin or official format? + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Parses contact information formatted according to the VCard (2.1) format. This is not a complete + implementation but should parse information as commonly encoded in 2D barcodes. + + Sean Owen + + + Formats name fields of the form "Public;John;Q.;Reverend;III" into a form like + "Reverend John Q. Public III". + + @param names name values to format, in place + + + + Partially implements the iCalendar format's "VEVENT" format for specifying a + calendar event. See RFC 2445. This supports SUMMARY, DTSTART and DTEND fields. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a Vehicle Identification Number (VIN). + + + + + Detects a result that is likely a vehicle identification number. + @author Sean Owen + + + + + Represents a parsed result that encodes wifi network information, like SSID and password. + + Vikram Aggarwal + + + + + A simple, fast array of bits, represented compactly by an array of ints internally. + + Sean Owen + + + + size of the array, number of elements + + + + + size of the array in bytes + + + + + index accessor + + + + + + + default constructor + + + + + initializing constructor + + desired size of the array + + + + Flips bit i. + + bit to set + + + + + Gets the next set. + + first bit to check + index of first bit that is set, starting from the given index, or size if none are set + at or beyond this given index + + + + see getNextSet(int) + + index to start looking for unset bit + index of next unset bit, or if none are unset until the end + + + Sets a block of 32 bits, starting at bit i. + + + first bit to set + + the new value of the next 32 bits. Note again that the least-significant bit + corresponds to bit i, the next-least-significant to i+1, and so on. + + + + + Sets a range of bits. + + start of range, inclusive. + end of range, exclusive + + + Clears all bits (sets to false). + + + Efficient method to check if a range of bits is set, or not set. + + + start of range, inclusive. + + end of range, exclusive + + if true, checks that bits in range are set, otherwise checks that they are not set + + true iff all bits are set or not set in range, according to value argument + if end is less than start or the range is not contained in the array + + + + Appends the bit. + + The bit. + + + underlying array of ints. The first element holds the first 32 bits, and the least + significant bit is bit 0. + + + + + Appends the least-significant bits, from value, in order from most-significant to + least-significant. For example, appending 6 bits from 0x000001E will append the bits + 0, 1, 1, 1, 1, 0 in that order. + + containing bits to append + bits from value to append + + + + adds the array to the end + + + + + + XOR operation + + + + + + converts to bytes. + + first bit to start writing + array to write into. Bytes are written most-significant byte first. This is the opposite + of the internal representation, which is exposed by BitArray + position in array to start writing + how many bytes to write + + + Reverses all bits in the array. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Erstellt ein neues Objekt, das eine Kopie der aktuellen Instanz darstellt. + + + Ein neues Objekt, das eine Kopie dieser Instanz darstellt. + + + + +

Represents a 2D matrix of bits. In function arguments below, and throughout the common + module, x is the column position, and y is the row position. The ordering is always x, y. + The origin is at the top-left.

+

Internally the bits are represented in a 1-D array of 32-bit ints. However, each row begins + with a new int. This is done intentionally so that we can copy out a row into a BitArray very + efficiently.

+

The ordering of bits is row-major. Within each int, the least significant bits are used first, + meaning they represent lower x values. This is compatible with BitArray's implementation.

+
+ Sean Owen + dswitkin@google.com (Daniel Switkin) +
+ + The width of the matrix + + + + The height of the matrix + + + + This method is for compatibility with older code. It's only logical to call if the matrix + is square, so I'm throwing if that's not the case. + + + row/column dimension of this matrix + + + + + The rowsize of the matrix + + + + + Creates an empty square . + + height and width + + + + Creates an empty square . + + bit matrix width + bit matrix height + + + + Interprets a 2D array of booleans as a , where "true" means an "on" bit. + + bits of the image, as a row-major 2D array. Elements are arrays representing rows + representation of image + + +

Gets the requested bit, where true means black.

+ +
+ The horizontal component (i.e. which column) + + The vertical component (i.e. which row) + + value of given bit in matrix + +
+ + +

Flips the given bit.

+
+ The horizontal component (i.e. which column) + The vertical component (i.e. which row) +
+ + + flip all of the bits, if shouldBeFlipped is true for the coordinates + + should return true, if the bit at a given coordinate should be flipped + + + + Exclusive-or (XOR): Flip the bit in this {@code BitMatrix} if the corresponding + mask bit is set. + + The mask. + + + Clears all bits (sets to false). + + +

Sets a square region of the bit matrix to true.

+ +
+ The horizontal position to begin at (inclusive) + + The vertical position to begin at (inclusive) + + The width of the region + + The height of the region + +
+ + A fast method to retrieve one row of data from the matrix as a BitArray. + + + The row to retrieve + + An optional caller-allocated BitArray, will be allocated if null or too small + + The resulting BitArray - this reference should always be used even when passing + your own row + + + + + Sets the row. + + row to set + {@link BitArray} to copy from + + + + Modifies this {@code BitMatrix} to represent the same but rotated 180 degrees + + + + + This is useful in detecting the enclosing rectangle of a 'pure' barcode. + + {left,top,width,height} enclosing rectangle of all 1 bits, or null if it is all white + + + + This is useful in detecting a corner of a 'pure' barcode. + + {x,y} coordinate of top-left-most 1 bit, or null if it is all white + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + The line separator. + + A that represents this instance. + + + + + Clones this instance. + + + + +

This provides an easy abstraction to read bits at a time from a sequence of bytes, where the + number of bits read is not often a multiple of 8.

+ +

This class is thread-safe but not reentrant. Unless the caller modifies the bytes array + it passed in, in which case all bets are off.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + bytes from which this will read bits. Bits will be read from the first byte first. + Bits are read within a byte from most-significant to least-significant bit. + + + + + index of next bit in current byte which would be read by the next call to {@link #readBits(int)}. + + + + + index of next byte in input byte array which would be read by the next call to {@link #readBits(int)}. + + + + number of bits to read + + int representing the bits read. The bits will appear as the least-significant + bits of the int + + if numBits isn't in [1,32] or more than is available + + + number of bits that can be read successfully + + + + Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1 + of ISO 18004. + + + Sean Owen + + + character set ECI value + representing ECI of given value, or null if it is legal but unsupported + + + character set ECI encoding name + representing ECI for character encoding, or null if it is legalbut unsupported + + + + Encapsulates the result of decoding a matrix of bits. This typically + applies to 2D barcode formats. For now it contains the raw bytes obtained, + as well as a String interpretation of those bytes, if applicable. + Sean Owen + + + + + raw bytes representing the result, or null if not applicable + + + + + how many bits of are valid; typically 8 times its length + + + + + text representation of the result + + + + + list of byte segments in the result, or null if not applicable + + + + + name of error correction level used, or null if not applicable + + + + + gets a value which describe if structure append data was found + + + + + number of errors corrected, or null if not applicable + + + + + gives the sequence number of the result if structured append was found + + + + + number of erasures corrected, or null if not applicable + + + + + gives the parity information if structured append was found + + + + + Miscellanseous data value for the various decoders + + The other. + + + + initializing constructor + + + + + + + + + initializing constructor + + + + + + + + + + + initializing constructor + + + + + + + + + + initializing constructor + + + + + + + + + + + + Defines an container for encoder options + + + + + Gets the data container for all options + + + + + event is raised when a value is changed + + + + + Gets or sets a flag which cause a deeper look into the bitmap + + + true if [try harder]; otherwise, false. + + + + + Image is a pure monochrome image of a barcode. + + + true if monochrome image of a barcode; otherwise, false. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + The character set. + + + + + Image is known to be of one of a few possible formats. + Maps to a {@link java.util.List} of {@link BarcodeFormat}s. + + + The possible formats. + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + true if it should assume a Code 39 check digit; otherwise, false. + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). + + + true if it should assume GS1; otherwise, false. + + + + + Assume MSI codes employ a check digit. Maps to . + + + true if it should assume a MSI check digit; otherwise, false. + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Initializes a new instance of the class. + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Encapsulates the result of detecting a barcode in an image. This includes the raw + matrix of black/white pixels corresponding to the barcode, and possibly points of interest + in the image, like the location of finder patterns or corners of the barcode in the image.

+
+ Sean Owen +
+ + + the detected bits + + + + + the pixel points where the result is found + + + + + initializing constructor + + + + + + + General math-related and numeric utility functions. + + + + + Ends up being a bit faster than {@link Math#round(float)}. This merely rounds its + argument to the nearest int, where x.5 rounds up to x+1. Semantics of this shortcut + differ slightly from {@link Math#round(float)} in that half rounds down for negative + values. -2.5 rounds to -3, not -2. For purposes here it makes no difference. + + real value to round + nearest int + + + + + + + + + + Euclidean distance between points A and B + + + + + + + + + + Euclidean distance between points A and B + + + + + values to sum + sum of values in array + + +

A somewhat generic detector that looks for a barcode-like rectangular region within an image. + It looks within a mostly white region of an image for a region of black and white, but mostly + black. It returns the four corners of the region, as best it can determine.

+ +
+ Sean Owen +
+ + + initializing constructor + + + + + +

Detects a rectangular region of black and white -- mostly black -- with a region of mostly + white, in an image.

+
+ [] describing the corners of the rectangular region. The first and + last points are opposed on the diagonal, as are the second and third. The first point will be + the topmost point and the last, the bottommost. The second point will be leftmost and the + third, the rightmost + +
+ + Attempts to locate a corner of the barcode by scanning up, down, left or right from a center + point which should be within the barcode. + + + center's x component (horizontal) + + same as deltaY but change in x per step instead + + minimum value of x + + maximum value of x + + center's y component (vertical) + + change in y per step. If scanning up this is negative; down, positive; + left or right, 0 + + minimum value of y to search through (meaningless when di == 0) + + maximum value of y + + maximum run of white pixels that can still be considered to be within + the barcode + + a encapsulating the corner that was found + + + + Computes the start and end of a region of pixels, either horizontally or vertically, that could + be part of a Data Matrix barcode. + + + if scanning horizontally, this is the row (the fixed vertical location) + where we are scanning. If scanning vertically it's the column, the fixed horizontal location + + largest run of white pixels that can still be considered part of the + barcode region + + minimum pixel location, horizontally or vertically, to consider + + maximum pixel location, horizontally or vertically, to consider + + if true, we're scanning left-right, instead of up-down + + int[] with start and end of found range, or null if no such range is found + (e.g. only white was found) + + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. By keeping track of the + last black points it encountered, it determines the corners of the barcode. + + David Olivier + + + + Creates a WhiteRectangleDetector instance + + The image. + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + Creates a WhiteRectangleDetector instance + + barcode image to find a rectangle in + initial size of search area around center + x position of search center + y position of search center + + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + + Initializes a new instance of the class. + + The image. + if image is too small + + + + Initializes a new instance of the class. + + The image. + Size of the init. + The x. + The y. + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. + + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + recenters the points of a constant distance towards the center + + bottom most point + left most point + right most point + top most point + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + Determines whether a segment contains a black point + + min value of the scanned coordinate + max value of the scanned coordinate + value of fixed coordinate + set to true if scan must be horizontal, false if vertical + + true if a black point has been found, else false. + + + + + Superclass of classes encapsulating types ECIs, according to "Extended Channel Interpretations" + 5.3 of ISO 18004. + + Sean Owen + + + + the ECI value + + + + ECI value + representing ECI of given value, or null if it is legal but unsupported + ArgumentException if ECI value is invalid + + + + Defines an container for encoder options + + + + + Gets the data container for all options + + + + + Specifies the height of the barcode image + + + + + Specifies the width of the barcode image + + + + + Don't put the content string into the output image. + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + + + + + Specifies whether the data should be encoded to the GS1 standard; + FNC1 character is added in front of the data + + + + + Initializes a new instance of the class. + + + + This Binarizer implementation uses the old ZXing global histogram approach. It is suitable + for low-end mobile devices which don't have enough CPU or memory to use a local thresholding + algorithm. However, because it picks a global black point, it cannot handle difficult shadows + and gradients. + + Faster mobile devices and all desktop applications should probably use HybridBinarizer instead. + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The source. + + + + Applies simple sharpening to the row data to improve performance of the 1D Readers. + + + + + + + + Does not sharpen the data, as this call is intended to only be used by 2D Readers. + + + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + + A new concrete Binarizer implementation object. + + + + Implementations of this class can, given locations of finder patterns for a QR code in an + image, sample the right points in the image to reconstruct the QR code, accounting for + perspective distortion. It is abstracted since it is relatively expensive and should be allowed + to take advantage of platform-specific optimized implementations, like Sun's Java Advanced + Imaging library, but which may not be available in other environments such as J2ME, and vice + versa. + + The implementation used can be controlled by calling {@link #setGridSampler(GridSampler)} + with an instance of a class which implements this interface. + + Sean Owen + + + the current implementation of + + + + Sets the implementation of used by the library. One global + instance is stored, which may sound problematic. But, the implementation provided + ought to be appropriate for the entire platform, and all uses of this library + in the whole lifetime of the JVM. For instance, an Android activity can swap in + an implementation that takes advantage of native platform libraries. + + The platform-specific object to install. + + + +

Samples an image for a square matrix of bits of the given dimension. This is used to extract + the black/white modules of a 2D barcode like a QR Code found in an image. Because this barcode + may be rotated or perspective-distorted, the caller supplies four points in the source image + that define known points in the barcode, so that the image may be sampled appropriately.

+

The last eight "from" parameters are four X/Y coordinate pairs of locations of points in + the image that define some significant points in the image to be sample. For example, + these may be the location of finder pattern in a QR Code.

+

The first eight "to" parameters are four X/Y coordinate pairs measured in the destination + , from the top left, where the known points in the image given by the "from" + parameters map to.

+

These 16 parameters define the transformation needed to sample the image.

+
+ image to sample + The dimension X. + The dimension Y. + The p1 preimage X. + The p1 preimage Y. + The p2 preimage X. + The p2 preimage Y. + The p3 preimage X. + The p3 preimage Y. + The p4 preimage X. + The p4 preimage Y. + The p1 image X. + The p1 image Y. + The p2 image X. + The p2 image Y. + The p3 image X. + The p3 image Y. + The p4 image X. + The p4 image Y. + + representing a grid of points sampled from the image within a region + defined by the "from" parameters + + ReaderException if image can't be sampled, for example, if the transformation defined +
+ + + + + + + + + + + +

Checks a set of points that have been transformed to sample points on an image against + the image's dimensions to see if the point are even within the image.

+ +

This method will actually "nudge" the endpoints back onto the image if they are found to be + barely (less than 1 pixel) off the image. This accounts for imperfect detection of finder + patterns in an image where the QR Code runs all the way to the image border.

+ +

For efficiency, the method will check points from either end of the line until one is found + to be within the image. Because the set of points are assumed to be linear, this is valid.

+ +
+ image into which the points should map + + actual points in x1,y1,...,xn,yn form + +
+ + This class implements a local thresholding algorithm, which while slower than the + GlobalHistogramBinarizer, is fairly efficient for what it does. It is designed for + high frequency images of barcodes with black data on white backgrounds. For this application, + it does a much better job than a global blackpoint with severe shadows and gradients. + However it tends to produce artifacts on lower frequency images and is therefore not + a good general purpose binarizer for uses outside ZXing. + + This class extends GlobalHistogramBinarizer, using the older histogram approach for 1D readers, + and the newer local approach for 2D readers. 1D decoding using a per-row histogram is already + inherently local, and only fails for horizontal gradients. We can revisit that problem later, + but for now it was not a win to use local blocks for 1D. + + This Binarizer is the default for the unit tests and the recommended class for library users. + dswitkin@google.com (Daniel Switkin) + + + + + gives the black matrix + + + + + initializing constructor + + + + + + creates a new instance + + + + + + + Calculates the final BitMatrix once for all requests. This could be called once from the + constructor instead, but there are some advantages to doing it lazily, such as making + profiling easier, and not doing heavy lifting when callers don't expect it. + + + + + For each 8x8 block in the image, calculate the average black point using a 5x5 grid + of the blocks around it. Also handles the corner cases (fractional blocks are computed based + on the last 8 pixels in the row/column which are also used in the previous block). + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + The black points. + The matrix. + + + + Applies a single threshold to an 8x8 block of pixels. + + The luminances. + The xoffset. + The yoffset. + The threshold. + The stride. + The matrix. + + + + Calculates a single black point for each 8x8 block of pixels and saves it away. + See the following thread for a discussion of this algorithm: + http://groups.google.com/group/zxing/browse_thread/thread/d06efa2c35a7ddc0 + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + + + +

This class implements a perspective transform in two dimensions. Given four source and four + destination points, it will compute the transformation implied between them. The code is based + directly upon section 3.4.2 of George Wolberg's "Digital Image Warping"; see pages 54-56.

+
+ Sean Owen +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Convenience method, not optimized for performance. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

This class contains utility methods for performing mathematical operations over + the Galois Fields. Operations use a given primitive polynomial in calculations.

+

Throughout this package, elements of the GF are represented as an {@code int} + for convenience and speed (but at the cost of memory). +

+
+ Sean Owen +
+ + + Create a representation of GF(size) using the given primitive polynomial. + + irreducible polynomial whose coefficients are represented by + * the bits of an int, where the least-significant bit represents the constant + * coefficient + the size of the field + the factor b in the generator polynomial can be 0- or 1-based + * (g(x) = (x+a^b)(x+a^(b+1))...(x+a^(b+2t-1))). + * In most cases it should be 1, but for QR code it is 0. + + + + Builds the monomial. + + The degree. + The coefficient. + the monomial representing coefficient * x^degree + + + + Implements both addition and subtraction -- they are the same in GF(size). + + sum/difference of a and b + + + + Exps the specified a. + + 2 to the power of a in GF(size) + + + + Logs the specified a. + + A. + base 2 log of a in GF(size) + + + + Inverses the specified a. + + multiplicative inverse of a + + + + Multiplies the specified a with b. + + A. + The b. + product of a and b in GF(size) + + + + Gets the size. + + + + + Gets the generator base. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + +

Represents a polynomial whose coefficients are elements of a GF. + Instances of this class are immutable.

+

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + the {@link GenericGF} instance representing the field to use + to perform computations + coefficients as ints representing elements of GF(size), arranged + from most significant (highest-power term) coefficient to least significant + if argument is null or empty, + or if leading coefficient is 0 and this is not a + constant polynomial (that is, it is not the monomial "0") + + + + degree of this polynomial + + + + + Gets a value indicating whether this is zero. + + true iff this polynomial is the monomial "0" + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + +

Implements Reed-Solomon decoding, as the name implies.

+ +

The algorithm will not be explained here, but the following references were helpful + in creating this implementation:

+ + + +

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+ +
+ Sean Owen + William Rucklidge + sanfordsquires +
+ + +

Decodes given set of received codewords, which include both data and error-correction + codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place, + in the input.

+
+ data and error-correction codewords + number of error-correction codewords available + false: decoding fails +
+ + + Implements Reed-Solomon encoding, as the name implies. + + Sean Owen + William Rucklidge + + + + Common string-related functions. + + Sean Owen + Alex Dupre + + + + SJIS + + + + + GB2312 + + + + + Guesses the encoding. + + bytes encoding a string, whose encoding should be guessed + decode hints if applicable + name of guessed encoding; at the moment will only guess one of: + {@link #SHIFT_JIS}, {@link #UTF8}, {@link #ISO88591}, or the platform + default encoding if none of these can possibly be correct + + + + This implementation can detect and decode Data Matrix codes in an image. + + bbrown@google.com (Brian Brown) + + + + + Locates and decodes a Data Matrix code in an image. + + + a String representing the content encoded by the Data Matrix code + + + + Locates and decodes a Data Matrix code in an image. + + + + a String representing the content encoded by the Data Matrix code + + + + does nothing here + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a Data Matrix code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + Guillaume Le Biller Added to zxing lib. + + + + encodes the content to a BitMatrix + + + + + + + + + + encodes the content to a BitMatrix + + + + + + + + + + + Encode the given symbol info to a bit matrix. + + The DataMatrix placement. + The symbol info to encode. + + + The bit matrix generated. + + + + Convert the ByteMatrix to BitMatrix. + + The input matrix. + The requested width of the image (in pixels) with the Datamatrix code + The requested height of the image (in pixels) with the Datamatrix code + The output matrix. + + + + bbrown@google.com (Brian Brown) + + + + + to parse + if dimension is < 8 or > 144 or not 0 mod 2 + + + + +

Creates the version object based on the dimension of the original bit matrix from + the datamatrix code.

+ +

See ISO 16022:2006 Table 7 - ECC 200 symbol attributes

+ + Original including alignment patterns + encapsulating the Data Matrix Code's "version" + if the dimensions of the mapping matrix are not valid + Data Matrix dimensions. +
+
+ + +

Reads the bits in the representing the mapping matrix (No alignment patterns) + in the correct order in order to reconstitute the codewords bytes contained within the + Data Matrix Code.

+ + bytes encoded within the Data Matrix Code + if the exact number of bytes expected is not read +
+
+ + +

Reads a bit of the mapping matrix accounting for boundary wrapping.

+ + Row to read in the mapping matrix + Column to read in the mapping matrix + Number of rows in the mapping matrix + Number of columns in the mapping matrix + value of the given bit in the mapping matrix +
+
+ + +

Reads the 8 bits of the standard Utah-shaped pattern.

+ +

See ISO 16022:2006, 5.8.1 Figure 6

+ + Current row in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Current column in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the utah shape +
+
+ + +

Reads the 8 bits of the special corner condition 1.

+ +

See ISO 16022:2006, Figure F.3

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 1 +
+
+ + +

Reads the 8 bits of the special corner condition 2.

+ +

See ISO 16022:2006, Figure F.4

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 2 +
+
+ + +

Reads the 8 bits of the special corner condition 3.

+ +

See ISO 16022:2006, Figure F.5

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 3 +
+
+ + +

Reads the 8 bits of the special corner condition 4.

+ +

See ISO 16022:2006, Figure F.6

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 4 +
+
+ + +

Extracts the data region from a that contains + alignment patterns.

+ + Original with alignment patterns + BitMatrix that has the alignment patterns removed +
+
+ + +

Encapsulates a block of data within a Data Matrix Code. Data Matrix Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ + bbrown@google.com (Brian Brown) +
+
+ + +

When Data Matrix Codes use multiple data blocks, they actually interleave the bytes of each of them. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ + bytes as read directly from the Data Matrix Code + version of the Data Matrix Code + DataBlocks containing original bytes, "de-interleaved" from representation in the + Data Matrix Code +
+
+ + +

Data Matrix Codes can encode text as bits in one of several modes, and can use multiple modes + in one Data Matrix Code. This class decodes the bits back into text.

+ +

See ISO 16022:2006, 5.2.1 - 5.2.9.2

+ + bbrown@google.com (Brian Brown) + Sean Owen +
+
+ + + See ISO 16022:2006, Annex C Table C.1 + The C40 Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, Annex C Table C.2 + The Text Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, 5.2.3 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.5 and Annex C, Table C.1 + + + + + See ISO 16022:2006, 5.2.6 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.7 + + + + + See ISO 16022:2006, 5.2.8 and Annex C Table C.3 + + + + + See ISO 16022:2006, 5.2.9 and Annex B, B.2 + + + + + See ISO 16022:2006, Annex B, B.2 + + + + +

The main class which implements Data Matrix Code decoding -- as opposed to locating and extracting + the Data Matrix Code from an image.

+ + bbrown@google.com (Brian Brown) +
+
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a Data Matrix Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+ + booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code + if the Data Matrix Code cannot be decoded +
+
+ + +

Decodes a Data Matrix Code represented as a . A 1 or "true" is taken + to mean a black module.

+
+ booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+ + data and error correction codewords + number of codewords that are data bytes +
+
+ + + The Version object encapsulates attributes about a particular + size Data Matrix Code. + + bbrown@google.com (Brian Brown) + + + + + returns the version numer + + + + + + returns the symbol size rows + + + + + + returns the symbols size columns + + + + + + retursn the data region size rows + + + + + + returns the data region size columns + + + + + + returns the total codewords count + + + + + +

Deduces version information from Data Matrix dimensions.

+ + Number of rows in modules + Number of columns in modules + Version for a Data Matrix Code of those dimensions + if dimensions do correspond to a valid Data Matrix size +
+
+ + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the Data Matrix code version's format.

+
+
+ + + returns the version number as string + + + + + + See ISO 16022:2006 5.5.1 Table 7 + + + + +

Encapsulates logic that can detect a Data Matrix Code in an image, even if the Data Matrix Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + +

Detects a Data Matrix Code in an image.

+
+ encapsulating results of detecting a Data Matrix Code or null +
+ + + Calculates the position of the white top right module using the output of the rectangle detector + for a rectangular matrix + + + + + Calculates the position of the white top right module using the output of the rectangle detector + for a square matrix + + + + + Increments the Integer associated with a key by one. + + + + + Counts the number of black/white transitions between two points, using something like Bresenham's algorithm. + + + + + Simply encapsulates two points and a number of transitions between them. + + + + + Orders ResultPointsAndTransitions by number of transitions, ascending. + + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Symbol Character Placement Program. Adapted from Annex M.1 in ISO/IEC 16022:2000(E). + + + + + Main constructor + + the codewords to place + the number of columns + the number of rows + + + + Places the 8 bits of a utah-shaped symbol character in ECC200. + + The row. + The col. + character position + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Enumeration for encodation types + + + + + Error Correction Code for ECC200. + + + + + Lookup table which factors to use for which number of error correction codewords. + See FACTORS. + + + + + Precomputed polynomial factors for ECC 200. + + + + + Creates the ECC200 error correction for an encoded message. + + The codewords. + information about the symbol to be encoded + the codewords with interleaved error correction. + + + + DataMatrix ECC 200 data encoder following the algorithm described in ISO/IEC 16022:200(E) in + annex S. + + + + + Padding character + + + + + mode latch to C40 encodation mode + + + + + mode latch to Base 256 encodation mode + + + + + FNC1 Codeword + + + + + Structured Append Codeword + + + + + Reader Programming + + + + + Upper Shift + + + + + 05 Macro + + + + + 06 Macro + + + + + mode latch to ANSI X.12 encodation mode + + + + + mode latch to Text encodation mode + + + + + mode latch to EDIFACT encodation mode + + + + + ECI character (Extended Channel Interpretation) + + + + + Unlatch from C40 encodation + + + + + Unlatch from X12 encodation + + + + + 05 Macro header + + + + + 06 Macro header + + + + + Macro trailer + + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + the encoded message (the char values range from 0 to 255) + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + requested shape. May be {@code SymbolShapeHint.FORCE_NONE},{@code SymbolShapeHint.FORCE_SQUARE} or {@code SymbolShapeHint.FORCE_RECTANGLE}. + the minimum symbol size constraint or null for no constraint + the maximum symbol size constraint or null for no constraint + encoding mode to start with + the encoded message (the char values range from 0 to 255) + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + Symbol info table for DataMatrix. + + + + Overrides the symbol info set used by this class. Used for testing purposes. + + @param override the symbol info set to use + + + + Enumeration for DataMatrix symbol shape hint. It can be used to force square or rectangular + symbols. + + + + + The class holds the available options for the DatamatrixWriter + + + + + Specifies the matrix shape for Data Matrix + + + + + Specifies a minimum barcode size + + + + + Specifies a maximum barcode size + + + + + Specifies the default encodation + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + implements an Intelligent Mail barcode + Rishabh Hatgadkar + + + + + mike32767 + Manuel Kasten + + + + + to parse + + + + +

MaxiCodes can encode text or structured information as bits in one of several modes, + with multiple character sets in one code. This class decodes the bits back into text.

+ + mike32767 + Manuel Kasten +
+
+ + +

The main class which implements MaxiCode decoding -- as opposed to locating and extracting + the MaxiCode from an image.

+ + Manuel Kasten +
+
+ + + This implementation can detect and decode a MaxiCode in an image. + + + + + Locates and decodes a MaxiCode in an image. + + a String representing the content encoded by the MaxiCode + if a MaxiCode cannot be decoded + + + + + Locates and decodes a MaxiCode within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + + This class attempts to decode a barcode from an image, not by scanning the whole image, + but by scanning subsets of the image. This is important when there may be multiple barcodes in + an image, and detecting a barcode may find parts of multiple barcode and fail to decode + (e.g. QR Codes). Instead this scans the four quadrants of the image -- and also the center + 'quadrant' to cover the case where a barcode is found in the center. + + + + + + Initializes a new instance of the class. + + The @delegate. + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Attempts to locate multiple barcodes in an image by repeatedly decoding portion of the image. + After one barcode is found, the areas left, above, right and below the barcode's + {@link com.google.zxing.ResultPoint}s are scanned, recursively.

+

A caller may want to also employ {@link ByQuadrantReader} when attempting to find multiple + 2D barcodes, like QR Codes, in an image, where the presence of multiple barcodes might prevent + detecting any one of them.

+

That is, instead of passing a {@link Reader} a caller might pass + new ByQuadrantReader(reader).

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The @delegate. + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Implementation of this interface attempt to read several barcodes from one image. + Sean Owen + + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + +

Encapsulates logic that can detect one or more QR Codes in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+ + Sean Owen + Hannes Erven +
+
+ + + Initializes a new instance of the class. + + The image. + + + + Detects the multi. + + The hints. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +

In contrast to , this class will return an array of all possible + QR code locations in the image.

+ +

Use the TRY_HARDER hint to ask for a more thorough detection.

+ + Sean Owen + Hannes Erven +
+
+ + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF_PERCENT percent in their + estimated modules sizes. + + + + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF pixels/module in their + estimated modules sizes. + + + + + A comparator that orders FinderPatterns by their estimated module size. + + + + +

Creates a finder that will search the image for three finder patterns.

+ + image to search +
+
+ + + + the 3 best s from our list of candidates. The "best" are + those that have been detected at least CENTER_QUORUM times, and whose module + size differs from the average among those patterns the least + + + + + This implementation can detect and decode multiple QR Codes in an image. + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + +

Decodes Codabar barcodes.

+ + Bas Vijfwinkel +
+
+ + These represent the encodings of characters, as patterns of wide and narrow bars. The 7 least-significant bits of + each int correspond to the pattern of wide and narrow, with 1s representing "wide" and 0s representing narrow. + + + + Records the size of all runs of white and black pixels, starting with white. + This is just like recordPattern, except it records all the counters, and + uses our builtin "counters" member for storage. + + row to count from + + + + This class renders CodaBar as []. + + dsbnatut@gmail.com (Kazuki Nishiura) + + + + The class holds the available options for the QrCodeWriter + + + + + if true, don't switch to codeset C for numbers + + + + +

Decodes Code 128 barcodes.

+ + Sean Owen +
+
+ + + This object renders a CODE128 code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + +

Decodes Code 39 barcodes. Supports "Full ASCII Code 39" if USE_CODE_39_EXTENDED_MODE is set.

+ Sean Owen + @see Code93Reader +
+
+ + + Returns a string with all possible characters + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. It will not decoded "extended Code 39" sequences. + + + + + Creates a reader that can be configured to check the last character as a check digit. + It will not decoded "extended Code 39" sequences. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + + Creates a reader that can be configured to check the last character as a check digit, + or optionally attempt to decode "extended Code 39" sequences that are used to encode + the full ASCII character set. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + if true, will attempt to decode extended Code 39 sequences in the text. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a CODE39 code as a . + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Decodes Code 93 barcodes.

+ Sean Owen + +
+
+ + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a CODE93 code as a BitMatrix + + + + + + output to append to + start position + pattern to append + unused + 9 + + + +

Implements decoding of the EAN-13 format.

+ + dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Initializes a new instance of the class. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + Get the format of this decoder. + The 1D format. + + + + + Based on pattern of odd-even ('L' and 'G') patterns used to encoded the explicitly-encoded + digits in a barcode, determines the implicitly encoded first digit and adds it to the + result string. + + string to insert decoded first digit into + int whose bits indicates the pattern of odd/even L/G patterns used to + encode digits + -1 if first digit cannot be determined + + + + This object renders an EAN13 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Implements decoding of the EAN-8 format.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Get the format of this decoder. + The 1D format. + + + + + This object renders an EAN8 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + + + a byte array of horizontal pixels (false = white, true = black) + + + + + Records EAN prefix to GS1 Member Organization, where the member organization + correlates strongly with a country. This is an imperfect means of identifying + a country of origin by EAN-13 barcode value. See + + http://en.wikipedia.org/wiki/List_of_GS1_country_codes. + + Sean Owen + + + + +

Implements decoding of the ITF format, or Interleaved Two of Five.

+ +

This Reader will scan ITF barcodes of certain lengths only. + At the moment it reads length 6, 8, 10, 12, 14, 16, 18, 20, 24, 44 and 48 as these have appeared "in the wild". Not all + lengths are scanned, especially shorter ones, to avoid false positives. This in turn is due to a lack of + required checksum function.

+ +

The checksum is optional and is not applied by this Reader. The consumer of the decoded + value will have to apply a checksum if required.

+ +

http://en.wikipedia.org/wiki/Interleaved_2_of_5 + is a great reference for Interleaved 2 of 5 information.

+ + kevin.osullivan@sita.aero, SITA Lab. +
+
+ + + Valid ITF lengths. Anything longer than the largest value is also allowed. + + + + + Start/end guard pattern. + + Note: The end pattern is reversed because the row is reversed before + searching for the END_PATTERN + + + + + Patterns of Wide / Narrow lines to indicate each digit + + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + + row of black/white values to search + offset of start pattern + The payload end. + to append decoded chars to + + false, if decoding could not complete successfully + + + + + Identify where the start of the middle / payload section starts. + + row of black/white values to search + Array, containing index of start of 'start block' and end of 'start block' + + + + The start & end patterns must be pre/post fixed by a quiet zone. This + zone must be at least 10 times the width of a narrow line. Scan back until + we either get to the start of the barcode or match the necessary number of + quiet zone pixels. + + Note: Its assumed the row is reversed when using this method to find + quiet zone after the end pattern. + + ref: http://www.barcode-1.net/i25code.html + + bit array representing the scanned barcode. + index into row of the start or end pattern. + false, if the quiet zone cannot be found + + + + Skip all whitespace until we get to the first black line. + + row of black/white values to search + index of the first black line or -1 if no black lines are found in the row. + + + + Identify where the end of the middle / payload section ends. + + row of black/white values to search + Array, containing index of start of 'end block' and end of 'end + block' or null, if nothing found + + + + + row of black/white values to search + position to start search + pattern of counts of number of black and white pixels that are being searched for as a pattern + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a sequence of ITF black/white lines into single + digit. + + the counts of runs of observed black/white/black/... values + The decoded digit + + false, if digit cannot be decoded + + + + + This object renders a ITF code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code bool[]} of horizontal pixels (false = white, true = black) + + + + + + + Decodes MSI barcodes. + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. + + + + + Creates a reader that can be configured to check the last character as a check digit, + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a MSI code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

A reader that can read all available UPC/EAN formats. If a caller wants to try to + read all such formats, it is most efficient to use this implementation rather than invoke + individual readers.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Encapsulates functionality and implementation that is common to one-dimensional barcodes.

+ dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + a byte array of horizontal pixels (0 = white, 1 = black) + + + + Appends the given pattern to the target array starting at pos. + + encode black/white pattern into this array + position to start encoding at in target + lengths of black/white runs to encode + starting color - false for white, true for black + the number of elements added to target. + + + + Gets the default margin. + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + + barcode contents to encode + a bool[] of horizontal pixels (false = white, true = black) + + + + Calculates the checksum digit modulo10. + + The contents. + + + + + Encapsulates functionality and implementation that is common to all families + of one-dimensional barcodes. + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + + + + + + + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + Note that we don't try rotation without the try harder flag, even if rotation was supported. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + We're going to examine rows from the middle outward, searching alternately above and below the + middle, and farther out each time. rowStep is the number of rows between each successive + attempt above and below the middle. So we'd scan row middle, then middle - rowStep, then + middle + rowStep, then middle - (2 * rowStep), etc. + rowStep is bigger as the image is taller, but is always at least 1. We've somewhat arbitrarily + decided that moving up and down by about 1/16 of the image is pretty good; we try more of the + image if "trying harder". + + The image to decode + Any hints that were requested + The contents of the decoded barcode + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the pattern in reverse. + + The row. + The start. + The counters. + + + + + Determines how closely a set of observed counts of runs of black/white values matches a given + target pattern. This is reported as the ratio of the total variance from the expected pattern + proportions across all pattern elements, to the length of the pattern. + + observed counters + expected pattern + The most any counter can differ before we give up + ratio of total variance between counters and pattern compared to total pattern size, + where the ratio has been multiplied by 256. So, 0 means no variance (perfect match); 256 means + the total variance between counters and patterns equals the pattern length, higher values mean + even more variance + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + This object renders a Plessey code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + Superclass of implementations that read barcodes in the RSS family of formats. + + + + + Initializes a new instance of the class. + + + + + Gets the decode finder counters. + + + + + + Gets the data character counters. + + + + + + Gets the odd rounding errors. + + + + + + Gets the even rounding errors. + + + + + + Gets the odd counts. + + + + + + Gets the even counts. + + + + + + Parses the finder value. + + The counters. + The finder patterns. + The value. + + + + + Counts the specified array. + + The array. + + + + + Increments the specified array. + + The array. + The errors. + + + + Decrements the specified array. + + The array. + The errors. + + + + Determines whether [is finder pattern] [the specified counters]. + + The counters. + + true if [is finder pattern] [the specified counters]; otherwise, false. + + + + + Encapsulates a since character value in an RSS barcode, including its checksum information. + + + + + Gets the value. + + + + + Gets the checksum portion. + + + + + Initializes a new instance of the class. + + The value. + The checksum portion. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Gets the information. + + + + + + Parses the information. + + + + + + Creates the decoder. + + The information. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + One row of an RSS Expanded Stacked symbol, consisting of 1+ expanded pairs. + + + + + Did this row of the image have to be reversed (mirrored) to recognize the pairs? + + + + + Two rows are equal if they contain the same pairs in the same order. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Encapsulates an RSS barcode finder pattern, including its start/end position and row. + + + + + Gets the value. + + + + + Gets the start end. + + + + + Gets the result points. + + + + + Initializes a new instance of the class. + + The value. + The start end. + The start. + The end. + The row number. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Decodes RSS-14, including truncated and stacked variants. See ISO/IEC 24724:2006. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Adapted from listings in ISO/IEC 24724 Appendix B and Appendix G. + + + + + Gets the RS svalue. + + The widths. + Width of the max. + if set to true [no narrow]. + + + + +

Implements decoding of the UPC-A format.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen +
+
+ + +

Like decodeRow(int, BitArray, java.util.Map), but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ + + + + +
+ + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Decodes the specified image. + + The image. + The hints. + + + + + Get the format of this decoder. + The 1D format. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + This object renders a UPC-A code as a . + qwandor@google.com (Andrew Walbran) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + @see UPCEANExtension5Support + + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + + + @see UPCEANExtension2Support + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + one {@link ResultMetadataType} to appropriate value, or {@code null} if not known + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Start/end guard pattern. + + + + + Pattern marking the middle of a UPC/EAN pattern, separating the two halves. + + + + + end guard pattern. + + + + + "Odd", or "L" patterns used to encode UPC/EAN digits. + + + + + As above but also including the "even", or "G" patterns used to encode UPC/EAN digits. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + +

Like , but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ row index into the image + encoding of the row of the barcode image + start/end column where the opening start pattern was found + optional hints that influence decoding + encapsulating the result of decoding a barcode in the row +
+ + + + string of digits to check + see + + + + Computes the UPC/EAN checksum on a string of digits, and reports + whether the checksum is correct or not. + + string of digits to check + true iff string of digits passes the UPC/EAN checksum algorithm + + + + Decodes the end. + + The row. + The end start. + + + + + + row of black/white values to search + position to start search + if true, indicates that the pattern specifies white/black/white/... + pixel counts, otherwise, it is interpreted as black/white/black/... + pattern of counts of number of black and white pixels that are being + searched for as a pattern + array of counters, as long as pattern, to re-use + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a single UPC/EAN-encoded digit. + + row of black/white values to decode + the counts of runs of observed black/white/black/... values + horizontal offset to start decoding from + the set of patterns to use to decode -- sometimes different encodings + for the digits 0-9 are used, and this indicates the encodings for 0 to 9 that should + be used + horizontal offset of first pixel beyond the decoded digit + + + + Get the format of this decoder. + + The 1D format. + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ aripollak@gmail.com (Ari Pollak) + dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Gets the default margin. + + + + +

Implements decoding of the UPC-E format.

+

Thisis a great reference for + UPC-E information.

+ Sean Owen +
+
+ + + The pattern that marks the middle, and end, of a UPC-E pattern. + There is no "second half" to a UPC-E barcode. + + + + + See L_AND_G_PATTERNS these values similarly represent patterns of + even-odd parity encodings of digits that imply both the number system (0 or 1) + used, and the check digit. + + + + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Decodes the end. + + The row. + The end start. + + + + + see checkStandardUPCEANChecksum(String) + + + + + + + Determines the num sys and check digit. + + The result string. + The lg pattern found. + + + + + Get the format of this decoder. + The 1D format. + + + + + Expands a UPC-E value back into its full, equivalent UPC-A code value. + + UPC-E code as string of digits + equivalent UPC-A code as string of digits + + + + + This object renders an UPC-E code as a {@link BitMatrix}. + @author 0979097955s@gmail.com (RX) + + + + + Metadata about a PDF417 Barcode + + Guenther Grau + + + + A Barcode Value for the PDF417 barcode. + The scanner will iterate through the bitmatrix, + and given the different methods or iterations + will increment a given barcode value's confidence. + + When done, this will return the values of highest confidence. + + Guenther Grau + + + + Incremenets the Confidence for a given value. (Adds an occurance of a value) + + + Value. + + + + Determines the maximum occurrence of a set value and returns all values which were set with this occurrence. + + an array of int, containing the values with the highest occurrence, or null, if no value was set. + + + + Returns the confience value for a given barcode value + + Barcode value. + + + + A Bounding Box helper class + + Guenther Grau + + + + Initializes a new instance of the class. + returns null if the corner points don't match up correctly + + The image. + The top left. + The bottom left. + The top right. + The bottom right. + + + + + Creates the specified box. + + The box. + + + + + Initializes a new instance of the class. + Will throw an exception if the corner points don't match up correctly + + Image. + Top left. + Top right. + Bottom left. + Bottom right. + + + + Merge two Bounding Boxes, getting the left corners of left, and the right corners of right + (Images should be the same) + + Left. + Right. + + + + Adds the missing rows. + + The missing rows. + Missing start rows. + Missing end rows. + If set to true is left. + + + + Calculates the minimum and maximum X & Y values based on the corner points. + + + + + If we adjust the width, set a new right corner coordinate and recalculate + + Bottom right. + + + + A Codeword in the PDF417 barcode + + Guenther Grau + + + + Default value for the RowNumber (-1 being an invalid real number) + + + + + Initializes a new instance of the class. + + Start x. + End x. + Bucket. + Value. + + + + Gets the width. + + The width. + + + + Gets a value indicating whether this instance has valid row number. + + true if this instance has valid row number; otherwise, false. + + + + Determines whether this instance is valid row number the specified rowNumber. + + true if this instance is valid row number the specified rowNumber; otherwise, false. + Row number. + + + + Sets the row number as the row's indicator column. + + + + + Returns a that represents the current . + + A that represents the current . + + + +

This class contains the methods for decoding the PDF417 codewords.

+ + SITA Lab (kevin.osullivan@sita.aero) +
+
+ + + Table containing values for the exponent of 900. + This is used in the numeric compaction decode algorithm. + + + + + Text Compaction mode (see 5.4.1.5) permits all printable ASCII characters to be + encoded, i.e. values 32 - 126 inclusive in accordance with ISO/IEC 646 (IRV), as + well as selected control characters. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + The Text Compaction mode includes all the printable ASCII characters + (i.e. values from 32 to 126) and three ASCII control characters: HT or tab + (ASCII value 9), LF or line feed (ASCII value 10), and CR or carriage + return (ASCII value 13). The Text Compaction mode also includes various latch + and shift characters which are used exclusively within the mode. The Text + Compaction mode encodes up to 2 characters per codeword. The compaction rules + for converting data into PDF417 codewords are defined in 5.4.2.2. The sub-mode + switches are defined in 5.4.2.3. + + The text compaction data. + The byte compaction data if there + was a mode shift. + The size of the text compaction and byte compaction data. + The decoded data is appended to the result. + + + + + Byte Compaction mode (see 5.4.3) permits all 256 possible 8-bit byte values to be encoded. + This includes all ASCII characters value 0 to 127 inclusive and provides for international + character set support. + + The byte compaction mode i.e. 901 or 924 + The array of codewords (data + error) + Currently active character encoding + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Numeric Compaction mode (see 5.4.4) permits efficient encoding of numeric data strings. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Convert a list of Numeric Compacted codewords from Base 900 to Base 10. + EXAMPLE + Encode the fifteen digit numeric string 000213298174000 + Prefix the numeric string with a 1 and set the initial value of + t = 1 000 213 298 174 000 + Calculate codeword 0 + d0 = 1 000 213 298 174 000 mod 900 = 200 + + t = 1 000 213 298 174 000 div 900 = 1 111 348 109 082 + Calculate codeword 1 + d1 = 1 111 348 109 082 mod 900 = 282 + + t = 1 111 348 109 082 div 900 = 1 234 831 232 + Calculate codeword 2 + d2 = 1 234 831 232 mod 900 = 632 + + t = 1 234 831 232 div 900 = 1 372 034 + Calculate codeword 3 + d3 = 1 372 034 mod 900 = 434 + + t = 1 372 034 div 900 = 1 524 + Calculate codeword 4 + d4 = 1 524 mod 900 = 624 + + t = 1 524 div 900 = 1 + Calculate codeword 5 + d5 = 1 mod 900 = 1 + t = 1 div 900 = 0 + Codeword sequence is: 1, 624, 434, 632, 282, 200 + + Decode the above codewords involves + 1 x 900 power of 5 + 624 x 900 power of 4 + 434 x 900 power of 3 + + 632 x 900 power of 2 + 282 x 900 power of 1 + 200 x 900 power of 0 = 1000213298174000 + + Remove leading 1 => Result is 000213298174000 + The array of codewords + The number of codewords + The decoded string representing the Numeric data. + + + + + + + Guenther Grau + + + + Returns the DetectionResult Columns. This does a fair bit of calculation, so call it sparingly. + + The detection result columns. + + + + Adjusts the indicator column row numbers. + + Detection result column. + + + + return number of codewords which don't have a valid row number. Note that the count is not accurate as codewords . + will be counted several times. It just serves as an indicator to see when we can stop adjusting row numbers + + The row numbers. + + + + Adjusts the row numbers by row. + + The row numbers by row. + + + + Adjusts the row numbers from both Row Indicators + + zero + + + + Adjusts the row numbers from Right Row Indicator. + + The unadjusted row count. + + + + Adjusts the row numbers from Left Row Indicator. + + Unadjusted row Count. + + + + Adjusts the row number if valid. + + The invalid rows + Row indicator row number. + Invalid row counts. + Codeword. + + + + Adjusts the row numbers. + + Barcode column. + Codewords row. + Codewords. + + + + Adjusts the row number. + + true, if row number was adjusted, false otherwise. + Codeword. + Other codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + The maximum distance to search in the codeword array in both the positive and negative directions + + + + + The Bounding Box around the column (in the BitMatrix) + + The box. + + + + The Codewords the Box encodes for, offset by the Box minY. + Remember to Access this ONLY through GetCodeword(imageRow) if you're accessing it in that manner. + + The codewords. + + + + Initializes a new instance of the class. + + The Bounding Box around the column (in the BitMatrix) + + + + Converts the Image's Row to the index in the Codewords array + + The Codeword Index. + Image row. + + + + Converts the Codeword array index into a Row in the Image (BitMatrix) + + The Image Row. + Codeword index. + + + + Gets the codeword for a given row + + The codeword. + Image row. + + + + Gets the codeword closest to the specified row in the image + + Image row. + + + + Sets the codeword for an image row + + Image row. + Codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + Gets or sets a value indicating whether this instance is the left indicator + + true if this instance is left; otherwise, false. + + + + Initializes a new instance of the class. + + Box. + If set to true is left. + + + + Sets the Row Numbers as Inidicator Columns + + + + + TODO implement properly + TODO maybe we should add missing codewords to store the correct row number to make + finding row numbers for other columns easier + use row height count to make detection of invalid row numbers more reliable + + The indicator column row numbers. + Metadata. + + + + Gets the row heights. + + The row heights. + + + + Adjusts the in omplete indicator column row numbers. + + Metadata. + + + + Gets the barcode metadata. + + The barcode metadata. + + + + Prune the codewords which do not match the metadata + TODO Maybe we should keep the incorrect codewords for the start and end positions? + + Codewords. + Metadata. + + + + Returns a that represents the current . + + A that represents the current . + + + +

PDF417 error correction implementation.

+

This example + is quite useful in understanding the algorithm.

+ Sean Owen + +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the specified received. + + received codewords + number of those codewords used for EC + location of erasures + The error locations count. + + + + + Runs the euclidean algorithm (Greatest Common Divisor) until r's degree is less than R/2 + + The euclidean algorithm. + + + + Finds the error locations as a direct application of Chien's search + + The error locations. + Error locator. + + + + Finds the error magnitudes by directly applying Forney's Formula + + The error magnitudes. + Error evaluator. + Error locator. + Error locations. + + + +

A field based on powers of a generator integer, modulo some modulus.

+ +
+ Sean Owen +
+ + + + + Sean Owen + + + + Gets the coefficients. + + The coefficients. + + + + degree of this polynomial + + + + + Gets a value indicating whether this instance is zero. + + true if this polynomial is the monomial "0" + + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + + + Adds another Modulus + + Other. + + + + Subtract another Modulus + + Other. + + + + Multiply by another Modulus + + Other. + + + + Returns a Negative version of this instance + + + + + Multiply by a Scalar. + + Scalar. + + + + Multiplies by a Monomial + + The by monomial. + Degree. + Coefficient. + + + + Returns a that represents the current . + + A that represents the current . + + + + + + Guenther Grau + creatale GmbH (christoph.schulz@creatale.de) + + + + The ratios table + + + + + Initializes the class & Pre-computes the symbol ratio table. + + + + + Gets the decoded value. + + The decoded value. + Module bit count. + + + + Samples the bit counts. + + The bit counts. + Module bit count. + + + + Gets the decoded codeword value. + + The decoded codeword value. + Module bit count. + + + + Gets the bit value. + + The bit value. + Module bit count. + + + + Gets the closest decoded value. + + The closest decoded value. + Module bit count. + + + + + + Guenther Grau + + + + Decode the specified image, imageTopLeft, imageBottomLeft, imageTopRight, imageBottomRight, minCodewordWidth + and maxCodewordWidth. + TODO: don't pass in minCodewordWidth and maxCodewordWidth, pass in barcode columns for start and stop pattern + columns. That way width can be deducted from the pattern column. + This approach also allows to detect more details about the barcode, e.g. if a bar type (white or black) is wider + than it should be. This can happen if the scanner used a bad blackpoint. + + Image. + Image top left. + Image bottom left. + Image top right. + Image bottom right. + Minimum codeword width. + Max codeword width. + + + + Merge the specified leftRowIndicatorColumn and rightRowIndicatorColumn. + + Left row indicator column. + Right row indicator column. + + + + Adjusts the bounding box. + + The bounding box. + Row indicator column. + + + + Gets the barcode metadata. + + The barcode metadata. + Left row indicator column. + Right row indicator column. + + + + Gets the row indicator column. + + The row indicator column. + Image. + Bounding box. + Start point. + If set to true left to right. + Minimum codeword width. + Max codeword width. + + + + Adjusts the codeword count. + + Detection result. + Barcode matrix. + + + + Creates the decoder result. + + The decoder result. + Detection result. + + + + This method deals with the fact, that the decoding process doesn't always yield a single most likely value. The + current error correction implementation doesn't deal with erasures very well, so it's better to provide a value + for these ambiguous codewords instead of treating it as an erasure. The problem is that we don't know which of + the ambiguous values to choose. We try decode using the first value, and if that fails, we use another of the + ambiguous values and try to decode again. This usually only happens on very hard to read and decode barcodes, + so decoding the normal barcodes is not affected by this. + + The decoder result from ambiguous values. + Ec level. + Codewords. + contains the indexes of erasures. + array with the indexes that have more than one most likely value. + two dimensional array that contains the ambiguous values. The first dimension must + be the same Length as the ambiguousIndexes array. + + + + Creates the barcode matrix. + + The barcode matrix. + Detection result. + + + + Tests to see if the Barcode Column is Valid + + true, if barcode column is valid, false otherwise. + Detection result. + Barcode column. + + + + Gets the start column. + + The start column. + Detection result. + Barcode column. + Image row. + If set to true left to right. + + + + Detects the codeword. + + The codeword. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + Minimum codeword width. + Max codeword width. + + + + Gets the module bit count. + + The module bit count. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + + + + Gets the number of EC code words. + + The number of EC code words. + Barcode EC level. + + + + Adjusts the codeword start column. + + The codeword start column. + Image. + Minimum column. + Max column. + If set to true left to right. + Codeword start column. + Image row. + + + + Checks the codeword for any skew. + + true, if codeword is within the skew, false otherwise. + Codeword size. + Minimum codeword width. + Max codeword width. + + + + Decodes the codewords. + + The codewords. + Codewords. + Ec level. + Erasures. + + + + Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place. + + The errors. + data and error correction codewords. + positions of any known erasures. + number of error correction codewords that are available in codewords. + + + + Verifies that all is well with the the codeword array. + + Codewords. + Number EC codewords. + + + + Gets the bit count for codeword. + + The bit count for codeword. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Module bit count. + + + + Returns a that represents the jagged array. + + A that represents the jagged array. + Barcode matrix as a jagged array. + + + +

Encapsulates logic that can detect a PDF417 Code in an image, even if the + PDF417 Code is rotated or skewed, or partially obscured.

+ + SITA Lab (kevin.osullivan@sita.aero) + dswitkin@google.com (Daniel Switkin) + Guenther Grau +
+
+ + + B S B S B S B S Bar/Space pattern + 11111111 0 1 0 1 0 1 000. + + + + + 1111111 0 1 000 1 0 1 00 1 + + + + + if we set the value too low, then we don't detect the correct height of the bar if the start patterns are damaged. + if we set the value too high, then we might detect the start pattern from a neighbor barcode. + + + + + A PDF471 barcode should have at least 3 rows, with each row being >= 3 times the module width. Therefore it should be at least + 9 pixels tall. To be conservative, we use about half the size to ensure we don't miss it. + + + + +

Detects a PDF417 Code in an image. Only checks 0 and 180 degree rotations.

+
+ barcode image to decode + optional hints to detector + if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned + + encapsulating results of detecting a PDF417 code + +
+ + + Detects PDF417 codes in an image. Only checks 0 degree rotation (so rotate the matrix and check again outside of this method) + + multiple if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned. + bit matrix to detect barcodes in. + List of ResultPoint arrays containing the coordinates of found barcodes + + + + Locate the vertices and the codewords area of a black blob using the Start and Stop patterns as locators. + + Matrix. + Start row. + Start column. + an array containing the vertices: + vertices[0] x, y top left barcode + vertices[1] x, y bottom left barcode + vertices[2] x, y top right barcode + vertices[3] x, y bottom right barcode + vertices[4] x, y top left codeword area + vertices[5] x, y bottom left codeword area + vertices[6] x, y top right codeword area + vertices[7] x, y bottom right codeword area + + + + + Copies the temp data to the final result + + Result. + Temp result. + Destination indexes. + + + + Finds the rows with the given pattern. + + The rows with pattern. + Matrix. + Height. + Width. + Start row. + Start column. + Pattern. + + + + Finds the guard pattern. Uses System.Linq.Enumerable.Repeat to fill in counters. This might be a performance issue? + + start/end horizontal offset of guard pattern, as an array of two ints. + matrix row of black/white values to search + column x position to start search. + row y position to start search. + width the number of pixels to search on this row. + If set to true search the white patterns first. + pattern of counts of number of black and white pixels that are being searched for as a pattern. + counters array of counters, as long as pattern, to re-use . + + + + Determines how closely a set of observed counts of runs of black/white. + values matches a given target pattern. This is reported as the ratio of + the total variance from the expected pattern proportions across all + pattern elements, to the length of the pattern. + + + ratio of total variance between counters and pattern compared to + total pattern size, where the ratio has been multiplied by 256. + So, 0 means no variance (perfect match); 256 means the total + variance between counters and patterns equals the pattern length, + higher values mean even more variance + + observed counters. + expected pattern. + The most any counter can differ before we give up. + + + + PDF 417 Detector Result class. Skipped private backing stores. + Guenther Grau + + + + + Initializes a new instance of the class. + + Bits. + Points. + + + + Holds all of the information for a barcode in a format where it can be easily accessible + + Jacob Haynes + + + + + the height of the matrix (Rows) + the width of the matrix (Cols) + + + + + Jacob Haynes + + + + + Creates a Barcode row of the width + + The width. + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + A boolean which is true if the bar black false if it is white + How many spots wide the bar is. + + + + + This function scales the row + + How much you want the image to be scaled, must be greater than or equal to 1. + the scaled row + + + + + Represents possible PDF417 barcode compaction types. + + + + + + + + + + + + + + + + + + + + + + + + + Data object to specify the minimum and maximum number of rows and columns for a PDF417 barcode. + @author qwandor@google.com (Andrew Walbran) + + + + + Initializes a new instance of the class. + + The min cols. + The max cols. + The min rows. + The max rows. + + + + Gets the min cols. + + + + + Gets the max cols. + + + + + Gets the min rows. + + + + + Gets the max rows. + + + + + Top-level class for the logic part of the PDF417 implementation. + + + + + The start pattern (17 bits) + + + + + The stop pattern (18 bits) + + + + + The codeword table from the Annex A of ISO/IEC 15438:2001(E). + + + + + Calculates the necessary number of rows as described in annex Q of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol (r) + + + + Calculates the number of pad codewords as described in 4.9.2 of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol + the number of pad codewords + + + + Generates the barcode logic. + + the message to encode + PDF417 error correction level to use + + + + Determine optimal nr of columns and rows for the specified number of + codewords. + + number of code words + number of error correction code words + The longest dimension of the barcode, used for columns + The short dimension of the barcode, used for rows + The height of a row, will alter this parameter if aspectRatio>4 (aspectRatio==AUTO) + dimension object containing cols as width and rows as height + + + + Sets max/min row/col values + + maximum allowed columns + minimum allowed columns + maximum allowed rows + minimum allowed rows + + + + Sets compaction to values stored in enum + + compaction mode to use + + + + Sets compact to be true or false + + if true, enables compaction + + + + Sets output encoding. + + sets character encoding to use + + + + Sets the disable eci. + + if set to true don't add an ECI segment for different encodings than default. + + + + defines the level of the error correction / count of error correction codewords + + + + + PDF417 error correction code following the algorithm described in ISO/IEC 15438:2001(E) in + chapter 4.10. + + + + + Tables of coefficients for calculating error correction words + (see annex F, ISO/IEC 15438:2001(E)) + + + + + Determines the number of error correction codewords for a specified error correction + level. + + the error correction level (0-8) + the number of codewords generated for error correction + + + + Determines the error correction level for AUTO + + The error correction level (0-9) + The number of codewords for AUTO errorCorrectionLevel + the number of codewords generated for error correction + + + + Returns the recommended minimum error correction level as described in annex E of + ISO/IEC 15438:2001(E). + + the number of data codewords + the recommended minimum error correction level + + + + Generates the error correction codewords according to 4.10 in ISO/IEC 15438:2001(E). + + the data codewords + the error correction level (0-8) + the String representing the error correction codewords + + + + defines the level of the error correction / count of error correction codewords + + + + + PDF417 high-level encoder following the algorithm described in ISO/IEC 15438:2001(E) in + annex P. + + + + + code for Text compaction + + + + + code for Byte compaction + + + + + code for Numeric compaction + + + + + Text compaction submode Alpha + + + + + Text compaction submode Lower + + + + + Text compaction submode Mixed + + + + + Text compaction submode Punctuation + + + + + mode latch to Text Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters NOT a multiple of 6) + + + + + mode latch to Numeric Compaction mode + + + + + mode shift to Byte Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters a multiple of 6) + + + + + identifier for a user defined Extended Channel Interpretation (ECI) + + + + + identifier for a general purpose ECO format + + + + + identifier for an ECI of a character set of code page + + + + + Raw code table for text compaction Mixed sub-mode + + + + + Raw code table for text compaction: Punctuation sub-mode + + + + + Performs high-level encoding of a PDF417 message using the algorithm described in annex P + of ISO/IEC 15438:2001(E). If byte compaction has been selected, then only byte compaction + is used. + + the message + compaction mode to use + character encoding used to encode in default or byte compaction + or null for default / not applicable + if true, don't add an ECI segment for different encodings than default + the encoded message (the char values range from 0 to 928) + + + + Encode parts of the message using Text Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.2. + + the message + the start position within the message + the number of characters to encode + receives the encoded codewords + should normally be SUBMODE_ALPHA + the text submode in which this method ends + + + + + Encode parts of the message using Byte Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.3. The Unicode characters will be converted to binary using the cp437 + codepage. + + the message converted to a byte array + the start position within the message + the number of bytes to encode + the mode from which this method starts + receives the encoded codewords + + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using text compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using binary compaction. + + the message + the message converted to a byte array + the start position within the message + + the requested character count + + + + The class holds the available options for the + + + + + Specifies whether to use compact mode for PDF417 (type ). + + + + + Specifies what compaction mode to use for PDF417 (type + ). + + + + + Specifies the minimum and maximum number of rows and columns for PDF417 (type + ). + + + + + Specifies what degree of error correction to use + + + + + Specifies what degree of error correction to use + + + + + Specifies what character encoding to use where applicable (type {@link String}) + + + + + Explicitly disables ECI segment when generating PDF417 Code + That is against the specification but some + readers have problems if the charset is switched from + CP437 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use different encodings + and the ECI segment is omitted. + + + + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Maximum Codewords (Data + Error). + + + + + Gets the bit count sum. + + The bit count sum. + Module bit count. + + + + Converts an ICollection<int> to an int[] + Carry-over from Java. Will likely remove and replace with the Generic .ToArray() method. + + The int array. + List. + + + + Translate the symbol into a codeword + + the codeword corresponding to the symbol. + encoded symbol to translate to a codeword + + + + The sorted table of all possible symbols. Extracted from the PDF417 + specification. The index of a symbol in this table corresponds to the + index into the codeword table. + + + + + This table contains to codewords for all symbols. + + + + + This implementation can detect and decode PDF417 codes in an image. + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Locates and decodes a PDF417 code in an image. + + a String representing the content encoded by the PDF417 code + if a PDF417 cannot be decoded + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + **Note** this will return the FIRST barcode discovered if there are many. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Locates and decodes Multiple PDF417 codes in an image. + + an array of Strings representing the content encoded by the PDF417 codes + + + + + Locates and decodes multiple barcodes in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcodes encode + + + + + Decode the specified image, with the hints and optionally multiple barcodes. + Based on Owen's Comments in , this method has been modified to continue silently + if a barcode was not decoded where it was detected instead of throwing a new exception object. + + Image. + Hints. + If set to true multiple. + + + + Gets the maximum width of the barcode + + The max width. + P1. + P2. + + + + Gets the minimum width of the barcode + + The minimum width. + P1. + P2. + + + + Gets the maximum width of the codeword. + + The max codeword width. + P. + + + + Gets the minimum width of the codeword. + + The minimum codeword width. + P. + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + PDF 417 result meta data. + Guenther Grau + + + + + The Segment ID represents the segment of the whole file distributed over different symbols. + + + + + Is the same for each related PDF417 symbol + + + + + always null + + + + + true if it is the last segment + + + + + count of segments, -1 if not set + + + + + Filename of the encoded file + + + + + filesize in bytes of the encoded file + returns filesize in bytes, -1 if not set + + + + + 16-bit CRC checksum using CCITT-16 + returns crc checksum, -1 if not set + + + + + unix epock timestamp, elapsed seconds since 1970-01-01 + returns elapsed seconds, -1 if not set + + + + + Jacob Haynes + qwandor@google.com (Andrew Walbran) + + + + + default white space (margin) around the code + + + + + default error correction level + + + + + default aspect ratio + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The height of a row in the barcode + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Takes encoder, accounts for width/height, and retrieves bit matrix + + + + + This takes an array holding the values of the PDF 417 + + a byte array of information with 0 is black, and 1 is white + border around the barcode + BitMatrix of the input + + + + Takes and rotates the it 90 degrees + + + + Sean Owen + + + {@link BitMatrix} to parse + ReaderException if dimension is not >= 21 and 1 mod 4 + + +

Reads format information from one of its two locations within the QR Code.

+ +
+ {@link FormatInformation} encapsulating the QR Code's format info + + ReaderException if both format information locations cannot be parsed as + the valid encoding of format information + +
+ +

Reads version information from one of its two locations within the QR Code.

+ +
+ {@link Version} encapsulating the QR Code's version + + ReaderException if both version information locations cannot be parsed as + the valid encoding of version information + +
+ +

Reads the bits in the {@link BitMatrix} representing the finder pattern in the + correct order in order to reconstruct the codewords bytes contained within the + QR Code.

+ +
+ bytes encoded within the QR Code + + ReaderException if the exact number of bytes expected is not read +
+ + Revert the mask removal done while reading the code words. The bit matrix should revert to its original state. + + + Prepare the parser for a mirrored operation. + This flag has effect only on the {@link #readFormatInformation()} and the + {@link #readVersion()}. Before proceeding with {@link #readCodewords()} the + {@link #mirror()} method should be called. + + @param mirror Whether to read version and format information mirrored. + + + Mirror the bit matrix in order to attempt a second reading. + + +

Encapsulates a block of data within a QR Code. QR Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

When QR Codes use multiple data blocks, they are actually interleaved. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ +
+ bytes as read directly from the QR Code + + version of the QR Code + + error-correction level of the QR Code + + {@link DataBlock}s containing original bytes, "de-interleaved" from representation in the + QR Code + +
+ +

Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations + of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix, + including areas used for finder patterns, timing patterns, etc. These areas should be unused + after the point they are unmasked anyway.

+ +

Note that the diagram in section 6.8.1 is misleading since it indicates that i is column position + and j is row position. In fact, as the text says, i is row position and j is column position.

+ +
+ Sean Owen +
+ + See ISO 18004:2006 6.8.1 + + +

Implementations of this method reverse the data masking process applied to a QR Code and + make its bits ready to read.

+
+ + representation of QR Code bits + dimension of QR Code, represented by bits, being unmasked +
+ +

QR Codes can encode text as bits in one of several modes, and can use multiple modes + in one QR Code. This class decodes the bits back into text.

+ +

See ISO 18004:2006, 6.4.3 - 6.4.7

+ Sean Owen +
+
+ + + See ISO 18004:2006, 6.4.4 Table 5 + + + + + See specification GBT 18284-2000 + + The bits. + The result. + The count. + + + + +

The main class which implements QR Code decoding -- as opposed to locating and extracting + the QR Code from an image.

+
+ + Sean Owen + +
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a QR Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Decodes a QR Code represented as a {@link BitMatrix}. A 1 or "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+
+ data and error correction codewords + number of codewords that are data bytes + +
+ + +

See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels + defined by the QR code standard.

+
+ Sean Owen +
+ + L = ~7% correction + + + M = ~15% correction + + + Q = ~25% correction + + + H = ~30% correction + + + + Gets the bits. + + + + + Gets the name. + + + + + Ordinals this instance. + + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Fors the bits. + + int containing the two bits encoding a QR Code's error correction level + + representing the encoded error correction level + + + +

Encapsulates a QR Code's format information, including the data mask used and + error correction level.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + +
+ + See ISO 18004:2006, Annex C, Table C.1 + + + Offset i holds the number of 1 bits in the binary representation of i + + + + Decodes the format information. + + format info indicator, with mask still applied + The masked format info2. + + information about the format it specifies, or null + if doesn't seem to match any known pattern + + + + +

See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which + data can be encoded to bits in the QR code standard.

+
+ Sean Owen +
+ + + Gets the name. + + + + + enumeration for encoding modes + + + + + + + + + + numeric encoding + + + + + alpha-numeric encoding + + + + + structured append + + + + + byte mode encoding + + + + + ECI segment + + + + + Kanji mode + + + + + FNC1 char, first position + + + + + FNC1 char, second position + + + + + Hanzi mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See GBT 18284-2000; "Hanzi" is a transliteration of this mode name. + + + + Fors the bits. + + four bits encoding a QR Code data mode + + encoded by these bits + + if bits do not correspond to a known mode + + + version in question + + number of bits used, in this QR Code symbol {@link Version}, to encode the + count of characters that will follow encoded in this {@link Mode} + + + + + Gets the bits. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Meta-data container for QR Code decoding. Instances of this class may be used to convey information back to the + decoding caller. Callers are expected to process this. + + + + + Initializes a new instance of the class. + + if set to true [mirrored]. + + + + true if the QR Code was mirrored. + + + + + Apply the result points' order correction due to mirroring. + + Array of points to apply mirror correction to. + + + + See ISO 18004:2006 Annex D + + Sean Owen + + + See ISO 18004:2006 Annex D. + Element i represents the raw version bits that specify version i + 7 + + + + + Gets the version number. + + + + + Gets the alignment pattern centers. + + + + + Gets the total codewords. + + + + + Gets the dimension for version. + + + + + Gets the EC blocks for level. + + The ec level. + + + +

Deduces version information purely from QR Code dimensions.

+ +
+ dimension in modules + + for a QR Code of that dimension or null +
+ + + Gets the version for number. + + The version number. + + + + See ISO 18004:2006 Annex E + + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + + Gets the EC codewords per block. + + + + + Gets the num blocks. + + + + + Gets the total EC codewords. + + + + + Gets the EC blocks. + + + + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the QR code version's format.

+
+
+ + + Gets the count. + + + + + Gets the data codewords. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + See ISO 18004:2006 6.5.1 Table 9 + + +

Encapsulates an alignment pattern, which are the smaller square patterns found in + all but the simplest QR Codes.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Determines if this alignment pattern "about equals" an alignment pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing an average of the two. + + The i. + The j. + New size of the module. + + + +

This class attempts to find alignment patterns in a QR Code. Alignment patterns look like finder + patterns but are smaller and appear at regular intervals throughout the image.

+ +

At the moment this only looks for the bottom-right alignment pattern.

+ +

This is mostly a simplified copy of {@link FinderPatternFinder}. It is copied, + pasted and stripped down here for maximum performance but does unfortunately duplicate + some code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Creates a finder that will look in a portion of the whole image.

+ +
+ image to search + + left column from which to start searching + + top row from which to start searching + + width of region to search + + height of region to search + + estimated module size so far + + callback function which is called, when a result point is found +
+ +

This method attempts to find the bottom-right alignment pattern in the image. It is a bit messy since + it's pretty performance-critical and so is written to be fast foremost.

+ +
+ if found +
+ + Given a count of black/white/black pixels just seen and an end position, + figures the location of the center of this black/white/black run. + + + + count of black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/1 ratios + used by alignment patterns to be considered a match + + + + +

After a horizontal scan finds a potential alignment pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + alignment pattern to see if the same proportion is detected.

+
+ row where an alignment pattern was detected + center of the section that appears to cross an alignment pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of alignment pattern, or null if not found + +
+ +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will see if this pattern had been + found on a previous horizontal scan. If so, we consider it confirmed and conclude we have + found the alignment pattern.

+ +
+ reading state module counts from horizontal scan + + row where alignment pattern may be found + + end of possible alignment pattern in row + + {@link AlignmentPattern} if we have found the same pattern twice, or null if not + +
+ + +

Encapsulates logic that can detect a QR Code in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + + Gets the image. + + + + + Gets the result point callback. + + + + +

Detects a QR Code in an image.

+
+ + encapsulating results of detecting a QR Code + +
+ + +

Detects a QR Code in an image.

+
+ optional hints to detector + + encapsulating results of detecting a QR Code + +
+ + + Processes the finder pattern info. + + The info. + + + +

Computes the dimension (number of modules on a size) of the QR Code based on the position + of the finder patterns and estimated module size.

+
+
+ + +

Computes an average estimated module size based on estimated derived from the positions + of the three finder patterns.

+
+ detected top-left finder pattern center + detected top-right finder pattern center + detected bottom-left finder pattern center + estimated module size +
+ +

Estimates module size based on two finder patterns -- it uses + {@link #sizeOfBlackWhiteBlackRunBothWays(int, int, int, int)} to figure the + width of each, measuring along the axis between their centers.

+
+
+ + See {@link #sizeOfBlackWhiteBlackRun(int, int, int, int)}; computes the total width of + a finder pattern by looking for a black-white-black run from the center in the direction + of another point (another finder pattern center), and in the opposite direction too. + + + +

This method traces a line from a point in the image, in the direction towards another point. + It begins in a black region, and keeps going until it finds white, then black, then white again. + It reports the distance from the start to this point.

+ +

This is used when figuring out how wide a finder pattern is, when the finder pattern + may be skewed or rotated.

+
+
+ + +

Attempts to locate an alignment pattern in a limited region of the image, which is + guessed to contain it. This method uses {@link AlignmentPattern}.

+
+ estimated module size so far + x coordinate of center of area probably containing alignment pattern + y coordinate of above + number of pixels in all directions to search from the center + + if found, or null otherwise + +
+ + +

Encapsulates a finder pattern, which are the three square patterns found in + the corners of QR Codes. It also encapsulates a count of similar finder patterns, + as a convenience to the finder's bookkeeping.

+
+ Sean Owen +
+ + + Gets the size of the estimated module. + + + The size of the estimated module. + + + +

Determines if this finder pattern "about equals" a finder pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing a weighted average + based on count. + + The i. + The j. + New size of the module. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+
+ Sean Owen +
+ + + 1 pixel/module times 3 modules/center + + + + + support up to version 20 for mobile clients + + + + +

Creates a finder that will search the image for three finder patterns.

+
+ image to search +
+ + + Initializes a new instance of the class. + + The image. + The result point callback. + + + + Gets the image. + + + + + Gets the possible centers. + + + + Given a count of black/white/black/white/black pixels just seen and an end position, + figures the location of the center of this run. + + + + count of black/white/black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/3/1/1 ratios + used by finder patterns to be considered a match + + + + + + count of black/white/black/white/black pixels just read + true if the proportions of the counts is close enough to the 1/1/3/1/1 ratios + by finder patterns to be considered a match + + + + After a vertical and horizontal scan finds a potential finder pattern, this method + "cross-cross-cross-checks" by scanning down diagonally through the center of the possible + finder pattern to see if the same proportion is detected. + @param maxCount maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + @param originalStateCountTotal The original state count total. + + row where a finder pattern was detected + center of the section that appears to cross a finder pattern + true if proportions are withing expected limits + + + +

After a horizontal scan finds a potential finder pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + finder pattern to see if the same proportion is detected.

+
+ row where a finder pattern was detected + center of the section that appears to cross a finder pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of finder pattern, or null if not found + +
+ +

Like {@link #crossCheckVertical(int, int, int, int)}, and in fact is basically identical, + except it reads horizontally instead of vertically. This is used to cross-cross + check a vertical cross check and locate the real center of the alignment pattern.

+
+
+ + + @see #handlePossibleCenter(int[], int, int) + + reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + ignored + true if a finder pattern candidate was found this time + + + +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will, ah, cross-cross-check + with another horizontal scan. This is needed primarily to locate the real horizontal + center of the pattern in cases of extreme skew. + And then we cross-cross-cross check with another diagonal scan.

+ If that succeeds the finder pattern location is added to a list that tracks + the number of times each location has been nearly-matched as a finder pattern. + Each additional find is more evidence that the location is in fact a finder + pattern center +
+ reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + + true if a finder pattern candidate was found this time + +
+ + number of rows we could safely skip during scanning, based on the first + two finder patterns that have been located. In some cases their position will + allow us to infer that the third pattern must lie below a certain point farther + down in the image. + + + + true iff we have found at least 3 finder patterns that have been detected + at least {@link #CENTER_QUORUM} times each, and, the estimated module size of the + candidates is "pretty similar" + + + + the 3 best {@link FinderPattern}s from our list of candidates. The "best" are + those that have been detected at least {@link #CENTER_QUORUM} times, and whose module + size differs from the average among those patterns the least + + + + + Orders by furthest from average + + + +

Orders by {@link FinderPattern#getCount()}, descending.

+
+ + +

Encapsulates information about finder patterns in an image, including the location of + the three finder patterns, and their estimated module size.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The pattern centers. + + + + Gets the bottom left. + + + + + Gets the top left. + + + + + Gets the top right. + + + + + JAVAPORT: The original code was a 2D array of ints, but since it only ever gets assigned + 0, 1 and 2 I'm going to use less memory and go with bytes. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Gets the height. + + + + + Gets the width. + + + + + Gets or sets the with the specified x. + + + + + an internal representation as bytes, in row-major order. array[y][x] represents point (x,y) + + + + + Sets the specified x. + + The x. + The y. + The value. + + + + Sets the specified x. + + The x. + The y. + if set to true [value]. + + + + Clears the specified value. + + The value. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + Encode "bytes" with the error correction level "ecLevel". The encoding mode will be chosen + internally by chooseMode(). On success, store the result in "qrCode". + We recommend you to use QRCode.EC_LEVEL_L (the lowest level) for + "getECLevel" since our primary use is to show QR code on desktop screens. We don't need very + strong error correction for this purpose. + Note that there is no way to encode bytes in MODE_KANJI. We might want to add EncodeWithMode() + with which clients can specify the encoding mode. For now, we don't need the functionality. + + text to encode + error correction level to use + representing the encoded QR code + + + + Encodes the specified content. + + The content. + The ec level. + The hints. + + + + + Decides the smallest version of QR code that will contain all of the provided data. + + if the data cannot fit in any version + + + + Gets the alphanumeric code. + + The code. + the code point of the table used in alphanumeric mode or + -1 if there is no corresponding code in the table. + + + + Chooses the mode. + + The content. + + + + + Choose the best mode by examining the content. Note that 'encoding' is used as a hint; + if it is Shift_JIS, and the input is only double-byte Kanji, then we return {@link Mode#KANJI}. + + The content. + The encoding. + + + + + true if the number of input bits will fit in a code with the specified version and error correction level. + + + + Terminate bits as described in 8.4.8 and 8.4.9 of JISX0510:2004 (p.24). + + The num data bytes. + The bits. + + + + Get number of data bytes and number of error correction bytes for block id "blockID". Store + the result in "numDataBytesInBlock", and "numECBytesInBlock". See table 12 in 8.5.1 of + JISX0510:2004 (p.30) + + The num total bytes. + The num data bytes. + The num RS blocks. + The block ID. + The num data bytes in block. + The num EC bytes in block. + + + + Interleave "bits" with corresponding error correction bytes. On success, store the result in + "result". The interleave rule is complicated. See 8.6 of JISX0510:2004 (p.37) for details. + + The bits. + The num total bytes. + The num data bytes. + The num RS blocks. + + + + + Append mode info. On success, store the result in "bits". + + The mode. + The bits. + + + + Append length info. On success, store the result in "bits". + + The num letters. + The version. + The mode. + The bits. + + + + Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits". + + The content. + The mode. + The bits. + The encoding. + + + + + + Satoru Takabayashi + Daniel Switkin + Sean Owen + + + + Apply mask penalty rule 1 and return the penalty. Find repetitive cells with the same color and + give penalty to them. Example: 00000 or 11111. + + The matrix. + + + + + Apply mask penalty rule 2 and return the penalty. Find 2x2 blocks with the same color and give + penalty to them. This is actually equivalent to the spec's rule, which is to find MxN blocks and give a + penalty proportional to (M-1)x(N-1), because this is the number of 2x2 blocks inside such a block. + + The matrix. + + + + + Apply mask penalty rule 3 and return the penalty. Find consecutive cells of 00001011101 or + 10111010000, and give penalty to them. If we find patterns like 000010111010000, we give + penalties twice (i.e. 40 * 2). + + The matrix. + + + + + Apply mask penalty rule 4 and return the penalty. Calculate the ratio of dark cells and give + penalty if the ratio is far from 50%. It gives 10 penalty for 5% distance. + + The matrix. + + + + + Return the mask bit for "getMaskPattern" at "x" and "y". See 8.8 of JISX0510:2004 for mask + pattern conditions. + + The mask pattern. + The x. + The y. + + + + + Helper function for applyMaskPenaltyRule1. We need this for doing this calculation in both + vertical and horizontal orders respectively. + + The matrix. + if set to true [is horizontal]. + + + + + + + + satorux@google.com (Satoru Takabayashi) - creator + + + + + Set all cells to 2. 2 means that the cell is empty (not set yet). + + JAVAPORT: We shouldn't need to do this at all. The code should be rewritten to begin encoding + with the ByteMatrix initialized all to zero. + + The matrix. + + + + Build 2D matrix of QR Code from "dataBits" with "ecLevel", "version" and "getMaskPattern". On + success, store the result in "matrix" and return true. + + The data bits. + The ec level. + The version. + The mask pattern. + The matrix. + + + + Embed basic patterns. On success, modify the matrix and return true. + The basic patterns are: + - Position detection patterns + - Timing patterns + - Dark dot at the left bottom corner + - Position adjustment patterns, if need be + + The version. + The matrix. + + + + Embed type information. On success, modify the matrix. + + The ec level. + The mask pattern. + The matrix. + + + + Embed version information if need be. On success, modify the matrix and return true. + See 8.10 of JISX0510:2004 (p.47) for how to embed version information. + + The version. + The matrix. + + + + Embed "dataBits" using "getMaskPattern". On success, modify the matrix and return true. + For debugging purposes, it skips masking process if "getMaskPattern" is -1. + See 8.7 of JISX0510:2004 (p.38) for how to embed data bits. + + The data bits. + The mask pattern. + The matrix. + + + + Return the position of the most significant bit set (to one) in the "value". The most + significant bit is position 32. If there is no bit set, return 0. Examples: + - findMSBSet(0) => 0 + - findMSBSet(1) => 1 + - findMSBSet(255) => 8 + + The value_ renamed. + + + + + Calculate BCH (Bose-Chaudhuri-Hocquenghem) code for "value" using polynomial "poly". The BCH + code is used for encoding type information and version information. + Example: Calculation of version information of 7. + f(x) is created from 7. + - 7 = 000111 in 6 bits + - f(x) = x^2 + x^2 + x^1 + g(x) is given by the standard (p. 67) + - g(x) = x^12 + x^11 + x^10 + x^9 + x^8 + x^5 + x^2 + 1 + Multiply f(x) by x^(18 - 6) + - f'(x) = f(x) * x^(18 - 6) + - f'(x) = x^14 + x^13 + x^12 + Calculate the remainder of f'(x) / g(x) + x^2 + __________________________________________________ + g(x) )x^14 + x^13 + x^12 + x^14 + x^13 + x^12 + x^11 + x^10 + x^7 + x^4 + x^2 + -------------------------------------------------- + x^11 + x^10 + x^7 + x^4 + x^2 + + The remainder is x^11 + x^10 + x^7 + x^4 + x^2 + Encode it in binary: 110010010100 + The return value is 0xc94 (1100 1001 0100) + + Since all coefficients in the polynomials are 1 or 0, we can do the calculation by bit + operations. We don't care if coefficients are positive or negative. + + The value. + The poly. + + + + + Make bit vector of type information. On success, store the result in "bits" and return true. + Encode error correction level and mask pattern. See 8.9 of + JISX0510:2004 (p.45) for details. + + The ec level. + The mask pattern. + The bits. + + + + Make bit vector of version information. On success, store the result in "bits" and return true. + See 8.10 of JISX0510:2004 (p.45) for details. + + The version. + The bits. + + + + Check if "value" is empty. + + The value. + + true if the specified value is empty; otherwise, false. + + + + + Embed the lonely dark dot at left bottom corner. JISX0510:2004 (p.46) + + The matrix. + + + + + + The x start. + The y start. + The matrix. + + + + Embed position detection patterns and surrounding vertical/horizontal separators. + + The matrix. + + + + Embed position adjustment patterns if need be. + + The version. + The matrix. + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + + + + + + Initializes a new instance of the class. + + + + + Gets or sets the mode. + + + The mode. + + + + + Gets or sets the EC level. + + + The EC level. + + + + + Gets or sets the version. + + + The version. + + + + + Gets or sets the mask pattern. + + + The mask pattern. + + + + + Gets or sets the matrix. + + + The matrix. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Check if "mask_pattern" is valid. + + The mask pattern. + + true if [is valid mask pattern] [the specified mask pattern]; otherwise, false. + + + + + The class holds the available options for the QrCodeWriter + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + . + + + + + Specifies what character encoding to use where applicable (type ) + + + + + Explicitly disables ECI segment when generating QR Code + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + + + + + Specifies the exact version of QR code to be encoded. An integer, range 1 to 40. If the data specified + cannot fit within the required version, a WriterException will be thrown. + + + + + This implementation can detect and decode QR Codes in an image. + Sean Owen + + + + + Gets the decoder. + + + + + + Locates and decodes a QR code in an image. + + a String representing the content encoded by the QR code + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a QR Code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + for compatibility with .net 4.0 + + + + + for compatibility with .net 4.0 + + The type of the 1. + The param1. + + + + for compatibility with .net 4.0 + + The type of the 1. + The type of the 2. + The param1. + The param2. + + + + for compatibility with .net 4.0 + + The type of the 1. + The type of the 2. + The type of the 3. + The param1. + The param2. + The param3. + + + + for compatibility with .net 4.0 + + The type of the 1. + The type of the 2. + The type of the 3. + The type of the 4. + The param1. + The param2. + The param3. + The param4. + + + + for compatibility with .net 4.0 + + The type of the result. + + + + + for compatibility with .net 4.0 + + The type of the 1. + The type of the result. + The param1. + + + + + for compatibility with .net 4.0 + + The type of the 1. + The type of the 2. + The type of the result. + The param1. + The param2. + + + + + for compatibility with .net 4.0 + + The type of the 1. + The type of the 2. + The type of the 3. + The type of the result. + The param1. + The param2. + The param3. + + + + + for compatibility with .net 4.0 + + The type of the 1. + The type of the 2. + The type of the 3. + The type of the 4. + The type of the result. + The param1. + The param2. + The param3. + The param4. + + + + + Attribute is only for source code compatibility issues + + + + + Attribute is only for compatibility issues + + + + + Integer inefficiently represented internally using base-10 digits, in order to allow a + visual representation as a base-10 string. Only for internal use. + + + + + 10 numeration base for string representation, very inefficient for computations. + + + + + Maximum size for numbers is up to 10240 binary digits or approximately (safe to use) 3000 decimal digits. + The maximum size is, in fact, double the previously specified amount, in order to accommodate operations' + overflow. + + + + Integer constants + + + + The array of digits of the number. + + + + + The actual number of digits of the number. + + + + + The number sign. + + + + + Sets the number sign. + + + + + Default constructor, intializing the Base10BigInteger with zero. + + + + + Constructor creating a new Base10BigInteger as a conversion of a regular base-10 long. + + The base-10 long to be converted + + + + Constructor creating a new Base10BigInteger as a copy of an existing Base10BigInteger. + + The Base10BigInteger to be copied + + + + Determines whether the specified Base10BigInteger is equal to the current Base10BigInteger. + + The Base10BigInteger to compare with the current Base10BigInteger + True if the specified Base10BigInteger is equal to the current Base10BigInteger, + false otherwise + + + + Determines whether the specified System.Object is equal to the current Base10BigInteger. + + The System.Object to compare with the current Base10BigInteger + True if the specified System.Object is equal to the current Base10BigInteger, + false otherwise + + + + Serves as a hash function for the Base10BigInteger type. + + A hash code for the current Base10BigInteger + + + + String representation of the current Base10BigInteger, converted to its base-10 representation. + + The string representation of the current Base10BigInteger + + + + Base10BigInteger inverse with respect to addition. + + The Base10BigInteger whose opposite is to be computed + The Base10BigInteger inverse with respect to addition + + + + Greater test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a > b, false otherwise + + + + Greater or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a >= b, false otherwise + + + + Smaller test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a < b, false otherwise + + + + Smaller or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a <= b, false otherwise + + + + Computes the absolute value of a Base10BigInteger. + + The Base10BigInteger whose absolute value is to be computed + The absolute value of the given BigInteger + + + + Addition operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the addition + + + + Subtraction operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the subtraction + + + + Multiplication operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the multiplication + + + + Implicit conversion operator from long to Base10BigInteger. + + The long to be converted to a Base10BigInteger + The Base10BigInteger converted from the given long + + + + Equality test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a == b, false otherwise + + + + Inequality test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a != b, false otherwise + + + + Greater test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a > b, false otherwise + + + + Smaller test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a < b, false otherwise + + + + Greater or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a >= b, false otherwise + + + + Smaller or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a <= b, false otherwise + + + + Base10BigInteger inverse with respect to addition. + + The Base10BigInteger whose opposite is to be computed + The Base10BigInteger inverse with respect to addition + + + + Addition operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the addition + + + + Subtraction operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the subtraction + + + + Multiplication operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the multiplication + + + + Incremetation by one operation of a Base10BigInteger. + + The Base10BigInteger to be incremented by one + The Base10BigInteger result of incrementing by one + + + + Decremetation by one operation of a Base10BigInteger. + + The Base10BigInteger to be decremented by one + The Base10BigInteger result of decrementing by one + + + + Adds two BigNumbers a and b, where a >= b, a, b non-negative. + + + + + Subtracts the Base10BigInteger b from the Base10BigInteger a, where a >= b, a, b non-negative. + + + + + Multiplies two Base10BigIntegers. + + + + + .NET 2.0 class for handling of very large integers, up to 10240 binary digits or + approximately (safe to use) 3000 decimal digits. + + + + + 2^16 numeration base for internal computations, in order to benefit the most from the + 32 bit (or 64 bit) integer processor registers. + + + + + Maximum size for numbers is up to 10240 binary digits or approximately (safe to use) 3000 decimal digits. + The maximum size is, in fact, double the previously specified amount, in order to accommodate operations's + overflow. + + + + + Ratio for the convertion of a BigInteger's size to a binary digits size. + + + + Integer constants + + + + The array of digits of the number. + + + + + The actual number of digits of the number. + + + + + The number sign. + + + + + Default constructor, intializing the BigInteger with zero. + + + + + Constructor creating a new BigInteger as a conversion of a regular base-10 long. + + The base-10 long to be converted + + + + Constructor creating a new BigInteger as a copy of an existing BigInteger. + + The BigInteger to be copied + + + + Constructor creating a BigInteger instance out of a base-10 formatted string. + + The base-10 formatted string. + Invalid numeric string exception + + + + Constructor creating a positive BigInteger by extracting it's digits from a given byte array. + + The byte array + The byte array's content exceeds the maximum size of a BigInteger + exception + + + + Determines whether the specified BigInteger is equal to the current BigInteger. + + The BigInteger to compare with the current BigInteger + True if the specified BigInteger is equal to the current BigInteger, + false otherwise + + + + Determines whether the specified System.Object is equal to the current BigInteger. + + The System.Object to compare with the current BigInteger + True if the specified System.Object is equal to the current BigInteger, + false otherwise + + + + Serves as a hash function for the BigInteger type. + + A hash code for the current BigInteger + + + + String representation of the current BigInteger, converted to its base-10 representation. + + The string representation of the current BigInteger + + + + Parses the number given by a string + + the number as a string + + + + + Compares this instance to a specified BigInteger. + + The BigInteger to compare this instance with + -1 if the current instance is smaller than the given BigInteger, + 0 if the two are equal, 1 otherwise + + + + Compares this instance to a specified object. + + The object to compare this instance with + -1 if the current instance is smaller than the given object, + 0 if the two are equal, 1 otherwise + obj is not a BigInteger exception + + + + Returns a BigInteger's size in binary digits. + + The BigInteger whose size in binary digits is to be determined + The BigInteger's size in binary digits + + + + BigInteger inverse with respect to addition. + + The BigInteger whose opposite is to be computed + The BigInteger inverse with respect to addition + + + + Greater test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a > b, false otherwise + + + + Greater or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a >= b, false otherwise + + + + Smaller test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a < b, false otherwise + + + + Smaller or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a <= b, false otherwise + + + + Computes the absolute value of a BigInteger. + + The BigInteger whose absolute value is to be computed + The absolute value of the given BigInteger + + + + Addition operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the addition + + + + Subtraction operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the subtraction + + + + Multiplication operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the multiplication + + + + Division operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the division + Cannot divide by zero exception + + + + Modulo operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the modulo + Cannot divide by zero exception + + + + Returns the power of a BigInteger base to a non-negative exponent by using the + fast exponentiation algorithm (right to left binary exponentiation). + + The BigInteger base + The non-negative exponent + The power of the BigInteger base to the non-negative exponent + Cannot raise a BigInteger to a negative power exception. + + + + Integer square root of the given BigInteger using Newton's numeric method. + + The BigInteger whose integer square root is to be computed + The integer square root of the given BigInteger + Cannot compute the integer square root of a negative number exception + + + + Euclidean algorithm for computing the greatest common divisor of two non-negative BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The greatest common divisor of the two given BigIntegers + Cannot compute the Gcd of negative BigIntegers exception + + + + Extended Euclidian Gcd algorithm, returning the greatest common divisor of two non-negative BigIntegers, + while also providing u and v, where: a*u + b*v = gcd(a,b). + + The 1st BigInteger + The 2nd BigInteger + Output BigInteger parameter, where a*u + b*v = gcd(a,b) + Output BigInteger parameter, where a*u + b*v = gcd(a,b) + The greatest common divisor of the two given BigIntegers + Cannot compute the Gcd of negative BigIntegers exception + + + + Computes the modular inverse of a given BigInteger. + + The non-zero BigInteger whose inverse is to be computed + The BigInteger modulus, which must be greater than or equal to 2 + The BigInteger equal to a^(-1) mod n + Invalid number or modulus exception + + + + Returns the power of a BigInteger to a non-negative exponent modulo n, by using the + fast exponentiation algorithm (right to left binary exponentiation) and modulo optimizations. + + The BigInteger base + The non-negative exponent + The modulus, which must be greater than or equal to 2 + The power of the BigInteger to the non-negative exponent + Invalid exponent or modulus exception + + + + Implicit conversion operator from long to BigInteger. + + The long to be converted to a BigInteger + The BigInteger converted from the given long + + + + Implicit conversion operator from int to BigInteger. + + The int to be converted to a BigInteger + The BigInteger converted from the given int + + + + Equality test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a == b, false otherwise + + + + Inequality test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a != b, false otherwise + + + + Greater test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a > b, false otherwise + + + + Smaller test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a < b, false otherwise + + + + Greater or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a >= b, false otherwise + + + + Smaller or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a <= b, false otherwise + + + + BigInteger inverse with respect to addition. + + The BigInteger whose opposite is to be computed + The BigInteger inverse with respect to addition + + + + Addition operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the addition + + + + Subtraction operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the subtraction + + + + Multiplication operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the multiplication + + + + Division operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the division + Cannot divide by zero exception + + + + Modulo operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the modulo + Cannot divide by zero exception + + + + Incremetation by one operation of a BigInteger. + + The BigInteger to be incremented by one + The BigInteger result of incrementing by one + + + + Decremetation by one operation of a BigInteger. + + The BigInteger to be decremented by one + The BigInteger result of decrementing by one + + + + Adds two BigNumbers a and b, where a >= b, a, b non-negative. + + + + + Subtracts the BigInteger b from the BigInteger a, where a >= b, a, b non-negative. + + + + + Multiplies two BigIntegers. + + + + + Divides a BigInteger by a one-digit int. + + + + + Divides a BigInteger by another BigInteger. + + + + + DivideByBigNumber auxiliary method. + + + + + DivideByBigNumber auxilary method. + + + + + DivideByBigNumber auxilary method. + + + + + BigInteger-related exception class. + + + + + BigIntegerException constructor. + + The exception message + The inner exception + + + + The number's sign, where Positive also stands for the number zero. + + + + + Attribute is only for compatibility issues + + +
+
diff --git a/packages/ZXing.Net.0.16.4/lib/netstandard1.1/zxing.dll b/packages/ZXing.Net.0.16.4/lib/netstandard1.1/zxing.dll new file mode 100644 index 0000000..8f68c7c Binary files /dev/null and b/packages/ZXing.Net.0.16.4/lib/netstandard1.1/zxing.dll differ diff --git a/packages/ZXing.Net.0.16.4/lib/netstandard1.1/zxing.xml b/packages/ZXing.Net.0.16.4/lib/netstandard1.1/zxing.xml new file mode 100644 index 0000000..df74ef8 --- /dev/null +++ b/packages/ZXing.Net.0.16.4/lib/netstandard1.1/zxing.xml @@ -0,0 +1,10922 @@ + + + + zxing + + + + + Interface for a class to convert a BitMatrix to an output image format + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + The options. + + + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + + + the generated code as byte array of BGRA pixels + + + + + the width of the image + + + + + the height of the image + + + + + Renders a to an byte array with pixel data (4 byte per pixel, BGRA) + + + + + represents a color defined as ARGB byte data + + + + + the color black + + + + + the color white + + + + + value of the alpha channel + + + + + value of the red channel + + + + + value of the green channel + + + + + value of the blue channel + + + + + Initializes a new instance of the struct. + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Renders a barcode into a Svg image + + + + + represents a color value + + + + + color black + + + + + color white + + + + + alpha channel + + + + + red channel + + + + + green channel + + + + + blur channel + + + + + initializing constructor + + + + + initializing constructor + + + + + Gets or sets the foreground color. + + The foreground color. + + + + Gets or sets the background color. + + The background color. + + + + Gets or sets the font family name + + The font family name. + + + + Gets or sets the font size in pixel + + The font size in pixel. + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Represents a barcode as a Svg image + + + + + Gets or sets the content. + + + The content. + + + + + The original height of the bitmatrix for the barcode + + + + + The original width of the bitmatrix for the barcode + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The content. + + + + Gives the XML representation of the SVG image + + + + + Enumerates barcode formats known to this package. + + Sean Owen + + + Aztec 2D barcode format. + + + CODABAR 1D format. + + + Code 39 1D format. + + + Code 93 1D format. + + + Code 128 1D format. + + + Data Matrix 2D barcode format. + + + EAN-8 1D format. + + + EAN-13 1D format. + + + ITF (Interleaved Two of Five) 1D format. + + + MaxiCode 2D barcode format. + + + PDF417 format. + + + QR Code 2D barcode format. + + + RSS 14 + + + RSS EXPANDED + + + UPC-A 1D format. + + + UPC-E 1D format. + + + UPC/EAN extension format. Not a stand-alone format. + + + MSI + + + Plessey + + + Intelligent Mail barcode + + + + UPC_A | UPC_E | EAN_13 | EAN_8 | CODABAR | CODE_39 | CODE_93 | CODE_128 | ITF | RSS_14 | RSS_EXPANDED + without MSI (to many false-positives) and IMB (not enough tested, and it looks more like a 2D) + + + + + A smart class to decode the barcode inside a bitmap object or byte array with raw pixel color values + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Optional: Gets or sets the function to create a luminance source object for a bitmap. + If null a platform specific default LuminanceSource is used + + + The function to create a luminance source object. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + A smart class to decode the barcode inside a bitmap object + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Constructor for additional image formats for one BarcodeReader class + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Optional: Gets or sets the function to create a luminance source object for a bitmap. + If null a platform specific default LuminanceSource is used + + + The function to create a luminance source object. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + A smart class to decode the barcode inside a bitmap object + + + + + represents the default function which is called to get a instance from a raw byte array + + + + + Gets or sets the options. + + + The options. + + + + + Gets the reader which should be used to find and decode the barcode. + + + The reader. + + + + + Gets or sets a method which is called if an important point is found + + + The result point callback. + + + + + event is executed if a result was found via decode + + + + + Gets or sets a value indicating whether the image should be automatically rotated. + Rotation is supported for 90, 180 and 270 degrees + + + true if image should be rotated; otherwise, false. + + + + + Gets or sets a value indicating whether the image should be automatically inverted + if no result is found in the original image. + ATTENTION: Please be carefully because it slows down the decoding process if it is used + + + true if image should be inverted; otherwise, false. + + + + + Optional: Gets or sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + The function to create a binarizer object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb array. + If null the RGBLuminanceSource is used. The handler is only called when Decode with a byte[] array is called. + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + raises the ResultFound event + + + + + + raises the ResultFound event + + + + + + calls the explicitResultPointFound action + + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + A smart class to encode some content to raw pixel data + + + + + Initializes a new instance of the class. + + + + + A smart class to encode some content to a svg barcode image + + + + + Initializes a new instance of the class. + + + + + A base class for specific barcode writers with specific formats of barcode images. + + The type of the output. + + + + Gets or sets the renderer which should be used to render the encoded BitMatrix. + + + + + Encodes the specified contents and returns a rendered instance of the barcode. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The matrix. + + + + + A base class for specific barcode writers with specific formats of barcode images. + + + + + Gets or sets the barcode format. + The value is only suitable if the MultiFormatWriter is used. + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + + + + + + + + + + + + Encodes the specified contents and returns a BitMatrix array. + That array has to be rendered manually or with a IBarcodeRenderer. + + The contents. + + + + + The base class for luminance sources which supports + cropping and rotating based upon the luminance values. + + + + + weight of the red channel for calculating a gray scale image + + + + + weight of the green channel for calculating a gray scale image + + + + + weight of the blue channel for calculating a gray scale image + + + + + numbers of bits which for right shifting + + + + + + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + + The luminance array. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + gets the luminance matrix + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + TODO: not implemented yet + + + A rotated version of this object. + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + + Whether this subclass supports cropping. + + + + + Whether this subclass supports invertion. + + + + Inverts the luminance values (newValue = 255 - oldValue) + + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + This class hierarchy provides a set of methods to convert luminance data to 1 bit data. + It allows the algorithm to vary polymorphically, for example allowing a very expensive + thresholding technique for servers and a fast one for mobile. It also permits the implementation + to vary, e.g. a JNI version for Android and a Java fallback version for other platforms. + + dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The source. + + + + Gets the luminance source object. + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + For callers which only examine one row of pixels at a time, the same BitArray should be reused + and passed in with each call for performance. However it is legal to keep more than one row + at a time if needed. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + Converts a 2D array of luminance data to 1 bit data. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + A new concrete Binarizer implementation object. + + + + Gets the width of the luminance source object. + + + + + Gets the height of the luminance source object. + + + + + This class is the core bitmap class used by ZXing to represent 1 bit data. Reader objects + accept a BinaryBitmap and attempt to decode it. + + dswitkin@google.com (Daniel Switkin) + + + + + + + + + + The width of the bitmap. + + + + + The height of the bitmap. + + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + + The row to fetch, which must be in [0, bitmap height). + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + + Converts a 2D array of luminance data to 1 bit. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + + Whether this bitmap can be cropped. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if isCropSupported() is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + + Whether this bitmap supports counter-clockwise rotation. + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Encapsulates a type of hint that a caller may pass to a barcode reader to help it + more quickly or accurately decode it. It is up to implementations to decide what, + if anything, to do with the information that is supplied. + + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Unspecified, application-specific hint. Maps to an unspecified . + + + + + Image is a pure monochrome image of a barcode. Doesn't matter what it maps to; + use = true. + + + + + Image is known to be of one of a few possible formats. + Maps to a of s. + + + + + Spend more time to try to find a barcode; optimize for accuracy, not speed. + Doesn't matter what it maps to; use = true. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + + + The caller needs to be notified via callback when a possible + is found. Maps to a . + + + + + Assume MSI codes employ a check digit. Maps to . + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + Maps to . + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + 1D readers supporting rotation with TRY_HARDER enabled. + But BarcodeReader class can do auto-rotating for 1D and 2D codes. + Enabling that option prevents 1D readers doing double rotation. + BarcodeReader enables that option automatically if "global" auto-rotation is enabled. + Maps to . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to; + use . + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Simply encapsulates a width and height. + + + + + initializing constructor + + + + + + + the width + + + + + the height + + + + + + + + + + + + + + + + + + + + + + + + These are a set of hints that you may pass to Writers to specify their behavior. + + dswitkin@google.com (Daniel Switkin) + + + + Specifies the width of the barcode image + type: + + + + + Specifies the height of the barcode image + type: + + + + + Don't put the content string into the output image. + type: + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + + For Aztec it is of type , representing the minimal percentage of error correction words. + In all cases, it can also be a representation of the desired value as well. + Note: an Aztec symbol should have a minimum of 25% EC words. + For PDF417 it is of type or (between 0 and 8), + + + + + Specifies what character encoding to use where applicable. + type: + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + type: , or representation of the integer value + + + + + Specifies the aspect ratio to use. Default is 4. + type: , or 1-4. + + + + + Specifies whether to use compact mode for PDF417 + type: , or "true" or "false" + value + + + + + Specifies what compaction mode to use for PDF417. + type: or value of one of its + enum values + + + + + Specifies the minimum and maximum number of rows and columns for PDF417. + type: + + + + + Don't append ECI segment. + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + type: + + + + + Specifies the matrix shape for Data Matrix (type ) + + + + + Specifies a minimum barcode size (type ). Only applicable to Data Matrix now. + + + + + Specifies a maximum barcode size (type ). Only applicable to Data Matrix now. + + + + + if true, don't switch to codeset C for numbers + + + + + Specifies the default encodation for Data Matrix (type ) + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Specifies the required number of layers for an Aztec code. + A negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + type: , or representation of the integer value + + + + + Specifies the exact version of QR code to be encoded. + (Type , or representation of the integer value). + + + + + Specifies whether the data should be encoded to the GS1 standard + type: , or "true" or "false" + value + + + + + Thrown when a barcode was successfully detected, but some aspect of + the content did not conform to the barcode's format rules. This could have + been due to a mis-detection. + Sean Owen + + + + + + + + + + + + + + + + + + + + + + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Decodes the specified barcode bitmap which is given by a generic byte array. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents. + + The contents. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + The matrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents. + + The contents. + + + + + A wrapper implementation of {@link LuminanceSource} which inverts the luminances it returns -- black becomes + white and vice versa, and each value becomes (255-value). + + Sean Owen + + + + Initializes a new instance of the class. + + The @delegate. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff; + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Inverts this instance. + + original delegate {@link LuminanceSource} since invert undoes itself + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + The purpose of this class hierarchy is to abstract different bitmap implementations across + platforms into a standard interface for requesting greyscale luminance values. The interface + only provides immutable methods; therefore crop and rotation create copies. This is to ensure + that one Reader does not modify the original luminance source and leave it in an unknown state + for other Readers in the chain. + + dswitkin@google.com (Daniel Switkin) + + + + initializing constructor + + + + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff + + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + The width of the bitmap. + + + The height of the bitmap. + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + Whether this subclass supports counter-clockwise rotation. + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + + Whether this subclass supports invertion. + + + + inverts the luminance values, not supported here. has to implemented in sub classes + + + + + + + + + + + + MultiFormatReader is a convenience class and the main entry point into the library for most uses. + By default it attempts to decode all barcode formats that the library supports. Optionally, you + can provide a hints object to request different behavior, for example only decoding QR codes. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + This version of decode honors the intent of Reader.decode(BinaryBitmap) in that it + passes null as a hint to the decoders. However, that makes it inefficient to call repeatedly. + Use setHints() followed by decodeWithState() for continuous scan applications. + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the hints provided. Does not honor existing state. + + + The pixel data to decode + + The hints to use, clearing the previous state. + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the state set up by calling setHints() previously. Continuous scan + clients will get a large speed increase by using this instead of decode(). + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls + to decodeWithState(image) can reuse the same set of readers without reallocating memory. This + is important for performance in continuous scan clients. + + + + + + resets all specific readers + + + + This is a factory class which finds the appropriate Writer subclass for the BarcodeFormat + requested and encodes the barcode with the supplied contents. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Gets the collection of supported writers. + + + + + encode the given data + + + + + + + + + + encode the given data + + + + + + + + + + + This object extends LuminanceSource around an array of YUV data returned from the camera driver, + with the option to crop to a rectangle within the full data. This can be used to exclude + superfluous pixels around the perimeter and speed up decoding. + It works for any pixel format where the Y channel is planar and appears first, including + YCbCr_420_SP and YCbCr_422_SP. + @author dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The yuv data. + Width of the data. + Height of the data. + The left. + The top. + The width. + The height. + if set to true [reverse horiz]. + + + + Initializes a new instance of the class. + + The luminances. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + + + + + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Renders the cropped greyscale bitmap. + + + + + + width of image from {@link #renderThumbnail()} + + + + + height of image from {@link #renderThumbnail()} + + + + + creates a new instance + + + + + + + + + Implementations of this interface can decode an image of a barcode in some format into + the String it encodes. For example, can + decode a QR code. The decoder may optionally receive hints from the caller which may help + it decode more quickly or accurately. + + See , which attempts to determine what barcode + format is present within the image as well, and then decodes it accordingly. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + String which the barcode encodes + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + The general exception class throw when something goes wrong during decoding of a barcode. + This includes, but is not limited to, failing checksums / error correction algorithms, being + unable to locate finder timing patterns, and so on. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class. + + The inner exception. + + + + Initializes a new instance of the class. + + The inner exception. + + + + + Encapsulates the result of decoding a barcode within an image. + + + + raw text encoded by the barcode, if applicable, otherwise null + + + raw bytes encoded by the barcode, if applicable, otherwise null + + + + points related to the barcode in the image. These are typically points + identifying finder patterns or the corners of the barcode. The exact meaning is + specific to the type of barcode that was decoded. + + + + {@link BarcodeFormat} representing the format of the barcode that was decoded + + + + {@link Hashtable} mapping {@link ResultMetadataType} keys to values. May be + null. This contains optional metadata about what was detected about the barcode, + like orientation. + + + + + Gets the timestamp. + + + + + how many bits of are valid; typically 8 times its length + + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + The timestamp. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + The timestamp. + + + + Adds one metadata to the result + + The type. + The value. + + + + Adds a list of metadata to the result + + The metadata. + + + + Adds the result points. + + The new points. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Represents some type of metadata about the result of the decoding that the decoder + wishes to communicate back to the caller. + + Sean Owen + + + + Unspecified, application-specific metadata. Maps to an unspecified {@link Object}. + + + + + Denotes the likely approximate orientation of the barcode in the image. This value + is given as degrees rotated clockwise from the normal, upright orientation. + For example a 1D barcode which was found by reading top-to-bottom would be + said to have orientation "90". This key maps to an {@link Integer} whose + value is in the range [0,360). + + + + +

2D barcode formats typically encode text, but allow for a sort of 'byte mode' + which is sometimes used to encode binary data. While {@link Result} makes available + the complete raw bytes in the barcode for these formats, it does not offer the bytes + from the byte segments alone.

+

This maps to a {@link java.util.List} of byte arrays corresponding to the + raw bytes in the byte segments in the barcode, in order.

+
+
+ + + Error correction level used, if applicable. The value type depends on the + format, but is typically a String. + + + + + For some periodicals, indicates the issue number as an {@link Integer}. + + + + + For some products, indicates the suggested retail price in the barcode as a + formatted {@link String}. + + + + + For some products, the possible country of manufacture as a {@link String} denoting the + ISO country code. Some map to multiple possible countries, like "US/CA". + + + + + For some products, the extension text + + + + + If the code format supports structured append and + the current scanned code is part of one then the + sequence number is given with it. + + + + + If the code format supports structured append and + the current scanned code is part of one then the + parity is given with it. + + + + + PDF417-specific metadata + + + + + Aztec-specific metadata + + + + + Encapsulates a point of interest in an image containing a barcode. Typically, this + would be the location of a finder pattern or the corner of the barcode, for example. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The x. + The y. + + + + Gets the X. + + + + + Gets the Y. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC and + BC is less than AC and the angle between BC and BA is less than 180 degrees. + + array of three to order + + + + calculates the distance between two points + + first pattern + second pattern + + distance between two points + + + + + Returns the z component of the cross product between vectors BC and BA. + + + + Callback which is invoked when a possible result point (significant + point in the barcode image such as a corner) is found. + + + + + + + + Luminance source class which support different formats of images. + + + + + enumeration of supported bitmap format which the RGBLuminanceSource can process + + + + + format of the byte[] isn't known. RGBLuminanceSource tries to determine the best possible value + + + + + grayscale array, the byte array is a luminance array with 1 byte per pixel + + + + + grayscale array, the byte array is a luminance array with 2 bytes per pixel + + + + + 3 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels alpha, red, green and blue + + + + + 3 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green, red and alpha + + + + + 2 bytes per pixel, 5 bit red, 6 bits green and 5 bits blue + + + + + 4 bytes per pixel with the channels red, green, blue and alpha + + + + + 4 bytes for two pixels, UYVY formatted + + + + + 4 bytes for two pixels, YUYV formatted + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 1 byte per pixel (Gray8). + That means the whole array consists of the luminance values (grayscale). + + The luminance array. + The width. + The height. + if set to true [is8 bit]. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + The bitmap format. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + calculates the luminance values for the given byte array and bitmap format + + + + + + + Contains conversion support elements such as classes, interfaces and static methods. + + + + + Copies an array of chars obtained from a String into a specified array of chars + + The String to get the chars from + Position of the String to start getting the chars + Position of the String to end getting the chars + Array to return the chars + Position of the destination array of chars to start storing the chars + An array of chars + + + + Sets the capacity for the specified List + + The List which capacity will be set + The new capacity value + + + + Converts a string-Collection to an array + + The strings. + + + + + Joins all elements to one string. + + + The separator. + The values. + + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The value. + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The start index. + The end index. + The value. + + + + + + + + + + + + + + + + + + Savely gets the value of a decoding hint + if hints is null the default is returned + + + The hints. + Type of the hint. + The @default. + + + + The base class for all objects which encode/generate a barcode image. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + A base class which covers the range of exceptions which may occur when encoding a barcode using + the Writer framework. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner exc. + + + + Extends with more information specific to the Aztec format, + like the number of layers and whether it's compact. + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + Initializes a new instance of the class. + + The bits. + The points. + if set to true [compact]. + The nb datablocks. + The nb layers. + + + + The main class which implements Aztec Code decoding -- as opposed to locating and extracting + the Aztec Code from an image. + + David Olivier + + + + Decodes the specified detector result. + + The detector result. + + + + + This method is used for testing the high-level encoder + + + + + + + Gets the string encoded in the aztec code bits + + The corrected bits. + the decoded string + + + + gets the table corresponding to the char passed + + The t. + + + + + Gets the character (or string) corresponding to the passed code in the given table + + the table used + the code of the character + + + + + Performs RS error correction on an array of bits. + + The rawbits. + the corrected array + + + + Gets the array of bits from an Aztec Code matrix + + The matrix. + the array of bits + + + + Reads a code of given length and at given index in an array of bits + + The rawbits. + The start index. + The length. + + + + + Reads a code of length 8 in an array of bits, padding with zeros + + + + + + + + Packs a bit array into bytes, most significant bit first + + + + + + + Encapsulates logic that can detect an Aztec Code in an image, even if the Aztec Code + is rotated or skewed, or partially obscured. + + David Olivier + + + + Initializes a new instance of the class. + + The image. + + + + Detects an Aztec Code in an image. + + + + + Detects an Aztec Code in an image. + + if true, image is a mirror-image of original. + + encapsulating results of detecting an Aztec Code + + + + + Extracts the number of data layers and data blocks from the layer around the bull's eye + + bullEyeCornerPoints the array of bull's eye corners + + + + + Corrects the parameter bits using Reed-Solomon algorithm + + paremeter bits + compact true if this is a compact Aztec code + + + + + Finds the corners of a bull-eye centered on the passed point + This returns the centers of the diagonal points just outside the bull's eye + Returns [topRight, bottomRight, bottomLeft, topLeft] + + Center point + The corners of the bull-eye + + + + Finds a candidate center point of an Aztec code from an image + + the center point + + + + Gets the Aztec code corners from the bull's eye corners and the parameters. + + the array of bull's eye corners + the array of aztec code corners + + + + Creates a BitMatrix by sampling the provided image. + topLeft, topRight, bottomRight, and bottomLeft are the centers of the squares on the + diagonal just outside the bull's eye. + + The image. + The top left. + The bottom left. + The bottom right. + The top right. + + + + + Samples a line + + start point (inclusive) + end point (exclusive) + number of bits + the array of bits as an int (first bit is high-order bit of result) + + + + Determines whether [is white or black rectangle] [the specified p1]. + + The p1. + The p2. + The p3. + The p4. + true if the border of the rectangle passed in parameter is compound of white points only + or black points only + + + + Gets the color of a segment + + The p1. + The p2. + 1 if segment more than 90% black, -1 if segment is more than 90% white, 0 else + + + + Gets the coordinate of the first point with a different color in the given direction + + The init. + if set to true [color]. + The dx. + The dy. + + + + + Expand the square represented by the corner points by pushing out equally in all directions + + the corners of the square, which has the bull's eye at its center + the original length of the side of the square in the target bit matrix + the new length of the size of the square in the target bit matrix + the corners of the expanded square + + + + Aztec 2D code representation + + Rustam Abdullaev + + + + Compact or full symbol indicator + + + + + Size in pixels (width and height) + + + + + Number of levels + + + + + Number of data codewords + + + + + The symbol image + + + + + represents a token for a binary shift + + + + + initializing constructor + + + + + + + + appends the byte array to the BitArray + + + + + + + string representation + + + + + + Generates Aztec 2D barcodes. + + Rustam Abdullaev + + + + Encodes the given binary content as an Aztec symbol + + input data string + Aztec symbol matrix with metadata + + + + Encodes the given binary content as an Aztec symbol + + input data string + minimal percentage of error check words (According to ISO/IEC 24778:2008, + a minimum of 23% + 3 words is recommended) + if non-zero, a user-specified value for the number of layers + + Aztec symbol matrix with metadata + + + + + This produces nearly optimal encodings of text into the first-level of + encoding used by Aztec code. + It uses a dynamic algorithm. For each prefix of the string, it determines + a set of encodings that could lead to this prefix. We repeatedly add a + character and generate a new set of optimal encodings until we have read + through the entire input. + @author Frank Yellin + @author Rustam Abdullaev + + + + + + + + + + + Convert the text represented by this High Level Encoder into a BitArray. + + text represented by this encoder encoded as a + + + + State represents all information about a sequence necessary to generate the current output. + Note that a state is immutable. + + + + + Create a new state representing this state with a latch to a (not + necessary different) mode, and then a code. + + + + + Create a new state representing this state, with a temporary shift + to a different mode to output a single value. + + + + + Create a new state representing this state, but an additional character + output in Binary Shift mode. + + + + + Create the state identical to this one, but we are no longer in + Binary Shift mode. + + + + + Returns true if "this" state is better (or equal) to be in than "that" + state under all possible circumstances. + + + + + This implementation can detect and decode Aztec codes in an image. + + David Olivier + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + a String representing the content encoded by the Data Matrix code + + + + + Locates and decodes a Data Matrix code in an image. + + image of barcode to decode + passed as a {@link java.util.Hashtable} from {@link com.google.zxing.DecodeHintType} + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Aztec result meta data. + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + + + + + + + + + Renders an Aztec code as a + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + The class holds the available options for the + + + + + Representing the minimal percentage of error correction words. + Note: an Aztec symbol should have a minimum of 25% EC words. + + + + + Specifies the required number of layers for an Aztec code: + a negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + a positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + + + +

See + + DoCoMo's documentation about the result types represented by subclasses of this class.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + Implements KDDI AU's address book format. See + + http://www.au.kddi.com/ezfactory/tec/two_dimensions/index.html. + (Thanks to Yuzo for translating!) + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Implements the "MECARD" address book entry format. + + Supported keys: N, SOUND, TEL, EMAIL, NOTE, ADR, BDAY, URL, plus ORG + Unsupported keys: TEL-AV, NICKNAME + + Except for TEL, multiple values for keys are also not supported; + the first one found takes precedence. + + Our understanding of the MECARD format is based on this document: + + http://www.mobicode.org.tw/files/OMIA%20Mobile%20Bar%20Code%20Standard%20v3.2.1.doc + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes contact information, like that in an address book entry. + + Sean Owen + + + + initializing constructor + + + + + + + + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + the names + + + + + the nicknames + + + + + In Japanese, the name is written in kanji, which can have multiple readings. Therefore a hint + is often provided, called furigana, which spells the name phonetically. + + The pronunciation of the getNames() field, often in hiragana or katakana. + + + + the phone numbers + + + + optional descriptions of the type of each phone number. It could be like "HOME", but, + there is no guaranteed or standard format. + + + + the e-mail addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the instant messenger addresses + + + + + the note field + + + + + the addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the title + + + + + the urls + + + + birthday formatted as yyyyMMdd (e.g. 19780917) + + + a location as a latitude/longitude pair + + + Implements the "BIZCARD" address book entry format, though this has been + largely reverse-engineered from examples observed in the wild -- still + looking for a definitive reference. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a calendar event at a certain time, optionally with attendees and a location. + + Sean Owen + + + + Gets the start. + + + + + Determines whether [is start all day]. + + if start time was specified as a whole day + + + + event end , or null if event has no duration + + + + + Gets a value indicating whether this instance is end all day. + + true if end time was specified as a whole day + + + + Parses a string as a date. RFC 2445 allows the start and end fields to be of type DATE (e.g. 20081021) + or DATE-TIME (e.g. 20081021T123000 for local time, or 20081021T123000Z for UTC). + + The string to parse + + if not a date formatted string + + + + Represents a parsed result that encodes an email message including recipients, subject and body text. + + Sean Owen + + + + the email address + + + + + the TOs + + + + + the CCs + + + + + the BCCs + + + + + the subject + + + + + the body + + + + + the mailto: uri + + + + + Represents a result that encodes an e-mail address, either as a plain address + like "joe@example.org" or a mailto: URL like "mailto:joe@example.org". + + Sean Owen + + + + Implements the "MATMSG" email message entry format. + + Supported keys: TO, SUB, BODY + + Sean Owen + + + + This implements only the most basic checking for an email address's validity -- that it contains + an '@' and contains no characters disallowed by RFC 2822. This is an overly lenient definition of + validity. We want to generally be lenient here since this class is only intended to encapsulate what's + in a barcode, not "judge" it. + + The email. + + true if it is basically a valid email address; otherwise, false. + + + + + Represents a parsed result that encodes extended product information as encoded by the RSS format, like weight, price, dates, etc. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + extension for kilogram weight type + + + + + extension for pounds weight type + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the raw text + + + + + the product id + + + + + the sscc + + + + + the lot number + + + + + the production date + + + + + the packaging date + + + + + the best before date + + + + + the expiration date + + + + + the weight + + + + + the weight type + + + + + the weight increment + + + + + the price + + + + + the price increment + + + + + the price currency + + + + + the uncommon AIs + + + + + the display representation (raw text) + + + + + Parses strings of digits that represent a RSS Extended code. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + tries to parse a text representation to a specific result object + + + + + + + Represents a parsed result that encodes a geographic coordinate, with latitude, longitude and altitude. + + Sean Owen + + + latitude in degrees + + + + longitude in degrees + + + + altitude in meters. If not specified, in the geo URI, returns 0.0 + + + + query string associated with geo URI or null if none exists + + + + the geo URI + + + + a URI link to Google Maps which display the point on the Earth described + by this instance, and sets the zoom level in a way that roughly reflects the + altitude, if specified + + + + Parses a "geo:" URI result, which specifies a location on the surface of + the Earth as well as an optional altitude above the surface. See + + http://tools.ietf.org/html/draft-mayrhofer-geo-uri-00. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a product ISBN number. + + jbreiden@google.com (Jeff Breidenbach) + + + + the ISBN number + + + + Parses strings of digits that represent a ISBN. + + + jbreiden@google.com (Jeff Breidenbach) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + See ISBN-13 For Dummies + + The result. + + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link ResultParser#parseResult(Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Represents the type of data encoded by a barcode -- from plain text, to a + URI, to an e-mail address, etc. + + Sean Owen + + + + Represents a parsed result that encodes a product by an identifier of some kind. + + dswitkin@google.com (Daniel Switkin) + + + + Parses strings of digits that represent a UPC code. + + dswitkin@google.com (Daniel Switkin) + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link #parseResult(com.google.zxing.Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Attempts to parse the raw {@link Result}'s contents as a particular type + of information (email, URL, etc.) and return a {@link ParsedResult} encapsulating + the result of parsing. + + the raw to parse + encapsulating the parsing result + + + + Parses the result. + + The result. + + + +

Parses an "sms:" URI result, which specifies a number to SMS and optional + "via" number. See + the IETF draft on this.

+ +

This actually also parses URIs starting with "mms:", "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + + Represents a parsed result that encodes an SMS message, including recipients, subject and body text. + + Sean Owen + + + +

Parses an "smsto:" URI result, whose format is not standardized but appears to be like: + {@code smsto:number(:body)}.

+

This actually also parses URIs starting with "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+
+ Sean Owen +
+ + +

Parses an "smtp:" URI result, whose format is not standardized but appears to be like: + smtp[:subject[:body]]}.

+

See http://code.google.com/p/zxing/issues/detail?id=536

+
+ Sean Owen +
+ + + Represents a parsed result that encodes a telephone number. + + Sean Owen + + + + Parses a "tel:" URI result, which specifies a phone number. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + A simple result type encapsulating a string that has no further interpretation. + + Sean Owen + + + + A simple result type encapsulating a URI that has no further interpretation. + + Sean Owen + + + true if the URI contains suspicious patterns that may suggest it intends to + mislead the user about its true nature. At the moment this looks for the presence + of user/password syntax in the host/authority portion of a URI which may be used + in attempts to make the URI's host appear to be other than it is. Example: + http://yourbank.com@phisher.com This URI connects to phisher.com but may appear + to connect to yourbank.com at first glance. + + + + Transforms a string that represents a URI into something more proper, by adding or canonicalizing + the protocol. + + + + + Tries to parse results that are a URI of some kind. + + Sean Owen + + + Parses the "URLTO" result format, which is of the form "URLTO:[title]:[url]". + This seems to be used sometimes, but I am not able to find documentation + on its origin or official format? + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Parses contact information formatted according to the VCard (2.1) format. This is not a complete + implementation but should parse information as commonly encoded in 2D barcodes. + + Sean Owen + + + Formats name fields of the form "Public;John;Q.;Reverend;III" into a form like + "Reverend John Q. Public III". + + @param names name values to format, in place + + + + Partially implements the iCalendar format's "VEVENT" format for specifying a + calendar event. See RFC 2445. This supports SUMMARY, DTSTART and DTEND fields. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a Vehicle Identification Number (VIN). + + + + + Detects a result that is likely a vehicle identification number. + @author Sean Owen + + + + + Represents a parsed result that encodes wifi network information, like SSID and password. + + Vikram Aggarwal + + + + + A simple, fast array of bits, represented compactly by an array of ints internally. + + Sean Owen + + + + size of the array, number of elements + + + + + size of the array in bytes + + + + + index accessor + + + + + + + default constructor + + + + + initializing constructor + + desired size of the array + + + + Flips bit i. + + bit to set + + + + + Gets the next set. + + first bit to check + index of first bit that is set, starting from the given index, or size if none are set + at or beyond this given index + + + + see getNextSet(int) + + index to start looking for unset bit + index of next unset bit, or if none are unset until the end + + + Sets a block of 32 bits, starting at bit i. + + + first bit to set + + the new value of the next 32 bits. Note again that the least-significant bit + corresponds to bit i, the next-least-significant to i+1, and so on. + + + + + Sets a range of bits. + + start of range, inclusive. + end of range, exclusive + + + Clears all bits (sets to false). + + + Efficient method to check if a range of bits is set, or not set. + + + start of range, inclusive. + + end of range, exclusive + + if true, checks that bits in range are set, otherwise checks that they are not set + + true iff all bits are set or not set in range, according to value argument + if end is less than start or the range is not contained in the array + + + + Appends the bit. + + The bit. + + + underlying array of ints. The first element holds the first 32 bits, and the least + significant bit is bit 0. + + + + + Appends the least-significant bits, from value, in order from most-significant to + least-significant. For example, appending 6 bits from 0x000001E will append the bits + 0, 1, 1, 1, 1, 0 in that order. + + containing bits to append + bits from value to append + + + + adds the array to the end + + + + + + XOR operation + + + + + + converts to bytes. + + first bit to start writing + array to write into. Bytes are written most-significant byte first. This is the opposite + of the internal representation, which is exposed by BitArray + position in array to start writing + how many bytes to write + + + Reverses all bits in the array. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Erstellt ein neues Objekt, das eine Kopie der aktuellen Instanz darstellt. + + + Ein neues Objekt, das eine Kopie dieser Instanz darstellt. + + + + +

Represents a 2D matrix of bits. In function arguments below, and throughout the common + module, x is the column position, and y is the row position. The ordering is always x, y. + The origin is at the top-left.

+

Internally the bits are represented in a 1-D array of 32-bit ints. However, each row begins + with a new int. This is done intentionally so that we can copy out a row into a BitArray very + efficiently.

+

The ordering of bits is row-major. Within each int, the least significant bits are used first, + meaning they represent lower x values. This is compatible with BitArray's implementation.

+
+ Sean Owen + dswitkin@google.com (Daniel Switkin) +
+ + The width of the matrix + + + + The height of the matrix + + + + This method is for compatibility with older code. It's only logical to call if the matrix + is square, so I'm throwing if that's not the case. + + + row/column dimension of this matrix + + + + + The rowsize of the matrix + + + + + Creates an empty square . + + height and width + + + + Creates an empty square . + + bit matrix width + bit matrix height + + + + Interprets a 2D array of booleans as a , where "true" means an "on" bit. + + bits of the image, as a row-major 2D array. Elements are arrays representing rows + representation of image + + +

Gets the requested bit, where true means black.

+ +
+ The horizontal component (i.e. which column) + + The vertical component (i.e. which row) + + value of given bit in matrix + +
+ + +

Flips the given bit.

+
+ The horizontal component (i.e. which column) + The vertical component (i.e. which row) +
+ + + flip all of the bits, if shouldBeFlipped is true for the coordinates + + should return true, if the bit at a given coordinate should be flipped + + + + Exclusive-or (XOR): Flip the bit in this {@code BitMatrix} if the corresponding + mask bit is set. + + The mask. + + + Clears all bits (sets to false). + + +

Sets a square region of the bit matrix to true.

+ +
+ The horizontal position to begin at (inclusive) + + The vertical position to begin at (inclusive) + + The width of the region + + The height of the region + +
+ + A fast method to retrieve one row of data from the matrix as a BitArray. + + + The row to retrieve + + An optional caller-allocated BitArray, will be allocated if null or too small + + The resulting BitArray - this reference should always be used even when passing + your own row + + + + + Sets the row. + + row to set + {@link BitArray} to copy from + + + + Modifies this {@code BitMatrix} to represent the same but rotated 180 degrees + + + + + This is useful in detecting the enclosing rectangle of a 'pure' barcode. + + {left,top,width,height} enclosing rectangle of all 1 bits, or null if it is all white + + + + This is useful in detecting a corner of a 'pure' barcode. + + {x,y} coordinate of top-left-most 1 bit, or null if it is all white + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + The line separator. + + A that represents this instance. + + + + + Clones this instance. + + + + +

This provides an easy abstraction to read bits at a time from a sequence of bytes, where the + number of bits read is not often a multiple of 8.

+ +

This class is thread-safe but not reentrant. Unless the caller modifies the bytes array + it passed in, in which case all bets are off.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + bytes from which this will read bits. Bits will be read from the first byte first. + Bits are read within a byte from most-significant to least-significant bit. + + + + + index of next bit in current byte which would be read by the next call to {@link #readBits(int)}. + + + + + index of next byte in input byte array which would be read by the next call to {@link #readBits(int)}. + + + + number of bits to read + + int representing the bits read. The bits will appear as the least-significant + bits of the int + + if numBits isn't in [1,32] or more than is available + + + number of bits that can be read successfully + + + + Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1 + of ISO 18004. + + + Sean Owen + + + character set ECI value + representing ECI of given value, or null if it is legal but unsupported + + + character set ECI encoding name + representing ECI for character encoding, or null if it is legalbut unsupported + + + + Encapsulates the result of decoding a matrix of bits. This typically + applies to 2D barcode formats. For now it contains the raw bytes obtained, + as well as a String interpretation of those bytes, if applicable. + Sean Owen + + + + + raw bytes representing the result, or null if not applicable + + + + + how many bits of are valid; typically 8 times its length + + + + + text representation of the result + + + + + list of byte segments in the result, or null if not applicable + + + + + name of error correction level used, or null if not applicable + + + + + gets a value which describe if structure append data was found + + + + + number of errors corrected, or null if not applicable + + + + + gives the sequence number of the result if structured append was found + + + + + number of erasures corrected, or null if not applicable + + + + + gives the parity information if structured append was found + + + + + Miscellanseous data value for the various decoders + + The other. + + + + initializing constructor + + + + + + + + + initializing constructor + + + + + + + + + + + initializing constructor + + + + + + + + + + initializing constructor + + + + + + + + + + + + Defines an container for encoder options + + + + + Gets the data container for all options + + + + + event is raised when a value is changed + + + + + Gets or sets a flag which cause a deeper look into the bitmap + + + true if [try harder]; otherwise, false. + + + + + Image is a pure monochrome image of a barcode. + + + true if monochrome image of a barcode; otherwise, false. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + The character set. + + + + + Image is known to be of one of a few possible formats. + Maps to a {@link java.util.List} of {@link BarcodeFormat}s. + + + The possible formats. + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + true if it should assume a Code 39 check digit; otherwise, false. + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). + + + true if it should assume GS1; otherwise, false. + + + + + Assume MSI codes employ a check digit. Maps to . + + + true if it should assume a MSI check digit; otherwise, false. + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Initializes a new instance of the class. + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Encapsulates the result of detecting a barcode in an image. This includes the raw + matrix of black/white pixels corresponding to the barcode, and possibly points of interest + in the image, like the location of finder patterns or corners of the barcode in the image.

+
+ Sean Owen +
+ + + the detected bits + + + + + the pixel points where the result is found + + + + + initializing constructor + + + + + + + General math-related and numeric utility functions. + + + + + Ends up being a bit faster than {@link Math#round(float)}. This merely rounds its + argument to the nearest int, where x.5 rounds up to x+1. Semantics of this shortcut + differ slightly from {@link Math#round(float)} in that half rounds down for negative + values. -2.5 rounds to -3, not -2. For purposes here it makes no difference. + + real value to round + nearest int + + + + + + + + + + Euclidean distance between points A and B + + + + + + + + + + Euclidean distance between points A and B + + + + + values to sum + sum of values in array + + +

A somewhat generic detector that looks for a barcode-like rectangular region within an image. + It looks within a mostly white region of an image for a region of black and white, but mostly + black. It returns the four corners of the region, as best it can determine.

+ +
+ Sean Owen +
+ + + initializing constructor + + + + + +

Detects a rectangular region of black and white -- mostly black -- with a region of mostly + white, in an image.

+
+ [] describing the corners of the rectangular region. The first and + last points are opposed on the diagonal, as are the second and third. The first point will be + the topmost point and the last, the bottommost. The second point will be leftmost and the + third, the rightmost + +
+ + Attempts to locate a corner of the barcode by scanning up, down, left or right from a center + point which should be within the barcode. + + + center's x component (horizontal) + + same as deltaY but change in x per step instead + + minimum value of x + + maximum value of x + + center's y component (vertical) + + change in y per step. If scanning up this is negative; down, positive; + left or right, 0 + + minimum value of y to search through (meaningless when di == 0) + + maximum value of y + + maximum run of white pixels that can still be considered to be within + the barcode + + a encapsulating the corner that was found + + + + Computes the start and end of a region of pixels, either horizontally or vertically, that could + be part of a Data Matrix barcode. + + + if scanning horizontally, this is the row (the fixed vertical location) + where we are scanning. If scanning vertically it's the column, the fixed horizontal location + + largest run of white pixels that can still be considered part of the + barcode region + + minimum pixel location, horizontally or vertically, to consider + + maximum pixel location, horizontally or vertically, to consider + + if true, we're scanning left-right, instead of up-down + + int[] with start and end of found range, or null if no such range is found + (e.g. only white was found) + + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. By keeping track of the + last black points it encountered, it determines the corners of the barcode. + + David Olivier + + + + Creates a WhiteRectangleDetector instance + + The image. + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + Creates a WhiteRectangleDetector instance + + barcode image to find a rectangle in + initial size of search area around center + x position of search center + y position of search center + + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + + Initializes a new instance of the class. + + The image. + if image is too small + + + + Initializes a new instance of the class. + + The image. + Size of the init. + The x. + The y. + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. + + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + recenters the points of a constant distance towards the center + + bottom most point + left most point + right most point + top most point + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + Determines whether a segment contains a black point + + min value of the scanned coordinate + max value of the scanned coordinate + value of fixed coordinate + set to true if scan must be horizontal, false if vertical + + true if a black point has been found, else false. + + + + + Superclass of classes encapsulating types ECIs, according to "Extended Channel Interpretations" + 5.3 of ISO 18004. + + Sean Owen + + + + the ECI value + + + + ECI value + representing ECI of given value, or null if it is legal but unsupported + ArgumentException if ECI value is invalid + + + + Defines an container for encoder options + + + + + Gets the data container for all options + + + + + Specifies the height of the barcode image + + + + + Specifies the width of the barcode image + + + + + Don't put the content string into the output image. + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + + + + + Specifies whether the data should be encoded to the GS1 standard; + FNC1 character is added in front of the data + + + + + Initializes a new instance of the class. + + + + This Binarizer implementation uses the old ZXing global histogram approach. It is suitable + for low-end mobile devices which don't have enough CPU or memory to use a local thresholding + algorithm. However, because it picks a global black point, it cannot handle difficult shadows + and gradients. + + Faster mobile devices and all desktop applications should probably use HybridBinarizer instead. + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The source. + + + + Applies simple sharpening to the row data to improve performance of the 1D Readers. + + + + + + + + Does not sharpen the data, as this call is intended to only be used by 2D Readers. + + + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + + A new concrete Binarizer implementation object. + + + + Implementations of this class can, given locations of finder patterns for a QR code in an + image, sample the right points in the image to reconstruct the QR code, accounting for + perspective distortion. It is abstracted since it is relatively expensive and should be allowed + to take advantage of platform-specific optimized implementations, like Sun's Java Advanced + Imaging library, but which may not be available in other environments such as J2ME, and vice + versa. + + The implementation used can be controlled by calling {@link #setGridSampler(GridSampler)} + with an instance of a class which implements this interface. + + Sean Owen + + + the current implementation of + + + + Sets the implementation of used by the library. One global + instance is stored, which may sound problematic. But, the implementation provided + ought to be appropriate for the entire platform, and all uses of this library + in the whole lifetime of the JVM. For instance, an Android activity can swap in + an implementation that takes advantage of native platform libraries. + + The platform-specific object to install. + + + +

Samples an image for a square matrix of bits of the given dimension. This is used to extract + the black/white modules of a 2D barcode like a QR Code found in an image. Because this barcode + may be rotated or perspective-distorted, the caller supplies four points in the source image + that define known points in the barcode, so that the image may be sampled appropriately.

+

The last eight "from" parameters are four X/Y coordinate pairs of locations of points in + the image that define some significant points in the image to be sample. For example, + these may be the location of finder pattern in a QR Code.

+

The first eight "to" parameters are four X/Y coordinate pairs measured in the destination + , from the top left, where the known points in the image given by the "from" + parameters map to.

+

These 16 parameters define the transformation needed to sample the image.

+
+ image to sample + The dimension X. + The dimension Y. + The p1 preimage X. + The p1 preimage Y. + The p2 preimage X. + The p2 preimage Y. + The p3 preimage X. + The p3 preimage Y. + The p4 preimage X. + The p4 preimage Y. + The p1 image X. + The p1 image Y. + The p2 image X. + The p2 image Y. + The p3 image X. + The p3 image Y. + The p4 image X. + The p4 image Y. + + representing a grid of points sampled from the image within a region + defined by the "from" parameters + + ReaderException if image can't be sampled, for example, if the transformation defined +
+ + + + + + + + + + + +

Checks a set of points that have been transformed to sample points on an image against + the image's dimensions to see if the point are even within the image.

+ +

This method will actually "nudge" the endpoints back onto the image if they are found to be + barely (less than 1 pixel) off the image. This accounts for imperfect detection of finder + patterns in an image where the QR Code runs all the way to the image border.

+ +

For efficiency, the method will check points from either end of the line until one is found + to be within the image. Because the set of points are assumed to be linear, this is valid.

+ +
+ image into which the points should map + + actual points in x1,y1,...,xn,yn form + +
+ + This class implements a local thresholding algorithm, which while slower than the + GlobalHistogramBinarizer, is fairly efficient for what it does. It is designed for + high frequency images of barcodes with black data on white backgrounds. For this application, + it does a much better job than a global blackpoint with severe shadows and gradients. + However it tends to produce artifacts on lower frequency images and is therefore not + a good general purpose binarizer for uses outside ZXing. + + This class extends GlobalHistogramBinarizer, using the older histogram approach for 1D readers, + and the newer local approach for 2D readers. 1D decoding using a per-row histogram is already + inherently local, and only fails for horizontal gradients. We can revisit that problem later, + but for now it was not a win to use local blocks for 1D. + + This Binarizer is the default for the unit tests and the recommended class for library users. + dswitkin@google.com (Daniel Switkin) + + + + + gives the black matrix + + + + + initializing constructor + + + + + + creates a new instance + + + + + + + Calculates the final BitMatrix once for all requests. This could be called once from the + constructor instead, but there are some advantages to doing it lazily, such as making + profiling easier, and not doing heavy lifting when callers don't expect it. + + + + + For each 8x8 block in the image, calculate the average black point using a 5x5 grid + of the blocks around it. Also handles the corner cases (fractional blocks are computed based + on the last 8 pixels in the row/column which are also used in the previous block). + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + The black points. + The matrix. + + + + Applies a single threshold to an 8x8 block of pixels. + + The luminances. + The xoffset. + The yoffset. + The threshold. + The stride. + The matrix. + + + + Calculates a single black point for each 8x8 block of pixels and saves it away. + See the following thread for a discussion of this algorithm: + http://groups.google.com/group/zxing/browse_thread/thread/d06efa2c35a7ddc0 + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + + + +

This class implements a perspective transform in two dimensions. Given four source and four + destination points, it will compute the transformation implied between them. The code is based + directly upon section 3.4.2 of George Wolberg's "Digital Image Warping"; see pages 54-56.

+
+ Sean Owen +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Convenience method, not optimized for performance. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

This class contains utility methods for performing mathematical operations over + the Galois Fields. Operations use a given primitive polynomial in calculations.

+

Throughout this package, elements of the GF are represented as an {@code int} + for convenience and speed (but at the cost of memory). +

+
+ Sean Owen +
+ + + Create a representation of GF(size) using the given primitive polynomial. + + irreducible polynomial whose coefficients are represented by + * the bits of an int, where the least-significant bit represents the constant + * coefficient + the size of the field + the factor b in the generator polynomial can be 0- or 1-based + * (g(x) = (x+a^b)(x+a^(b+1))...(x+a^(b+2t-1))). + * In most cases it should be 1, but for QR code it is 0. + + + + Builds the monomial. + + The degree. + The coefficient. + the monomial representing coefficient * x^degree + + + + Implements both addition and subtraction -- they are the same in GF(size). + + sum/difference of a and b + + + + Exps the specified a. + + 2 to the power of a in GF(size) + + + + Logs the specified a. + + A. + base 2 log of a in GF(size) + + + + Inverses the specified a. + + multiplicative inverse of a + + + + Multiplies the specified a with b. + + A. + The b. + product of a and b in GF(size) + + + + Gets the size. + + + + + Gets the generator base. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + +

Represents a polynomial whose coefficients are elements of a GF. + Instances of this class are immutable.

+

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + the {@link GenericGF} instance representing the field to use + to perform computations + coefficients as ints representing elements of GF(size), arranged + from most significant (highest-power term) coefficient to least significant + if argument is null or empty, + or if leading coefficient is 0 and this is not a + constant polynomial (that is, it is not the monomial "0") + + + + degree of this polynomial + + + + + Gets a value indicating whether this is zero. + + true iff this polynomial is the monomial "0" + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + +

Implements Reed-Solomon decoding, as the name implies.

+ +

The algorithm will not be explained here, but the following references were helpful + in creating this implementation:

+ + + +

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+ +
+ Sean Owen + William Rucklidge + sanfordsquires +
+ + +

Decodes given set of received codewords, which include both data and error-correction + codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place, + in the input.

+
+ data and error-correction codewords + number of error-correction codewords available + false: decoding fails +
+ + + Implements Reed-Solomon encoding, as the name implies. + + Sean Owen + William Rucklidge + + + + Common string-related functions. + + Sean Owen + Alex Dupre + + + + SJIS + + + + + GB2312 + + + + + Guesses the encoding. + + bytes encoding a string, whose encoding should be guessed + decode hints if applicable + name of guessed encoding; at the moment will only guess one of: + {@link #SHIFT_JIS}, {@link #UTF8}, {@link #ISO88591}, or the platform + default encoding if none of these can possibly be correct + + + + This implementation can detect and decode Data Matrix codes in an image. + + bbrown@google.com (Brian Brown) + + + + + Locates and decodes a Data Matrix code in an image. + + + a String representing the content encoded by the Data Matrix code + + + + Locates and decodes a Data Matrix code in an image. + + + + a String representing the content encoded by the Data Matrix code + + + + does nothing here + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a Data Matrix code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + Guillaume Le Biller Added to zxing lib. + + + + encodes the content to a BitMatrix + + + + + + + + + + encodes the content to a BitMatrix + + + + + + + + + + + Encode the given symbol info to a bit matrix. + + The DataMatrix placement. + The symbol info to encode. + + + The bit matrix generated. + + + + Convert the ByteMatrix to BitMatrix. + + The input matrix. + The requested width of the image (in pixels) with the Datamatrix code + The requested height of the image (in pixels) with the Datamatrix code + The output matrix. + + + + bbrown@google.com (Brian Brown) + + + + + to parse + if dimension is < 8 or > 144 or not 0 mod 2 + + + + +

Creates the version object based on the dimension of the original bit matrix from + the datamatrix code.

+ +

See ISO 16022:2006 Table 7 - ECC 200 symbol attributes

+ + Original including alignment patterns + encapsulating the Data Matrix Code's "version" + if the dimensions of the mapping matrix are not valid + Data Matrix dimensions. +
+
+ + +

Reads the bits in the representing the mapping matrix (No alignment patterns) + in the correct order in order to reconstitute the codewords bytes contained within the + Data Matrix Code.

+ + bytes encoded within the Data Matrix Code + if the exact number of bytes expected is not read +
+
+ + +

Reads a bit of the mapping matrix accounting for boundary wrapping.

+ + Row to read in the mapping matrix + Column to read in the mapping matrix + Number of rows in the mapping matrix + Number of columns in the mapping matrix + value of the given bit in the mapping matrix +
+
+ + +

Reads the 8 bits of the standard Utah-shaped pattern.

+ +

See ISO 16022:2006, 5.8.1 Figure 6

+ + Current row in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Current column in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the utah shape +
+
+ + +

Reads the 8 bits of the special corner condition 1.

+ +

See ISO 16022:2006, Figure F.3

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 1 +
+
+ + +

Reads the 8 bits of the special corner condition 2.

+ +

See ISO 16022:2006, Figure F.4

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 2 +
+
+ + +

Reads the 8 bits of the special corner condition 3.

+ +

See ISO 16022:2006, Figure F.5

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 3 +
+
+ + +

Reads the 8 bits of the special corner condition 4.

+ +

See ISO 16022:2006, Figure F.6

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 4 +
+
+ + +

Extracts the data region from a that contains + alignment patterns.

+ + Original with alignment patterns + BitMatrix that has the alignment patterns removed +
+
+ + +

Encapsulates a block of data within a Data Matrix Code. Data Matrix Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ + bbrown@google.com (Brian Brown) +
+
+ + +

When Data Matrix Codes use multiple data blocks, they actually interleave the bytes of each of them. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ + bytes as read directly from the Data Matrix Code + version of the Data Matrix Code + DataBlocks containing original bytes, "de-interleaved" from representation in the + Data Matrix Code +
+
+ + +

Data Matrix Codes can encode text as bits in one of several modes, and can use multiple modes + in one Data Matrix Code. This class decodes the bits back into text.

+ +

See ISO 16022:2006, 5.2.1 - 5.2.9.2

+ + bbrown@google.com (Brian Brown) + Sean Owen +
+
+ + + See ISO 16022:2006, Annex C Table C.1 + The C40 Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, Annex C Table C.2 + The Text Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, 5.2.3 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.5 and Annex C, Table C.1 + + + + + See ISO 16022:2006, 5.2.6 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.7 + + + + + See ISO 16022:2006, 5.2.8 and Annex C Table C.3 + + + + + See ISO 16022:2006, 5.2.9 and Annex B, B.2 + + + + + See ISO 16022:2006, Annex B, B.2 + + + + +

The main class which implements Data Matrix Code decoding -- as opposed to locating and extracting + the Data Matrix Code from an image.

+ + bbrown@google.com (Brian Brown) +
+
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a Data Matrix Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+ + booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code + if the Data Matrix Code cannot be decoded +
+
+ + +

Decodes a Data Matrix Code represented as a . A 1 or "true" is taken + to mean a black module.

+
+ booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+ + data and error correction codewords + number of codewords that are data bytes +
+
+ + + The Version object encapsulates attributes about a particular + size Data Matrix Code. + + bbrown@google.com (Brian Brown) + + + + + returns the version numer + + + + + + returns the symbol size rows + + + + + + returns the symbols size columns + + + + + + retursn the data region size rows + + + + + + returns the data region size columns + + + + + + returns the total codewords count + + + + + +

Deduces version information from Data Matrix dimensions.

+ + Number of rows in modules + Number of columns in modules + Version for a Data Matrix Code of those dimensions + if dimensions do correspond to a valid Data Matrix size +
+
+ + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the Data Matrix code version's format.

+
+
+ + + returns the version number as string + + + + + + See ISO 16022:2006 5.5.1 Table 7 + + + + +

Encapsulates logic that can detect a Data Matrix Code in an image, even if the Data Matrix Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + +

Detects a Data Matrix Code in an image.

+
+ encapsulating results of detecting a Data Matrix Code or null +
+ + + Calculates the position of the white top right module using the output of the rectangle detector + for a rectangular matrix + + + + + Calculates the position of the white top right module using the output of the rectangle detector + for a square matrix + + + + + Increments the Integer associated with a key by one. + + + + + Counts the number of black/white transitions between two points, using something like Bresenham's algorithm. + + + + + Simply encapsulates two points and a number of transitions between them. + + + + + Orders ResultPointsAndTransitions by number of transitions, ascending. + + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Symbol Character Placement Program. Adapted from Annex M.1 in ISO/IEC 16022:2000(E). + + + + + Main constructor + + the codewords to place + the number of columns + the number of rows + + + + Places the 8 bits of a utah-shaped symbol character in ECC200. + + The row. + The col. + character position + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Enumeration for encodation types + + + + + Error Correction Code for ECC200. + + + + + Lookup table which factors to use for which number of error correction codewords. + See FACTORS. + + + + + Precomputed polynomial factors for ECC 200. + + + + + Creates the ECC200 error correction for an encoded message. + + The codewords. + information about the symbol to be encoded + the codewords with interleaved error correction. + + + + DataMatrix ECC 200 data encoder following the algorithm described in ISO/IEC 16022:200(E) in + annex S. + + + + + Padding character + + + + + mode latch to C40 encodation mode + + + + + mode latch to Base 256 encodation mode + + + + + FNC1 Codeword + + + + + Structured Append Codeword + + + + + Reader Programming + + + + + Upper Shift + + + + + 05 Macro + + + + + 06 Macro + + + + + mode latch to ANSI X.12 encodation mode + + + + + mode latch to Text encodation mode + + + + + mode latch to EDIFACT encodation mode + + + + + ECI character (Extended Channel Interpretation) + + + + + Unlatch from C40 encodation + + + + + Unlatch from X12 encodation + + + + + 05 Macro header + + + + + 06 Macro header + + + + + Macro trailer + + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + the encoded message (the char values range from 0 to 255) + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + requested shape. May be {@code SymbolShapeHint.FORCE_NONE},{@code SymbolShapeHint.FORCE_SQUARE} or {@code SymbolShapeHint.FORCE_RECTANGLE}. + the minimum symbol size constraint or null for no constraint + the maximum symbol size constraint or null for no constraint + encoding mode to start with + the encoded message (the char values range from 0 to 255) + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + Symbol info table for DataMatrix. + + + + Overrides the symbol info set used by this class. Used for testing purposes. + + @param override the symbol info set to use + + + + Enumeration for DataMatrix symbol shape hint. It can be used to force square or rectangular + symbols. + + + + + The class holds the available options for the DatamatrixWriter + + + + + Specifies the matrix shape for Data Matrix + + + + + Specifies a minimum barcode size + + + + + Specifies a maximum barcode size + + + + + Specifies the default encodation + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + implements an Intelligent Mail barcode + Rishabh Hatgadkar + + + + + mike32767 + Manuel Kasten + + + + + to parse + + + + +

MaxiCodes can encode text or structured information as bits in one of several modes, + with multiple character sets in one code. This class decodes the bits back into text.

+ + mike32767 + Manuel Kasten +
+
+ + +

The main class which implements MaxiCode decoding -- as opposed to locating and extracting + the MaxiCode from an image.

+ + Manuel Kasten +
+
+ + + This implementation can detect and decode a MaxiCode in an image. + + + + + Locates and decodes a MaxiCode in an image. + + a String representing the content encoded by the MaxiCode + if a MaxiCode cannot be decoded + + + + + Locates and decodes a MaxiCode within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + + This class attempts to decode a barcode from an image, not by scanning the whole image, + but by scanning subsets of the image. This is important when there may be multiple barcodes in + an image, and detecting a barcode may find parts of multiple barcode and fail to decode + (e.g. QR Codes). Instead this scans the four quadrants of the image -- and also the center + 'quadrant' to cover the case where a barcode is found in the center. + + + + + + Initializes a new instance of the class. + + The @delegate. + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Attempts to locate multiple barcodes in an image by repeatedly decoding portion of the image. + After one barcode is found, the areas left, above, right and below the barcode's + {@link com.google.zxing.ResultPoint}s are scanned, recursively.

+

A caller may want to also employ {@link ByQuadrantReader} when attempting to find multiple + 2D barcodes, like QR Codes, in an image, where the presence of multiple barcodes might prevent + detecting any one of them.

+

That is, instead of passing a {@link Reader} a caller might pass + new ByQuadrantReader(reader).

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The @delegate. + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Implementation of this interface attempt to read several barcodes from one image. + Sean Owen + + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + +

Encapsulates logic that can detect one or more QR Codes in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+ + Sean Owen + Hannes Erven +
+
+ + + Initializes a new instance of the class. + + The image. + + + + Detects the multi. + + The hints. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +

In contrast to , this class will return an array of all possible + QR code locations in the image.

+ +

Use the TRY_HARDER hint to ask for a more thorough detection.

+ + Sean Owen + Hannes Erven +
+
+ + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF_PERCENT percent in their + estimated modules sizes. + + + + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF pixels/module in their + estimated modules sizes. + + + + + A comparator that orders FinderPatterns by their estimated module size. + + + + +

Creates a finder that will search the image for three finder patterns.

+ + image to search +
+
+ + + + the 3 best s from our list of candidates. The "best" are + those that have been detected at least CENTER_QUORUM times, and whose module + size differs from the average among those patterns the least + + + + + This implementation can detect and decode multiple QR Codes in an image. + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + +

Decodes Codabar barcodes.

+ + Bas Vijfwinkel +
+
+ + These represent the encodings of characters, as patterns of wide and narrow bars. The 7 least-significant bits of + each int correspond to the pattern of wide and narrow, with 1s representing "wide" and 0s representing narrow. + + + + Records the size of all runs of white and black pixels, starting with white. + This is just like recordPattern, except it records all the counters, and + uses our builtin "counters" member for storage. + + row to count from + + + + This class renders CodaBar as []. + + dsbnatut@gmail.com (Kazuki Nishiura) + + + + The class holds the available options for the QrCodeWriter + + + + + if true, don't switch to codeset C for numbers + + + + +

Decodes Code 128 barcodes.

+ + Sean Owen +
+
+ + + This object renders a CODE128 code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + +

Decodes Code 39 barcodes. Supports "Full ASCII Code 39" if USE_CODE_39_EXTENDED_MODE is set.

+ Sean Owen + @see Code93Reader +
+
+ + + Returns a string with all possible characters + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. It will not decoded "extended Code 39" sequences. + + + + + Creates a reader that can be configured to check the last character as a check digit. + It will not decoded "extended Code 39" sequences. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + + Creates a reader that can be configured to check the last character as a check digit, + or optionally attempt to decode "extended Code 39" sequences that are used to encode + the full ASCII character set. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + if true, will attempt to decode extended Code 39 sequences in the text. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a CODE39 code as a . + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Decodes Code 93 barcodes.

+ Sean Owen + +
+
+ + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a CODE93 code as a BitMatrix + + + + + + output to append to + start position + pattern to append + unused + 9 + + + +

Implements decoding of the EAN-13 format.

+ + dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Initializes a new instance of the class. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + Get the format of this decoder. + The 1D format. + + + + + Based on pattern of odd-even ('L' and 'G') patterns used to encoded the explicitly-encoded + digits in a barcode, determines the implicitly encoded first digit and adds it to the + result string. + + string to insert decoded first digit into + int whose bits indicates the pattern of odd/even L/G patterns used to + encode digits + -1 if first digit cannot be determined + + + + This object renders an EAN13 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Implements decoding of the EAN-8 format.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Get the format of this decoder. + The 1D format. + + + + + This object renders an EAN8 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + + + a byte array of horizontal pixels (false = white, true = black) + + + + + Records EAN prefix to GS1 Member Organization, where the member organization + correlates strongly with a country. This is an imperfect means of identifying + a country of origin by EAN-13 barcode value. See + + http://en.wikipedia.org/wiki/List_of_GS1_country_codes. + + Sean Owen + + + + +

Implements decoding of the ITF format, or Interleaved Two of Five.

+ +

This Reader will scan ITF barcodes of certain lengths only. + At the moment it reads length 6, 8, 10, 12, 14, 16, 18, 20, 24, 44 and 48 as these have appeared "in the wild". Not all + lengths are scanned, especially shorter ones, to avoid false positives. This in turn is due to a lack of + required checksum function.

+ +

The checksum is optional and is not applied by this Reader. The consumer of the decoded + value will have to apply a checksum if required.

+ +

http://en.wikipedia.org/wiki/Interleaved_2_of_5 + is a great reference for Interleaved 2 of 5 information.

+ + kevin.osullivan@sita.aero, SITA Lab. +
+
+ + + Valid ITF lengths. Anything longer than the largest value is also allowed. + + + + + Start/end guard pattern. + + Note: The end pattern is reversed because the row is reversed before + searching for the END_PATTERN + + + + + Patterns of Wide / Narrow lines to indicate each digit + + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + + row of black/white values to search + offset of start pattern + The payload end. + to append decoded chars to + + false, if decoding could not complete successfully + + + + + Identify where the start of the middle / payload section starts. + + row of black/white values to search + Array, containing index of start of 'start block' and end of 'start block' + + + + The start & end patterns must be pre/post fixed by a quiet zone. This + zone must be at least 10 times the width of a narrow line. Scan back until + we either get to the start of the barcode or match the necessary number of + quiet zone pixels. + + Note: Its assumed the row is reversed when using this method to find + quiet zone after the end pattern. + + ref: http://www.barcode-1.net/i25code.html + + bit array representing the scanned barcode. + index into row of the start or end pattern. + false, if the quiet zone cannot be found + + + + Skip all whitespace until we get to the first black line. + + row of black/white values to search + index of the first black line or -1 if no black lines are found in the row. + + + + Identify where the end of the middle / payload section ends. + + row of black/white values to search + Array, containing index of start of 'end block' and end of 'end + block' or null, if nothing found + + + + + row of black/white values to search + position to start search + pattern of counts of number of black and white pixels that are being searched for as a pattern + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a sequence of ITF black/white lines into single + digit. + + the counts of runs of observed black/white/black/... values + The decoded digit + + false, if digit cannot be decoded + + + + + This object renders a ITF code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code bool[]} of horizontal pixels (false = white, true = black) + + + + + + + Decodes MSI barcodes. + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. + + + + + Creates a reader that can be configured to check the last character as a check digit, + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a MSI code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

A reader that can read all available UPC/EAN formats. If a caller wants to try to + read all such formats, it is most efficient to use this implementation rather than invoke + individual readers.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Encapsulates functionality and implementation that is common to one-dimensional barcodes.

+ dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + a byte array of horizontal pixels (0 = white, 1 = black) + + + + Appends the given pattern to the target array starting at pos. + + encode black/white pattern into this array + position to start encoding at in target + lengths of black/white runs to encode + starting color - false for white, true for black + the number of elements added to target. + + + + Gets the default margin. + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + + barcode contents to encode + a bool[] of horizontal pixels (false = white, true = black) + + + + Calculates the checksum digit modulo10. + + The contents. + + + + + Encapsulates functionality and implementation that is common to all families + of one-dimensional barcodes. + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + + + + + + + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + Note that we don't try rotation without the try harder flag, even if rotation was supported. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + We're going to examine rows from the middle outward, searching alternately above and below the + middle, and farther out each time. rowStep is the number of rows between each successive + attempt above and below the middle. So we'd scan row middle, then middle - rowStep, then + middle + rowStep, then middle - (2 * rowStep), etc. + rowStep is bigger as the image is taller, but is always at least 1. We've somewhat arbitrarily + decided that moving up and down by about 1/16 of the image is pretty good; we try more of the + image if "trying harder". + + The image to decode + Any hints that were requested + The contents of the decoded barcode + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the pattern in reverse. + + The row. + The start. + The counters. + + + + + Determines how closely a set of observed counts of runs of black/white values matches a given + target pattern. This is reported as the ratio of the total variance from the expected pattern + proportions across all pattern elements, to the length of the pattern. + + observed counters + expected pattern + The most any counter can differ before we give up + ratio of total variance between counters and pattern compared to total pattern size, + where the ratio has been multiplied by 256. So, 0 means no variance (perfect match); 256 means + the total variance between counters and patterns equals the pattern length, higher values mean + even more variance + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + This object renders a Plessey code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + Superclass of implementations that read barcodes in the RSS family of formats. + + + + + Initializes a new instance of the class. + + + + + Gets the decode finder counters. + + + + + + Gets the data character counters. + + + + + + Gets the odd rounding errors. + + + + + + Gets the even rounding errors. + + + + + + Gets the odd counts. + + + + + + Gets the even counts. + + + + + + Parses the finder value. + + The counters. + The finder patterns. + The value. + + + + + Counts the specified array. + + The array. + + + + + Increments the specified array. + + The array. + The errors. + + + + Decrements the specified array. + + The array. + The errors. + + + + Determines whether [is finder pattern] [the specified counters]. + + The counters. + + true if [is finder pattern] [the specified counters]; otherwise, false. + + + + + Encapsulates a since character value in an RSS barcode, including its checksum information. + + + + + Gets the value. + + + + + Gets the checksum portion. + + + + + Initializes a new instance of the class. + + The value. + The checksum portion. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Gets the information. + + + + + + Parses the information. + + + + + + Creates the decoder. + + The information. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + One row of an RSS Expanded Stacked symbol, consisting of 1+ expanded pairs. + + + + + Did this row of the image have to be reversed (mirrored) to recognize the pairs? + + + + + Two rows are equal if they contain the same pairs in the same order. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Encapsulates an RSS barcode finder pattern, including its start/end position and row. + + + + + Gets the value. + + + + + Gets the start end. + + + + + Gets the result points. + + + + + Initializes a new instance of the class. + + The value. + The start end. + The start. + The end. + The row number. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Decodes RSS-14, including truncated and stacked variants. See ISO/IEC 24724:2006. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Adapted from listings in ISO/IEC 24724 Appendix B and Appendix G. + + + + + Gets the RS svalue. + + The widths. + Width of the max. + if set to true [no narrow]. + + + + +

Implements decoding of the UPC-A format.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen +
+
+ + +

Like decodeRow(int, BitArray, java.util.Map), but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ + + + + +
+ + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Decodes the specified image. + + The image. + The hints. + + + + + Get the format of this decoder. + The 1D format. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + This object renders a UPC-A code as a . + qwandor@google.com (Andrew Walbran) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + @see UPCEANExtension5Support + + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + + + @see UPCEANExtension2Support + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + one {@link ResultMetadataType} to appropriate value, or {@code null} if not known + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Start/end guard pattern. + + + + + Pattern marking the middle of a UPC/EAN pattern, separating the two halves. + + + + + end guard pattern. + + + + + "Odd", or "L" patterns used to encode UPC/EAN digits. + + + + + As above but also including the "even", or "G" patterns used to encode UPC/EAN digits. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + +

Like , but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ row index into the image + encoding of the row of the barcode image + start/end column where the opening start pattern was found + optional hints that influence decoding + encapsulating the result of decoding a barcode in the row +
+ + + + string of digits to check + see + + + + Computes the UPC/EAN checksum on a string of digits, and reports + whether the checksum is correct or not. + + string of digits to check + true iff string of digits passes the UPC/EAN checksum algorithm + + + + Decodes the end. + + The row. + The end start. + + + + + + row of black/white values to search + position to start search + if true, indicates that the pattern specifies white/black/white/... + pixel counts, otherwise, it is interpreted as black/white/black/... + pattern of counts of number of black and white pixels that are being + searched for as a pattern + array of counters, as long as pattern, to re-use + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a single UPC/EAN-encoded digit. + + row of black/white values to decode + the counts of runs of observed black/white/black/... values + horizontal offset to start decoding from + the set of patterns to use to decode -- sometimes different encodings + for the digits 0-9 are used, and this indicates the encodings for 0 to 9 that should + be used + horizontal offset of first pixel beyond the decoded digit + + + + Get the format of this decoder. + + The 1D format. + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ aripollak@gmail.com (Ari Pollak) + dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Gets the default margin. + + + + +

Implements decoding of the UPC-E format.

+

Thisis a great reference for + UPC-E information.

+ Sean Owen +
+
+ + + The pattern that marks the middle, and end, of a UPC-E pattern. + There is no "second half" to a UPC-E barcode. + + + + + See L_AND_G_PATTERNS these values similarly represent patterns of + even-odd parity encodings of digits that imply both the number system (0 or 1) + used, and the check digit. + + + + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Decodes the end. + + The row. + The end start. + + + + + see checkStandardUPCEANChecksum(String) + + + + + + + Determines the num sys and check digit. + + The result string. + The lg pattern found. + + + + + Get the format of this decoder. + The 1D format. + + + + + Expands a UPC-E value back into its full, equivalent UPC-A code value. + + UPC-E code as string of digits + equivalent UPC-A code as string of digits + + + + + This object renders an UPC-E code as a {@link BitMatrix}. + @author 0979097955s@gmail.com (RX) + + + + + Metadata about a PDF417 Barcode + + Guenther Grau + + + + A Barcode Value for the PDF417 barcode. + The scanner will iterate through the bitmatrix, + and given the different methods or iterations + will increment a given barcode value's confidence. + + When done, this will return the values of highest confidence. + + Guenther Grau + + + + Incremenets the Confidence for a given value. (Adds an occurance of a value) + + + Value. + + + + Determines the maximum occurrence of a set value and returns all values which were set with this occurrence. + + an array of int, containing the values with the highest occurrence, or null, if no value was set. + + + + Returns the confience value for a given barcode value + + Barcode value. + + + + A Bounding Box helper class + + Guenther Grau + + + + Initializes a new instance of the class. + returns null if the corner points don't match up correctly + + The image. + The top left. + The bottom left. + The top right. + The bottom right. + + + + + Creates the specified box. + + The box. + + + + + Initializes a new instance of the class. + Will throw an exception if the corner points don't match up correctly + + Image. + Top left. + Top right. + Bottom left. + Bottom right. + + + + Merge two Bounding Boxes, getting the left corners of left, and the right corners of right + (Images should be the same) + + Left. + Right. + + + + Adds the missing rows. + + The missing rows. + Missing start rows. + Missing end rows. + If set to true is left. + + + + Calculates the minimum and maximum X & Y values based on the corner points. + + + + + If we adjust the width, set a new right corner coordinate and recalculate + + Bottom right. + + + + A Codeword in the PDF417 barcode + + Guenther Grau + + + + Default value for the RowNumber (-1 being an invalid real number) + + + + + Initializes a new instance of the class. + + Start x. + End x. + Bucket. + Value. + + + + Gets the width. + + The width. + + + + Gets a value indicating whether this instance has valid row number. + + true if this instance has valid row number; otherwise, false. + + + + Determines whether this instance is valid row number the specified rowNumber. + + true if this instance is valid row number the specified rowNumber; otherwise, false. + Row number. + + + + Sets the row number as the row's indicator column. + + + + + Returns a that represents the current . + + A that represents the current . + + + +

This class contains the methods for decoding the PDF417 codewords.

+ + SITA Lab (kevin.osullivan@sita.aero) +
+
+ + + Table containing values for the exponent of 900. + This is used in the numeric compaction decode algorithm. + + + + + Text Compaction mode (see 5.4.1.5) permits all printable ASCII characters to be + encoded, i.e. values 32 - 126 inclusive in accordance with ISO/IEC 646 (IRV), as + well as selected control characters. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + The Text Compaction mode includes all the printable ASCII characters + (i.e. values from 32 to 126) and three ASCII control characters: HT or tab + (ASCII value 9), LF or line feed (ASCII value 10), and CR or carriage + return (ASCII value 13). The Text Compaction mode also includes various latch + and shift characters which are used exclusively within the mode. The Text + Compaction mode encodes up to 2 characters per codeword. The compaction rules + for converting data into PDF417 codewords are defined in 5.4.2.2. The sub-mode + switches are defined in 5.4.2.3. + + The text compaction data. + The byte compaction data if there + was a mode shift. + The size of the text compaction and byte compaction data. + The decoded data is appended to the result. + + + + + Byte Compaction mode (see 5.4.3) permits all 256 possible 8-bit byte values to be encoded. + This includes all ASCII characters value 0 to 127 inclusive and provides for international + character set support. + + The byte compaction mode i.e. 901 or 924 + The array of codewords (data + error) + Currently active character encoding + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Numeric Compaction mode (see 5.4.4) permits efficient encoding of numeric data strings. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Convert a list of Numeric Compacted codewords from Base 900 to Base 10. + EXAMPLE + Encode the fifteen digit numeric string 000213298174000 + Prefix the numeric string with a 1 and set the initial value of + t = 1 000 213 298 174 000 + Calculate codeword 0 + d0 = 1 000 213 298 174 000 mod 900 = 200 + + t = 1 000 213 298 174 000 div 900 = 1 111 348 109 082 + Calculate codeword 1 + d1 = 1 111 348 109 082 mod 900 = 282 + + t = 1 111 348 109 082 div 900 = 1 234 831 232 + Calculate codeword 2 + d2 = 1 234 831 232 mod 900 = 632 + + t = 1 234 831 232 div 900 = 1 372 034 + Calculate codeword 3 + d3 = 1 372 034 mod 900 = 434 + + t = 1 372 034 div 900 = 1 524 + Calculate codeword 4 + d4 = 1 524 mod 900 = 624 + + t = 1 524 div 900 = 1 + Calculate codeword 5 + d5 = 1 mod 900 = 1 + t = 1 div 900 = 0 + Codeword sequence is: 1, 624, 434, 632, 282, 200 + + Decode the above codewords involves + 1 x 900 power of 5 + 624 x 900 power of 4 + 434 x 900 power of 3 + + 632 x 900 power of 2 + 282 x 900 power of 1 + 200 x 900 power of 0 = 1000213298174000 + + Remove leading 1 => Result is 000213298174000 + The array of codewords + The number of codewords + The decoded string representing the Numeric data. + + + + + + + Guenther Grau + + + + Returns the DetectionResult Columns. This does a fair bit of calculation, so call it sparingly. + + The detection result columns. + + + + Adjusts the indicator column row numbers. + + Detection result column. + + + + return number of codewords which don't have a valid row number. Note that the count is not accurate as codewords . + will be counted several times. It just serves as an indicator to see when we can stop adjusting row numbers + + The row numbers. + + + + Adjusts the row numbers by row. + + The row numbers by row. + + + + Adjusts the row numbers from both Row Indicators + + zero + + + + Adjusts the row numbers from Right Row Indicator. + + The unadjusted row count. + + + + Adjusts the row numbers from Left Row Indicator. + + Unadjusted row Count. + + + + Adjusts the row number if valid. + + The invalid rows + Row indicator row number. + Invalid row counts. + Codeword. + + + + Adjusts the row numbers. + + Barcode column. + Codewords row. + Codewords. + + + + Adjusts the row number. + + true, if row number was adjusted, false otherwise. + Codeword. + Other codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + The maximum distance to search in the codeword array in both the positive and negative directions + + + + + The Bounding Box around the column (in the BitMatrix) + + The box. + + + + The Codewords the Box encodes for, offset by the Box minY. + Remember to Access this ONLY through GetCodeword(imageRow) if you're accessing it in that manner. + + The codewords. + + + + Initializes a new instance of the class. + + The Bounding Box around the column (in the BitMatrix) + + + + Converts the Image's Row to the index in the Codewords array + + The Codeword Index. + Image row. + + + + Converts the Codeword array index into a Row in the Image (BitMatrix) + + The Image Row. + Codeword index. + + + + Gets the codeword for a given row + + The codeword. + Image row. + + + + Gets the codeword closest to the specified row in the image + + Image row. + + + + Sets the codeword for an image row + + Image row. + Codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + Gets or sets a value indicating whether this instance is the left indicator + + true if this instance is left; otherwise, false. + + + + Initializes a new instance of the class. + + Box. + If set to true is left. + + + + Sets the Row Numbers as Inidicator Columns + + + + + TODO implement properly + TODO maybe we should add missing codewords to store the correct row number to make + finding row numbers for other columns easier + use row height count to make detection of invalid row numbers more reliable + + The indicator column row numbers. + Metadata. + + + + Gets the row heights. + + The row heights. + + + + Adjusts the in omplete indicator column row numbers. + + Metadata. + + + + Gets the barcode metadata. + + The barcode metadata. + + + + Prune the codewords which do not match the metadata + TODO Maybe we should keep the incorrect codewords for the start and end positions? + + Codewords. + Metadata. + + + + Returns a that represents the current . + + A that represents the current . + + + +

PDF417 error correction implementation.

+

This example + is quite useful in understanding the algorithm.

+ Sean Owen + +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the specified received. + + received codewords + number of those codewords used for EC + location of erasures + The error locations count. + + + + + Runs the euclidean algorithm (Greatest Common Divisor) until r's degree is less than R/2 + + The euclidean algorithm. + + + + Finds the error locations as a direct application of Chien's search + + The error locations. + Error locator. + + + + Finds the error magnitudes by directly applying Forney's Formula + + The error magnitudes. + Error evaluator. + Error locator. + Error locations. + + + +

A field based on powers of a generator integer, modulo some modulus.

+ +
+ Sean Owen +
+ + + + + Sean Owen + + + + Gets the coefficients. + + The coefficients. + + + + degree of this polynomial + + + + + Gets a value indicating whether this instance is zero. + + true if this polynomial is the monomial "0" + + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + + + Adds another Modulus + + Other. + + + + Subtract another Modulus + + Other. + + + + Multiply by another Modulus + + Other. + + + + Returns a Negative version of this instance + + + + + Multiply by a Scalar. + + Scalar. + + + + Multiplies by a Monomial + + The by monomial. + Degree. + Coefficient. + + + + Returns a that represents the current . + + A that represents the current . + + + + + + Guenther Grau + creatale GmbH (christoph.schulz@creatale.de) + + + + The ratios table + + + + + Initializes the class & Pre-computes the symbol ratio table. + + + + + Gets the decoded value. + + The decoded value. + Module bit count. + + + + Samples the bit counts. + + The bit counts. + Module bit count. + + + + Gets the decoded codeword value. + + The decoded codeword value. + Module bit count. + + + + Gets the bit value. + + The bit value. + Module bit count. + + + + Gets the closest decoded value. + + The closest decoded value. + Module bit count. + + + + + + Guenther Grau + + + + Decode the specified image, imageTopLeft, imageBottomLeft, imageTopRight, imageBottomRight, minCodewordWidth + and maxCodewordWidth. + TODO: don't pass in minCodewordWidth and maxCodewordWidth, pass in barcode columns for start and stop pattern + columns. That way width can be deducted from the pattern column. + This approach also allows to detect more details about the barcode, e.g. if a bar type (white or black) is wider + than it should be. This can happen if the scanner used a bad blackpoint. + + Image. + Image top left. + Image bottom left. + Image top right. + Image bottom right. + Minimum codeword width. + Max codeword width. + + + + Merge the specified leftRowIndicatorColumn and rightRowIndicatorColumn. + + Left row indicator column. + Right row indicator column. + + + + Adjusts the bounding box. + + The bounding box. + Row indicator column. + + + + Gets the barcode metadata. + + The barcode metadata. + Left row indicator column. + Right row indicator column. + + + + Gets the row indicator column. + + The row indicator column. + Image. + Bounding box. + Start point. + If set to true left to right. + Minimum codeword width. + Max codeword width. + + + + Adjusts the codeword count. + + Detection result. + Barcode matrix. + + + + Creates the decoder result. + + The decoder result. + Detection result. + + + + This method deals with the fact, that the decoding process doesn't always yield a single most likely value. The + current error correction implementation doesn't deal with erasures very well, so it's better to provide a value + for these ambiguous codewords instead of treating it as an erasure. The problem is that we don't know which of + the ambiguous values to choose. We try decode using the first value, and if that fails, we use another of the + ambiguous values and try to decode again. This usually only happens on very hard to read and decode barcodes, + so decoding the normal barcodes is not affected by this. + + The decoder result from ambiguous values. + Ec level. + Codewords. + contains the indexes of erasures. + array with the indexes that have more than one most likely value. + two dimensional array that contains the ambiguous values. The first dimension must + be the same Length as the ambiguousIndexes array. + + + + Creates the barcode matrix. + + The barcode matrix. + Detection result. + + + + Tests to see if the Barcode Column is Valid + + true, if barcode column is valid, false otherwise. + Detection result. + Barcode column. + + + + Gets the start column. + + The start column. + Detection result. + Barcode column. + Image row. + If set to true left to right. + + + + Detects the codeword. + + The codeword. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + Minimum codeword width. + Max codeword width. + + + + Gets the module bit count. + + The module bit count. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + + + + Gets the number of EC code words. + + The number of EC code words. + Barcode EC level. + + + + Adjusts the codeword start column. + + The codeword start column. + Image. + Minimum column. + Max column. + If set to true left to right. + Codeword start column. + Image row. + + + + Checks the codeword for any skew. + + true, if codeword is within the skew, false otherwise. + Codeword size. + Minimum codeword width. + Max codeword width. + + + + Decodes the codewords. + + The codewords. + Codewords. + Ec level. + Erasures. + + + + Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place. + + The errors. + data and error correction codewords. + positions of any known erasures. + number of error correction codewords that are available in codewords. + + + + Verifies that all is well with the the codeword array. + + Codewords. + Number EC codewords. + + + + Gets the bit count for codeword. + + The bit count for codeword. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Module bit count. + + + + Returns a that represents the jagged array. + + A that represents the jagged array. + Barcode matrix as a jagged array. + + + +

Encapsulates logic that can detect a PDF417 Code in an image, even if the + PDF417 Code is rotated or skewed, or partially obscured.

+ + SITA Lab (kevin.osullivan@sita.aero) + dswitkin@google.com (Daniel Switkin) + Guenther Grau +
+
+ + + B S B S B S B S Bar/Space pattern + 11111111 0 1 0 1 0 1 000. + + + + + 1111111 0 1 000 1 0 1 00 1 + + + + + if we set the value too low, then we don't detect the correct height of the bar if the start patterns are damaged. + if we set the value too high, then we might detect the start pattern from a neighbor barcode. + + + + + A PDF471 barcode should have at least 3 rows, with each row being >= 3 times the module width. Therefore it should be at least + 9 pixels tall. To be conservative, we use about half the size to ensure we don't miss it. + + + + +

Detects a PDF417 Code in an image. Only checks 0 and 180 degree rotations.

+
+ barcode image to decode + optional hints to detector + if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned + + encapsulating results of detecting a PDF417 code + +
+ + + Detects PDF417 codes in an image. Only checks 0 degree rotation (so rotate the matrix and check again outside of this method) + + multiple if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned. + bit matrix to detect barcodes in. + List of ResultPoint arrays containing the coordinates of found barcodes + + + + Locate the vertices and the codewords area of a black blob using the Start and Stop patterns as locators. + + Matrix. + Start row. + Start column. + an array containing the vertices: + vertices[0] x, y top left barcode + vertices[1] x, y bottom left barcode + vertices[2] x, y top right barcode + vertices[3] x, y bottom right barcode + vertices[4] x, y top left codeword area + vertices[5] x, y bottom left codeword area + vertices[6] x, y top right codeword area + vertices[7] x, y bottom right codeword area + + + + + Copies the temp data to the final result + + Result. + Temp result. + Destination indexes. + + + + Finds the rows with the given pattern. + + The rows with pattern. + Matrix. + Height. + Width. + Start row. + Start column. + Pattern. + + + + Finds the guard pattern. Uses System.Linq.Enumerable.Repeat to fill in counters. This might be a performance issue? + + start/end horizontal offset of guard pattern, as an array of two ints. + matrix row of black/white values to search + column x position to start search. + row y position to start search. + width the number of pixels to search on this row. + If set to true search the white patterns first. + pattern of counts of number of black and white pixels that are being searched for as a pattern. + counters array of counters, as long as pattern, to re-use . + + + + Determines how closely a set of observed counts of runs of black/white. + values matches a given target pattern. This is reported as the ratio of + the total variance from the expected pattern proportions across all + pattern elements, to the length of the pattern. + + + ratio of total variance between counters and pattern compared to + total pattern size, where the ratio has been multiplied by 256. + So, 0 means no variance (perfect match); 256 means the total + variance between counters and patterns equals the pattern length, + higher values mean even more variance + + observed counters. + expected pattern. + The most any counter can differ before we give up. + + + + PDF 417 Detector Result class. Skipped private backing stores. + Guenther Grau + + + + + Initializes a new instance of the class. + + Bits. + Points. + + + + Holds all of the information for a barcode in a format where it can be easily accessible + + Jacob Haynes + + + + + the height of the matrix (Rows) + the width of the matrix (Cols) + + + + + Jacob Haynes + + + + + Creates a Barcode row of the width + + The width. + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + A boolean which is true if the bar black false if it is white + How many spots wide the bar is. + + + + + This function scales the row + + How much you want the image to be scaled, must be greater than or equal to 1. + the scaled row + + + + + Represents possible PDF417 barcode compaction types. + + + + + + + + + + + + + + + + + + + + + + + + + Data object to specify the minimum and maximum number of rows and columns for a PDF417 barcode. + @author qwandor@google.com (Andrew Walbran) + + + + + Initializes a new instance of the class. + + The min cols. + The max cols. + The min rows. + The max rows. + + + + Gets the min cols. + + + + + Gets the max cols. + + + + + Gets the min rows. + + + + + Gets the max rows. + + + + + Top-level class for the logic part of the PDF417 implementation. + + + + + The start pattern (17 bits) + + + + + The stop pattern (18 bits) + + + + + The codeword table from the Annex A of ISO/IEC 15438:2001(E). + + + + + Calculates the necessary number of rows as described in annex Q of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol (r) + + + + Calculates the number of pad codewords as described in 4.9.2 of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol + the number of pad codewords + + + + Generates the barcode logic. + + the message to encode + PDF417 error correction level to use + + + + Determine optimal nr of columns and rows for the specified number of + codewords. + + number of code words + number of error correction code words + The longest dimension of the barcode, used for columns + The short dimension of the barcode, used for rows + The height of a row, will alter this parameter if aspectRatio>4 (aspectRatio==AUTO) + dimension object containing cols as width and rows as height + + + + Sets max/min row/col values + + maximum allowed columns + minimum allowed columns + maximum allowed rows + minimum allowed rows + + + + Sets compaction to values stored in enum + + compaction mode to use + + + + Sets compact to be true or false + + if true, enables compaction + + + + Sets output encoding. + + sets character encoding to use + + + + Sets the disable eci. + + if set to true don't add an ECI segment for different encodings than default. + + + + defines the level of the error correction / count of error correction codewords + + + + + PDF417 error correction code following the algorithm described in ISO/IEC 15438:2001(E) in + chapter 4.10. + + + + + Tables of coefficients for calculating error correction words + (see annex F, ISO/IEC 15438:2001(E)) + + + + + Determines the number of error correction codewords for a specified error correction + level. + + the error correction level (0-8) + the number of codewords generated for error correction + + + + Determines the error correction level for AUTO + + The error correction level (0-9) + The number of codewords for AUTO errorCorrectionLevel + the number of codewords generated for error correction + + + + Returns the recommended minimum error correction level as described in annex E of + ISO/IEC 15438:2001(E). + + the number of data codewords + the recommended minimum error correction level + + + + Generates the error correction codewords according to 4.10 in ISO/IEC 15438:2001(E). + + the data codewords + the error correction level (0-8) + the String representing the error correction codewords + + + + defines the level of the error correction / count of error correction codewords + + + + + PDF417 high-level encoder following the algorithm described in ISO/IEC 15438:2001(E) in + annex P. + + + + + code for Text compaction + + + + + code for Byte compaction + + + + + code for Numeric compaction + + + + + Text compaction submode Alpha + + + + + Text compaction submode Lower + + + + + Text compaction submode Mixed + + + + + Text compaction submode Punctuation + + + + + mode latch to Text Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters NOT a multiple of 6) + + + + + mode latch to Numeric Compaction mode + + + + + mode shift to Byte Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters a multiple of 6) + + + + + identifier for a user defined Extended Channel Interpretation (ECI) + + + + + identifier for a general purpose ECO format + + + + + identifier for an ECI of a character set of code page + + + + + Raw code table for text compaction Mixed sub-mode + + + + + Raw code table for text compaction: Punctuation sub-mode + + + + + Performs high-level encoding of a PDF417 message using the algorithm described in annex P + of ISO/IEC 15438:2001(E). If byte compaction has been selected, then only byte compaction + is used. + + the message + compaction mode to use + character encoding used to encode in default or byte compaction + or null for default / not applicable + if true, don't add an ECI segment for different encodings than default + the encoded message (the char values range from 0 to 928) + + + + Encode parts of the message using Text Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.2. + + the message + the start position within the message + the number of characters to encode + receives the encoded codewords + should normally be SUBMODE_ALPHA + the text submode in which this method ends + + + + + Encode parts of the message using Byte Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.3. The Unicode characters will be converted to binary using the cp437 + codepage. + + the message converted to a byte array + the start position within the message + the number of bytes to encode + the mode from which this method starts + receives the encoded codewords + + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using text compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using binary compaction. + + the message + the message converted to a byte array + the start position within the message + + the requested character count + + + + The class holds the available options for the + + + + + Specifies whether to use compact mode for PDF417 (type ). + + + + + Specifies what compaction mode to use for PDF417 (type + ). + + + + + Specifies the minimum and maximum number of rows and columns for PDF417 (type + ). + + + + + Specifies what degree of error correction to use + + + + + Specifies what degree of error correction to use + + + + + Specifies what character encoding to use where applicable (type {@link String}) + + + + + Explicitly disables ECI segment when generating PDF417 Code + That is against the specification but some + readers have problems if the charset is switched from + CP437 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use different encodings + and the ECI segment is omitted. + + + + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Maximum Codewords (Data + Error). + + + + + Gets the bit count sum. + + The bit count sum. + Module bit count. + + + + Converts an ICollection<int> to an int[] + Carry-over from Java. Will likely remove and replace with the Generic .ToArray() method. + + The int array. + List. + + + + Translate the symbol into a codeword + + the codeword corresponding to the symbol. + encoded symbol to translate to a codeword + + + + The sorted table of all possible symbols. Extracted from the PDF417 + specification. The index of a symbol in this table corresponds to the + index into the codeword table. + + + + + This table contains to codewords for all symbols. + + + + + This implementation can detect and decode PDF417 codes in an image. + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Locates and decodes a PDF417 code in an image. + + a String representing the content encoded by the PDF417 code + if a PDF417 cannot be decoded + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + **Note** this will return the FIRST barcode discovered if there are many. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Locates and decodes Multiple PDF417 codes in an image. + + an array of Strings representing the content encoded by the PDF417 codes + + + + + Locates and decodes multiple barcodes in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcodes encode + + + + + Decode the specified image, with the hints and optionally multiple barcodes. + Based on Owen's Comments in , this method has been modified to continue silently + if a barcode was not decoded where it was detected instead of throwing a new exception object. + + Image. + Hints. + If set to true multiple. + + + + Gets the maximum width of the barcode + + The max width. + P1. + P2. + + + + Gets the minimum width of the barcode + + The minimum width. + P1. + P2. + + + + Gets the maximum width of the codeword. + + The max codeword width. + P. + + + + Gets the minimum width of the codeword. + + The minimum codeword width. + P. + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + PDF 417 result meta data. + Guenther Grau + + + + + The Segment ID represents the segment of the whole file distributed over different symbols. + + + + + Is the same for each related PDF417 symbol + + + + + always null + + + + + true if it is the last segment + + + + + count of segments, -1 if not set + + + + + Filename of the encoded file + + + + + filesize in bytes of the encoded file + returns filesize in bytes, -1 if not set + + + + + 16-bit CRC checksum using CCITT-16 + returns crc checksum, -1 if not set + + + + + unix epock timestamp, elapsed seconds since 1970-01-01 + returns elapsed seconds, -1 if not set + + + + + Jacob Haynes + qwandor@google.com (Andrew Walbran) + + + + + default white space (margin) around the code + + + + + default error correction level + + + + + default aspect ratio + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The height of a row in the barcode + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Takes encoder, accounts for width/height, and retrieves bit matrix + + + + + This takes an array holding the values of the PDF 417 + + a byte array of information with 0 is black, and 1 is white + border around the barcode + BitMatrix of the input + + + + Takes and rotates the it 90 degrees + + + + Sean Owen + + + {@link BitMatrix} to parse + ReaderException if dimension is not >= 21 and 1 mod 4 + + +

Reads format information from one of its two locations within the QR Code.

+ +
+ {@link FormatInformation} encapsulating the QR Code's format info + + ReaderException if both format information locations cannot be parsed as + the valid encoding of format information + +
+ +

Reads version information from one of its two locations within the QR Code.

+ +
+ {@link Version} encapsulating the QR Code's version + + ReaderException if both version information locations cannot be parsed as + the valid encoding of version information + +
+ +

Reads the bits in the {@link BitMatrix} representing the finder pattern in the + correct order in order to reconstruct the codewords bytes contained within the + QR Code.

+ +
+ bytes encoded within the QR Code + + ReaderException if the exact number of bytes expected is not read +
+ + Revert the mask removal done while reading the code words. The bit matrix should revert to its original state. + + + Prepare the parser for a mirrored operation. + This flag has effect only on the {@link #readFormatInformation()} and the + {@link #readVersion()}. Before proceeding with {@link #readCodewords()} the + {@link #mirror()} method should be called. + + @param mirror Whether to read version and format information mirrored. + + + Mirror the bit matrix in order to attempt a second reading. + + +

Encapsulates a block of data within a QR Code. QR Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

When QR Codes use multiple data blocks, they are actually interleaved. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ +
+ bytes as read directly from the QR Code + + version of the QR Code + + error-correction level of the QR Code + + {@link DataBlock}s containing original bytes, "de-interleaved" from representation in the + QR Code + +
+ +

Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations + of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix, + including areas used for finder patterns, timing patterns, etc. These areas should be unused + after the point they are unmasked anyway.

+ +

Note that the diagram in section 6.8.1 is misleading since it indicates that i is column position + and j is row position. In fact, as the text says, i is row position and j is column position.

+ +
+ Sean Owen +
+ + See ISO 18004:2006 6.8.1 + + +

Implementations of this method reverse the data masking process applied to a QR Code and + make its bits ready to read.

+
+ + representation of QR Code bits + dimension of QR Code, represented by bits, being unmasked +
+ +

QR Codes can encode text as bits in one of several modes, and can use multiple modes + in one QR Code. This class decodes the bits back into text.

+ +

See ISO 18004:2006, 6.4.3 - 6.4.7

+ Sean Owen +
+
+ + + See ISO 18004:2006, 6.4.4 Table 5 + + + + + See specification GBT 18284-2000 + + The bits. + The result. + The count. + + + + +

The main class which implements QR Code decoding -- as opposed to locating and extracting + the QR Code from an image.

+
+ + Sean Owen + +
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a QR Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Decodes a QR Code represented as a {@link BitMatrix}. A 1 or "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+
+ data and error correction codewords + number of codewords that are data bytes + +
+ + +

See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels + defined by the QR code standard.

+
+ Sean Owen +
+ + L = ~7% correction + + + M = ~15% correction + + + Q = ~25% correction + + + H = ~30% correction + + + + Gets the bits. + + + + + Gets the name. + + + + + Ordinals this instance. + + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Fors the bits. + + int containing the two bits encoding a QR Code's error correction level + + representing the encoded error correction level + + + +

Encapsulates a QR Code's format information, including the data mask used and + error correction level.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + +
+ + See ISO 18004:2006, Annex C, Table C.1 + + + Offset i holds the number of 1 bits in the binary representation of i + + + + Decodes the format information. + + format info indicator, with mask still applied + The masked format info2. + + information about the format it specifies, or null + if doesn't seem to match any known pattern + + + + +

See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which + data can be encoded to bits in the QR code standard.

+
+ Sean Owen +
+ + + Gets the name. + + + + + enumeration for encoding modes + + + + + + + + + + numeric encoding + + + + + alpha-numeric encoding + + + + + structured append + + + + + byte mode encoding + + + + + ECI segment + + + + + Kanji mode + + + + + FNC1 char, first position + + + + + FNC1 char, second position + + + + + Hanzi mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See GBT 18284-2000; "Hanzi" is a transliteration of this mode name. + + + + Fors the bits. + + four bits encoding a QR Code data mode + + encoded by these bits + + if bits do not correspond to a known mode + + + version in question + + number of bits used, in this QR Code symbol {@link Version}, to encode the + count of characters that will follow encoded in this {@link Mode} + + + + + Gets the bits. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Meta-data container for QR Code decoding. Instances of this class may be used to convey information back to the + decoding caller. Callers are expected to process this. + + + + + Initializes a new instance of the class. + + if set to true [mirrored]. + + + + true if the QR Code was mirrored. + + + + + Apply the result points' order correction due to mirroring. + + Array of points to apply mirror correction to. + + + + See ISO 18004:2006 Annex D + + Sean Owen + + + See ISO 18004:2006 Annex D. + Element i represents the raw version bits that specify version i + 7 + + + + + Gets the version number. + + + + + Gets the alignment pattern centers. + + + + + Gets the total codewords. + + + + + Gets the dimension for version. + + + + + Gets the EC blocks for level. + + The ec level. + + + +

Deduces version information purely from QR Code dimensions.

+ +
+ dimension in modules + + for a QR Code of that dimension or null +
+ + + Gets the version for number. + + The version number. + + + + See ISO 18004:2006 Annex E + + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + + Gets the EC codewords per block. + + + + + Gets the num blocks. + + + + + Gets the total EC codewords. + + + + + Gets the EC blocks. + + + + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the QR code version's format.

+
+
+ + + Gets the count. + + + + + Gets the data codewords. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + See ISO 18004:2006 6.5.1 Table 9 + + +

Encapsulates an alignment pattern, which are the smaller square patterns found in + all but the simplest QR Codes.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Determines if this alignment pattern "about equals" an alignment pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing an average of the two. + + The i. + The j. + New size of the module. + + + +

This class attempts to find alignment patterns in a QR Code. Alignment patterns look like finder + patterns but are smaller and appear at regular intervals throughout the image.

+ +

At the moment this only looks for the bottom-right alignment pattern.

+ +

This is mostly a simplified copy of {@link FinderPatternFinder}. It is copied, + pasted and stripped down here for maximum performance but does unfortunately duplicate + some code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Creates a finder that will look in a portion of the whole image.

+ +
+ image to search + + left column from which to start searching + + top row from which to start searching + + width of region to search + + height of region to search + + estimated module size so far + + callback function which is called, when a result point is found +
+ +

This method attempts to find the bottom-right alignment pattern in the image. It is a bit messy since + it's pretty performance-critical and so is written to be fast foremost.

+ +
+ if found +
+ + Given a count of black/white/black pixels just seen and an end position, + figures the location of the center of this black/white/black run. + + + + count of black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/1 ratios + used by alignment patterns to be considered a match + + + + +

After a horizontal scan finds a potential alignment pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + alignment pattern to see if the same proportion is detected.

+
+ row where an alignment pattern was detected + center of the section that appears to cross an alignment pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of alignment pattern, or null if not found + +
+ +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will see if this pattern had been + found on a previous horizontal scan. If so, we consider it confirmed and conclude we have + found the alignment pattern.

+ +
+ reading state module counts from horizontal scan + + row where alignment pattern may be found + + end of possible alignment pattern in row + + {@link AlignmentPattern} if we have found the same pattern twice, or null if not + +
+ + +

Encapsulates logic that can detect a QR Code in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + + Gets the image. + + + + + Gets the result point callback. + + + + +

Detects a QR Code in an image.

+
+ + encapsulating results of detecting a QR Code + +
+ + +

Detects a QR Code in an image.

+
+ optional hints to detector + + encapsulating results of detecting a QR Code + +
+ + + Processes the finder pattern info. + + The info. + + + +

Computes the dimension (number of modules on a size) of the QR Code based on the position + of the finder patterns and estimated module size.

+
+
+ + +

Computes an average estimated module size based on estimated derived from the positions + of the three finder patterns.

+
+ detected top-left finder pattern center + detected top-right finder pattern center + detected bottom-left finder pattern center + estimated module size +
+ +

Estimates module size based on two finder patterns -- it uses + {@link #sizeOfBlackWhiteBlackRunBothWays(int, int, int, int)} to figure the + width of each, measuring along the axis between their centers.

+
+
+ + See {@link #sizeOfBlackWhiteBlackRun(int, int, int, int)}; computes the total width of + a finder pattern by looking for a black-white-black run from the center in the direction + of another point (another finder pattern center), and in the opposite direction too. + + + +

This method traces a line from a point in the image, in the direction towards another point. + It begins in a black region, and keeps going until it finds white, then black, then white again. + It reports the distance from the start to this point.

+ +

This is used when figuring out how wide a finder pattern is, when the finder pattern + may be skewed or rotated.

+
+
+ + +

Attempts to locate an alignment pattern in a limited region of the image, which is + guessed to contain it. This method uses {@link AlignmentPattern}.

+
+ estimated module size so far + x coordinate of center of area probably containing alignment pattern + y coordinate of above + number of pixels in all directions to search from the center + + if found, or null otherwise + +
+ + +

Encapsulates a finder pattern, which are the three square patterns found in + the corners of QR Codes. It also encapsulates a count of similar finder patterns, + as a convenience to the finder's bookkeeping.

+
+ Sean Owen +
+ + + Gets the size of the estimated module. + + + The size of the estimated module. + + + +

Determines if this finder pattern "about equals" a finder pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing a weighted average + based on count. + + The i. + The j. + New size of the module. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+
+ Sean Owen +
+ + + 1 pixel/module times 3 modules/center + + + + + support up to version 20 for mobile clients + + + + +

Creates a finder that will search the image for three finder patterns.

+
+ image to search +
+ + + Initializes a new instance of the class. + + The image. + The result point callback. + + + + Gets the image. + + + + + Gets the possible centers. + + + + Given a count of black/white/black/white/black pixels just seen and an end position, + figures the location of the center of this run. + + + + count of black/white/black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/3/1/1 ratios + used by finder patterns to be considered a match + + + + + + count of black/white/black/white/black pixels just read + true if the proportions of the counts is close enough to the 1/1/3/1/1 ratios + by finder patterns to be considered a match + + + + After a vertical and horizontal scan finds a potential finder pattern, this method + "cross-cross-cross-checks" by scanning down diagonally through the center of the possible + finder pattern to see if the same proportion is detected. + @param maxCount maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + @param originalStateCountTotal The original state count total. + + row where a finder pattern was detected + center of the section that appears to cross a finder pattern + true if proportions are withing expected limits + + + +

After a horizontal scan finds a potential finder pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + finder pattern to see if the same proportion is detected.

+
+ row where a finder pattern was detected + center of the section that appears to cross a finder pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of finder pattern, or null if not found + +
+ +

Like {@link #crossCheckVertical(int, int, int, int)}, and in fact is basically identical, + except it reads horizontally instead of vertically. This is used to cross-cross + check a vertical cross check and locate the real center of the alignment pattern.

+
+
+ + + @see #handlePossibleCenter(int[], int, int) + + reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + ignored + true if a finder pattern candidate was found this time + + + +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will, ah, cross-cross-check + with another horizontal scan. This is needed primarily to locate the real horizontal + center of the pattern in cases of extreme skew. + And then we cross-cross-cross check with another diagonal scan.

+ If that succeeds the finder pattern location is added to a list that tracks + the number of times each location has been nearly-matched as a finder pattern. + Each additional find is more evidence that the location is in fact a finder + pattern center +
+ reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + + true if a finder pattern candidate was found this time + +
+ + number of rows we could safely skip during scanning, based on the first + two finder patterns that have been located. In some cases their position will + allow us to infer that the third pattern must lie below a certain point farther + down in the image. + + + + true iff we have found at least 3 finder patterns that have been detected + at least {@link #CENTER_QUORUM} times each, and, the estimated module size of the + candidates is "pretty similar" + + + + the 3 best {@link FinderPattern}s from our list of candidates. The "best" are + those that have been detected at least {@link #CENTER_QUORUM} times, and whose module + size differs from the average among those patterns the least + + + + + Orders by furthest from average + + + +

Orders by {@link FinderPattern#getCount()}, descending.

+
+ + +

Encapsulates information about finder patterns in an image, including the location of + the three finder patterns, and their estimated module size.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The pattern centers. + + + + Gets the bottom left. + + + + + Gets the top left. + + + + + Gets the top right. + + + + + JAVAPORT: The original code was a 2D array of ints, but since it only ever gets assigned + 0, 1 and 2 I'm going to use less memory and go with bytes. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Gets the height. + + + + + Gets the width. + + + + + Gets or sets the with the specified x. + + + + + an internal representation as bytes, in row-major order. array[y][x] represents point (x,y) + + + + + Sets the specified x. + + The x. + The y. + The value. + + + + Sets the specified x. + + The x. + The y. + if set to true [value]. + + + + Clears the specified value. + + The value. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + Encode "bytes" with the error correction level "ecLevel". The encoding mode will be chosen + internally by chooseMode(). On success, store the result in "qrCode". + We recommend you to use QRCode.EC_LEVEL_L (the lowest level) for + "getECLevel" since our primary use is to show QR code on desktop screens. We don't need very + strong error correction for this purpose. + Note that there is no way to encode bytes in MODE_KANJI. We might want to add EncodeWithMode() + with which clients can specify the encoding mode. For now, we don't need the functionality. + + text to encode + error correction level to use + representing the encoded QR code + + + + Encodes the specified content. + + The content. + The ec level. + The hints. + + + + + Decides the smallest version of QR code that will contain all of the provided data. + + if the data cannot fit in any version + + + + Gets the alphanumeric code. + + The code. + the code point of the table used in alphanumeric mode or + -1 if there is no corresponding code in the table. + + + + Chooses the mode. + + The content. + + + + + Choose the best mode by examining the content. Note that 'encoding' is used as a hint; + if it is Shift_JIS, and the input is only double-byte Kanji, then we return {@link Mode#KANJI}. + + The content. + The encoding. + + + + + true if the number of input bits will fit in a code with the specified version and error correction level. + + + + Terminate bits as described in 8.4.8 and 8.4.9 of JISX0510:2004 (p.24). + + The num data bytes. + The bits. + + + + Get number of data bytes and number of error correction bytes for block id "blockID". Store + the result in "numDataBytesInBlock", and "numECBytesInBlock". See table 12 in 8.5.1 of + JISX0510:2004 (p.30) + + The num total bytes. + The num data bytes. + The num RS blocks. + The block ID. + The num data bytes in block. + The num EC bytes in block. + + + + Interleave "bits" with corresponding error correction bytes. On success, store the result in + "result". The interleave rule is complicated. See 8.6 of JISX0510:2004 (p.37) for details. + + The bits. + The num total bytes. + The num data bytes. + The num RS blocks. + + + + + Append mode info. On success, store the result in "bits". + + The mode. + The bits. + + + + Append length info. On success, store the result in "bits". + + The num letters. + The version. + The mode. + The bits. + + + + Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits". + + The content. + The mode. + The bits. + The encoding. + + + + + + Satoru Takabayashi + Daniel Switkin + Sean Owen + + + + Apply mask penalty rule 1 and return the penalty. Find repetitive cells with the same color and + give penalty to them. Example: 00000 or 11111. + + The matrix. + + + + + Apply mask penalty rule 2 and return the penalty. Find 2x2 blocks with the same color and give + penalty to them. This is actually equivalent to the spec's rule, which is to find MxN blocks and give a + penalty proportional to (M-1)x(N-1), because this is the number of 2x2 blocks inside such a block. + + The matrix. + + + + + Apply mask penalty rule 3 and return the penalty. Find consecutive cells of 00001011101 or + 10111010000, and give penalty to them. If we find patterns like 000010111010000, we give + penalties twice (i.e. 40 * 2). + + The matrix. + + + + + Apply mask penalty rule 4 and return the penalty. Calculate the ratio of dark cells and give + penalty if the ratio is far from 50%. It gives 10 penalty for 5% distance. + + The matrix. + + + + + Return the mask bit for "getMaskPattern" at "x" and "y". See 8.8 of JISX0510:2004 for mask + pattern conditions. + + The mask pattern. + The x. + The y. + + + + + Helper function for applyMaskPenaltyRule1. We need this for doing this calculation in both + vertical and horizontal orders respectively. + + The matrix. + if set to true [is horizontal]. + + + + + + + + satorux@google.com (Satoru Takabayashi) - creator + + + + + Set all cells to 2. 2 means that the cell is empty (not set yet). + + JAVAPORT: We shouldn't need to do this at all. The code should be rewritten to begin encoding + with the ByteMatrix initialized all to zero. + + The matrix. + + + + Build 2D matrix of QR Code from "dataBits" with "ecLevel", "version" and "getMaskPattern". On + success, store the result in "matrix" and return true. + + The data bits. + The ec level. + The version. + The mask pattern. + The matrix. + + + + Embed basic patterns. On success, modify the matrix and return true. + The basic patterns are: + - Position detection patterns + - Timing patterns + - Dark dot at the left bottom corner + - Position adjustment patterns, if need be + + The version. + The matrix. + + + + Embed type information. On success, modify the matrix. + + The ec level. + The mask pattern. + The matrix. + + + + Embed version information if need be. On success, modify the matrix and return true. + See 8.10 of JISX0510:2004 (p.47) for how to embed version information. + + The version. + The matrix. + + + + Embed "dataBits" using "getMaskPattern". On success, modify the matrix and return true. + For debugging purposes, it skips masking process if "getMaskPattern" is -1. + See 8.7 of JISX0510:2004 (p.38) for how to embed data bits. + + The data bits. + The mask pattern. + The matrix. + + + + Return the position of the most significant bit set (to one) in the "value". The most + significant bit is position 32. If there is no bit set, return 0. Examples: + - findMSBSet(0) => 0 + - findMSBSet(1) => 1 + - findMSBSet(255) => 8 + + The value_ renamed. + + + + + Calculate BCH (Bose-Chaudhuri-Hocquenghem) code for "value" using polynomial "poly". The BCH + code is used for encoding type information and version information. + Example: Calculation of version information of 7. + f(x) is created from 7. + - 7 = 000111 in 6 bits + - f(x) = x^2 + x^2 + x^1 + g(x) is given by the standard (p. 67) + - g(x) = x^12 + x^11 + x^10 + x^9 + x^8 + x^5 + x^2 + 1 + Multiply f(x) by x^(18 - 6) + - f'(x) = f(x) * x^(18 - 6) + - f'(x) = x^14 + x^13 + x^12 + Calculate the remainder of f'(x) / g(x) + x^2 + __________________________________________________ + g(x) )x^14 + x^13 + x^12 + x^14 + x^13 + x^12 + x^11 + x^10 + x^7 + x^4 + x^2 + -------------------------------------------------- + x^11 + x^10 + x^7 + x^4 + x^2 + + The remainder is x^11 + x^10 + x^7 + x^4 + x^2 + Encode it in binary: 110010010100 + The return value is 0xc94 (1100 1001 0100) + + Since all coefficients in the polynomials are 1 or 0, we can do the calculation by bit + operations. We don't care if coefficients are positive or negative. + + The value. + The poly. + + + + + Make bit vector of type information. On success, store the result in "bits" and return true. + Encode error correction level and mask pattern. See 8.9 of + JISX0510:2004 (p.45) for details. + + The ec level. + The mask pattern. + The bits. + + + + Make bit vector of version information. On success, store the result in "bits" and return true. + See 8.10 of JISX0510:2004 (p.45) for details. + + The version. + The bits. + + + + Check if "value" is empty. + + The value. + + true if the specified value is empty; otherwise, false. + + + + + Embed the lonely dark dot at left bottom corner. JISX0510:2004 (p.46) + + The matrix. + + + + + + The x start. + The y start. + The matrix. + + + + Embed position detection patterns and surrounding vertical/horizontal separators. + + The matrix. + + + + Embed position adjustment patterns if need be. + + The version. + The matrix. + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + + + + + + Initializes a new instance of the class. + + + + + Gets or sets the mode. + + + The mode. + + + + + Gets or sets the EC level. + + + The EC level. + + + + + Gets or sets the version. + + + The version. + + + + + Gets or sets the mask pattern. + + + The mask pattern. + + + + + Gets or sets the matrix. + + + The matrix. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Check if "mask_pattern" is valid. + + The mask pattern. + + true if [is valid mask pattern] [the specified mask pattern]; otherwise, false. + + + + + The class holds the available options for the QrCodeWriter + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + . + + + + + Specifies what character encoding to use where applicable (type ) + + + + + Explicitly disables ECI segment when generating QR Code + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + + + + + Specifies the exact version of QR code to be encoded. An integer, range 1 to 40. If the data specified + cannot fit within the required version, a WriterException will be thrown. + + + + + This implementation can detect and decode QR Codes in an image. + Sean Owen + + + + + Gets the decoder. + + + + + + Locates and decodes a QR code in an image. + + a String representing the content encoded by the QR code + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a QR Code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Attribute is only for source code compatibility issues + + + + + Attribute is only for compatibility issues + + + + + Attribute is only for compatibility issues + + +
+
diff --git a/packages/ZXing.Net.0.16.4/lib/netstandard1.3/zxing.dll b/packages/ZXing.Net.0.16.4/lib/netstandard1.3/zxing.dll new file mode 100644 index 0000000..709690b Binary files /dev/null and b/packages/ZXing.Net.0.16.4/lib/netstandard1.3/zxing.dll differ diff --git a/packages/ZXing.Net.0.16.4/lib/netstandard1.3/zxing.xml b/packages/ZXing.Net.0.16.4/lib/netstandard1.3/zxing.xml new file mode 100644 index 0000000..df74ef8 --- /dev/null +++ b/packages/ZXing.Net.0.16.4/lib/netstandard1.3/zxing.xml @@ -0,0 +1,10922 @@ + + + + zxing + + + + + Interface for a class to convert a BitMatrix to an output image format + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + The options. + + + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + + + the generated code as byte array of BGRA pixels + + + + + the width of the image + + + + + the height of the image + + + + + Renders a to an byte array with pixel data (4 byte per pixel, BGRA) + + + + + represents a color defined as ARGB byte data + + + + + the color black + + + + + the color white + + + + + value of the alpha channel + + + + + value of the red channel + + + + + value of the green channel + + + + + value of the blue channel + + + + + Initializes a new instance of the struct. + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Renders a barcode into a Svg image + + + + + represents a color value + + + + + color black + + + + + color white + + + + + alpha channel + + + + + red channel + + + + + green channel + + + + + blur channel + + + + + initializing constructor + + + + + initializing constructor + + + + + Gets or sets the foreground color. + + The foreground color. + + + + Gets or sets the background color. + + The background color. + + + + Gets or sets the font family name + + The font family name. + + + + Gets or sets the font size in pixel + + The font size in pixel. + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Represents a barcode as a Svg image + + + + + Gets or sets the content. + + + The content. + + + + + The original height of the bitmatrix for the barcode + + + + + The original width of the bitmatrix for the barcode + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The content. + + + + Gives the XML representation of the SVG image + + + + + Enumerates barcode formats known to this package. + + Sean Owen + + + Aztec 2D barcode format. + + + CODABAR 1D format. + + + Code 39 1D format. + + + Code 93 1D format. + + + Code 128 1D format. + + + Data Matrix 2D barcode format. + + + EAN-8 1D format. + + + EAN-13 1D format. + + + ITF (Interleaved Two of Five) 1D format. + + + MaxiCode 2D barcode format. + + + PDF417 format. + + + QR Code 2D barcode format. + + + RSS 14 + + + RSS EXPANDED + + + UPC-A 1D format. + + + UPC-E 1D format. + + + UPC/EAN extension format. Not a stand-alone format. + + + MSI + + + Plessey + + + Intelligent Mail barcode + + + + UPC_A | UPC_E | EAN_13 | EAN_8 | CODABAR | CODE_39 | CODE_93 | CODE_128 | ITF | RSS_14 | RSS_EXPANDED + without MSI (to many false-positives) and IMB (not enough tested, and it looks more like a 2D) + + + + + A smart class to decode the barcode inside a bitmap object or byte array with raw pixel color values + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Optional: Gets or sets the function to create a luminance source object for a bitmap. + If null a platform specific default LuminanceSource is used + + + The function to create a luminance source object. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + A smart class to decode the barcode inside a bitmap object + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Constructor for additional image formats for one BarcodeReader class + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Optional: Gets or sets the function to create a luminance source object for a bitmap. + If null a platform specific default LuminanceSource is used + + + The function to create a luminance source object. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + A smart class to decode the barcode inside a bitmap object + + + + + represents the default function which is called to get a instance from a raw byte array + + + + + Gets or sets the options. + + + The options. + + + + + Gets the reader which should be used to find and decode the barcode. + + + The reader. + + + + + Gets or sets a method which is called if an important point is found + + + The result point callback. + + + + + event is executed if a result was found via decode + + + + + Gets or sets a value indicating whether the image should be automatically rotated. + Rotation is supported for 90, 180 and 270 degrees + + + true if image should be rotated; otherwise, false. + + + + + Gets or sets a value indicating whether the image should be automatically inverted + if no result is found in the original image. + ATTENTION: Please be carefully because it slows down the decoding process if it is used + + + true if image should be inverted; otherwise, false. + + + + + Optional: Gets or sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + The function to create a binarizer object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb array. + If null the RGBLuminanceSource is used. The handler is only called when Decode with a byte[] array is called. + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + raises the ResultFound event + + + + + + raises the ResultFound event + + + + + + calls the explicitResultPointFound action + + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + A smart class to encode some content to raw pixel data + + + + + Initializes a new instance of the class. + + + + + A smart class to encode some content to a svg barcode image + + + + + Initializes a new instance of the class. + + + + + A base class for specific barcode writers with specific formats of barcode images. + + The type of the output. + + + + Gets or sets the renderer which should be used to render the encoded BitMatrix. + + + + + Encodes the specified contents and returns a rendered instance of the barcode. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The matrix. + + + + + A base class for specific barcode writers with specific formats of barcode images. + + + + + Gets or sets the barcode format. + The value is only suitable if the MultiFormatWriter is used. + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + + + + + + + + + + + + Encodes the specified contents and returns a BitMatrix array. + That array has to be rendered manually or with a IBarcodeRenderer. + + The contents. + + + + + The base class for luminance sources which supports + cropping and rotating based upon the luminance values. + + + + + weight of the red channel for calculating a gray scale image + + + + + weight of the green channel for calculating a gray scale image + + + + + weight of the blue channel for calculating a gray scale image + + + + + numbers of bits which for right shifting + + + + + + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + + The luminance array. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + gets the luminance matrix + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + TODO: not implemented yet + + + A rotated version of this object. + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + + Whether this subclass supports cropping. + + + + + Whether this subclass supports invertion. + + + + Inverts the luminance values (newValue = 255 - oldValue) + + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + This class hierarchy provides a set of methods to convert luminance data to 1 bit data. + It allows the algorithm to vary polymorphically, for example allowing a very expensive + thresholding technique for servers and a fast one for mobile. It also permits the implementation + to vary, e.g. a JNI version for Android and a Java fallback version for other platforms. + + dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The source. + + + + Gets the luminance source object. + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + For callers which only examine one row of pixels at a time, the same BitArray should be reused + and passed in with each call for performance. However it is legal to keep more than one row + at a time if needed. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + Converts a 2D array of luminance data to 1 bit data. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + A new concrete Binarizer implementation object. + + + + Gets the width of the luminance source object. + + + + + Gets the height of the luminance source object. + + + + + This class is the core bitmap class used by ZXing to represent 1 bit data. Reader objects + accept a BinaryBitmap and attempt to decode it. + + dswitkin@google.com (Daniel Switkin) + + + + + + + + + + The width of the bitmap. + + + + + The height of the bitmap. + + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + + The row to fetch, which must be in [0, bitmap height). + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + + Converts a 2D array of luminance data to 1 bit. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + + Whether this bitmap can be cropped. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if isCropSupported() is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + + Whether this bitmap supports counter-clockwise rotation. + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Encapsulates a type of hint that a caller may pass to a barcode reader to help it + more quickly or accurately decode it. It is up to implementations to decide what, + if anything, to do with the information that is supplied. + + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Unspecified, application-specific hint. Maps to an unspecified . + + + + + Image is a pure monochrome image of a barcode. Doesn't matter what it maps to; + use = true. + + + + + Image is known to be of one of a few possible formats. + Maps to a of s. + + + + + Spend more time to try to find a barcode; optimize for accuracy, not speed. + Doesn't matter what it maps to; use = true. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + + + The caller needs to be notified via callback when a possible + is found. Maps to a . + + + + + Assume MSI codes employ a check digit. Maps to . + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + Maps to . + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + 1D readers supporting rotation with TRY_HARDER enabled. + But BarcodeReader class can do auto-rotating for 1D and 2D codes. + Enabling that option prevents 1D readers doing double rotation. + BarcodeReader enables that option automatically if "global" auto-rotation is enabled. + Maps to . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to; + use . + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Simply encapsulates a width and height. + + + + + initializing constructor + + + + + + + the width + + + + + the height + + + + + + + + + + + + + + + + + + + + + + + + These are a set of hints that you may pass to Writers to specify their behavior. + + dswitkin@google.com (Daniel Switkin) + + + + Specifies the width of the barcode image + type: + + + + + Specifies the height of the barcode image + type: + + + + + Don't put the content string into the output image. + type: + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + + For Aztec it is of type , representing the minimal percentage of error correction words. + In all cases, it can also be a representation of the desired value as well. + Note: an Aztec symbol should have a minimum of 25% EC words. + For PDF417 it is of type or (between 0 and 8), + + + + + Specifies what character encoding to use where applicable. + type: + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + type: , or representation of the integer value + + + + + Specifies the aspect ratio to use. Default is 4. + type: , or 1-4. + + + + + Specifies whether to use compact mode for PDF417 + type: , or "true" or "false" + value + + + + + Specifies what compaction mode to use for PDF417. + type: or value of one of its + enum values + + + + + Specifies the minimum and maximum number of rows and columns for PDF417. + type: + + + + + Don't append ECI segment. + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + type: + + + + + Specifies the matrix shape for Data Matrix (type ) + + + + + Specifies a minimum barcode size (type ). Only applicable to Data Matrix now. + + + + + Specifies a maximum barcode size (type ). Only applicable to Data Matrix now. + + + + + if true, don't switch to codeset C for numbers + + + + + Specifies the default encodation for Data Matrix (type ) + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Specifies the required number of layers for an Aztec code. + A negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + type: , or representation of the integer value + + + + + Specifies the exact version of QR code to be encoded. + (Type , or representation of the integer value). + + + + + Specifies whether the data should be encoded to the GS1 standard + type: , or "true" or "false" + value + + + + + Thrown when a barcode was successfully detected, but some aspect of + the content did not conform to the barcode's format rules. This could have + been due to a mis-detection. + Sean Owen + + + + + + + + + + + + + + + + + + + + + + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Decodes the specified barcode bitmap which is given by a generic byte array. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents. + + The contents. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + The matrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents. + + The contents. + + + + + A wrapper implementation of {@link LuminanceSource} which inverts the luminances it returns -- black becomes + white and vice versa, and each value becomes (255-value). + + Sean Owen + + + + Initializes a new instance of the class. + + The @delegate. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff; + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Inverts this instance. + + original delegate {@link LuminanceSource} since invert undoes itself + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + The purpose of this class hierarchy is to abstract different bitmap implementations across + platforms into a standard interface for requesting greyscale luminance values. The interface + only provides immutable methods; therefore crop and rotation create copies. This is to ensure + that one Reader does not modify the original luminance source and leave it in an unknown state + for other Readers in the chain. + + dswitkin@google.com (Daniel Switkin) + + + + initializing constructor + + + + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff + + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + The width of the bitmap. + + + The height of the bitmap. + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + Whether this subclass supports counter-clockwise rotation. + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + + Whether this subclass supports invertion. + + + + inverts the luminance values, not supported here. has to implemented in sub classes + + + + + + + + + + + + MultiFormatReader is a convenience class and the main entry point into the library for most uses. + By default it attempts to decode all barcode formats that the library supports. Optionally, you + can provide a hints object to request different behavior, for example only decoding QR codes. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + This version of decode honors the intent of Reader.decode(BinaryBitmap) in that it + passes null as a hint to the decoders. However, that makes it inefficient to call repeatedly. + Use setHints() followed by decodeWithState() for continuous scan applications. + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the hints provided. Does not honor existing state. + + + The pixel data to decode + + The hints to use, clearing the previous state. + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the state set up by calling setHints() previously. Continuous scan + clients will get a large speed increase by using this instead of decode(). + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls + to decodeWithState(image) can reuse the same set of readers without reallocating memory. This + is important for performance in continuous scan clients. + + + + + + resets all specific readers + + + + This is a factory class which finds the appropriate Writer subclass for the BarcodeFormat + requested and encodes the barcode with the supplied contents. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Gets the collection of supported writers. + + + + + encode the given data + + + + + + + + + + encode the given data + + + + + + + + + + + This object extends LuminanceSource around an array of YUV data returned from the camera driver, + with the option to crop to a rectangle within the full data. This can be used to exclude + superfluous pixels around the perimeter and speed up decoding. + It works for any pixel format where the Y channel is planar and appears first, including + YCbCr_420_SP and YCbCr_422_SP. + @author dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The yuv data. + Width of the data. + Height of the data. + The left. + The top. + The width. + The height. + if set to true [reverse horiz]. + + + + Initializes a new instance of the class. + + The luminances. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + + + + + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Renders the cropped greyscale bitmap. + + + + + + width of image from {@link #renderThumbnail()} + + + + + height of image from {@link #renderThumbnail()} + + + + + creates a new instance + + + + + + + + + Implementations of this interface can decode an image of a barcode in some format into + the String it encodes. For example, can + decode a QR code. The decoder may optionally receive hints from the caller which may help + it decode more quickly or accurately. + + See , which attempts to determine what barcode + format is present within the image as well, and then decodes it accordingly. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + String which the barcode encodes + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + The general exception class throw when something goes wrong during decoding of a barcode. + This includes, but is not limited to, failing checksums / error correction algorithms, being + unable to locate finder timing patterns, and so on. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class. + + The inner exception. + + + + Initializes a new instance of the class. + + The inner exception. + + + + + Encapsulates the result of decoding a barcode within an image. + + + + raw text encoded by the barcode, if applicable, otherwise null + + + raw bytes encoded by the barcode, if applicable, otherwise null + + + + points related to the barcode in the image. These are typically points + identifying finder patterns or the corners of the barcode. The exact meaning is + specific to the type of barcode that was decoded. + + + + {@link BarcodeFormat} representing the format of the barcode that was decoded + + + + {@link Hashtable} mapping {@link ResultMetadataType} keys to values. May be + null. This contains optional metadata about what was detected about the barcode, + like orientation. + + + + + Gets the timestamp. + + + + + how many bits of are valid; typically 8 times its length + + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + The timestamp. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + The timestamp. + + + + Adds one metadata to the result + + The type. + The value. + + + + Adds a list of metadata to the result + + The metadata. + + + + Adds the result points. + + The new points. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Represents some type of metadata about the result of the decoding that the decoder + wishes to communicate back to the caller. + + Sean Owen + + + + Unspecified, application-specific metadata. Maps to an unspecified {@link Object}. + + + + + Denotes the likely approximate orientation of the barcode in the image. This value + is given as degrees rotated clockwise from the normal, upright orientation. + For example a 1D barcode which was found by reading top-to-bottom would be + said to have orientation "90". This key maps to an {@link Integer} whose + value is in the range [0,360). + + + + +

2D barcode formats typically encode text, but allow for a sort of 'byte mode' + which is sometimes used to encode binary data. While {@link Result} makes available + the complete raw bytes in the barcode for these formats, it does not offer the bytes + from the byte segments alone.

+

This maps to a {@link java.util.List} of byte arrays corresponding to the + raw bytes in the byte segments in the barcode, in order.

+
+
+ + + Error correction level used, if applicable. The value type depends on the + format, but is typically a String. + + + + + For some periodicals, indicates the issue number as an {@link Integer}. + + + + + For some products, indicates the suggested retail price in the barcode as a + formatted {@link String}. + + + + + For some products, the possible country of manufacture as a {@link String} denoting the + ISO country code. Some map to multiple possible countries, like "US/CA". + + + + + For some products, the extension text + + + + + If the code format supports structured append and + the current scanned code is part of one then the + sequence number is given with it. + + + + + If the code format supports structured append and + the current scanned code is part of one then the + parity is given with it. + + + + + PDF417-specific metadata + + + + + Aztec-specific metadata + + + + + Encapsulates a point of interest in an image containing a barcode. Typically, this + would be the location of a finder pattern or the corner of the barcode, for example. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The x. + The y. + + + + Gets the X. + + + + + Gets the Y. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC and + BC is less than AC and the angle between BC and BA is less than 180 degrees. + + array of three to order + + + + calculates the distance between two points + + first pattern + second pattern + + distance between two points + + + + + Returns the z component of the cross product between vectors BC and BA. + + + + Callback which is invoked when a possible result point (significant + point in the barcode image such as a corner) is found. + + + + + + + + Luminance source class which support different formats of images. + + + + + enumeration of supported bitmap format which the RGBLuminanceSource can process + + + + + format of the byte[] isn't known. RGBLuminanceSource tries to determine the best possible value + + + + + grayscale array, the byte array is a luminance array with 1 byte per pixel + + + + + grayscale array, the byte array is a luminance array with 2 bytes per pixel + + + + + 3 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels alpha, red, green and blue + + + + + 3 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green, red and alpha + + + + + 2 bytes per pixel, 5 bit red, 6 bits green and 5 bits blue + + + + + 4 bytes per pixel with the channels red, green, blue and alpha + + + + + 4 bytes for two pixels, UYVY formatted + + + + + 4 bytes for two pixels, YUYV formatted + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 1 byte per pixel (Gray8). + That means the whole array consists of the luminance values (grayscale). + + The luminance array. + The width. + The height. + if set to true [is8 bit]. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + The bitmap format. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + calculates the luminance values for the given byte array and bitmap format + + + + + + + Contains conversion support elements such as classes, interfaces and static methods. + + + + + Copies an array of chars obtained from a String into a specified array of chars + + The String to get the chars from + Position of the String to start getting the chars + Position of the String to end getting the chars + Array to return the chars + Position of the destination array of chars to start storing the chars + An array of chars + + + + Sets the capacity for the specified List + + The List which capacity will be set + The new capacity value + + + + Converts a string-Collection to an array + + The strings. + + + + + Joins all elements to one string. + + + The separator. + The values. + + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The value. + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The start index. + The end index. + The value. + + + + + + + + + + + + + + + + + + Savely gets the value of a decoding hint + if hints is null the default is returned + + + The hints. + Type of the hint. + The @default. + + + + The base class for all objects which encode/generate a barcode image. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + A base class which covers the range of exceptions which may occur when encoding a barcode using + the Writer framework. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner exc. + + + + Extends with more information specific to the Aztec format, + like the number of layers and whether it's compact. + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + Initializes a new instance of the class. + + The bits. + The points. + if set to true [compact]. + The nb datablocks. + The nb layers. + + + + The main class which implements Aztec Code decoding -- as opposed to locating and extracting + the Aztec Code from an image. + + David Olivier + + + + Decodes the specified detector result. + + The detector result. + + + + + This method is used for testing the high-level encoder + + + + + + + Gets the string encoded in the aztec code bits + + The corrected bits. + the decoded string + + + + gets the table corresponding to the char passed + + The t. + + + + + Gets the character (or string) corresponding to the passed code in the given table + + the table used + the code of the character + + + + + Performs RS error correction on an array of bits. + + The rawbits. + the corrected array + + + + Gets the array of bits from an Aztec Code matrix + + The matrix. + the array of bits + + + + Reads a code of given length and at given index in an array of bits + + The rawbits. + The start index. + The length. + + + + + Reads a code of length 8 in an array of bits, padding with zeros + + + + + + + + Packs a bit array into bytes, most significant bit first + + + + + + + Encapsulates logic that can detect an Aztec Code in an image, even if the Aztec Code + is rotated or skewed, or partially obscured. + + David Olivier + + + + Initializes a new instance of the class. + + The image. + + + + Detects an Aztec Code in an image. + + + + + Detects an Aztec Code in an image. + + if true, image is a mirror-image of original. + + encapsulating results of detecting an Aztec Code + + + + + Extracts the number of data layers and data blocks from the layer around the bull's eye + + bullEyeCornerPoints the array of bull's eye corners + + + + + Corrects the parameter bits using Reed-Solomon algorithm + + paremeter bits + compact true if this is a compact Aztec code + + + + + Finds the corners of a bull-eye centered on the passed point + This returns the centers of the diagonal points just outside the bull's eye + Returns [topRight, bottomRight, bottomLeft, topLeft] + + Center point + The corners of the bull-eye + + + + Finds a candidate center point of an Aztec code from an image + + the center point + + + + Gets the Aztec code corners from the bull's eye corners and the parameters. + + the array of bull's eye corners + the array of aztec code corners + + + + Creates a BitMatrix by sampling the provided image. + topLeft, topRight, bottomRight, and bottomLeft are the centers of the squares on the + diagonal just outside the bull's eye. + + The image. + The top left. + The bottom left. + The bottom right. + The top right. + + + + + Samples a line + + start point (inclusive) + end point (exclusive) + number of bits + the array of bits as an int (first bit is high-order bit of result) + + + + Determines whether [is white or black rectangle] [the specified p1]. + + The p1. + The p2. + The p3. + The p4. + true if the border of the rectangle passed in parameter is compound of white points only + or black points only + + + + Gets the color of a segment + + The p1. + The p2. + 1 if segment more than 90% black, -1 if segment is more than 90% white, 0 else + + + + Gets the coordinate of the first point with a different color in the given direction + + The init. + if set to true [color]. + The dx. + The dy. + + + + + Expand the square represented by the corner points by pushing out equally in all directions + + the corners of the square, which has the bull's eye at its center + the original length of the side of the square in the target bit matrix + the new length of the size of the square in the target bit matrix + the corners of the expanded square + + + + Aztec 2D code representation + + Rustam Abdullaev + + + + Compact or full symbol indicator + + + + + Size in pixels (width and height) + + + + + Number of levels + + + + + Number of data codewords + + + + + The symbol image + + + + + represents a token for a binary shift + + + + + initializing constructor + + + + + + + + appends the byte array to the BitArray + + + + + + + string representation + + + + + + Generates Aztec 2D barcodes. + + Rustam Abdullaev + + + + Encodes the given binary content as an Aztec symbol + + input data string + Aztec symbol matrix with metadata + + + + Encodes the given binary content as an Aztec symbol + + input data string + minimal percentage of error check words (According to ISO/IEC 24778:2008, + a minimum of 23% + 3 words is recommended) + if non-zero, a user-specified value for the number of layers + + Aztec symbol matrix with metadata + + + + + This produces nearly optimal encodings of text into the first-level of + encoding used by Aztec code. + It uses a dynamic algorithm. For each prefix of the string, it determines + a set of encodings that could lead to this prefix. We repeatedly add a + character and generate a new set of optimal encodings until we have read + through the entire input. + @author Frank Yellin + @author Rustam Abdullaev + + + + + + + + + + + Convert the text represented by this High Level Encoder into a BitArray. + + text represented by this encoder encoded as a + + + + State represents all information about a sequence necessary to generate the current output. + Note that a state is immutable. + + + + + Create a new state representing this state with a latch to a (not + necessary different) mode, and then a code. + + + + + Create a new state representing this state, with a temporary shift + to a different mode to output a single value. + + + + + Create a new state representing this state, but an additional character + output in Binary Shift mode. + + + + + Create the state identical to this one, but we are no longer in + Binary Shift mode. + + + + + Returns true if "this" state is better (or equal) to be in than "that" + state under all possible circumstances. + + + + + This implementation can detect and decode Aztec codes in an image. + + David Olivier + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + a String representing the content encoded by the Data Matrix code + + + + + Locates and decodes a Data Matrix code in an image. + + image of barcode to decode + passed as a {@link java.util.Hashtable} from {@link com.google.zxing.DecodeHintType} + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Aztec result meta data. + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + + + + + + + + + Renders an Aztec code as a + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + The class holds the available options for the + + + + + Representing the minimal percentage of error correction words. + Note: an Aztec symbol should have a minimum of 25% EC words. + + + + + Specifies the required number of layers for an Aztec code: + a negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + a positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + + + +

See + + DoCoMo's documentation about the result types represented by subclasses of this class.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + Implements KDDI AU's address book format. See + + http://www.au.kddi.com/ezfactory/tec/two_dimensions/index.html. + (Thanks to Yuzo for translating!) + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Implements the "MECARD" address book entry format. + + Supported keys: N, SOUND, TEL, EMAIL, NOTE, ADR, BDAY, URL, plus ORG + Unsupported keys: TEL-AV, NICKNAME + + Except for TEL, multiple values for keys are also not supported; + the first one found takes precedence. + + Our understanding of the MECARD format is based on this document: + + http://www.mobicode.org.tw/files/OMIA%20Mobile%20Bar%20Code%20Standard%20v3.2.1.doc + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes contact information, like that in an address book entry. + + Sean Owen + + + + initializing constructor + + + + + + + + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + the names + + + + + the nicknames + + + + + In Japanese, the name is written in kanji, which can have multiple readings. Therefore a hint + is often provided, called furigana, which spells the name phonetically. + + The pronunciation of the getNames() field, often in hiragana or katakana. + + + + the phone numbers + + + + optional descriptions of the type of each phone number. It could be like "HOME", but, + there is no guaranteed or standard format. + + + + the e-mail addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the instant messenger addresses + + + + + the note field + + + + + the addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the title + + + + + the urls + + + + birthday formatted as yyyyMMdd (e.g. 19780917) + + + a location as a latitude/longitude pair + + + Implements the "BIZCARD" address book entry format, though this has been + largely reverse-engineered from examples observed in the wild -- still + looking for a definitive reference. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a calendar event at a certain time, optionally with attendees and a location. + + Sean Owen + + + + Gets the start. + + + + + Determines whether [is start all day]. + + if start time was specified as a whole day + + + + event end , or null if event has no duration + + + + + Gets a value indicating whether this instance is end all day. + + true if end time was specified as a whole day + + + + Parses a string as a date. RFC 2445 allows the start and end fields to be of type DATE (e.g. 20081021) + or DATE-TIME (e.g. 20081021T123000 for local time, or 20081021T123000Z for UTC). + + The string to parse + + if not a date formatted string + + + + Represents a parsed result that encodes an email message including recipients, subject and body text. + + Sean Owen + + + + the email address + + + + + the TOs + + + + + the CCs + + + + + the BCCs + + + + + the subject + + + + + the body + + + + + the mailto: uri + + + + + Represents a result that encodes an e-mail address, either as a plain address + like "joe@example.org" or a mailto: URL like "mailto:joe@example.org". + + Sean Owen + + + + Implements the "MATMSG" email message entry format. + + Supported keys: TO, SUB, BODY + + Sean Owen + + + + This implements only the most basic checking for an email address's validity -- that it contains + an '@' and contains no characters disallowed by RFC 2822. This is an overly lenient definition of + validity. We want to generally be lenient here since this class is only intended to encapsulate what's + in a barcode, not "judge" it. + + The email. + + true if it is basically a valid email address; otherwise, false. + + + + + Represents a parsed result that encodes extended product information as encoded by the RSS format, like weight, price, dates, etc. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + extension for kilogram weight type + + + + + extension for pounds weight type + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the raw text + + + + + the product id + + + + + the sscc + + + + + the lot number + + + + + the production date + + + + + the packaging date + + + + + the best before date + + + + + the expiration date + + + + + the weight + + + + + the weight type + + + + + the weight increment + + + + + the price + + + + + the price increment + + + + + the price currency + + + + + the uncommon AIs + + + + + the display representation (raw text) + + + + + Parses strings of digits that represent a RSS Extended code. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + tries to parse a text representation to a specific result object + + + + + + + Represents a parsed result that encodes a geographic coordinate, with latitude, longitude and altitude. + + Sean Owen + + + latitude in degrees + + + + longitude in degrees + + + + altitude in meters. If not specified, in the geo URI, returns 0.0 + + + + query string associated with geo URI or null if none exists + + + + the geo URI + + + + a URI link to Google Maps which display the point on the Earth described + by this instance, and sets the zoom level in a way that roughly reflects the + altitude, if specified + + + + Parses a "geo:" URI result, which specifies a location on the surface of + the Earth as well as an optional altitude above the surface. See + + http://tools.ietf.org/html/draft-mayrhofer-geo-uri-00. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a product ISBN number. + + jbreiden@google.com (Jeff Breidenbach) + + + + the ISBN number + + + + Parses strings of digits that represent a ISBN. + + + jbreiden@google.com (Jeff Breidenbach) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + See ISBN-13 For Dummies + + The result. + + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link ResultParser#parseResult(Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Represents the type of data encoded by a barcode -- from plain text, to a + URI, to an e-mail address, etc. + + Sean Owen + + + + Represents a parsed result that encodes a product by an identifier of some kind. + + dswitkin@google.com (Daniel Switkin) + + + + Parses strings of digits that represent a UPC code. + + dswitkin@google.com (Daniel Switkin) + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link #parseResult(com.google.zxing.Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Attempts to parse the raw {@link Result}'s contents as a particular type + of information (email, URL, etc.) and return a {@link ParsedResult} encapsulating + the result of parsing. + + the raw to parse + encapsulating the parsing result + + + + Parses the result. + + The result. + + + +

Parses an "sms:" URI result, which specifies a number to SMS and optional + "via" number. See + the IETF draft on this.

+ +

This actually also parses URIs starting with "mms:", "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + + Represents a parsed result that encodes an SMS message, including recipients, subject and body text. + + Sean Owen + + + +

Parses an "smsto:" URI result, whose format is not standardized but appears to be like: + {@code smsto:number(:body)}.

+

This actually also parses URIs starting with "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+
+ Sean Owen +
+ + +

Parses an "smtp:" URI result, whose format is not standardized but appears to be like: + smtp[:subject[:body]]}.

+

See http://code.google.com/p/zxing/issues/detail?id=536

+
+ Sean Owen +
+ + + Represents a parsed result that encodes a telephone number. + + Sean Owen + + + + Parses a "tel:" URI result, which specifies a phone number. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + A simple result type encapsulating a string that has no further interpretation. + + Sean Owen + + + + A simple result type encapsulating a URI that has no further interpretation. + + Sean Owen + + + true if the URI contains suspicious patterns that may suggest it intends to + mislead the user about its true nature. At the moment this looks for the presence + of user/password syntax in the host/authority portion of a URI which may be used + in attempts to make the URI's host appear to be other than it is. Example: + http://yourbank.com@phisher.com This URI connects to phisher.com but may appear + to connect to yourbank.com at first glance. + + + + Transforms a string that represents a URI into something more proper, by adding or canonicalizing + the protocol. + + + + + Tries to parse results that are a URI of some kind. + + Sean Owen + + + Parses the "URLTO" result format, which is of the form "URLTO:[title]:[url]". + This seems to be used sometimes, but I am not able to find documentation + on its origin or official format? + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Parses contact information formatted according to the VCard (2.1) format. This is not a complete + implementation but should parse information as commonly encoded in 2D barcodes. + + Sean Owen + + + Formats name fields of the form "Public;John;Q.;Reverend;III" into a form like + "Reverend John Q. Public III". + + @param names name values to format, in place + + + + Partially implements the iCalendar format's "VEVENT" format for specifying a + calendar event. See RFC 2445. This supports SUMMARY, DTSTART and DTEND fields. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a Vehicle Identification Number (VIN). + + + + + Detects a result that is likely a vehicle identification number. + @author Sean Owen + + + + + Represents a parsed result that encodes wifi network information, like SSID and password. + + Vikram Aggarwal + + + + + A simple, fast array of bits, represented compactly by an array of ints internally. + + Sean Owen + + + + size of the array, number of elements + + + + + size of the array in bytes + + + + + index accessor + + + + + + + default constructor + + + + + initializing constructor + + desired size of the array + + + + Flips bit i. + + bit to set + + + + + Gets the next set. + + first bit to check + index of first bit that is set, starting from the given index, or size if none are set + at or beyond this given index + + + + see getNextSet(int) + + index to start looking for unset bit + index of next unset bit, or if none are unset until the end + + + Sets a block of 32 bits, starting at bit i. + + + first bit to set + + the new value of the next 32 bits. Note again that the least-significant bit + corresponds to bit i, the next-least-significant to i+1, and so on. + + + + + Sets a range of bits. + + start of range, inclusive. + end of range, exclusive + + + Clears all bits (sets to false). + + + Efficient method to check if a range of bits is set, or not set. + + + start of range, inclusive. + + end of range, exclusive + + if true, checks that bits in range are set, otherwise checks that they are not set + + true iff all bits are set or not set in range, according to value argument + if end is less than start or the range is not contained in the array + + + + Appends the bit. + + The bit. + + + underlying array of ints. The first element holds the first 32 bits, and the least + significant bit is bit 0. + + + + + Appends the least-significant bits, from value, in order from most-significant to + least-significant. For example, appending 6 bits from 0x000001E will append the bits + 0, 1, 1, 1, 1, 0 in that order. + + containing bits to append + bits from value to append + + + + adds the array to the end + + + + + + XOR operation + + + + + + converts to bytes. + + first bit to start writing + array to write into. Bytes are written most-significant byte first. This is the opposite + of the internal representation, which is exposed by BitArray + position in array to start writing + how many bytes to write + + + Reverses all bits in the array. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Erstellt ein neues Objekt, das eine Kopie der aktuellen Instanz darstellt. + + + Ein neues Objekt, das eine Kopie dieser Instanz darstellt. + + + + +

Represents a 2D matrix of bits. In function arguments below, and throughout the common + module, x is the column position, and y is the row position. The ordering is always x, y. + The origin is at the top-left.

+

Internally the bits are represented in a 1-D array of 32-bit ints. However, each row begins + with a new int. This is done intentionally so that we can copy out a row into a BitArray very + efficiently.

+

The ordering of bits is row-major. Within each int, the least significant bits are used first, + meaning they represent lower x values. This is compatible with BitArray's implementation.

+
+ Sean Owen + dswitkin@google.com (Daniel Switkin) +
+ + The width of the matrix + + + + The height of the matrix + + + + This method is for compatibility with older code. It's only logical to call if the matrix + is square, so I'm throwing if that's not the case. + + + row/column dimension of this matrix + + + + + The rowsize of the matrix + + + + + Creates an empty square . + + height and width + + + + Creates an empty square . + + bit matrix width + bit matrix height + + + + Interprets a 2D array of booleans as a , where "true" means an "on" bit. + + bits of the image, as a row-major 2D array. Elements are arrays representing rows + representation of image + + +

Gets the requested bit, where true means black.

+ +
+ The horizontal component (i.e. which column) + + The vertical component (i.e. which row) + + value of given bit in matrix + +
+ + +

Flips the given bit.

+
+ The horizontal component (i.e. which column) + The vertical component (i.e. which row) +
+ + + flip all of the bits, if shouldBeFlipped is true for the coordinates + + should return true, if the bit at a given coordinate should be flipped + + + + Exclusive-or (XOR): Flip the bit in this {@code BitMatrix} if the corresponding + mask bit is set. + + The mask. + + + Clears all bits (sets to false). + + +

Sets a square region of the bit matrix to true.

+ +
+ The horizontal position to begin at (inclusive) + + The vertical position to begin at (inclusive) + + The width of the region + + The height of the region + +
+ + A fast method to retrieve one row of data from the matrix as a BitArray. + + + The row to retrieve + + An optional caller-allocated BitArray, will be allocated if null or too small + + The resulting BitArray - this reference should always be used even when passing + your own row + + + + + Sets the row. + + row to set + {@link BitArray} to copy from + + + + Modifies this {@code BitMatrix} to represent the same but rotated 180 degrees + + + + + This is useful in detecting the enclosing rectangle of a 'pure' barcode. + + {left,top,width,height} enclosing rectangle of all 1 bits, or null if it is all white + + + + This is useful in detecting a corner of a 'pure' barcode. + + {x,y} coordinate of top-left-most 1 bit, or null if it is all white + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + The line separator. + + A that represents this instance. + + + + + Clones this instance. + + + + +

This provides an easy abstraction to read bits at a time from a sequence of bytes, where the + number of bits read is not often a multiple of 8.

+ +

This class is thread-safe but not reentrant. Unless the caller modifies the bytes array + it passed in, in which case all bets are off.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + bytes from which this will read bits. Bits will be read from the first byte first. + Bits are read within a byte from most-significant to least-significant bit. + + + + + index of next bit in current byte which would be read by the next call to {@link #readBits(int)}. + + + + + index of next byte in input byte array which would be read by the next call to {@link #readBits(int)}. + + + + number of bits to read + + int representing the bits read. The bits will appear as the least-significant + bits of the int + + if numBits isn't in [1,32] or more than is available + + + number of bits that can be read successfully + + + + Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1 + of ISO 18004. + + + Sean Owen + + + character set ECI value + representing ECI of given value, or null if it is legal but unsupported + + + character set ECI encoding name + representing ECI for character encoding, or null if it is legalbut unsupported + + + + Encapsulates the result of decoding a matrix of bits. This typically + applies to 2D barcode formats. For now it contains the raw bytes obtained, + as well as a String interpretation of those bytes, if applicable. + Sean Owen + + + + + raw bytes representing the result, or null if not applicable + + + + + how many bits of are valid; typically 8 times its length + + + + + text representation of the result + + + + + list of byte segments in the result, or null if not applicable + + + + + name of error correction level used, or null if not applicable + + + + + gets a value which describe if structure append data was found + + + + + number of errors corrected, or null if not applicable + + + + + gives the sequence number of the result if structured append was found + + + + + number of erasures corrected, or null if not applicable + + + + + gives the parity information if structured append was found + + + + + Miscellanseous data value for the various decoders + + The other. + + + + initializing constructor + + + + + + + + + initializing constructor + + + + + + + + + + + initializing constructor + + + + + + + + + + initializing constructor + + + + + + + + + + + + Defines an container for encoder options + + + + + Gets the data container for all options + + + + + event is raised when a value is changed + + + + + Gets or sets a flag which cause a deeper look into the bitmap + + + true if [try harder]; otherwise, false. + + + + + Image is a pure monochrome image of a barcode. + + + true if monochrome image of a barcode; otherwise, false. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + The character set. + + + + + Image is known to be of one of a few possible formats. + Maps to a {@link java.util.List} of {@link BarcodeFormat}s. + + + The possible formats. + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + true if it should assume a Code 39 check digit; otherwise, false. + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). + + + true if it should assume GS1; otherwise, false. + + + + + Assume MSI codes employ a check digit. Maps to . + + + true if it should assume a MSI check digit; otherwise, false. + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Initializes a new instance of the class. + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Encapsulates the result of detecting a barcode in an image. This includes the raw + matrix of black/white pixels corresponding to the barcode, and possibly points of interest + in the image, like the location of finder patterns or corners of the barcode in the image.

+
+ Sean Owen +
+ + + the detected bits + + + + + the pixel points where the result is found + + + + + initializing constructor + + + + + + + General math-related and numeric utility functions. + + + + + Ends up being a bit faster than {@link Math#round(float)}. This merely rounds its + argument to the nearest int, where x.5 rounds up to x+1. Semantics of this shortcut + differ slightly from {@link Math#round(float)} in that half rounds down for negative + values. -2.5 rounds to -3, not -2. For purposes here it makes no difference. + + real value to round + nearest int + + + + + + + + + + Euclidean distance between points A and B + + + + + + + + + + Euclidean distance between points A and B + + + + + values to sum + sum of values in array + + +

A somewhat generic detector that looks for a barcode-like rectangular region within an image. + It looks within a mostly white region of an image for a region of black and white, but mostly + black. It returns the four corners of the region, as best it can determine.

+ +
+ Sean Owen +
+ + + initializing constructor + + + + + +

Detects a rectangular region of black and white -- mostly black -- with a region of mostly + white, in an image.

+
+ [] describing the corners of the rectangular region. The first and + last points are opposed on the diagonal, as are the second and third. The first point will be + the topmost point and the last, the bottommost. The second point will be leftmost and the + third, the rightmost + +
+ + Attempts to locate a corner of the barcode by scanning up, down, left or right from a center + point which should be within the barcode. + + + center's x component (horizontal) + + same as deltaY but change in x per step instead + + minimum value of x + + maximum value of x + + center's y component (vertical) + + change in y per step. If scanning up this is negative; down, positive; + left or right, 0 + + minimum value of y to search through (meaningless when di == 0) + + maximum value of y + + maximum run of white pixels that can still be considered to be within + the barcode + + a encapsulating the corner that was found + + + + Computes the start and end of a region of pixels, either horizontally or vertically, that could + be part of a Data Matrix barcode. + + + if scanning horizontally, this is the row (the fixed vertical location) + where we are scanning. If scanning vertically it's the column, the fixed horizontal location + + largest run of white pixels that can still be considered part of the + barcode region + + minimum pixel location, horizontally or vertically, to consider + + maximum pixel location, horizontally or vertically, to consider + + if true, we're scanning left-right, instead of up-down + + int[] with start and end of found range, or null if no such range is found + (e.g. only white was found) + + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. By keeping track of the + last black points it encountered, it determines the corners of the barcode. + + David Olivier + + + + Creates a WhiteRectangleDetector instance + + The image. + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + Creates a WhiteRectangleDetector instance + + barcode image to find a rectangle in + initial size of search area around center + x position of search center + y position of search center + + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + + Initializes a new instance of the class. + + The image. + if image is too small + + + + Initializes a new instance of the class. + + The image. + Size of the init. + The x. + The y. + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. + + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + recenters the points of a constant distance towards the center + + bottom most point + left most point + right most point + top most point + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + Determines whether a segment contains a black point + + min value of the scanned coordinate + max value of the scanned coordinate + value of fixed coordinate + set to true if scan must be horizontal, false if vertical + + true if a black point has been found, else false. + + + + + Superclass of classes encapsulating types ECIs, according to "Extended Channel Interpretations" + 5.3 of ISO 18004. + + Sean Owen + + + + the ECI value + + + + ECI value + representing ECI of given value, or null if it is legal but unsupported + ArgumentException if ECI value is invalid + + + + Defines an container for encoder options + + + + + Gets the data container for all options + + + + + Specifies the height of the barcode image + + + + + Specifies the width of the barcode image + + + + + Don't put the content string into the output image. + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + + + + + Specifies whether the data should be encoded to the GS1 standard; + FNC1 character is added in front of the data + + + + + Initializes a new instance of the class. + + + + This Binarizer implementation uses the old ZXing global histogram approach. It is suitable + for low-end mobile devices which don't have enough CPU or memory to use a local thresholding + algorithm. However, because it picks a global black point, it cannot handle difficult shadows + and gradients. + + Faster mobile devices and all desktop applications should probably use HybridBinarizer instead. + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The source. + + + + Applies simple sharpening to the row data to improve performance of the 1D Readers. + + + + + + + + Does not sharpen the data, as this call is intended to only be used by 2D Readers. + + + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + + A new concrete Binarizer implementation object. + + + + Implementations of this class can, given locations of finder patterns for a QR code in an + image, sample the right points in the image to reconstruct the QR code, accounting for + perspective distortion. It is abstracted since it is relatively expensive and should be allowed + to take advantage of platform-specific optimized implementations, like Sun's Java Advanced + Imaging library, but which may not be available in other environments such as J2ME, and vice + versa. + + The implementation used can be controlled by calling {@link #setGridSampler(GridSampler)} + with an instance of a class which implements this interface. + + Sean Owen + + + the current implementation of + + + + Sets the implementation of used by the library. One global + instance is stored, which may sound problematic. But, the implementation provided + ought to be appropriate for the entire platform, and all uses of this library + in the whole lifetime of the JVM. For instance, an Android activity can swap in + an implementation that takes advantage of native platform libraries. + + The platform-specific object to install. + + + +

Samples an image for a square matrix of bits of the given dimension. This is used to extract + the black/white modules of a 2D barcode like a QR Code found in an image. Because this barcode + may be rotated or perspective-distorted, the caller supplies four points in the source image + that define known points in the barcode, so that the image may be sampled appropriately.

+

The last eight "from" parameters are four X/Y coordinate pairs of locations of points in + the image that define some significant points in the image to be sample. For example, + these may be the location of finder pattern in a QR Code.

+

The first eight "to" parameters are four X/Y coordinate pairs measured in the destination + , from the top left, where the known points in the image given by the "from" + parameters map to.

+

These 16 parameters define the transformation needed to sample the image.

+
+ image to sample + The dimension X. + The dimension Y. + The p1 preimage X. + The p1 preimage Y. + The p2 preimage X. + The p2 preimage Y. + The p3 preimage X. + The p3 preimage Y. + The p4 preimage X. + The p4 preimage Y. + The p1 image X. + The p1 image Y. + The p2 image X. + The p2 image Y. + The p3 image X. + The p3 image Y. + The p4 image X. + The p4 image Y. + + representing a grid of points sampled from the image within a region + defined by the "from" parameters + + ReaderException if image can't be sampled, for example, if the transformation defined +
+ + + + + + + + + + + +

Checks a set of points that have been transformed to sample points on an image against + the image's dimensions to see if the point are even within the image.

+ +

This method will actually "nudge" the endpoints back onto the image if they are found to be + barely (less than 1 pixel) off the image. This accounts for imperfect detection of finder + patterns in an image where the QR Code runs all the way to the image border.

+ +

For efficiency, the method will check points from either end of the line until one is found + to be within the image. Because the set of points are assumed to be linear, this is valid.

+ +
+ image into which the points should map + + actual points in x1,y1,...,xn,yn form + +
+ + This class implements a local thresholding algorithm, which while slower than the + GlobalHistogramBinarizer, is fairly efficient for what it does. It is designed for + high frequency images of barcodes with black data on white backgrounds. For this application, + it does a much better job than a global blackpoint with severe shadows and gradients. + However it tends to produce artifacts on lower frequency images and is therefore not + a good general purpose binarizer for uses outside ZXing. + + This class extends GlobalHistogramBinarizer, using the older histogram approach for 1D readers, + and the newer local approach for 2D readers. 1D decoding using a per-row histogram is already + inherently local, and only fails for horizontal gradients. We can revisit that problem later, + but for now it was not a win to use local blocks for 1D. + + This Binarizer is the default for the unit tests and the recommended class for library users. + dswitkin@google.com (Daniel Switkin) + + + + + gives the black matrix + + + + + initializing constructor + + + + + + creates a new instance + + + + + + + Calculates the final BitMatrix once for all requests. This could be called once from the + constructor instead, but there are some advantages to doing it lazily, such as making + profiling easier, and not doing heavy lifting when callers don't expect it. + + + + + For each 8x8 block in the image, calculate the average black point using a 5x5 grid + of the blocks around it. Also handles the corner cases (fractional blocks are computed based + on the last 8 pixels in the row/column which are also used in the previous block). + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + The black points. + The matrix. + + + + Applies a single threshold to an 8x8 block of pixels. + + The luminances. + The xoffset. + The yoffset. + The threshold. + The stride. + The matrix. + + + + Calculates a single black point for each 8x8 block of pixels and saves it away. + See the following thread for a discussion of this algorithm: + http://groups.google.com/group/zxing/browse_thread/thread/d06efa2c35a7ddc0 + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + + + +

This class implements a perspective transform in two dimensions. Given four source and four + destination points, it will compute the transformation implied between them. The code is based + directly upon section 3.4.2 of George Wolberg's "Digital Image Warping"; see pages 54-56.

+
+ Sean Owen +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Convenience method, not optimized for performance. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

This class contains utility methods for performing mathematical operations over + the Galois Fields. Operations use a given primitive polynomial in calculations.

+

Throughout this package, elements of the GF are represented as an {@code int} + for convenience and speed (but at the cost of memory). +

+
+ Sean Owen +
+ + + Create a representation of GF(size) using the given primitive polynomial. + + irreducible polynomial whose coefficients are represented by + * the bits of an int, where the least-significant bit represents the constant + * coefficient + the size of the field + the factor b in the generator polynomial can be 0- or 1-based + * (g(x) = (x+a^b)(x+a^(b+1))...(x+a^(b+2t-1))). + * In most cases it should be 1, but for QR code it is 0. + + + + Builds the monomial. + + The degree. + The coefficient. + the monomial representing coefficient * x^degree + + + + Implements both addition and subtraction -- they are the same in GF(size). + + sum/difference of a and b + + + + Exps the specified a. + + 2 to the power of a in GF(size) + + + + Logs the specified a. + + A. + base 2 log of a in GF(size) + + + + Inverses the specified a. + + multiplicative inverse of a + + + + Multiplies the specified a with b. + + A. + The b. + product of a and b in GF(size) + + + + Gets the size. + + + + + Gets the generator base. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + +

Represents a polynomial whose coefficients are elements of a GF. + Instances of this class are immutable.

+

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + the {@link GenericGF} instance representing the field to use + to perform computations + coefficients as ints representing elements of GF(size), arranged + from most significant (highest-power term) coefficient to least significant + if argument is null or empty, + or if leading coefficient is 0 and this is not a + constant polynomial (that is, it is not the monomial "0") + + + + degree of this polynomial + + + + + Gets a value indicating whether this is zero. + + true iff this polynomial is the monomial "0" + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + +

Implements Reed-Solomon decoding, as the name implies.

+ +

The algorithm will not be explained here, but the following references were helpful + in creating this implementation:

+ + + +

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+ +
+ Sean Owen + William Rucklidge + sanfordsquires +
+ + +

Decodes given set of received codewords, which include both data and error-correction + codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place, + in the input.

+
+ data and error-correction codewords + number of error-correction codewords available + false: decoding fails +
+ + + Implements Reed-Solomon encoding, as the name implies. + + Sean Owen + William Rucklidge + + + + Common string-related functions. + + Sean Owen + Alex Dupre + + + + SJIS + + + + + GB2312 + + + + + Guesses the encoding. + + bytes encoding a string, whose encoding should be guessed + decode hints if applicable + name of guessed encoding; at the moment will only guess one of: + {@link #SHIFT_JIS}, {@link #UTF8}, {@link #ISO88591}, or the platform + default encoding if none of these can possibly be correct + + + + This implementation can detect and decode Data Matrix codes in an image. + + bbrown@google.com (Brian Brown) + + + + + Locates and decodes a Data Matrix code in an image. + + + a String representing the content encoded by the Data Matrix code + + + + Locates and decodes a Data Matrix code in an image. + + + + a String representing the content encoded by the Data Matrix code + + + + does nothing here + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a Data Matrix code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + Guillaume Le Biller Added to zxing lib. + + + + encodes the content to a BitMatrix + + + + + + + + + + encodes the content to a BitMatrix + + + + + + + + + + + Encode the given symbol info to a bit matrix. + + The DataMatrix placement. + The symbol info to encode. + + + The bit matrix generated. + + + + Convert the ByteMatrix to BitMatrix. + + The input matrix. + The requested width of the image (in pixels) with the Datamatrix code + The requested height of the image (in pixels) with the Datamatrix code + The output matrix. + + + + bbrown@google.com (Brian Brown) + + + + + to parse + if dimension is < 8 or > 144 or not 0 mod 2 + + + + +

Creates the version object based on the dimension of the original bit matrix from + the datamatrix code.

+ +

See ISO 16022:2006 Table 7 - ECC 200 symbol attributes

+ + Original including alignment patterns + encapsulating the Data Matrix Code's "version" + if the dimensions of the mapping matrix are not valid + Data Matrix dimensions. +
+
+ + +

Reads the bits in the representing the mapping matrix (No alignment patterns) + in the correct order in order to reconstitute the codewords bytes contained within the + Data Matrix Code.

+ + bytes encoded within the Data Matrix Code + if the exact number of bytes expected is not read +
+
+ + +

Reads a bit of the mapping matrix accounting for boundary wrapping.

+ + Row to read in the mapping matrix + Column to read in the mapping matrix + Number of rows in the mapping matrix + Number of columns in the mapping matrix + value of the given bit in the mapping matrix +
+
+ + +

Reads the 8 bits of the standard Utah-shaped pattern.

+ +

See ISO 16022:2006, 5.8.1 Figure 6

+ + Current row in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Current column in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the utah shape +
+
+ + +

Reads the 8 bits of the special corner condition 1.

+ +

See ISO 16022:2006, Figure F.3

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 1 +
+
+ + +

Reads the 8 bits of the special corner condition 2.

+ +

See ISO 16022:2006, Figure F.4

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 2 +
+
+ + +

Reads the 8 bits of the special corner condition 3.

+ +

See ISO 16022:2006, Figure F.5

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 3 +
+
+ + +

Reads the 8 bits of the special corner condition 4.

+ +

See ISO 16022:2006, Figure F.6

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 4 +
+
+ + +

Extracts the data region from a that contains + alignment patterns.

+ + Original with alignment patterns + BitMatrix that has the alignment patterns removed +
+
+ + +

Encapsulates a block of data within a Data Matrix Code. Data Matrix Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ + bbrown@google.com (Brian Brown) +
+
+ + +

When Data Matrix Codes use multiple data blocks, they actually interleave the bytes of each of them. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ + bytes as read directly from the Data Matrix Code + version of the Data Matrix Code + DataBlocks containing original bytes, "de-interleaved" from representation in the + Data Matrix Code +
+
+ + +

Data Matrix Codes can encode text as bits in one of several modes, and can use multiple modes + in one Data Matrix Code. This class decodes the bits back into text.

+ +

See ISO 16022:2006, 5.2.1 - 5.2.9.2

+ + bbrown@google.com (Brian Brown) + Sean Owen +
+
+ + + See ISO 16022:2006, Annex C Table C.1 + The C40 Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, Annex C Table C.2 + The Text Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, 5.2.3 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.5 and Annex C, Table C.1 + + + + + See ISO 16022:2006, 5.2.6 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.7 + + + + + See ISO 16022:2006, 5.2.8 and Annex C Table C.3 + + + + + See ISO 16022:2006, 5.2.9 and Annex B, B.2 + + + + + See ISO 16022:2006, Annex B, B.2 + + + + +

The main class which implements Data Matrix Code decoding -- as opposed to locating and extracting + the Data Matrix Code from an image.

+ + bbrown@google.com (Brian Brown) +
+
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a Data Matrix Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+ + booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code + if the Data Matrix Code cannot be decoded +
+
+ + +

Decodes a Data Matrix Code represented as a . A 1 or "true" is taken + to mean a black module.

+
+ booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+ + data and error correction codewords + number of codewords that are data bytes +
+
+ + + The Version object encapsulates attributes about a particular + size Data Matrix Code. + + bbrown@google.com (Brian Brown) + + + + + returns the version numer + + + + + + returns the symbol size rows + + + + + + returns the symbols size columns + + + + + + retursn the data region size rows + + + + + + returns the data region size columns + + + + + + returns the total codewords count + + + + + +

Deduces version information from Data Matrix dimensions.

+ + Number of rows in modules + Number of columns in modules + Version for a Data Matrix Code of those dimensions + if dimensions do correspond to a valid Data Matrix size +
+
+ + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the Data Matrix code version's format.

+
+
+ + + returns the version number as string + + + + + + See ISO 16022:2006 5.5.1 Table 7 + + + + +

Encapsulates logic that can detect a Data Matrix Code in an image, even if the Data Matrix Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + +

Detects a Data Matrix Code in an image.

+
+ encapsulating results of detecting a Data Matrix Code or null +
+ + + Calculates the position of the white top right module using the output of the rectangle detector + for a rectangular matrix + + + + + Calculates the position of the white top right module using the output of the rectangle detector + for a square matrix + + + + + Increments the Integer associated with a key by one. + + + + + Counts the number of black/white transitions between two points, using something like Bresenham's algorithm. + + + + + Simply encapsulates two points and a number of transitions between them. + + + + + Orders ResultPointsAndTransitions by number of transitions, ascending. + + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Symbol Character Placement Program. Adapted from Annex M.1 in ISO/IEC 16022:2000(E). + + + + + Main constructor + + the codewords to place + the number of columns + the number of rows + + + + Places the 8 bits of a utah-shaped symbol character in ECC200. + + The row. + The col. + character position + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Enumeration for encodation types + + + + + Error Correction Code for ECC200. + + + + + Lookup table which factors to use for which number of error correction codewords. + See FACTORS. + + + + + Precomputed polynomial factors for ECC 200. + + + + + Creates the ECC200 error correction for an encoded message. + + The codewords. + information about the symbol to be encoded + the codewords with interleaved error correction. + + + + DataMatrix ECC 200 data encoder following the algorithm described in ISO/IEC 16022:200(E) in + annex S. + + + + + Padding character + + + + + mode latch to C40 encodation mode + + + + + mode latch to Base 256 encodation mode + + + + + FNC1 Codeword + + + + + Structured Append Codeword + + + + + Reader Programming + + + + + Upper Shift + + + + + 05 Macro + + + + + 06 Macro + + + + + mode latch to ANSI X.12 encodation mode + + + + + mode latch to Text encodation mode + + + + + mode latch to EDIFACT encodation mode + + + + + ECI character (Extended Channel Interpretation) + + + + + Unlatch from C40 encodation + + + + + Unlatch from X12 encodation + + + + + 05 Macro header + + + + + 06 Macro header + + + + + Macro trailer + + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + the encoded message (the char values range from 0 to 255) + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + requested shape. May be {@code SymbolShapeHint.FORCE_NONE},{@code SymbolShapeHint.FORCE_SQUARE} or {@code SymbolShapeHint.FORCE_RECTANGLE}. + the minimum symbol size constraint or null for no constraint + the maximum symbol size constraint or null for no constraint + encoding mode to start with + the encoded message (the char values range from 0 to 255) + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + Symbol info table for DataMatrix. + + + + Overrides the symbol info set used by this class. Used for testing purposes. + + @param override the symbol info set to use + + + + Enumeration for DataMatrix symbol shape hint. It can be used to force square or rectangular + symbols. + + + + + The class holds the available options for the DatamatrixWriter + + + + + Specifies the matrix shape for Data Matrix + + + + + Specifies a minimum barcode size + + + + + Specifies a maximum barcode size + + + + + Specifies the default encodation + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + implements an Intelligent Mail barcode + Rishabh Hatgadkar + + + + + mike32767 + Manuel Kasten + + + + + to parse + + + + +

MaxiCodes can encode text or structured information as bits in one of several modes, + with multiple character sets in one code. This class decodes the bits back into text.

+ + mike32767 + Manuel Kasten +
+
+ + +

The main class which implements MaxiCode decoding -- as opposed to locating and extracting + the MaxiCode from an image.

+ + Manuel Kasten +
+
+ + + This implementation can detect and decode a MaxiCode in an image. + + + + + Locates and decodes a MaxiCode in an image. + + a String representing the content encoded by the MaxiCode + if a MaxiCode cannot be decoded + + + + + Locates and decodes a MaxiCode within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + + This class attempts to decode a barcode from an image, not by scanning the whole image, + but by scanning subsets of the image. This is important when there may be multiple barcodes in + an image, and detecting a barcode may find parts of multiple barcode and fail to decode + (e.g. QR Codes). Instead this scans the four quadrants of the image -- and also the center + 'quadrant' to cover the case where a barcode is found in the center. + + + + + + Initializes a new instance of the class. + + The @delegate. + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Attempts to locate multiple barcodes in an image by repeatedly decoding portion of the image. + After one barcode is found, the areas left, above, right and below the barcode's + {@link com.google.zxing.ResultPoint}s are scanned, recursively.

+

A caller may want to also employ {@link ByQuadrantReader} when attempting to find multiple + 2D barcodes, like QR Codes, in an image, where the presence of multiple barcodes might prevent + detecting any one of them.

+

That is, instead of passing a {@link Reader} a caller might pass + new ByQuadrantReader(reader).

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The @delegate. + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Implementation of this interface attempt to read several barcodes from one image. + Sean Owen + + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + +

Encapsulates logic that can detect one or more QR Codes in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+ + Sean Owen + Hannes Erven +
+
+ + + Initializes a new instance of the class. + + The image. + + + + Detects the multi. + + The hints. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +

In contrast to , this class will return an array of all possible + QR code locations in the image.

+ +

Use the TRY_HARDER hint to ask for a more thorough detection.

+ + Sean Owen + Hannes Erven +
+
+ + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF_PERCENT percent in their + estimated modules sizes. + + + + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF pixels/module in their + estimated modules sizes. + + + + + A comparator that orders FinderPatterns by their estimated module size. + + + + +

Creates a finder that will search the image for three finder patterns.

+ + image to search +
+
+ + + + the 3 best s from our list of candidates. The "best" are + those that have been detected at least CENTER_QUORUM times, and whose module + size differs from the average among those patterns the least + + + + + This implementation can detect and decode multiple QR Codes in an image. + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + +

Decodes Codabar barcodes.

+ + Bas Vijfwinkel +
+
+ + These represent the encodings of characters, as patterns of wide and narrow bars. The 7 least-significant bits of + each int correspond to the pattern of wide and narrow, with 1s representing "wide" and 0s representing narrow. + + + + Records the size of all runs of white and black pixels, starting with white. + This is just like recordPattern, except it records all the counters, and + uses our builtin "counters" member for storage. + + row to count from + + + + This class renders CodaBar as []. + + dsbnatut@gmail.com (Kazuki Nishiura) + + + + The class holds the available options for the QrCodeWriter + + + + + if true, don't switch to codeset C for numbers + + + + +

Decodes Code 128 barcodes.

+ + Sean Owen +
+
+ + + This object renders a CODE128 code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + +

Decodes Code 39 barcodes. Supports "Full ASCII Code 39" if USE_CODE_39_EXTENDED_MODE is set.

+ Sean Owen + @see Code93Reader +
+
+ + + Returns a string with all possible characters + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. It will not decoded "extended Code 39" sequences. + + + + + Creates a reader that can be configured to check the last character as a check digit. + It will not decoded "extended Code 39" sequences. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + + Creates a reader that can be configured to check the last character as a check digit, + or optionally attempt to decode "extended Code 39" sequences that are used to encode + the full ASCII character set. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + if true, will attempt to decode extended Code 39 sequences in the text. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a CODE39 code as a . + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Decodes Code 93 barcodes.

+ Sean Owen + +
+
+ + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a CODE93 code as a BitMatrix + + + + + + output to append to + start position + pattern to append + unused + 9 + + + +

Implements decoding of the EAN-13 format.

+ + dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Initializes a new instance of the class. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + Get the format of this decoder. + The 1D format. + + + + + Based on pattern of odd-even ('L' and 'G') patterns used to encoded the explicitly-encoded + digits in a barcode, determines the implicitly encoded first digit and adds it to the + result string. + + string to insert decoded first digit into + int whose bits indicates the pattern of odd/even L/G patterns used to + encode digits + -1 if first digit cannot be determined + + + + This object renders an EAN13 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Implements decoding of the EAN-8 format.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Get the format of this decoder. + The 1D format. + + + + + This object renders an EAN8 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + + + a byte array of horizontal pixels (false = white, true = black) + + + + + Records EAN prefix to GS1 Member Organization, where the member organization + correlates strongly with a country. This is an imperfect means of identifying + a country of origin by EAN-13 barcode value. See + + http://en.wikipedia.org/wiki/List_of_GS1_country_codes. + + Sean Owen + + + + +

Implements decoding of the ITF format, or Interleaved Two of Five.

+ +

This Reader will scan ITF barcodes of certain lengths only. + At the moment it reads length 6, 8, 10, 12, 14, 16, 18, 20, 24, 44 and 48 as these have appeared "in the wild". Not all + lengths are scanned, especially shorter ones, to avoid false positives. This in turn is due to a lack of + required checksum function.

+ +

The checksum is optional and is not applied by this Reader. The consumer of the decoded + value will have to apply a checksum if required.

+ +

http://en.wikipedia.org/wiki/Interleaved_2_of_5 + is a great reference for Interleaved 2 of 5 information.

+ + kevin.osullivan@sita.aero, SITA Lab. +
+
+ + + Valid ITF lengths. Anything longer than the largest value is also allowed. + + + + + Start/end guard pattern. + + Note: The end pattern is reversed because the row is reversed before + searching for the END_PATTERN + + + + + Patterns of Wide / Narrow lines to indicate each digit + + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + + row of black/white values to search + offset of start pattern + The payload end. + to append decoded chars to + + false, if decoding could not complete successfully + + + + + Identify where the start of the middle / payload section starts. + + row of black/white values to search + Array, containing index of start of 'start block' and end of 'start block' + + + + The start & end patterns must be pre/post fixed by a quiet zone. This + zone must be at least 10 times the width of a narrow line. Scan back until + we either get to the start of the barcode or match the necessary number of + quiet zone pixels. + + Note: Its assumed the row is reversed when using this method to find + quiet zone after the end pattern. + + ref: http://www.barcode-1.net/i25code.html + + bit array representing the scanned barcode. + index into row of the start or end pattern. + false, if the quiet zone cannot be found + + + + Skip all whitespace until we get to the first black line. + + row of black/white values to search + index of the first black line or -1 if no black lines are found in the row. + + + + Identify where the end of the middle / payload section ends. + + row of black/white values to search + Array, containing index of start of 'end block' and end of 'end + block' or null, if nothing found + + + + + row of black/white values to search + position to start search + pattern of counts of number of black and white pixels that are being searched for as a pattern + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a sequence of ITF black/white lines into single + digit. + + the counts of runs of observed black/white/black/... values + The decoded digit + + false, if digit cannot be decoded + + + + + This object renders a ITF code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code bool[]} of horizontal pixels (false = white, true = black) + + + + + + + Decodes MSI barcodes. + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. + + + + + Creates a reader that can be configured to check the last character as a check digit, + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a MSI code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

A reader that can read all available UPC/EAN formats. If a caller wants to try to + read all such formats, it is most efficient to use this implementation rather than invoke + individual readers.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Encapsulates functionality and implementation that is common to one-dimensional barcodes.

+ dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + a byte array of horizontal pixels (0 = white, 1 = black) + + + + Appends the given pattern to the target array starting at pos. + + encode black/white pattern into this array + position to start encoding at in target + lengths of black/white runs to encode + starting color - false for white, true for black + the number of elements added to target. + + + + Gets the default margin. + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + + barcode contents to encode + a bool[] of horizontal pixels (false = white, true = black) + + + + Calculates the checksum digit modulo10. + + The contents. + + + + + Encapsulates functionality and implementation that is common to all families + of one-dimensional barcodes. + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + + + + + + + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + Note that we don't try rotation without the try harder flag, even if rotation was supported. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + We're going to examine rows from the middle outward, searching alternately above and below the + middle, and farther out each time. rowStep is the number of rows between each successive + attempt above and below the middle. So we'd scan row middle, then middle - rowStep, then + middle + rowStep, then middle - (2 * rowStep), etc. + rowStep is bigger as the image is taller, but is always at least 1. We've somewhat arbitrarily + decided that moving up and down by about 1/16 of the image is pretty good; we try more of the + image if "trying harder". + + The image to decode + Any hints that were requested + The contents of the decoded barcode + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the pattern in reverse. + + The row. + The start. + The counters. + + + + + Determines how closely a set of observed counts of runs of black/white values matches a given + target pattern. This is reported as the ratio of the total variance from the expected pattern + proportions across all pattern elements, to the length of the pattern. + + observed counters + expected pattern + The most any counter can differ before we give up + ratio of total variance between counters and pattern compared to total pattern size, + where the ratio has been multiplied by 256. So, 0 means no variance (perfect match); 256 means + the total variance between counters and patterns equals the pattern length, higher values mean + even more variance + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + This object renders a Plessey code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + Superclass of implementations that read barcodes in the RSS family of formats. + + + + + Initializes a new instance of the class. + + + + + Gets the decode finder counters. + + + + + + Gets the data character counters. + + + + + + Gets the odd rounding errors. + + + + + + Gets the even rounding errors. + + + + + + Gets the odd counts. + + + + + + Gets the even counts. + + + + + + Parses the finder value. + + The counters. + The finder patterns. + The value. + + + + + Counts the specified array. + + The array. + + + + + Increments the specified array. + + The array. + The errors. + + + + Decrements the specified array. + + The array. + The errors. + + + + Determines whether [is finder pattern] [the specified counters]. + + The counters. + + true if [is finder pattern] [the specified counters]; otherwise, false. + + + + + Encapsulates a since character value in an RSS barcode, including its checksum information. + + + + + Gets the value. + + + + + Gets the checksum portion. + + + + + Initializes a new instance of the class. + + The value. + The checksum portion. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Gets the information. + + + + + + Parses the information. + + + + + + Creates the decoder. + + The information. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + One row of an RSS Expanded Stacked symbol, consisting of 1+ expanded pairs. + + + + + Did this row of the image have to be reversed (mirrored) to recognize the pairs? + + + + + Two rows are equal if they contain the same pairs in the same order. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Encapsulates an RSS barcode finder pattern, including its start/end position and row. + + + + + Gets the value. + + + + + Gets the start end. + + + + + Gets the result points. + + + + + Initializes a new instance of the class. + + The value. + The start end. + The start. + The end. + The row number. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Decodes RSS-14, including truncated and stacked variants. See ISO/IEC 24724:2006. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Adapted from listings in ISO/IEC 24724 Appendix B and Appendix G. + + + + + Gets the RS svalue. + + The widths. + Width of the max. + if set to true [no narrow]. + + + + +

Implements decoding of the UPC-A format.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen +
+
+ + +

Like decodeRow(int, BitArray, java.util.Map), but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ + + + + +
+ + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Decodes the specified image. + + The image. + The hints. + + + + + Get the format of this decoder. + The 1D format. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + This object renders a UPC-A code as a . + qwandor@google.com (Andrew Walbran) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + @see UPCEANExtension5Support + + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + + + @see UPCEANExtension2Support + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + one {@link ResultMetadataType} to appropriate value, or {@code null} if not known + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Start/end guard pattern. + + + + + Pattern marking the middle of a UPC/EAN pattern, separating the two halves. + + + + + end guard pattern. + + + + + "Odd", or "L" patterns used to encode UPC/EAN digits. + + + + + As above but also including the "even", or "G" patterns used to encode UPC/EAN digits. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + +

Like , but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ row index into the image + encoding of the row of the barcode image + start/end column where the opening start pattern was found + optional hints that influence decoding + encapsulating the result of decoding a barcode in the row +
+ + + + string of digits to check + see + + + + Computes the UPC/EAN checksum on a string of digits, and reports + whether the checksum is correct or not. + + string of digits to check + true iff string of digits passes the UPC/EAN checksum algorithm + + + + Decodes the end. + + The row. + The end start. + + + + + + row of black/white values to search + position to start search + if true, indicates that the pattern specifies white/black/white/... + pixel counts, otherwise, it is interpreted as black/white/black/... + pattern of counts of number of black and white pixels that are being + searched for as a pattern + array of counters, as long as pattern, to re-use + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a single UPC/EAN-encoded digit. + + row of black/white values to decode + the counts of runs of observed black/white/black/... values + horizontal offset to start decoding from + the set of patterns to use to decode -- sometimes different encodings + for the digits 0-9 are used, and this indicates the encodings for 0 to 9 that should + be used + horizontal offset of first pixel beyond the decoded digit + + + + Get the format of this decoder. + + The 1D format. + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ aripollak@gmail.com (Ari Pollak) + dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Gets the default margin. + + + + +

Implements decoding of the UPC-E format.

+

Thisis a great reference for + UPC-E information.

+ Sean Owen +
+
+ + + The pattern that marks the middle, and end, of a UPC-E pattern. + There is no "second half" to a UPC-E barcode. + + + + + See L_AND_G_PATTERNS these values similarly represent patterns of + even-odd parity encodings of digits that imply both the number system (0 or 1) + used, and the check digit. + + + + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Decodes the end. + + The row. + The end start. + + + + + see checkStandardUPCEANChecksum(String) + + + + + + + Determines the num sys and check digit. + + The result string. + The lg pattern found. + + + + + Get the format of this decoder. + The 1D format. + + + + + Expands a UPC-E value back into its full, equivalent UPC-A code value. + + UPC-E code as string of digits + equivalent UPC-A code as string of digits + + + + + This object renders an UPC-E code as a {@link BitMatrix}. + @author 0979097955s@gmail.com (RX) + + + + + Metadata about a PDF417 Barcode + + Guenther Grau + + + + A Barcode Value for the PDF417 barcode. + The scanner will iterate through the bitmatrix, + and given the different methods or iterations + will increment a given barcode value's confidence. + + When done, this will return the values of highest confidence. + + Guenther Grau + + + + Incremenets the Confidence for a given value. (Adds an occurance of a value) + + + Value. + + + + Determines the maximum occurrence of a set value and returns all values which were set with this occurrence. + + an array of int, containing the values with the highest occurrence, or null, if no value was set. + + + + Returns the confience value for a given barcode value + + Barcode value. + + + + A Bounding Box helper class + + Guenther Grau + + + + Initializes a new instance of the class. + returns null if the corner points don't match up correctly + + The image. + The top left. + The bottom left. + The top right. + The bottom right. + + + + + Creates the specified box. + + The box. + + + + + Initializes a new instance of the class. + Will throw an exception if the corner points don't match up correctly + + Image. + Top left. + Top right. + Bottom left. + Bottom right. + + + + Merge two Bounding Boxes, getting the left corners of left, and the right corners of right + (Images should be the same) + + Left. + Right. + + + + Adds the missing rows. + + The missing rows. + Missing start rows. + Missing end rows. + If set to true is left. + + + + Calculates the minimum and maximum X & Y values based on the corner points. + + + + + If we adjust the width, set a new right corner coordinate and recalculate + + Bottom right. + + + + A Codeword in the PDF417 barcode + + Guenther Grau + + + + Default value for the RowNumber (-1 being an invalid real number) + + + + + Initializes a new instance of the class. + + Start x. + End x. + Bucket. + Value. + + + + Gets the width. + + The width. + + + + Gets a value indicating whether this instance has valid row number. + + true if this instance has valid row number; otherwise, false. + + + + Determines whether this instance is valid row number the specified rowNumber. + + true if this instance is valid row number the specified rowNumber; otherwise, false. + Row number. + + + + Sets the row number as the row's indicator column. + + + + + Returns a that represents the current . + + A that represents the current . + + + +

This class contains the methods for decoding the PDF417 codewords.

+ + SITA Lab (kevin.osullivan@sita.aero) +
+
+ + + Table containing values for the exponent of 900. + This is used in the numeric compaction decode algorithm. + + + + + Text Compaction mode (see 5.4.1.5) permits all printable ASCII characters to be + encoded, i.e. values 32 - 126 inclusive in accordance with ISO/IEC 646 (IRV), as + well as selected control characters. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + The Text Compaction mode includes all the printable ASCII characters + (i.e. values from 32 to 126) and three ASCII control characters: HT or tab + (ASCII value 9), LF or line feed (ASCII value 10), and CR or carriage + return (ASCII value 13). The Text Compaction mode also includes various latch + and shift characters which are used exclusively within the mode. The Text + Compaction mode encodes up to 2 characters per codeword. The compaction rules + for converting data into PDF417 codewords are defined in 5.4.2.2. The sub-mode + switches are defined in 5.4.2.3. + + The text compaction data. + The byte compaction data if there + was a mode shift. + The size of the text compaction and byte compaction data. + The decoded data is appended to the result. + + + + + Byte Compaction mode (see 5.4.3) permits all 256 possible 8-bit byte values to be encoded. + This includes all ASCII characters value 0 to 127 inclusive and provides for international + character set support. + + The byte compaction mode i.e. 901 or 924 + The array of codewords (data + error) + Currently active character encoding + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Numeric Compaction mode (see 5.4.4) permits efficient encoding of numeric data strings. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Convert a list of Numeric Compacted codewords from Base 900 to Base 10. + EXAMPLE + Encode the fifteen digit numeric string 000213298174000 + Prefix the numeric string with a 1 and set the initial value of + t = 1 000 213 298 174 000 + Calculate codeword 0 + d0 = 1 000 213 298 174 000 mod 900 = 200 + + t = 1 000 213 298 174 000 div 900 = 1 111 348 109 082 + Calculate codeword 1 + d1 = 1 111 348 109 082 mod 900 = 282 + + t = 1 111 348 109 082 div 900 = 1 234 831 232 + Calculate codeword 2 + d2 = 1 234 831 232 mod 900 = 632 + + t = 1 234 831 232 div 900 = 1 372 034 + Calculate codeword 3 + d3 = 1 372 034 mod 900 = 434 + + t = 1 372 034 div 900 = 1 524 + Calculate codeword 4 + d4 = 1 524 mod 900 = 624 + + t = 1 524 div 900 = 1 + Calculate codeword 5 + d5 = 1 mod 900 = 1 + t = 1 div 900 = 0 + Codeword sequence is: 1, 624, 434, 632, 282, 200 + + Decode the above codewords involves + 1 x 900 power of 5 + 624 x 900 power of 4 + 434 x 900 power of 3 + + 632 x 900 power of 2 + 282 x 900 power of 1 + 200 x 900 power of 0 = 1000213298174000 + + Remove leading 1 => Result is 000213298174000 + The array of codewords + The number of codewords + The decoded string representing the Numeric data. + + + + + + + Guenther Grau + + + + Returns the DetectionResult Columns. This does a fair bit of calculation, so call it sparingly. + + The detection result columns. + + + + Adjusts the indicator column row numbers. + + Detection result column. + + + + return number of codewords which don't have a valid row number. Note that the count is not accurate as codewords . + will be counted several times. It just serves as an indicator to see when we can stop adjusting row numbers + + The row numbers. + + + + Adjusts the row numbers by row. + + The row numbers by row. + + + + Adjusts the row numbers from both Row Indicators + + zero + + + + Adjusts the row numbers from Right Row Indicator. + + The unadjusted row count. + + + + Adjusts the row numbers from Left Row Indicator. + + Unadjusted row Count. + + + + Adjusts the row number if valid. + + The invalid rows + Row indicator row number. + Invalid row counts. + Codeword. + + + + Adjusts the row numbers. + + Barcode column. + Codewords row. + Codewords. + + + + Adjusts the row number. + + true, if row number was adjusted, false otherwise. + Codeword. + Other codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + The maximum distance to search in the codeword array in both the positive and negative directions + + + + + The Bounding Box around the column (in the BitMatrix) + + The box. + + + + The Codewords the Box encodes for, offset by the Box minY. + Remember to Access this ONLY through GetCodeword(imageRow) if you're accessing it in that manner. + + The codewords. + + + + Initializes a new instance of the class. + + The Bounding Box around the column (in the BitMatrix) + + + + Converts the Image's Row to the index in the Codewords array + + The Codeword Index. + Image row. + + + + Converts the Codeword array index into a Row in the Image (BitMatrix) + + The Image Row. + Codeword index. + + + + Gets the codeword for a given row + + The codeword. + Image row. + + + + Gets the codeword closest to the specified row in the image + + Image row. + + + + Sets the codeword for an image row + + Image row. + Codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + Gets or sets a value indicating whether this instance is the left indicator + + true if this instance is left; otherwise, false. + + + + Initializes a new instance of the class. + + Box. + If set to true is left. + + + + Sets the Row Numbers as Inidicator Columns + + + + + TODO implement properly + TODO maybe we should add missing codewords to store the correct row number to make + finding row numbers for other columns easier + use row height count to make detection of invalid row numbers more reliable + + The indicator column row numbers. + Metadata. + + + + Gets the row heights. + + The row heights. + + + + Adjusts the in omplete indicator column row numbers. + + Metadata. + + + + Gets the barcode metadata. + + The barcode metadata. + + + + Prune the codewords which do not match the metadata + TODO Maybe we should keep the incorrect codewords for the start and end positions? + + Codewords. + Metadata. + + + + Returns a that represents the current . + + A that represents the current . + + + +

PDF417 error correction implementation.

+

This example + is quite useful in understanding the algorithm.

+ Sean Owen + +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the specified received. + + received codewords + number of those codewords used for EC + location of erasures + The error locations count. + + + + + Runs the euclidean algorithm (Greatest Common Divisor) until r's degree is less than R/2 + + The euclidean algorithm. + + + + Finds the error locations as a direct application of Chien's search + + The error locations. + Error locator. + + + + Finds the error magnitudes by directly applying Forney's Formula + + The error magnitudes. + Error evaluator. + Error locator. + Error locations. + + + +

A field based on powers of a generator integer, modulo some modulus.

+ +
+ Sean Owen +
+ + + + + Sean Owen + + + + Gets the coefficients. + + The coefficients. + + + + degree of this polynomial + + + + + Gets a value indicating whether this instance is zero. + + true if this polynomial is the monomial "0" + + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + + + Adds another Modulus + + Other. + + + + Subtract another Modulus + + Other. + + + + Multiply by another Modulus + + Other. + + + + Returns a Negative version of this instance + + + + + Multiply by a Scalar. + + Scalar. + + + + Multiplies by a Monomial + + The by monomial. + Degree. + Coefficient. + + + + Returns a that represents the current . + + A that represents the current . + + + + + + Guenther Grau + creatale GmbH (christoph.schulz@creatale.de) + + + + The ratios table + + + + + Initializes the class & Pre-computes the symbol ratio table. + + + + + Gets the decoded value. + + The decoded value. + Module bit count. + + + + Samples the bit counts. + + The bit counts. + Module bit count. + + + + Gets the decoded codeword value. + + The decoded codeword value. + Module bit count. + + + + Gets the bit value. + + The bit value. + Module bit count. + + + + Gets the closest decoded value. + + The closest decoded value. + Module bit count. + + + + + + Guenther Grau + + + + Decode the specified image, imageTopLeft, imageBottomLeft, imageTopRight, imageBottomRight, minCodewordWidth + and maxCodewordWidth. + TODO: don't pass in minCodewordWidth and maxCodewordWidth, pass in barcode columns for start and stop pattern + columns. That way width can be deducted from the pattern column. + This approach also allows to detect more details about the barcode, e.g. if a bar type (white or black) is wider + than it should be. This can happen if the scanner used a bad blackpoint. + + Image. + Image top left. + Image bottom left. + Image top right. + Image bottom right. + Minimum codeword width. + Max codeword width. + + + + Merge the specified leftRowIndicatorColumn and rightRowIndicatorColumn. + + Left row indicator column. + Right row indicator column. + + + + Adjusts the bounding box. + + The bounding box. + Row indicator column. + + + + Gets the barcode metadata. + + The barcode metadata. + Left row indicator column. + Right row indicator column. + + + + Gets the row indicator column. + + The row indicator column. + Image. + Bounding box. + Start point. + If set to true left to right. + Minimum codeword width. + Max codeword width. + + + + Adjusts the codeword count. + + Detection result. + Barcode matrix. + + + + Creates the decoder result. + + The decoder result. + Detection result. + + + + This method deals with the fact, that the decoding process doesn't always yield a single most likely value. The + current error correction implementation doesn't deal with erasures very well, so it's better to provide a value + for these ambiguous codewords instead of treating it as an erasure. The problem is that we don't know which of + the ambiguous values to choose. We try decode using the first value, and if that fails, we use another of the + ambiguous values and try to decode again. This usually only happens on very hard to read and decode barcodes, + so decoding the normal barcodes is not affected by this. + + The decoder result from ambiguous values. + Ec level. + Codewords. + contains the indexes of erasures. + array with the indexes that have more than one most likely value. + two dimensional array that contains the ambiguous values. The first dimension must + be the same Length as the ambiguousIndexes array. + + + + Creates the barcode matrix. + + The barcode matrix. + Detection result. + + + + Tests to see if the Barcode Column is Valid + + true, if barcode column is valid, false otherwise. + Detection result. + Barcode column. + + + + Gets the start column. + + The start column. + Detection result. + Barcode column. + Image row. + If set to true left to right. + + + + Detects the codeword. + + The codeword. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + Minimum codeword width. + Max codeword width. + + + + Gets the module bit count. + + The module bit count. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + + + + Gets the number of EC code words. + + The number of EC code words. + Barcode EC level. + + + + Adjusts the codeword start column. + + The codeword start column. + Image. + Minimum column. + Max column. + If set to true left to right. + Codeword start column. + Image row. + + + + Checks the codeword for any skew. + + true, if codeword is within the skew, false otherwise. + Codeword size. + Minimum codeword width. + Max codeword width. + + + + Decodes the codewords. + + The codewords. + Codewords. + Ec level. + Erasures. + + + + Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place. + + The errors. + data and error correction codewords. + positions of any known erasures. + number of error correction codewords that are available in codewords. + + + + Verifies that all is well with the the codeword array. + + Codewords. + Number EC codewords. + + + + Gets the bit count for codeword. + + The bit count for codeword. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Module bit count. + + + + Returns a that represents the jagged array. + + A that represents the jagged array. + Barcode matrix as a jagged array. + + + +

Encapsulates logic that can detect a PDF417 Code in an image, even if the + PDF417 Code is rotated or skewed, or partially obscured.

+ + SITA Lab (kevin.osullivan@sita.aero) + dswitkin@google.com (Daniel Switkin) + Guenther Grau +
+
+ + + B S B S B S B S Bar/Space pattern + 11111111 0 1 0 1 0 1 000. + + + + + 1111111 0 1 000 1 0 1 00 1 + + + + + if we set the value too low, then we don't detect the correct height of the bar if the start patterns are damaged. + if we set the value too high, then we might detect the start pattern from a neighbor barcode. + + + + + A PDF471 barcode should have at least 3 rows, with each row being >= 3 times the module width. Therefore it should be at least + 9 pixels tall. To be conservative, we use about half the size to ensure we don't miss it. + + + + +

Detects a PDF417 Code in an image. Only checks 0 and 180 degree rotations.

+
+ barcode image to decode + optional hints to detector + if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned + + encapsulating results of detecting a PDF417 code + +
+ + + Detects PDF417 codes in an image. Only checks 0 degree rotation (so rotate the matrix and check again outside of this method) + + multiple if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned. + bit matrix to detect barcodes in. + List of ResultPoint arrays containing the coordinates of found barcodes + + + + Locate the vertices and the codewords area of a black blob using the Start and Stop patterns as locators. + + Matrix. + Start row. + Start column. + an array containing the vertices: + vertices[0] x, y top left barcode + vertices[1] x, y bottom left barcode + vertices[2] x, y top right barcode + vertices[3] x, y bottom right barcode + vertices[4] x, y top left codeword area + vertices[5] x, y bottom left codeword area + vertices[6] x, y top right codeword area + vertices[7] x, y bottom right codeword area + + + + + Copies the temp data to the final result + + Result. + Temp result. + Destination indexes. + + + + Finds the rows with the given pattern. + + The rows with pattern. + Matrix. + Height. + Width. + Start row. + Start column. + Pattern. + + + + Finds the guard pattern. Uses System.Linq.Enumerable.Repeat to fill in counters. This might be a performance issue? + + start/end horizontal offset of guard pattern, as an array of two ints. + matrix row of black/white values to search + column x position to start search. + row y position to start search. + width the number of pixels to search on this row. + If set to true search the white patterns first. + pattern of counts of number of black and white pixels that are being searched for as a pattern. + counters array of counters, as long as pattern, to re-use . + + + + Determines how closely a set of observed counts of runs of black/white. + values matches a given target pattern. This is reported as the ratio of + the total variance from the expected pattern proportions across all + pattern elements, to the length of the pattern. + + + ratio of total variance between counters and pattern compared to + total pattern size, where the ratio has been multiplied by 256. + So, 0 means no variance (perfect match); 256 means the total + variance between counters and patterns equals the pattern length, + higher values mean even more variance + + observed counters. + expected pattern. + The most any counter can differ before we give up. + + + + PDF 417 Detector Result class. Skipped private backing stores. + Guenther Grau + + + + + Initializes a new instance of the class. + + Bits. + Points. + + + + Holds all of the information for a barcode in a format where it can be easily accessible + + Jacob Haynes + + + + + the height of the matrix (Rows) + the width of the matrix (Cols) + + + + + Jacob Haynes + + + + + Creates a Barcode row of the width + + The width. + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + A boolean which is true if the bar black false if it is white + How many spots wide the bar is. + + + + + This function scales the row + + How much you want the image to be scaled, must be greater than or equal to 1. + the scaled row + + + + + Represents possible PDF417 barcode compaction types. + + + + + + + + + + + + + + + + + + + + + + + + + Data object to specify the minimum and maximum number of rows and columns for a PDF417 barcode. + @author qwandor@google.com (Andrew Walbran) + + + + + Initializes a new instance of the class. + + The min cols. + The max cols. + The min rows. + The max rows. + + + + Gets the min cols. + + + + + Gets the max cols. + + + + + Gets the min rows. + + + + + Gets the max rows. + + + + + Top-level class for the logic part of the PDF417 implementation. + + + + + The start pattern (17 bits) + + + + + The stop pattern (18 bits) + + + + + The codeword table from the Annex A of ISO/IEC 15438:2001(E). + + + + + Calculates the necessary number of rows as described in annex Q of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol (r) + + + + Calculates the number of pad codewords as described in 4.9.2 of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol + the number of pad codewords + + + + Generates the barcode logic. + + the message to encode + PDF417 error correction level to use + + + + Determine optimal nr of columns and rows for the specified number of + codewords. + + number of code words + number of error correction code words + The longest dimension of the barcode, used for columns + The short dimension of the barcode, used for rows + The height of a row, will alter this parameter if aspectRatio>4 (aspectRatio==AUTO) + dimension object containing cols as width and rows as height + + + + Sets max/min row/col values + + maximum allowed columns + minimum allowed columns + maximum allowed rows + minimum allowed rows + + + + Sets compaction to values stored in enum + + compaction mode to use + + + + Sets compact to be true or false + + if true, enables compaction + + + + Sets output encoding. + + sets character encoding to use + + + + Sets the disable eci. + + if set to true don't add an ECI segment for different encodings than default. + + + + defines the level of the error correction / count of error correction codewords + + + + + PDF417 error correction code following the algorithm described in ISO/IEC 15438:2001(E) in + chapter 4.10. + + + + + Tables of coefficients for calculating error correction words + (see annex F, ISO/IEC 15438:2001(E)) + + + + + Determines the number of error correction codewords for a specified error correction + level. + + the error correction level (0-8) + the number of codewords generated for error correction + + + + Determines the error correction level for AUTO + + The error correction level (0-9) + The number of codewords for AUTO errorCorrectionLevel + the number of codewords generated for error correction + + + + Returns the recommended minimum error correction level as described in annex E of + ISO/IEC 15438:2001(E). + + the number of data codewords + the recommended minimum error correction level + + + + Generates the error correction codewords according to 4.10 in ISO/IEC 15438:2001(E). + + the data codewords + the error correction level (0-8) + the String representing the error correction codewords + + + + defines the level of the error correction / count of error correction codewords + + + + + PDF417 high-level encoder following the algorithm described in ISO/IEC 15438:2001(E) in + annex P. + + + + + code for Text compaction + + + + + code for Byte compaction + + + + + code for Numeric compaction + + + + + Text compaction submode Alpha + + + + + Text compaction submode Lower + + + + + Text compaction submode Mixed + + + + + Text compaction submode Punctuation + + + + + mode latch to Text Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters NOT a multiple of 6) + + + + + mode latch to Numeric Compaction mode + + + + + mode shift to Byte Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters a multiple of 6) + + + + + identifier for a user defined Extended Channel Interpretation (ECI) + + + + + identifier for a general purpose ECO format + + + + + identifier for an ECI of a character set of code page + + + + + Raw code table for text compaction Mixed sub-mode + + + + + Raw code table for text compaction: Punctuation sub-mode + + + + + Performs high-level encoding of a PDF417 message using the algorithm described in annex P + of ISO/IEC 15438:2001(E). If byte compaction has been selected, then only byte compaction + is used. + + the message + compaction mode to use + character encoding used to encode in default or byte compaction + or null for default / not applicable + if true, don't add an ECI segment for different encodings than default + the encoded message (the char values range from 0 to 928) + + + + Encode parts of the message using Text Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.2. + + the message + the start position within the message + the number of characters to encode + receives the encoded codewords + should normally be SUBMODE_ALPHA + the text submode in which this method ends + + + + + Encode parts of the message using Byte Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.3. The Unicode characters will be converted to binary using the cp437 + codepage. + + the message converted to a byte array + the start position within the message + the number of bytes to encode + the mode from which this method starts + receives the encoded codewords + + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using text compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using binary compaction. + + the message + the message converted to a byte array + the start position within the message + + the requested character count + + + + The class holds the available options for the + + + + + Specifies whether to use compact mode for PDF417 (type ). + + + + + Specifies what compaction mode to use for PDF417 (type + ). + + + + + Specifies the minimum and maximum number of rows and columns for PDF417 (type + ). + + + + + Specifies what degree of error correction to use + + + + + Specifies what degree of error correction to use + + + + + Specifies what character encoding to use where applicable (type {@link String}) + + + + + Explicitly disables ECI segment when generating PDF417 Code + That is against the specification but some + readers have problems if the charset is switched from + CP437 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use different encodings + and the ECI segment is omitted. + + + + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Maximum Codewords (Data + Error). + + + + + Gets the bit count sum. + + The bit count sum. + Module bit count. + + + + Converts an ICollection<int> to an int[] + Carry-over from Java. Will likely remove and replace with the Generic .ToArray() method. + + The int array. + List. + + + + Translate the symbol into a codeword + + the codeword corresponding to the symbol. + encoded symbol to translate to a codeword + + + + The sorted table of all possible symbols. Extracted from the PDF417 + specification. The index of a symbol in this table corresponds to the + index into the codeword table. + + + + + This table contains to codewords for all symbols. + + + + + This implementation can detect and decode PDF417 codes in an image. + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Locates and decodes a PDF417 code in an image. + + a String representing the content encoded by the PDF417 code + if a PDF417 cannot be decoded + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + **Note** this will return the FIRST barcode discovered if there are many. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Locates and decodes Multiple PDF417 codes in an image. + + an array of Strings representing the content encoded by the PDF417 codes + + + + + Locates and decodes multiple barcodes in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcodes encode + + + + + Decode the specified image, with the hints and optionally multiple barcodes. + Based on Owen's Comments in , this method has been modified to continue silently + if a barcode was not decoded where it was detected instead of throwing a new exception object. + + Image. + Hints. + If set to true multiple. + + + + Gets the maximum width of the barcode + + The max width. + P1. + P2. + + + + Gets the minimum width of the barcode + + The minimum width. + P1. + P2. + + + + Gets the maximum width of the codeword. + + The max codeword width. + P. + + + + Gets the minimum width of the codeword. + + The minimum codeword width. + P. + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + PDF 417 result meta data. + Guenther Grau + + + + + The Segment ID represents the segment of the whole file distributed over different symbols. + + + + + Is the same for each related PDF417 symbol + + + + + always null + + + + + true if it is the last segment + + + + + count of segments, -1 if not set + + + + + Filename of the encoded file + + + + + filesize in bytes of the encoded file + returns filesize in bytes, -1 if not set + + + + + 16-bit CRC checksum using CCITT-16 + returns crc checksum, -1 if not set + + + + + unix epock timestamp, elapsed seconds since 1970-01-01 + returns elapsed seconds, -1 if not set + + + + + Jacob Haynes + qwandor@google.com (Andrew Walbran) + + + + + default white space (margin) around the code + + + + + default error correction level + + + + + default aspect ratio + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The height of a row in the barcode + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Takes encoder, accounts for width/height, and retrieves bit matrix + + + + + This takes an array holding the values of the PDF 417 + + a byte array of information with 0 is black, and 1 is white + border around the barcode + BitMatrix of the input + + + + Takes and rotates the it 90 degrees + + + + Sean Owen + + + {@link BitMatrix} to parse + ReaderException if dimension is not >= 21 and 1 mod 4 + + +

Reads format information from one of its two locations within the QR Code.

+ +
+ {@link FormatInformation} encapsulating the QR Code's format info + + ReaderException if both format information locations cannot be parsed as + the valid encoding of format information + +
+ +

Reads version information from one of its two locations within the QR Code.

+ +
+ {@link Version} encapsulating the QR Code's version + + ReaderException if both version information locations cannot be parsed as + the valid encoding of version information + +
+ +

Reads the bits in the {@link BitMatrix} representing the finder pattern in the + correct order in order to reconstruct the codewords bytes contained within the + QR Code.

+ +
+ bytes encoded within the QR Code + + ReaderException if the exact number of bytes expected is not read +
+ + Revert the mask removal done while reading the code words. The bit matrix should revert to its original state. + + + Prepare the parser for a mirrored operation. + This flag has effect only on the {@link #readFormatInformation()} and the + {@link #readVersion()}. Before proceeding with {@link #readCodewords()} the + {@link #mirror()} method should be called. + + @param mirror Whether to read version and format information mirrored. + + + Mirror the bit matrix in order to attempt a second reading. + + +

Encapsulates a block of data within a QR Code. QR Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

When QR Codes use multiple data blocks, they are actually interleaved. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ +
+ bytes as read directly from the QR Code + + version of the QR Code + + error-correction level of the QR Code + + {@link DataBlock}s containing original bytes, "de-interleaved" from representation in the + QR Code + +
+ +

Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations + of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix, + including areas used for finder patterns, timing patterns, etc. These areas should be unused + after the point they are unmasked anyway.

+ +

Note that the diagram in section 6.8.1 is misleading since it indicates that i is column position + and j is row position. In fact, as the text says, i is row position and j is column position.

+ +
+ Sean Owen +
+ + See ISO 18004:2006 6.8.1 + + +

Implementations of this method reverse the data masking process applied to a QR Code and + make its bits ready to read.

+
+ + representation of QR Code bits + dimension of QR Code, represented by bits, being unmasked +
+ +

QR Codes can encode text as bits in one of several modes, and can use multiple modes + in one QR Code. This class decodes the bits back into text.

+ +

See ISO 18004:2006, 6.4.3 - 6.4.7

+ Sean Owen +
+
+ + + See ISO 18004:2006, 6.4.4 Table 5 + + + + + See specification GBT 18284-2000 + + The bits. + The result. + The count. + + + + +

The main class which implements QR Code decoding -- as opposed to locating and extracting + the QR Code from an image.

+
+ + Sean Owen + +
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a QR Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Decodes a QR Code represented as a {@link BitMatrix}. A 1 or "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+
+ data and error correction codewords + number of codewords that are data bytes + +
+ + +

See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels + defined by the QR code standard.

+
+ Sean Owen +
+ + L = ~7% correction + + + M = ~15% correction + + + Q = ~25% correction + + + H = ~30% correction + + + + Gets the bits. + + + + + Gets the name. + + + + + Ordinals this instance. + + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Fors the bits. + + int containing the two bits encoding a QR Code's error correction level + + representing the encoded error correction level + + + +

Encapsulates a QR Code's format information, including the data mask used and + error correction level.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + +
+ + See ISO 18004:2006, Annex C, Table C.1 + + + Offset i holds the number of 1 bits in the binary representation of i + + + + Decodes the format information. + + format info indicator, with mask still applied + The masked format info2. + + information about the format it specifies, or null + if doesn't seem to match any known pattern + + + + +

See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which + data can be encoded to bits in the QR code standard.

+
+ Sean Owen +
+ + + Gets the name. + + + + + enumeration for encoding modes + + + + + + + + + + numeric encoding + + + + + alpha-numeric encoding + + + + + structured append + + + + + byte mode encoding + + + + + ECI segment + + + + + Kanji mode + + + + + FNC1 char, first position + + + + + FNC1 char, second position + + + + + Hanzi mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See GBT 18284-2000; "Hanzi" is a transliteration of this mode name. + + + + Fors the bits. + + four bits encoding a QR Code data mode + + encoded by these bits + + if bits do not correspond to a known mode + + + version in question + + number of bits used, in this QR Code symbol {@link Version}, to encode the + count of characters that will follow encoded in this {@link Mode} + + + + + Gets the bits. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Meta-data container for QR Code decoding. Instances of this class may be used to convey information back to the + decoding caller. Callers are expected to process this. + + + + + Initializes a new instance of the class. + + if set to true [mirrored]. + + + + true if the QR Code was mirrored. + + + + + Apply the result points' order correction due to mirroring. + + Array of points to apply mirror correction to. + + + + See ISO 18004:2006 Annex D + + Sean Owen + + + See ISO 18004:2006 Annex D. + Element i represents the raw version bits that specify version i + 7 + + + + + Gets the version number. + + + + + Gets the alignment pattern centers. + + + + + Gets the total codewords. + + + + + Gets the dimension for version. + + + + + Gets the EC blocks for level. + + The ec level. + + + +

Deduces version information purely from QR Code dimensions.

+ +
+ dimension in modules + + for a QR Code of that dimension or null +
+ + + Gets the version for number. + + The version number. + + + + See ISO 18004:2006 Annex E + + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + + Gets the EC codewords per block. + + + + + Gets the num blocks. + + + + + Gets the total EC codewords. + + + + + Gets the EC blocks. + + + + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the QR code version's format.

+
+
+ + + Gets the count. + + + + + Gets the data codewords. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + See ISO 18004:2006 6.5.1 Table 9 + + +

Encapsulates an alignment pattern, which are the smaller square patterns found in + all but the simplest QR Codes.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Determines if this alignment pattern "about equals" an alignment pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing an average of the two. + + The i. + The j. + New size of the module. + + + +

This class attempts to find alignment patterns in a QR Code. Alignment patterns look like finder + patterns but are smaller and appear at regular intervals throughout the image.

+ +

At the moment this only looks for the bottom-right alignment pattern.

+ +

This is mostly a simplified copy of {@link FinderPatternFinder}. It is copied, + pasted and stripped down here for maximum performance but does unfortunately duplicate + some code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Creates a finder that will look in a portion of the whole image.

+ +
+ image to search + + left column from which to start searching + + top row from which to start searching + + width of region to search + + height of region to search + + estimated module size so far + + callback function which is called, when a result point is found +
+ +

This method attempts to find the bottom-right alignment pattern in the image. It is a bit messy since + it's pretty performance-critical and so is written to be fast foremost.

+ +
+ if found +
+ + Given a count of black/white/black pixels just seen and an end position, + figures the location of the center of this black/white/black run. + + + + count of black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/1 ratios + used by alignment patterns to be considered a match + + + + +

After a horizontal scan finds a potential alignment pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + alignment pattern to see if the same proportion is detected.

+
+ row where an alignment pattern was detected + center of the section that appears to cross an alignment pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of alignment pattern, or null if not found + +
+ +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will see if this pattern had been + found on a previous horizontal scan. If so, we consider it confirmed and conclude we have + found the alignment pattern.

+ +
+ reading state module counts from horizontal scan + + row where alignment pattern may be found + + end of possible alignment pattern in row + + {@link AlignmentPattern} if we have found the same pattern twice, or null if not + +
+ + +

Encapsulates logic that can detect a QR Code in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + + Gets the image. + + + + + Gets the result point callback. + + + + +

Detects a QR Code in an image.

+
+ + encapsulating results of detecting a QR Code + +
+ + +

Detects a QR Code in an image.

+
+ optional hints to detector + + encapsulating results of detecting a QR Code + +
+ + + Processes the finder pattern info. + + The info. + + + +

Computes the dimension (number of modules on a size) of the QR Code based on the position + of the finder patterns and estimated module size.

+
+
+ + +

Computes an average estimated module size based on estimated derived from the positions + of the three finder patterns.

+
+ detected top-left finder pattern center + detected top-right finder pattern center + detected bottom-left finder pattern center + estimated module size +
+ +

Estimates module size based on two finder patterns -- it uses + {@link #sizeOfBlackWhiteBlackRunBothWays(int, int, int, int)} to figure the + width of each, measuring along the axis between their centers.

+
+
+ + See {@link #sizeOfBlackWhiteBlackRun(int, int, int, int)}; computes the total width of + a finder pattern by looking for a black-white-black run from the center in the direction + of another point (another finder pattern center), and in the opposite direction too. + + + +

This method traces a line from a point in the image, in the direction towards another point. + It begins in a black region, and keeps going until it finds white, then black, then white again. + It reports the distance from the start to this point.

+ +

This is used when figuring out how wide a finder pattern is, when the finder pattern + may be skewed or rotated.

+
+
+ + +

Attempts to locate an alignment pattern in a limited region of the image, which is + guessed to contain it. This method uses {@link AlignmentPattern}.

+
+ estimated module size so far + x coordinate of center of area probably containing alignment pattern + y coordinate of above + number of pixels in all directions to search from the center + + if found, or null otherwise + +
+ + +

Encapsulates a finder pattern, which are the three square patterns found in + the corners of QR Codes. It also encapsulates a count of similar finder patterns, + as a convenience to the finder's bookkeeping.

+
+ Sean Owen +
+ + + Gets the size of the estimated module. + + + The size of the estimated module. + + + +

Determines if this finder pattern "about equals" a finder pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing a weighted average + based on count. + + The i. + The j. + New size of the module. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+
+ Sean Owen +
+ + + 1 pixel/module times 3 modules/center + + + + + support up to version 20 for mobile clients + + + + +

Creates a finder that will search the image for three finder patterns.

+
+ image to search +
+ + + Initializes a new instance of the class. + + The image. + The result point callback. + + + + Gets the image. + + + + + Gets the possible centers. + + + + Given a count of black/white/black/white/black pixels just seen and an end position, + figures the location of the center of this run. + + + + count of black/white/black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/3/1/1 ratios + used by finder patterns to be considered a match + + + + + + count of black/white/black/white/black pixels just read + true if the proportions of the counts is close enough to the 1/1/3/1/1 ratios + by finder patterns to be considered a match + + + + After a vertical and horizontal scan finds a potential finder pattern, this method + "cross-cross-cross-checks" by scanning down diagonally through the center of the possible + finder pattern to see if the same proportion is detected. + @param maxCount maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + @param originalStateCountTotal The original state count total. + + row where a finder pattern was detected + center of the section that appears to cross a finder pattern + true if proportions are withing expected limits + + + +

After a horizontal scan finds a potential finder pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + finder pattern to see if the same proportion is detected.

+
+ row where a finder pattern was detected + center of the section that appears to cross a finder pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of finder pattern, or null if not found + +
+ +

Like {@link #crossCheckVertical(int, int, int, int)}, and in fact is basically identical, + except it reads horizontally instead of vertically. This is used to cross-cross + check a vertical cross check and locate the real center of the alignment pattern.

+
+
+ + + @see #handlePossibleCenter(int[], int, int) + + reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + ignored + true if a finder pattern candidate was found this time + + + +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will, ah, cross-cross-check + with another horizontal scan. This is needed primarily to locate the real horizontal + center of the pattern in cases of extreme skew. + And then we cross-cross-cross check with another diagonal scan.

+ If that succeeds the finder pattern location is added to a list that tracks + the number of times each location has been nearly-matched as a finder pattern. + Each additional find is more evidence that the location is in fact a finder + pattern center +
+ reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + + true if a finder pattern candidate was found this time + +
+ + number of rows we could safely skip during scanning, based on the first + two finder patterns that have been located. In some cases their position will + allow us to infer that the third pattern must lie below a certain point farther + down in the image. + + + + true iff we have found at least 3 finder patterns that have been detected + at least {@link #CENTER_QUORUM} times each, and, the estimated module size of the + candidates is "pretty similar" + + + + the 3 best {@link FinderPattern}s from our list of candidates. The "best" are + those that have been detected at least {@link #CENTER_QUORUM} times, and whose module + size differs from the average among those patterns the least + + + + + Orders by furthest from average + + + +

Orders by {@link FinderPattern#getCount()}, descending.

+
+ + +

Encapsulates information about finder patterns in an image, including the location of + the three finder patterns, and their estimated module size.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The pattern centers. + + + + Gets the bottom left. + + + + + Gets the top left. + + + + + Gets the top right. + + + + + JAVAPORT: The original code was a 2D array of ints, but since it only ever gets assigned + 0, 1 and 2 I'm going to use less memory and go with bytes. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Gets the height. + + + + + Gets the width. + + + + + Gets or sets the with the specified x. + + + + + an internal representation as bytes, in row-major order. array[y][x] represents point (x,y) + + + + + Sets the specified x. + + The x. + The y. + The value. + + + + Sets the specified x. + + The x. + The y. + if set to true [value]. + + + + Clears the specified value. + + The value. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + Encode "bytes" with the error correction level "ecLevel". The encoding mode will be chosen + internally by chooseMode(). On success, store the result in "qrCode". + We recommend you to use QRCode.EC_LEVEL_L (the lowest level) for + "getECLevel" since our primary use is to show QR code on desktop screens. We don't need very + strong error correction for this purpose. + Note that there is no way to encode bytes in MODE_KANJI. We might want to add EncodeWithMode() + with which clients can specify the encoding mode. For now, we don't need the functionality. + + text to encode + error correction level to use + representing the encoded QR code + + + + Encodes the specified content. + + The content. + The ec level. + The hints. + + + + + Decides the smallest version of QR code that will contain all of the provided data. + + if the data cannot fit in any version + + + + Gets the alphanumeric code. + + The code. + the code point of the table used in alphanumeric mode or + -1 if there is no corresponding code in the table. + + + + Chooses the mode. + + The content. + + + + + Choose the best mode by examining the content. Note that 'encoding' is used as a hint; + if it is Shift_JIS, and the input is only double-byte Kanji, then we return {@link Mode#KANJI}. + + The content. + The encoding. + + + + + true if the number of input bits will fit in a code with the specified version and error correction level. + + + + Terminate bits as described in 8.4.8 and 8.4.9 of JISX0510:2004 (p.24). + + The num data bytes. + The bits. + + + + Get number of data bytes and number of error correction bytes for block id "blockID". Store + the result in "numDataBytesInBlock", and "numECBytesInBlock". See table 12 in 8.5.1 of + JISX0510:2004 (p.30) + + The num total bytes. + The num data bytes. + The num RS blocks. + The block ID. + The num data bytes in block. + The num EC bytes in block. + + + + Interleave "bits" with corresponding error correction bytes. On success, store the result in + "result". The interleave rule is complicated. See 8.6 of JISX0510:2004 (p.37) for details. + + The bits. + The num total bytes. + The num data bytes. + The num RS blocks. + + + + + Append mode info. On success, store the result in "bits". + + The mode. + The bits. + + + + Append length info. On success, store the result in "bits". + + The num letters. + The version. + The mode. + The bits. + + + + Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits". + + The content. + The mode. + The bits. + The encoding. + + + + + + Satoru Takabayashi + Daniel Switkin + Sean Owen + + + + Apply mask penalty rule 1 and return the penalty. Find repetitive cells with the same color and + give penalty to them. Example: 00000 or 11111. + + The matrix. + + + + + Apply mask penalty rule 2 and return the penalty. Find 2x2 blocks with the same color and give + penalty to them. This is actually equivalent to the spec's rule, which is to find MxN blocks and give a + penalty proportional to (M-1)x(N-1), because this is the number of 2x2 blocks inside such a block. + + The matrix. + + + + + Apply mask penalty rule 3 and return the penalty. Find consecutive cells of 00001011101 or + 10111010000, and give penalty to them. If we find patterns like 000010111010000, we give + penalties twice (i.e. 40 * 2). + + The matrix. + + + + + Apply mask penalty rule 4 and return the penalty. Calculate the ratio of dark cells and give + penalty if the ratio is far from 50%. It gives 10 penalty for 5% distance. + + The matrix. + + + + + Return the mask bit for "getMaskPattern" at "x" and "y". See 8.8 of JISX0510:2004 for mask + pattern conditions. + + The mask pattern. + The x. + The y. + + + + + Helper function for applyMaskPenaltyRule1. We need this for doing this calculation in both + vertical and horizontal orders respectively. + + The matrix. + if set to true [is horizontal]. + + + + + + + + satorux@google.com (Satoru Takabayashi) - creator + + + + + Set all cells to 2. 2 means that the cell is empty (not set yet). + + JAVAPORT: We shouldn't need to do this at all. The code should be rewritten to begin encoding + with the ByteMatrix initialized all to zero. + + The matrix. + + + + Build 2D matrix of QR Code from "dataBits" with "ecLevel", "version" and "getMaskPattern". On + success, store the result in "matrix" and return true. + + The data bits. + The ec level. + The version. + The mask pattern. + The matrix. + + + + Embed basic patterns. On success, modify the matrix and return true. + The basic patterns are: + - Position detection patterns + - Timing patterns + - Dark dot at the left bottom corner + - Position adjustment patterns, if need be + + The version. + The matrix. + + + + Embed type information. On success, modify the matrix. + + The ec level. + The mask pattern. + The matrix. + + + + Embed version information if need be. On success, modify the matrix and return true. + See 8.10 of JISX0510:2004 (p.47) for how to embed version information. + + The version. + The matrix. + + + + Embed "dataBits" using "getMaskPattern". On success, modify the matrix and return true. + For debugging purposes, it skips masking process if "getMaskPattern" is -1. + See 8.7 of JISX0510:2004 (p.38) for how to embed data bits. + + The data bits. + The mask pattern. + The matrix. + + + + Return the position of the most significant bit set (to one) in the "value". The most + significant bit is position 32. If there is no bit set, return 0. Examples: + - findMSBSet(0) => 0 + - findMSBSet(1) => 1 + - findMSBSet(255) => 8 + + The value_ renamed. + + + + + Calculate BCH (Bose-Chaudhuri-Hocquenghem) code for "value" using polynomial "poly". The BCH + code is used for encoding type information and version information. + Example: Calculation of version information of 7. + f(x) is created from 7. + - 7 = 000111 in 6 bits + - f(x) = x^2 + x^2 + x^1 + g(x) is given by the standard (p. 67) + - g(x) = x^12 + x^11 + x^10 + x^9 + x^8 + x^5 + x^2 + 1 + Multiply f(x) by x^(18 - 6) + - f'(x) = f(x) * x^(18 - 6) + - f'(x) = x^14 + x^13 + x^12 + Calculate the remainder of f'(x) / g(x) + x^2 + __________________________________________________ + g(x) )x^14 + x^13 + x^12 + x^14 + x^13 + x^12 + x^11 + x^10 + x^7 + x^4 + x^2 + -------------------------------------------------- + x^11 + x^10 + x^7 + x^4 + x^2 + + The remainder is x^11 + x^10 + x^7 + x^4 + x^2 + Encode it in binary: 110010010100 + The return value is 0xc94 (1100 1001 0100) + + Since all coefficients in the polynomials are 1 or 0, we can do the calculation by bit + operations. We don't care if coefficients are positive or negative. + + The value. + The poly. + + + + + Make bit vector of type information. On success, store the result in "bits" and return true. + Encode error correction level and mask pattern. See 8.9 of + JISX0510:2004 (p.45) for details. + + The ec level. + The mask pattern. + The bits. + + + + Make bit vector of version information. On success, store the result in "bits" and return true. + See 8.10 of JISX0510:2004 (p.45) for details. + + The version. + The bits. + + + + Check if "value" is empty. + + The value. + + true if the specified value is empty; otherwise, false. + + + + + Embed the lonely dark dot at left bottom corner. JISX0510:2004 (p.46) + + The matrix. + + + + + + The x start. + The y start. + The matrix. + + + + Embed position detection patterns and surrounding vertical/horizontal separators. + + The matrix. + + + + Embed position adjustment patterns if need be. + + The version. + The matrix. + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + + + + + + Initializes a new instance of the class. + + + + + Gets or sets the mode. + + + The mode. + + + + + Gets or sets the EC level. + + + The EC level. + + + + + Gets or sets the version. + + + The version. + + + + + Gets or sets the mask pattern. + + + The mask pattern. + + + + + Gets or sets the matrix. + + + The matrix. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Check if "mask_pattern" is valid. + + The mask pattern. + + true if [is valid mask pattern] [the specified mask pattern]; otherwise, false. + + + + + The class holds the available options for the QrCodeWriter + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + . + + + + + Specifies what character encoding to use where applicable (type ) + + + + + Explicitly disables ECI segment when generating QR Code + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + + + + + Specifies the exact version of QR code to be encoded. An integer, range 1 to 40. If the data specified + cannot fit within the required version, a WriterException will be thrown. + + + + + This implementation can detect and decode QR Codes in an image. + Sean Owen + + + + + Gets the decoder. + + + + + + Locates and decodes a QR code in an image. + + a String representing the content encoded by the QR code + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a QR Code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Attribute is only for source code compatibility issues + + + + + Attribute is only for compatibility issues + + + + + Attribute is only for compatibility issues + + +
+
diff --git a/packages/ZXing.Net.0.16.4/lib/netstandard2.0/zxing.dll b/packages/ZXing.Net.0.16.4/lib/netstandard2.0/zxing.dll new file mode 100644 index 0000000..b271960 Binary files /dev/null and b/packages/ZXing.Net.0.16.4/lib/netstandard2.0/zxing.dll differ diff --git a/packages/ZXing.Net.0.16.4/lib/netstandard2.0/zxing.xml b/packages/ZXing.Net.0.16.4/lib/netstandard2.0/zxing.xml new file mode 100644 index 0000000..6351769 --- /dev/null +++ b/packages/ZXing.Net.0.16.4/lib/netstandard2.0/zxing.xml @@ -0,0 +1,10907 @@ + + + + zxing + + + + + Interface for a class to convert a BitMatrix to an output image format + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + The options. + + + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + + + the generated code as byte array of BGRA pixels + + + + + the width of the image + + + + + the height of the image + + + + + Renders a to an byte array with pixel data (4 byte per pixel, BGRA) + + + + + represents a color defined as ARGB byte data + + + + + the color black + + + + + the color white + + + + + value of the alpha channel + + + + + value of the red channel + + + + + value of the green channel + + + + + value of the blue channel + + + + + Initializes a new instance of the struct. + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Renders a barcode into a Svg image + + + + + represents a color value + + + + + color black + + + + + color white + + + + + alpha channel + + + + + red channel + + + + + green channel + + + + + blur channel + + + + + initializing constructor + + + + + initializing constructor + + + + + Gets or sets the foreground color. + + The foreground color. + + + + Gets or sets the background color. + + The background color. + + + + Gets or sets the font family name + + The font family name. + + + + Gets or sets the font size in pixel + + The font size in pixel. + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Represents a barcode as a Svg image + + + + + Gets or sets the content. + + + The content. + + + + + The original height of the bitmatrix for the barcode + + + + + The original width of the bitmatrix for the barcode + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The content. + + + + Gives the XML representation of the SVG image + + + + + Enumerates barcode formats known to this package. + + Sean Owen + + + Aztec 2D barcode format. + + + CODABAR 1D format. + + + Code 39 1D format. + + + Code 93 1D format. + + + Code 128 1D format. + + + Data Matrix 2D barcode format. + + + EAN-8 1D format. + + + EAN-13 1D format. + + + ITF (Interleaved Two of Five) 1D format. + + + MaxiCode 2D barcode format. + + + PDF417 format. + + + QR Code 2D barcode format. + + + RSS 14 + + + RSS EXPANDED + + + UPC-A 1D format. + + + UPC-E 1D format. + + + UPC/EAN extension format. Not a stand-alone format. + + + MSI + + + Plessey + + + Intelligent Mail barcode + + + + UPC_A | UPC_E | EAN_13 | EAN_8 | CODABAR | CODE_39 | CODE_93 | CODE_128 | ITF | RSS_14 | RSS_EXPANDED + without MSI (to many false-positives) and IMB (not enough tested, and it looks more like a 2D) + + + + + A smart class to decode the barcode inside a bitmap object or byte array with raw pixel color values + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Optional: Gets or sets the function to create a luminance source object for a bitmap. + If null a platform specific default LuminanceSource is used + + + The function to create a luminance source object. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + A smart class to decode the barcode inside a bitmap object + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Constructor for additional image formats for one BarcodeReader class + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Optional: Gets or sets the function to create a luminance source object for a bitmap. + If null a platform specific default LuminanceSource is used + + + The function to create a luminance source object. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + A smart class to decode the barcode inside a bitmap object + + + + + represents the default function which is called to get a instance from a raw byte array + + + + + Gets or sets the options. + + + The options. + + + + + Gets the reader which should be used to find and decode the barcode. + + + The reader. + + + + + Gets or sets a method which is called if an important point is found + + + The result point callback. + + + + + event is executed if a result was found via decode + + + + + Gets or sets a value indicating whether the image should be automatically rotated. + Rotation is supported for 90, 180 and 270 degrees + + + true if image should be rotated; otherwise, false. + + + + + Gets or sets a value indicating whether the image should be automatically inverted + if no result is found in the original image. + ATTENTION: Please be carefully because it slows down the decoding process if it is used + + + true if image should be inverted; otherwise, false. + + + + + Optional: Gets or sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + The function to create a binarizer object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb array. + If null the RGBLuminanceSource is used. The handler is only called when Decode with a byte[] array is called. + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + raises the ResultFound event + + + + + + raises the ResultFound event + + + + + + calls the explicitResultPointFound action + + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + A smart class to encode some content to raw pixel data + + + + + Initializes a new instance of the class. + + + + + A smart class to encode some content to a svg barcode image + + + + + Initializes a new instance of the class. + + + + + A base class for specific barcode writers with specific formats of barcode images. + + The type of the output. + + + + Gets or sets the renderer which should be used to render the encoded BitMatrix. + + + + + Encodes the specified contents and returns a rendered instance of the barcode. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The matrix. + + + + + A base class for specific barcode writers with specific formats of barcode images. + + + + + Gets or sets the barcode format. + The value is only suitable if the MultiFormatWriter is used. + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + + + + + + + + + + + + Encodes the specified contents and returns a BitMatrix array. + That array has to be rendered manually or with a IBarcodeRenderer. + + The contents. + + + + + The base class for luminance sources which supports + cropping and rotating based upon the luminance values. + + + + + weight of the red channel for calculating a gray scale image + + + + + weight of the green channel for calculating a gray scale image + + + + + weight of the blue channel for calculating a gray scale image + + + + + numbers of bits which for right shifting + + + + + + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + + The luminance array. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + gets the luminance matrix + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + TODO: not implemented yet + + + A rotated version of this object. + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + + Whether this subclass supports cropping. + + + + + Whether this subclass supports invertion. + + + + Inverts the luminance values (newValue = 255 - oldValue) + + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + This class hierarchy provides a set of methods to convert luminance data to 1 bit data. + It allows the algorithm to vary polymorphically, for example allowing a very expensive + thresholding technique for servers and a fast one for mobile. It also permits the implementation + to vary, e.g. a JNI version for Android and a Java fallback version for other platforms. + + dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The source. + + + + Gets the luminance source object. + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + For callers which only examine one row of pixels at a time, the same BitArray should be reused + and passed in with each call for performance. However it is legal to keep more than one row + at a time if needed. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + Converts a 2D array of luminance data to 1 bit data. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + A new concrete Binarizer implementation object. + + + + Gets the width of the luminance source object. + + + + + Gets the height of the luminance source object. + + + + + This class is the core bitmap class used by ZXing to represent 1 bit data. Reader objects + accept a BinaryBitmap and attempt to decode it. + + dswitkin@google.com (Daniel Switkin) + + + + + + + + + + The width of the bitmap. + + + + + The height of the bitmap. + + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + + The row to fetch, which must be in [0, bitmap height). + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + + Converts a 2D array of luminance data to 1 bit. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + + Whether this bitmap can be cropped. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if isCropSupported() is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + + Whether this bitmap supports counter-clockwise rotation. + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Encapsulates a type of hint that a caller may pass to a barcode reader to help it + more quickly or accurately decode it. It is up to implementations to decide what, + if anything, to do with the information that is supplied. + + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Unspecified, application-specific hint. Maps to an unspecified . + + + + + Image is a pure monochrome image of a barcode. Doesn't matter what it maps to; + use = true. + + + + + Image is known to be of one of a few possible formats. + Maps to a of s. + + + + + Spend more time to try to find a barcode; optimize for accuracy, not speed. + Doesn't matter what it maps to; use = true. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + + + The caller needs to be notified via callback when a possible + is found. Maps to a . + + + + + Assume MSI codes employ a check digit. Maps to . + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + Maps to . + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + 1D readers supporting rotation with TRY_HARDER enabled. + But BarcodeReader class can do auto-rotating for 1D and 2D codes. + Enabling that option prevents 1D readers doing double rotation. + BarcodeReader enables that option automatically if "global" auto-rotation is enabled. + Maps to . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to; + use . + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Simply encapsulates a width and height. + + + + + initializing constructor + + + + + + + the width + + + + + the height + + + + + + + + + + + + + + + + + + + + + + + + These are a set of hints that you may pass to Writers to specify their behavior. + + dswitkin@google.com (Daniel Switkin) + + + + Specifies the width of the barcode image + type: + + + + + Specifies the height of the barcode image + type: + + + + + Don't put the content string into the output image. + type: + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + + For Aztec it is of type , representing the minimal percentage of error correction words. + In all cases, it can also be a representation of the desired value as well. + Note: an Aztec symbol should have a minimum of 25% EC words. + For PDF417 it is of type or (between 0 and 8), + + + + + Specifies what character encoding to use where applicable. + type: + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + type: , or representation of the integer value + + + + + Specifies the aspect ratio to use. Default is 4. + type: , or 1-4. + + + + + Specifies whether to use compact mode for PDF417 + type: , or "true" or "false" + value + + + + + Specifies what compaction mode to use for PDF417. + type: or value of one of its + enum values + + + + + Specifies the minimum and maximum number of rows and columns for PDF417. + type: + + + + + Don't append ECI segment. + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + type: + + + + + Specifies the matrix shape for Data Matrix (type ) + + + + + Specifies a minimum barcode size (type ). Only applicable to Data Matrix now. + + + + + Specifies a maximum barcode size (type ). Only applicable to Data Matrix now. + + + + + if true, don't switch to codeset C for numbers + + + + + Specifies the default encodation for Data Matrix (type ) + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Specifies the required number of layers for an Aztec code. + A negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + type: , or representation of the integer value + + + + + Specifies the exact version of QR code to be encoded. + (Type , or representation of the integer value). + + + + + Specifies whether the data should be encoded to the GS1 standard + type: , or "true" or "false" + value + + + + + Thrown when a barcode was successfully detected, but some aspect of + the content did not conform to the barcode's format rules. This could have + been due to a mis-detection. + Sean Owen + + + + + + + + + + + + + + + + + + + + + + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Decodes the specified barcode bitmap which is given by a generic byte array. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents. + + The contents. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + The matrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents. + + The contents. + + + + + A wrapper implementation of {@link LuminanceSource} which inverts the luminances it returns -- black becomes + white and vice versa, and each value becomes (255-value). + + Sean Owen + + + + Initializes a new instance of the class. + + The @delegate. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff; + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Inverts this instance. + + original delegate {@link LuminanceSource} since invert undoes itself + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + The purpose of this class hierarchy is to abstract different bitmap implementations across + platforms into a standard interface for requesting greyscale luminance values. The interface + only provides immutable methods; therefore crop and rotation create copies. This is to ensure + that one Reader does not modify the original luminance source and leave it in an unknown state + for other Readers in the chain. + + dswitkin@google.com (Daniel Switkin) + + + + initializing constructor + + + + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff + + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + The width of the bitmap. + + + The height of the bitmap. + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + Whether this subclass supports counter-clockwise rotation. + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + + Whether this subclass supports invertion. + + + + inverts the luminance values, not supported here. has to implemented in sub classes + + + + + + + + + + + + MultiFormatReader is a convenience class and the main entry point into the library for most uses. + By default it attempts to decode all barcode formats that the library supports. Optionally, you + can provide a hints object to request different behavior, for example only decoding QR codes. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + This version of decode honors the intent of Reader.decode(BinaryBitmap) in that it + passes null as a hint to the decoders. However, that makes it inefficient to call repeatedly. + Use setHints() followed by decodeWithState() for continuous scan applications. + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the hints provided. Does not honor existing state. + + + The pixel data to decode + + The hints to use, clearing the previous state. + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the state set up by calling setHints() previously. Continuous scan + clients will get a large speed increase by using this instead of decode(). + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls + to decodeWithState(image) can reuse the same set of readers without reallocating memory. This + is important for performance in continuous scan clients. + + + + + + resets all specific readers + + + + This is a factory class which finds the appropriate Writer subclass for the BarcodeFormat + requested and encodes the barcode with the supplied contents. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Gets the collection of supported writers. + + + + + encode the given data + + + + + + + + + + encode the given data + + + + + + + + + + + This object extends LuminanceSource around an array of YUV data returned from the camera driver, + with the option to crop to a rectangle within the full data. This can be used to exclude + superfluous pixels around the perimeter and speed up decoding. + It works for any pixel format where the Y channel is planar and appears first, including + YCbCr_420_SP and YCbCr_422_SP. + @author dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The yuv data. + Width of the data. + Height of the data. + The left. + The top. + The width. + The height. + if set to true [reverse horiz]. + + + + Initializes a new instance of the class. + + The luminances. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + + + + + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Renders the cropped greyscale bitmap. + + + + + + width of image from {@link #renderThumbnail()} + + + + + height of image from {@link #renderThumbnail()} + + + + + creates a new instance + + + + + + + + + Implementations of this interface can decode an image of a barcode in some format into + the String it encodes. For example, can + decode a QR code. The decoder may optionally receive hints from the caller which may help + it decode more quickly or accurately. + + See , which attempts to determine what barcode + format is present within the image as well, and then decodes it accordingly. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + String which the barcode encodes + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + The general exception class throw when something goes wrong during decoding of a barcode. + This includes, but is not limited to, failing checksums / error correction algorithms, being + unable to locate finder timing patterns, and so on. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class. + + The inner exception. + + + + Initializes a new instance of the class. + + The inner exception. + + + + + Encapsulates the result of decoding a barcode within an image. + + + + raw text encoded by the barcode, if applicable, otherwise null + + + raw bytes encoded by the barcode, if applicable, otherwise null + + + + points related to the barcode in the image. These are typically points + identifying finder patterns or the corners of the barcode. The exact meaning is + specific to the type of barcode that was decoded. + + + + {@link BarcodeFormat} representing the format of the barcode that was decoded + + + + {@link Hashtable} mapping {@link ResultMetadataType} keys to values. May be + null. This contains optional metadata about what was detected about the barcode, + like orientation. + + + + + Gets the timestamp. + + + + + how many bits of are valid; typically 8 times its length + + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + The timestamp. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + The timestamp. + + + + Adds one metadata to the result + + The type. + The value. + + + + Adds a list of metadata to the result + + The metadata. + + + + Adds the result points. + + The new points. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Represents some type of metadata about the result of the decoding that the decoder + wishes to communicate back to the caller. + + Sean Owen + + + + Unspecified, application-specific metadata. Maps to an unspecified {@link Object}. + + + + + Denotes the likely approximate orientation of the barcode in the image. This value + is given as degrees rotated clockwise from the normal, upright orientation. + For example a 1D barcode which was found by reading top-to-bottom would be + said to have orientation "90". This key maps to an {@link Integer} whose + value is in the range [0,360). + + + + +

2D barcode formats typically encode text, but allow for a sort of 'byte mode' + which is sometimes used to encode binary data. While {@link Result} makes available + the complete raw bytes in the barcode for these formats, it does not offer the bytes + from the byte segments alone.

+

This maps to a {@link java.util.List} of byte arrays corresponding to the + raw bytes in the byte segments in the barcode, in order.

+
+
+ + + Error correction level used, if applicable. The value type depends on the + format, but is typically a String. + + + + + For some periodicals, indicates the issue number as an {@link Integer}. + + + + + For some products, indicates the suggested retail price in the barcode as a + formatted {@link String}. + + + + + For some products, the possible country of manufacture as a {@link String} denoting the + ISO country code. Some map to multiple possible countries, like "US/CA". + + + + + For some products, the extension text + + + + + If the code format supports structured append and + the current scanned code is part of one then the + sequence number is given with it. + + + + + If the code format supports structured append and + the current scanned code is part of one then the + parity is given with it. + + + + + PDF417-specific metadata + + + + + Aztec-specific metadata + + + + + Encapsulates a point of interest in an image containing a barcode. Typically, this + would be the location of a finder pattern or the corner of the barcode, for example. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The x. + The y. + + + + Gets the X. + + + + + Gets the Y. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC and + BC is less than AC and the angle between BC and BA is less than 180 degrees. + + array of three to order + + + + calculates the distance between two points + + first pattern + second pattern + + distance between two points + + + + + Returns the z component of the cross product between vectors BC and BA. + + + + Callback which is invoked when a possible result point (significant + point in the barcode image such as a corner) is found. + + + + + + + + Luminance source class which support different formats of images. + + + + + enumeration of supported bitmap format which the RGBLuminanceSource can process + + + + + format of the byte[] isn't known. RGBLuminanceSource tries to determine the best possible value + + + + + grayscale array, the byte array is a luminance array with 1 byte per pixel + + + + + grayscale array, the byte array is a luminance array with 2 bytes per pixel + + + + + 3 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels alpha, red, green and blue + + + + + 3 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green, red and alpha + + + + + 2 bytes per pixel, 5 bit red, 6 bits green and 5 bits blue + + + + + 4 bytes per pixel with the channels red, green, blue and alpha + + + + + 4 bytes for two pixels, UYVY formatted + + + + + 4 bytes for two pixels, YUYV formatted + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 1 byte per pixel (Gray8). + That means the whole array consists of the luminance values (grayscale). + + The luminance array. + The width. + The height. + if set to true [is8 bit]. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + The bitmap format. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + calculates the luminance values for the given byte array and bitmap format + + + + + + + Contains conversion support elements such as classes, interfaces and static methods. + + + + + Copies an array of chars obtained from a String into a specified array of chars + + The String to get the chars from + Position of the String to start getting the chars + Position of the String to end getting the chars + Array to return the chars + Position of the destination array of chars to start storing the chars + An array of chars + + + + Sets the capacity for the specified List + + The List which capacity will be set + The new capacity value + + + + Converts a string-Collection to an array + + The strings. + + + + + Joins all elements to one string. + + + The separator. + The values. + + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The value. + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The start index. + The end index. + The value. + + + + + + + + + + + + + + + + + + Savely gets the value of a decoding hint + if hints is null the default is returned + + + The hints. + Type of the hint. + The @default. + + + + The base class for all objects which encode/generate a barcode image. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + A base class which covers the range of exceptions which may occur when encoding a barcode using + the Writer framework. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner exc. + + + + Extends with more information specific to the Aztec format, + like the number of layers and whether it's compact. + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + Initializes a new instance of the class. + + The bits. + The points. + if set to true [compact]. + The nb datablocks. + The nb layers. + + + + The main class which implements Aztec Code decoding -- as opposed to locating and extracting + the Aztec Code from an image. + + David Olivier + + + + Decodes the specified detector result. + + The detector result. + + + + + This method is used for testing the high-level encoder + + + + + + + Gets the string encoded in the aztec code bits + + The corrected bits. + the decoded string + + + + gets the table corresponding to the char passed + + The t. + + + + + Gets the character (or string) corresponding to the passed code in the given table + + the table used + the code of the character + + + + + Performs RS error correction on an array of bits. + + The rawbits. + the corrected array + + + + Gets the array of bits from an Aztec Code matrix + + The matrix. + the array of bits + + + + Reads a code of given length and at given index in an array of bits + + The rawbits. + The start index. + The length. + + + + + Reads a code of length 8 in an array of bits, padding with zeros + + + + + + + + Packs a bit array into bytes, most significant bit first + + + + + + + Encapsulates logic that can detect an Aztec Code in an image, even if the Aztec Code + is rotated or skewed, or partially obscured. + + David Olivier + + + + Initializes a new instance of the class. + + The image. + + + + Detects an Aztec Code in an image. + + + + + Detects an Aztec Code in an image. + + if true, image is a mirror-image of original. + + encapsulating results of detecting an Aztec Code + + + + + Extracts the number of data layers and data blocks from the layer around the bull's eye + + bullEyeCornerPoints the array of bull's eye corners + + + + + Corrects the parameter bits using Reed-Solomon algorithm + + paremeter bits + compact true if this is a compact Aztec code + + + + + Finds the corners of a bull-eye centered on the passed point + This returns the centers of the diagonal points just outside the bull's eye + Returns [topRight, bottomRight, bottomLeft, topLeft] + + Center point + The corners of the bull-eye + + + + Finds a candidate center point of an Aztec code from an image + + the center point + + + + Gets the Aztec code corners from the bull's eye corners and the parameters. + + the array of bull's eye corners + the array of aztec code corners + + + + Creates a BitMatrix by sampling the provided image. + topLeft, topRight, bottomRight, and bottomLeft are the centers of the squares on the + diagonal just outside the bull's eye. + + The image. + The top left. + The bottom left. + The bottom right. + The top right. + + + + + Samples a line + + start point (inclusive) + end point (exclusive) + number of bits + the array of bits as an int (first bit is high-order bit of result) + + + + Determines whether [is white or black rectangle] [the specified p1]. + + The p1. + The p2. + The p3. + The p4. + true if the border of the rectangle passed in parameter is compound of white points only + or black points only + + + + Gets the color of a segment + + The p1. + The p2. + 1 if segment more than 90% black, -1 if segment is more than 90% white, 0 else + + + + Gets the coordinate of the first point with a different color in the given direction + + The init. + if set to true [color]. + The dx. + The dy. + + + + + Expand the square represented by the corner points by pushing out equally in all directions + + the corners of the square, which has the bull's eye at its center + the original length of the side of the square in the target bit matrix + the new length of the size of the square in the target bit matrix + the corners of the expanded square + + + + Aztec 2D code representation + + Rustam Abdullaev + + + + Compact or full symbol indicator + + + + + Size in pixels (width and height) + + + + + Number of levels + + + + + Number of data codewords + + + + + The symbol image + + + + + represents a token for a binary shift + + + + + initializing constructor + + + + + + + + appends the byte array to the BitArray + + + + + + + string representation + + + + + + Generates Aztec 2D barcodes. + + Rustam Abdullaev + + + + Encodes the given binary content as an Aztec symbol + + input data string + Aztec symbol matrix with metadata + + + + Encodes the given binary content as an Aztec symbol + + input data string + minimal percentage of error check words (According to ISO/IEC 24778:2008, + a minimum of 23% + 3 words is recommended) + if non-zero, a user-specified value for the number of layers + + Aztec symbol matrix with metadata + + + + + This produces nearly optimal encodings of text into the first-level of + encoding used by Aztec code. + It uses a dynamic algorithm. For each prefix of the string, it determines + a set of encodings that could lead to this prefix. We repeatedly add a + character and generate a new set of optimal encodings until we have read + through the entire input. + @author Frank Yellin + @author Rustam Abdullaev + + + + + + + + + + + Convert the text represented by this High Level Encoder into a BitArray. + + text represented by this encoder encoded as a + + + + State represents all information about a sequence necessary to generate the current output. + Note that a state is immutable. + + + + + Create a new state representing this state with a latch to a (not + necessary different) mode, and then a code. + + + + + Create a new state representing this state, with a temporary shift + to a different mode to output a single value. + + + + + Create a new state representing this state, but an additional character + output in Binary Shift mode. + + + + + Create the state identical to this one, but we are no longer in + Binary Shift mode. + + + + + Returns true if "this" state is better (or equal) to be in than "that" + state under all possible circumstances. + + + + + This implementation can detect and decode Aztec codes in an image. + + David Olivier + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + a String representing the content encoded by the Data Matrix code + + + + + Locates and decodes a Data Matrix code in an image. + + image of barcode to decode + passed as a {@link java.util.Hashtable} from {@link com.google.zxing.DecodeHintType} + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Aztec result meta data. + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + + + + + + + + + Renders an Aztec code as a + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + The class holds the available options for the + + + + + Representing the minimal percentage of error correction words. + Note: an Aztec symbol should have a minimum of 25% EC words. + + + + + Specifies the required number of layers for an Aztec code: + a negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + a positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + + + +

See + + DoCoMo's documentation about the result types represented by subclasses of this class.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + Implements KDDI AU's address book format. See + + http://www.au.kddi.com/ezfactory/tec/two_dimensions/index.html. + (Thanks to Yuzo for translating!) + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Implements the "MECARD" address book entry format. + + Supported keys: N, SOUND, TEL, EMAIL, NOTE, ADR, BDAY, URL, plus ORG + Unsupported keys: TEL-AV, NICKNAME + + Except for TEL, multiple values for keys are also not supported; + the first one found takes precedence. + + Our understanding of the MECARD format is based on this document: + + http://www.mobicode.org.tw/files/OMIA%20Mobile%20Bar%20Code%20Standard%20v3.2.1.doc + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes contact information, like that in an address book entry. + + Sean Owen + + + + initializing constructor + + + + + + + + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + the names + + + + + the nicknames + + + + + In Japanese, the name is written in kanji, which can have multiple readings. Therefore a hint + is often provided, called furigana, which spells the name phonetically. + + The pronunciation of the getNames() field, often in hiragana or katakana. + + + + the phone numbers + + + + optional descriptions of the type of each phone number. It could be like "HOME", but, + there is no guaranteed or standard format. + + + + the e-mail addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the instant messenger addresses + + + + + the note field + + + + + the addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the title + + + + + the urls + + + + birthday formatted as yyyyMMdd (e.g. 19780917) + + + a location as a latitude/longitude pair + + + Implements the "BIZCARD" address book entry format, though this has been + largely reverse-engineered from examples observed in the wild -- still + looking for a definitive reference. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a calendar event at a certain time, optionally with attendees and a location. + + Sean Owen + + + + Gets the start. + + + + + Determines whether [is start all day]. + + if start time was specified as a whole day + + + + event end , or null if event has no duration + + + + + Gets a value indicating whether this instance is end all day. + + true if end time was specified as a whole day + + + + Parses a string as a date. RFC 2445 allows the start and end fields to be of type DATE (e.g. 20081021) + or DATE-TIME (e.g. 20081021T123000 for local time, or 20081021T123000Z for UTC). + + The string to parse + + if not a date formatted string + + + + Represents a parsed result that encodes an email message including recipients, subject and body text. + + Sean Owen + + + + the email address + + + + + the TOs + + + + + the CCs + + + + + the BCCs + + + + + the subject + + + + + the body + + + + + the mailto: uri + + + + + Represents a result that encodes an e-mail address, either as a plain address + like "joe@example.org" or a mailto: URL like "mailto:joe@example.org". + + Sean Owen + + + + Implements the "MATMSG" email message entry format. + + Supported keys: TO, SUB, BODY + + Sean Owen + + + + This implements only the most basic checking for an email address's validity -- that it contains + an '@' and contains no characters disallowed by RFC 2822. This is an overly lenient definition of + validity. We want to generally be lenient here since this class is only intended to encapsulate what's + in a barcode, not "judge" it. + + The email. + + true if it is basically a valid email address; otherwise, false. + + + + + Represents a parsed result that encodes extended product information as encoded by the RSS format, like weight, price, dates, etc. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + extension for kilogram weight type + + + + + extension for pounds weight type + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the raw text + + + + + the product id + + + + + the sscc + + + + + the lot number + + + + + the production date + + + + + the packaging date + + + + + the best before date + + + + + the expiration date + + + + + the weight + + + + + the weight type + + + + + the weight increment + + + + + the price + + + + + the price increment + + + + + the price currency + + + + + the uncommon AIs + + + + + the display representation (raw text) + + + + + Parses strings of digits that represent a RSS Extended code. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + tries to parse a text representation to a specific result object + + + + + + + Represents a parsed result that encodes a geographic coordinate, with latitude, longitude and altitude. + + Sean Owen + + + latitude in degrees + + + + longitude in degrees + + + + altitude in meters. If not specified, in the geo URI, returns 0.0 + + + + query string associated with geo URI or null if none exists + + + + the geo URI + + + + a URI link to Google Maps which display the point on the Earth described + by this instance, and sets the zoom level in a way that roughly reflects the + altitude, if specified + + + + Parses a "geo:" URI result, which specifies a location on the surface of + the Earth as well as an optional altitude above the surface. See + + http://tools.ietf.org/html/draft-mayrhofer-geo-uri-00. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a product ISBN number. + + jbreiden@google.com (Jeff Breidenbach) + + + + the ISBN number + + + + Parses strings of digits that represent a ISBN. + + + jbreiden@google.com (Jeff Breidenbach) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + See ISBN-13 For Dummies + + The result. + + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link ResultParser#parseResult(Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Represents the type of data encoded by a barcode -- from plain text, to a + URI, to an e-mail address, etc. + + Sean Owen + + + + Represents a parsed result that encodes a product by an identifier of some kind. + + dswitkin@google.com (Daniel Switkin) + + + + Parses strings of digits that represent a UPC code. + + dswitkin@google.com (Daniel Switkin) + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link #parseResult(com.google.zxing.Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Attempts to parse the raw {@link Result}'s contents as a particular type + of information (email, URL, etc.) and return a {@link ParsedResult} encapsulating + the result of parsing. + + the raw to parse + encapsulating the parsing result + + + + Parses the result. + + The result. + + + +

Parses an "sms:" URI result, which specifies a number to SMS and optional + "via" number. See + the IETF draft on this.

+ +

This actually also parses URIs starting with "mms:", "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + + Represents a parsed result that encodes an SMS message, including recipients, subject and body text. + + Sean Owen + + + +

Parses an "smsto:" URI result, whose format is not standardized but appears to be like: + {@code smsto:number(:body)}.

+

This actually also parses URIs starting with "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+
+ Sean Owen +
+ + +

Parses an "smtp:" URI result, whose format is not standardized but appears to be like: + smtp[:subject[:body]]}.

+

See http://code.google.com/p/zxing/issues/detail?id=536

+
+ Sean Owen +
+ + + Represents a parsed result that encodes a telephone number. + + Sean Owen + + + + Parses a "tel:" URI result, which specifies a phone number. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + A simple result type encapsulating a string that has no further interpretation. + + Sean Owen + + + + A simple result type encapsulating a URI that has no further interpretation. + + Sean Owen + + + true if the URI contains suspicious patterns that may suggest it intends to + mislead the user about its true nature. At the moment this looks for the presence + of user/password syntax in the host/authority portion of a URI which may be used + in attempts to make the URI's host appear to be other than it is. Example: + http://yourbank.com@phisher.com This URI connects to phisher.com but may appear + to connect to yourbank.com at first glance. + + + + Transforms a string that represents a URI into something more proper, by adding or canonicalizing + the protocol. + + + + + Tries to parse results that are a URI of some kind. + + Sean Owen + + + Parses the "URLTO" result format, which is of the form "URLTO:[title]:[url]". + This seems to be used sometimes, but I am not able to find documentation + on its origin or official format? + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Parses contact information formatted according to the VCard (2.1) format. This is not a complete + implementation but should parse information as commonly encoded in 2D barcodes. + + Sean Owen + + + Formats name fields of the form "Public;John;Q.;Reverend;III" into a form like + "Reverend John Q. Public III". + + @param names name values to format, in place + + + + Partially implements the iCalendar format's "VEVENT" format for specifying a + calendar event. See RFC 2445. This supports SUMMARY, DTSTART and DTEND fields. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a Vehicle Identification Number (VIN). + + + + + Detects a result that is likely a vehicle identification number. + @author Sean Owen + + + + + Represents a parsed result that encodes wifi network information, like SSID and password. + + Vikram Aggarwal + + + + + A simple, fast array of bits, represented compactly by an array of ints internally. + + Sean Owen + + + + size of the array, number of elements + + + + + size of the array in bytes + + + + + index accessor + + + + + + + default constructor + + + + + initializing constructor + + desired size of the array + + + + Flips bit i. + + bit to set + + + + + Gets the next set. + + first bit to check + index of first bit that is set, starting from the given index, or size if none are set + at or beyond this given index + + + + see getNextSet(int) + + index to start looking for unset bit + index of next unset bit, or if none are unset until the end + + + Sets a block of 32 bits, starting at bit i. + + + first bit to set + + the new value of the next 32 bits. Note again that the least-significant bit + corresponds to bit i, the next-least-significant to i+1, and so on. + + + + + Sets a range of bits. + + start of range, inclusive. + end of range, exclusive + + + Clears all bits (sets to false). + + + Efficient method to check if a range of bits is set, or not set. + + + start of range, inclusive. + + end of range, exclusive + + if true, checks that bits in range are set, otherwise checks that they are not set + + true iff all bits are set or not set in range, according to value argument + if end is less than start or the range is not contained in the array + + + + Appends the bit. + + The bit. + + + underlying array of ints. The first element holds the first 32 bits, and the least + significant bit is bit 0. + + + + + Appends the least-significant bits, from value, in order from most-significant to + least-significant. For example, appending 6 bits from 0x000001E will append the bits + 0, 1, 1, 1, 1, 0 in that order. + + containing bits to append + bits from value to append + + + + adds the array to the end + + + + + + XOR operation + + + + + + converts to bytes. + + first bit to start writing + array to write into. Bytes are written most-significant byte first. This is the opposite + of the internal representation, which is exposed by BitArray + position in array to start writing + how many bytes to write + + + Reverses all bits in the array. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Erstellt ein neues Objekt, das eine Kopie der aktuellen Instanz darstellt. + + + Ein neues Objekt, das eine Kopie dieser Instanz darstellt. + + + + +

Represents a 2D matrix of bits. In function arguments below, and throughout the common + module, x is the column position, and y is the row position. The ordering is always x, y. + The origin is at the top-left.

+

Internally the bits are represented in a 1-D array of 32-bit ints. However, each row begins + with a new int. This is done intentionally so that we can copy out a row into a BitArray very + efficiently.

+

The ordering of bits is row-major. Within each int, the least significant bits are used first, + meaning they represent lower x values. This is compatible with BitArray's implementation.

+
+ Sean Owen + dswitkin@google.com (Daniel Switkin) +
+ + The width of the matrix + + + + The height of the matrix + + + + This method is for compatibility with older code. It's only logical to call if the matrix + is square, so I'm throwing if that's not the case. + + + row/column dimension of this matrix + + + + + The rowsize of the matrix + + + + + Creates an empty square . + + height and width + + + + Creates an empty square . + + bit matrix width + bit matrix height + + + + Interprets a 2D array of booleans as a , where "true" means an "on" bit. + + bits of the image, as a row-major 2D array. Elements are arrays representing rows + representation of image + + +

Gets the requested bit, where true means black.

+ +
+ The horizontal component (i.e. which column) + + The vertical component (i.e. which row) + + value of given bit in matrix + +
+ + +

Flips the given bit.

+
+ The horizontal component (i.e. which column) + The vertical component (i.e. which row) +
+ + + flip all of the bits, if shouldBeFlipped is true for the coordinates + + should return true, if the bit at a given coordinate should be flipped + + + + Exclusive-or (XOR): Flip the bit in this {@code BitMatrix} if the corresponding + mask bit is set. + + The mask. + + + Clears all bits (sets to false). + + +

Sets a square region of the bit matrix to true.

+ +
+ The horizontal position to begin at (inclusive) + + The vertical position to begin at (inclusive) + + The width of the region + + The height of the region + +
+ + A fast method to retrieve one row of data from the matrix as a BitArray. + + + The row to retrieve + + An optional caller-allocated BitArray, will be allocated if null or too small + + The resulting BitArray - this reference should always be used even when passing + your own row + + + + + Sets the row. + + row to set + {@link BitArray} to copy from + + + + Modifies this {@code BitMatrix} to represent the same but rotated 180 degrees + + + + + This is useful in detecting the enclosing rectangle of a 'pure' barcode. + + {left,top,width,height} enclosing rectangle of all 1 bits, or null if it is all white + + + + This is useful in detecting a corner of a 'pure' barcode. + + {x,y} coordinate of top-left-most 1 bit, or null if it is all white + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + The line separator. + + A that represents this instance. + + + + + Clones this instance. + + + + +

This provides an easy abstraction to read bits at a time from a sequence of bytes, where the + number of bits read is not often a multiple of 8.

+ +

This class is thread-safe but not reentrant. Unless the caller modifies the bytes array + it passed in, in which case all bets are off.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + bytes from which this will read bits. Bits will be read from the first byte first. + Bits are read within a byte from most-significant to least-significant bit. + + + + + index of next bit in current byte which would be read by the next call to {@link #readBits(int)}. + + + + + index of next byte in input byte array which would be read by the next call to {@link #readBits(int)}. + + + + number of bits to read + + int representing the bits read. The bits will appear as the least-significant + bits of the int + + if numBits isn't in [1,32] or more than is available + + + number of bits that can be read successfully + + + + Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1 + of ISO 18004. + + + Sean Owen + + + character set ECI value + representing ECI of given value, or null if it is legal but unsupported + + + character set ECI encoding name + representing ECI for character encoding, or null if it is legalbut unsupported + + + + Encapsulates the result of decoding a matrix of bits. This typically + applies to 2D barcode formats. For now it contains the raw bytes obtained, + as well as a String interpretation of those bytes, if applicable. + Sean Owen + + + + + raw bytes representing the result, or null if not applicable + + + + + how many bits of are valid; typically 8 times its length + + + + + text representation of the result + + + + + list of byte segments in the result, or null if not applicable + + + + + name of error correction level used, or null if not applicable + + + + + gets a value which describe if structure append data was found + + + + + number of errors corrected, or null if not applicable + + + + + gives the sequence number of the result if structured append was found + + + + + number of erasures corrected, or null if not applicable + + + + + gives the parity information if structured append was found + + + + + Miscellanseous data value for the various decoders + + The other. + + + + initializing constructor + + + + + + + + + initializing constructor + + + + + + + + + + + initializing constructor + + + + + + + + + + initializing constructor + + + + + + + + + + + + Defines an container for encoder options + + + + + Gets the data container for all options + + + + + event is raised when a value is changed + + + + + Gets or sets a flag which cause a deeper look into the bitmap + + + true if [try harder]; otherwise, false. + + + + + Image is a pure monochrome image of a barcode. + + + true if monochrome image of a barcode; otherwise, false. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + The character set. + + + + + Image is known to be of one of a few possible formats. + Maps to a {@link java.util.List} of {@link BarcodeFormat}s. + + + The possible formats. + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + true if it should assume a Code 39 check digit; otherwise, false. + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). + + + true if it should assume GS1; otherwise, false. + + + + + Assume MSI codes employ a check digit. Maps to . + + + true if it should assume a MSI check digit; otherwise, false. + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Initializes a new instance of the class. + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Encapsulates the result of detecting a barcode in an image. This includes the raw + matrix of black/white pixels corresponding to the barcode, and possibly points of interest + in the image, like the location of finder patterns or corners of the barcode in the image.

+
+ Sean Owen +
+ + + the detected bits + + + + + the pixel points where the result is found + + + + + initializing constructor + + + + + + + General math-related and numeric utility functions. + + + + + Ends up being a bit faster than {@link Math#round(float)}. This merely rounds its + argument to the nearest int, where x.5 rounds up to x+1. Semantics of this shortcut + differ slightly from {@link Math#round(float)} in that half rounds down for negative + values. -2.5 rounds to -3, not -2. For purposes here it makes no difference. + + real value to round + nearest int + + + + + + + + + + Euclidean distance between points A and B + + + + + + + + + + Euclidean distance between points A and B + + + + + values to sum + sum of values in array + + +

A somewhat generic detector that looks for a barcode-like rectangular region within an image. + It looks within a mostly white region of an image for a region of black and white, but mostly + black. It returns the four corners of the region, as best it can determine.

+ +
+ Sean Owen +
+ + + initializing constructor + + + + + +

Detects a rectangular region of black and white -- mostly black -- with a region of mostly + white, in an image.

+
+ [] describing the corners of the rectangular region. The first and + last points are opposed on the diagonal, as are the second and third. The first point will be + the topmost point and the last, the bottommost. The second point will be leftmost and the + third, the rightmost + +
+ + Attempts to locate a corner of the barcode by scanning up, down, left or right from a center + point which should be within the barcode. + + + center's x component (horizontal) + + same as deltaY but change in x per step instead + + minimum value of x + + maximum value of x + + center's y component (vertical) + + change in y per step. If scanning up this is negative; down, positive; + left or right, 0 + + minimum value of y to search through (meaningless when di == 0) + + maximum value of y + + maximum run of white pixels that can still be considered to be within + the barcode + + a encapsulating the corner that was found + + + + Computes the start and end of a region of pixels, either horizontally or vertically, that could + be part of a Data Matrix barcode. + + + if scanning horizontally, this is the row (the fixed vertical location) + where we are scanning. If scanning vertically it's the column, the fixed horizontal location + + largest run of white pixels that can still be considered part of the + barcode region + + minimum pixel location, horizontally or vertically, to consider + + maximum pixel location, horizontally or vertically, to consider + + if true, we're scanning left-right, instead of up-down + + int[] with start and end of found range, or null if no such range is found + (e.g. only white was found) + + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. By keeping track of the + last black points it encountered, it determines the corners of the barcode. + + David Olivier + + + + Creates a WhiteRectangleDetector instance + + The image. + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + Creates a WhiteRectangleDetector instance + + barcode image to find a rectangle in + initial size of search area around center + x position of search center + y position of search center + + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + + Initializes a new instance of the class. + + The image. + if image is too small + + + + Initializes a new instance of the class. + + The image. + Size of the init. + The x. + The y. + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. + + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + recenters the points of a constant distance towards the center + + bottom most point + left most point + right most point + top most point + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + Determines whether a segment contains a black point + + min value of the scanned coordinate + max value of the scanned coordinate + value of fixed coordinate + set to true if scan must be horizontal, false if vertical + + true if a black point has been found, else false. + + + + + Superclass of classes encapsulating types ECIs, according to "Extended Channel Interpretations" + 5.3 of ISO 18004. + + Sean Owen + + + + the ECI value + + + + ECI value + representing ECI of given value, or null if it is legal but unsupported + ArgumentException if ECI value is invalid + + + + Defines an container for encoder options + + + + + Gets the data container for all options + + + + + Specifies the height of the barcode image + + + + + Specifies the width of the barcode image + + + + + Don't put the content string into the output image. + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + + + + + Specifies whether the data should be encoded to the GS1 standard; + FNC1 character is added in front of the data + + + + + Initializes a new instance of the class. + + + + This Binarizer implementation uses the old ZXing global histogram approach. It is suitable + for low-end mobile devices which don't have enough CPU or memory to use a local thresholding + algorithm. However, because it picks a global black point, it cannot handle difficult shadows + and gradients. + + Faster mobile devices and all desktop applications should probably use HybridBinarizer instead. + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The source. + + + + Applies simple sharpening to the row data to improve performance of the 1D Readers. + + + + + + + + Does not sharpen the data, as this call is intended to only be used by 2D Readers. + + + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + + A new concrete Binarizer implementation object. + + + + Implementations of this class can, given locations of finder patterns for a QR code in an + image, sample the right points in the image to reconstruct the QR code, accounting for + perspective distortion. It is abstracted since it is relatively expensive and should be allowed + to take advantage of platform-specific optimized implementations, like Sun's Java Advanced + Imaging library, but which may not be available in other environments such as J2ME, and vice + versa. + + The implementation used can be controlled by calling {@link #setGridSampler(GridSampler)} + with an instance of a class which implements this interface. + + Sean Owen + + + the current implementation of + + + + Sets the implementation of used by the library. One global + instance is stored, which may sound problematic. But, the implementation provided + ought to be appropriate for the entire platform, and all uses of this library + in the whole lifetime of the JVM. For instance, an Android activity can swap in + an implementation that takes advantage of native platform libraries. + + The platform-specific object to install. + + + +

Samples an image for a square matrix of bits of the given dimension. This is used to extract + the black/white modules of a 2D barcode like a QR Code found in an image. Because this barcode + may be rotated or perspective-distorted, the caller supplies four points in the source image + that define known points in the barcode, so that the image may be sampled appropriately.

+

The last eight "from" parameters are four X/Y coordinate pairs of locations of points in + the image that define some significant points in the image to be sample. For example, + these may be the location of finder pattern in a QR Code.

+

The first eight "to" parameters are four X/Y coordinate pairs measured in the destination + , from the top left, where the known points in the image given by the "from" + parameters map to.

+

These 16 parameters define the transformation needed to sample the image.

+
+ image to sample + The dimension X. + The dimension Y. + The p1 preimage X. + The p1 preimage Y. + The p2 preimage X. + The p2 preimage Y. + The p3 preimage X. + The p3 preimage Y. + The p4 preimage X. + The p4 preimage Y. + The p1 image X. + The p1 image Y. + The p2 image X. + The p2 image Y. + The p3 image X. + The p3 image Y. + The p4 image X. + The p4 image Y. + + representing a grid of points sampled from the image within a region + defined by the "from" parameters + + ReaderException if image can't be sampled, for example, if the transformation defined +
+ + + + + + + + + + + +

Checks a set of points that have been transformed to sample points on an image against + the image's dimensions to see if the point are even within the image.

+ +

This method will actually "nudge" the endpoints back onto the image if they are found to be + barely (less than 1 pixel) off the image. This accounts for imperfect detection of finder + patterns in an image where the QR Code runs all the way to the image border.

+ +

For efficiency, the method will check points from either end of the line until one is found + to be within the image. Because the set of points are assumed to be linear, this is valid.

+ +
+ image into which the points should map + + actual points in x1,y1,...,xn,yn form + +
+ + This class implements a local thresholding algorithm, which while slower than the + GlobalHistogramBinarizer, is fairly efficient for what it does. It is designed for + high frequency images of barcodes with black data on white backgrounds. For this application, + it does a much better job than a global blackpoint with severe shadows and gradients. + However it tends to produce artifacts on lower frequency images and is therefore not + a good general purpose binarizer for uses outside ZXing. + + This class extends GlobalHistogramBinarizer, using the older histogram approach for 1D readers, + and the newer local approach for 2D readers. 1D decoding using a per-row histogram is already + inherently local, and only fails for horizontal gradients. We can revisit that problem later, + but for now it was not a win to use local blocks for 1D. + + This Binarizer is the default for the unit tests and the recommended class for library users. + dswitkin@google.com (Daniel Switkin) + + + + + gives the black matrix + + + + + initializing constructor + + + + + + creates a new instance + + + + + + + Calculates the final BitMatrix once for all requests. This could be called once from the + constructor instead, but there are some advantages to doing it lazily, such as making + profiling easier, and not doing heavy lifting when callers don't expect it. + + + + + For each 8x8 block in the image, calculate the average black point using a 5x5 grid + of the blocks around it. Also handles the corner cases (fractional blocks are computed based + on the last 8 pixels in the row/column which are also used in the previous block). + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + The black points. + The matrix. + + + + Applies a single threshold to an 8x8 block of pixels. + + The luminances. + The xoffset. + The yoffset. + The threshold. + The stride. + The matrix. + + + + Calculates a single black point for each 8x8 block of pixels and saves it away. + See the following thread for a discussion of this algorithm: + http://groups.google.com/group/zxing/browse_thread/thread/d06efa2c35a7ddc0 + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + + + +

This class implements a perspective transform in two dimensions. Given four source and four + destination points, it will compute the transformation implied between them. The code is based + directly upon section 3.4.2 of George Wolberg's "Digital Image Warping"; see pages 54-56.

+
+ Sean Owen +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Convenience method, not optimized for performance. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

This class contains utility methods for performing mathematical operations over + the Galois Fields. Operations use a given primitive polynomial in calculations.

+

Throughout this package, elements of the GF are represented as an {@code int} + for convenience and speed (but at the cost of memory). +

+
+ Sean Owen +
+ + + Create a representation of GF(size) using the given primitive polynomial. + + irreducible polynomial whose coefficients are represented by + * the bits of an int, where the least-significant bit represents the constant + * coefficient + the size of the field + the factor b in the generator polynomial can be 0- or 1-based + * (g(x) = (x+a^b)(x+a^(b+1))...(x+a^(b+2t-1))). + * In most cases it should be 1, but for QR code it is 0. + + + + Builds the monomial. + + The degree. + The coefficient. + the monomial representing coefficient * x^degree + + + + Implements both addition and subtraction -- they are the same in GF(size). + + sum/difference of a and b + + + + Exps the specified a. + + 2 to the power of a in GF(size) + + + + Logs the specified a. + + A. + base 2 log of a in GF(size) + + + + Inverses the specified a. + + multiplicative inverse of a + + + + Multiplies the specified a with b. + + A. + The b. + product of a and b in GF(size) + + + + Gets the size. + + + + + Gets the generator base. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + +

Represents a polynomial whose coefficients are elements of a GF. + Instances of this class are immutable.

+

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + the {@link GenericGF} instance representing the field to use + to perform computations + coefficients as ints representing elements of GF(size), arranged + from most significant (highest-power term) coefficient to least significant + if argument is null or empty, + or if leading coefficient is 0 and this is not a + constant polynomial (that is, it is not the monomial "0") + + + + degree of this polynomial + + + + + Gets a value indicating whether this is zero. + + true iff this polynomial is the monomial "0" + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + +

Implements Reed-Solomon decoding, as the name implies.

+ +

The algorithm will not be explained here, but the following references were helpful + in creating this implementation:

+ + + +

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+ +
+ Sean Owen + William Rucklidge + sanfordsquires +
+ + +

Decodes given set of received codewords, which include both data and error-correction + codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place, + in the input.

+
+ data and error-correction codewords + number of error-correction codewords available + false: decoding fails +
+ + + Implements Reed-Solomon encoding, as the name implies. + + Sean Owen + William Rucklidge + + + + Common string-related functions. + + Sean Owen + Alex Dupre + + + + SJIS + + + + + GB2312 + + + + + Guesses the encoding. + + bytes encoding a string, whose encoding should be guessed + decode hints if applicable + name of guessed encoding; at the moment will only guess one of: + {@link #SHIFT_JIS}, {@link #UTF8}, {@link #ISO88591}, or the platform + default encoding if none of these can possibly be correct + + + + This implementation can detect and decode Data Matrix codes in an image. + + bbrown@google.com (Brian Brown) + + + + + Locates and decodes a Data Matrix code in an image. + + + a String representing the content encoded by the Data Matrix code + + + + Locates and decodes a Data Matrix code in an image. + + + + a String representing the content encoded by the Data Matrix code + + + + does nothing here + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a Data Matrix code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + Guillaume Le Biller Added to zxing lib. + + + + encodes the content to a BitMatrix + + + + + + + + + + encodes the content to a BitMatrix + + + + + + + + + + + Encode the given symbol info to a bit matrix. + + The DataMatrix placement. + The symbol info to encode. + + + The bit matrix generated. + + + + Convert the ByteMatrix to BitMatrix. + + The input matrix. + The requested width of the image (in pixels) with the Datamatrix code + The requested height of the image (in pixels) with the Datamatrix code + The output matrix. + + + + bbrown@google.com (Brian Brown) + + + + + to parse + if dimension is < 8 or > 144 or not 0 mod 2 + + + + +

Creates the version object based on the dimension of the original bit matrix from + the datamatrix code.

+ +

See ISO 16022:2006 Table 7 - ECC 200 symbol attributes

+ + Original including alignment patterns + encapsulating the Data Matrix Code's "version" + if the dimensions of the mapping matrix are not valid + Data Matrix dimensions. +
+
+ + +

Reads the bits in the representing the mapping matrix (No alignment patterns) + in the correct order in order to reconstitute the codewords bytes contained within the + Data Matrix Code.

+ + bytes encoded within the Data Matrix Code + if the exact number of bytes expected is not read +
+
+ + +

Reads a bit of the mapping matrix accounting for boundary wrapping.

+ + Row to read in the mapping matrix + Column to read in the mapping matrix + Number of rows in the mapping matrix + Number of columns in the mapping matrix + value of the given bit in the mapping matrix +
+
+ + +

Reads the 8 bits of the standard Utah-shaped pattern.

+ +

See ISO 16022:2006, 5.8.1 Figure 6

+ + Current row in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Current column in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the utah shape +
+
+ + +

Reads the 8 bits of the special corner condition 1.

+ +

See ISO 16022:2006, Figure F.3

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 1 +
+
+ + +

Reads the 8 bits of the special corner condition 2.

+ +

See ISO 16022:2006, Figure F.4

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 2 +
+
+ + +

Reads the 8 bits of the special corner condition 3.

+ +

See ISO 16022:2006, Figure F.5

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 3 +
+
+ + +

Reads the 8 bits of the special corner condition 4.

+ +

See ISO 16022:2006, Figure F.6

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 4 +
+
+ + +

Extracts the data region from a that contains + alignment patterns.

+ + Original with alignment patterns + BitMatrix that has the alignment patterns removed +
+
+ + +

Encapsulates a block of data within a Data Matrix Code. Data Matrix Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ + bbrown@google.com (Brian Brown) +
+
+ + +

When Data Matrix Codes use multiple data blocks, they actually interleave the bytes of each of them. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ + bytes as read directly from the Data Matrix Code + version of the Data Matrix Code + DataBlocks containing original bytes, "de-interleaved" from representation in the + Data Matrix Code +
+
+ + +

Data Matrix Codes can encode text as bits in one of several modes, and can use multiple modes + in one Data Matrix Code. This class decodes the bits back into text.

+ +

See ISO 16022:2006, 5.2.1 - 5.2.9.2

+ + bbrown@google.com (Brian Brown) + Sean Owen +
+
+ + + See ISO 16022:2006, Annex C Table C.1 + The C40 Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, Annex C Table C.2 + The Text Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, 5.2.3 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.5 and Annex C, Table C.1 + + + + + See ISO 16022:2006, 5.2.6 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.7 + + + + + See ISO 16022:2006, 5.2.8 and Annex C Table C.3 + + + + + See ISO 16022:2006, 5.2.9 and Annex B, B.2 + + + + + See ISO 16022:2006, Annex B, B.2 + + + + +

The main class which implements Data Matrix Code decoding -- as opposed to locating and extracting + the Data Matrix Code from an image.

+ + bbrown@google.com (Brian Brown) +
+
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a Data Matrix Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+ + booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code + if the Data Matrix Code cannot be decoded +
+
+ + +

Decodes a Data Matrix Code represented as a . A 1 or "true" is taken + to mean a black module.

+
+ booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+ + data and error correction codewords + number of codewords that are data bytes +
+
+ + + The Version object encapsulates attributes about a particular + size Data Matrix Code. + + bbrown@google.com (Brian Brown) + + + + + returns the version numer + + + + + + returns the symbol size rows + + + + + + returns the symbols size columns + + + + + + retursn the data region size rows + + + + + + returns the data region size columns + + + + + + returns the total codewords count + + + + + +

Deduces version information from Data Matrix dimensions.

+ + Number of rows in modules + Number of columns in modules + Version for a Data Matrix Code of those dimensions + if dimensions do correspond to a valid Data Matrix size +
+
+ + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the Data Matrix code version's format.

+
+
+ + + returns the version number as string + + + + + + See ISO 16022:2006 5.5.1 Table 7 + + + + +

Encapsulates logic that can detect a Data Matrix Code in an image, even if the Data Matrix Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + +

Detects a Data Matrix Code in an image.

+
+ encapsulating results of detecting a Data Matrix Code or null +
+ + + Calculates the position of the white top right module using the output of the rectangle detector + for a rectangular matrix + + + + + Calculates the position of the white top right module using the output of the rectangle detector + for a square matrix + + + + + Increments the Integer associated with a key by one. + + + + + Counts the number of black/white transitions between two points, using something like Bresenham's algorithm. + + + + + Simply encapsulates two points and a number of transitions between them. + + + + + Orders ResultPointsAndTransitions by number of transitions, ascending. + + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Symbol Character Placement Program. Adapted from Annex M.1 in ISO/IEC 16022:2000(E). + + + + + Main constructor + + the codewords to place + the number of columns + the number of rows + + + + Places the 8 bits of a utah-shaped symbol character in ECC200. + + The row. + The col. + character position + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Enumeration for encodation types + + + + + Error Correction Code for ECC200. + + + + + Lookup table which factors to use for which number of error correction codewords. + See FACTORS. + + + + + Precomputed polynomial factors for ECC 200. + + + + + Creates the ECC200 error correction for an encoded message. + + The codewords. + information about the symbol to be encoded + the codewords with interleaved error correction. + + + + DataMatrix ECC 200 data encoder following the algorithm described in ISO/IEC 16022:200(E) in + annex S. + + + + + Padding character + + + + + mode latch to C40 encodation mode + + + + + mode latch to Base 256 encodation mode + + + + + FNC1 Codeword + + + + + Structured Append Codeword + + + + + Reader Programming + + + + + Upper Shift + + + + + 05 Macro + + + + + 06 Macro + + + + + mode latch to ANSI X.12 encodation mode + + + + + mode latch to Text encodation mode + + + + + mode latch to EDIFACT encodation mode + + + + + ECI character (Extended Channel Interpretation) + + + + + Unlatch from C40 encodation + + + + + Unlatch from X12 encodation + + + + + 05 Macro header + + + + + 06 Macro header + + + + + Macro trailer + + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + the encoded message (the char values range from 0 to 255) + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + requested shape. May be {@code SymbolShapeHint.FORCE_NONE},{@code SymbolShapeHint.FORCE_SQUARE} or {@code SymbolShapeHint.FORCE_RECTANGLE}. + the minimum symbol size constraint or null for no constraint + the maximum symbol size constraint or null for no constraint + encoding mode to start with + the encoded message (the char values range from 0 to 255) + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + Symbol info table for DataMatrix. + + + + Overrides the symbol info set used by this class. Used for testing purposes. + + @param override the symbol info set to use + + + + Enumeration for DataMatrix symbol shape hint. It can be used to force square or rectangular + symbols. + + + + + The class holds the available options for the DatamatrixWriter + + + + + Specifies the matrix shape for Data Matrix + + + + + Specifies a minimum barcode size + + + + + Specifies a maximum barcode size + + + + + Specifies the default encodation + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + implements an Intelligent Mail barcode + Rishabh Hatgadkar + + + + + mike32767 + Manuel Kasten + + + + + to parse + + + + +

MaxiCodes can encode text or structured information as bits in one of several modes, + with multiple character sets in one code. This class decodes the bits back into text.

+ + mike32767 + Manuel Kasten +
+
+ + +

The main class which implements MaxiCode decoding -- as opposed to locating and extracting + the MaxiCode from an image.

+ + Manuel Kasten +
+
+ + + This implementation can detect and decode a MaxiCode in an image. + + + + + Locates and decodes a MaxiCode in an image. + + a String representing the content encoded by the MaxiCode + if a MaxiCode cannot be decoded + + + + + Locates and decodes a MaxiCode within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + + This class attempts to decode a barcode from an image, not by scanning the whole image, + but by scanning subsets of the image. This is important when there may be multiple barcodes in + an image, and detecting a barcode may find parts of multiple barcode and fail to decode + (e.g. QR Codes). Instead this scans the four quadrants of the image -- and also the center + 'quadrant' to cover the case where a barcode is found in the center. + + + + + + Initializes a new instance of the class. + + The @delegate. + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Attempts to locate multiple barcodes in an image by repeatedly decoding portion of the image. + After one barcode is found, the areas left, above, right and below the barcode's + {@link com.google.zxing.ResultPoint}s are scanned, recursively.

+

A caller may want to also employ {@link ByQuadrantReader} when attempting to find multiple + 2D barcodes, like QR Codes, in an image, where the presence of multiple barcodes might prevent + detecting any one of them.

+

That is, instead of passing a {@link Reader} a caller might pass + new ByQuadrantReader(reader).

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The @delegate. + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Implementation of this interface attempt to read several barcodes from one image. + Sean Owen + + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + +

Encapsulates logic that can detect one or more QR Codes in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+ + Sean Owen + Hannes Erven +
+
+ + + Initializes a new instance of the class. + + The image. + + + + Detects the multi. + + The hints. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +

In contrast to , this class will return an array of all possible + QR code locations in the image.

+ +

Use the TRY_HARDER hint to ask for a more thorough detection.

+ + Sean Owen + Hannes Erven +
+
+ + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF_PERCENT percent in their + estimated modules sizes. + + + + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF pixels/module in their + estimated modules sizes. + + + + + A comparator that orders FinderPatterns by their estimated module size. + + + + +

Creates a finder that will search the image for three finder patterns.

+ + image to search +
+
+ + + + the 3 best s from our list of candidates. The "best" are + those that have been detected at least CENTER_QUORUM times, and whose module + size differs from the average among those patterns the least + + + + + This implementation can detect and decode multiple QR Codes in an image. + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + +

Decodes Codabar barcodes.

+ + Bas Vijfwinkel +
+
+ + These represent the encodings of characters, as patterns of wide and narrow bars. The 7 least-significant bits of + each int correspond to the pattern of wide and narrow, with 1s representing "wide" and 0s representing narrow. + + + + Records the size of all runs of white and black pixels, starting with white. + This is just like recordPattern, except it records all the counters, and + uses our builtin "counters" member for storage. + + row to count from + + + + This class renders CodaBar as []. + + dsbnatut@gmail.com (Kazuki Nishiura) + + + + The class holds the available options for the QrCodeWriter + + + + + if true, don't switch to codeset C for numbers + + + + +

Decodes Code 128 barcodes.

+ + Sean Owen +
+
+ + + This object renders a CODE128 code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + +

Decodes Code 39 barcodes. Supports "Full ASCII Code 39" if USE_CODE_39_EXTENDED_MODE is set.

+ Sean Owen + @see Code93Reader +
+
+ + + Returns a string with all possible characters + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. It will not decoded "extended Code 39" sequences. + + + + + Creates a reader that can be configured to check the last character as a check digit. + It will not decoded "extended Code 39" sequences. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + + Creates a reader that can be configured to check the last character as a check digit, + or optionally attempt to decode "extended Code 39" sequences that are used to encode + the full ASCII character set. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + if true, will attempt to decode extended Code 39 sequences in the text. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a CODE39 code as a . + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Decodes Code 93 barcodes.

+ Sean Owen + +
+
+ + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a CODE93 code as a BitMatrix + + + + + + output to append to + start position + pattern to append + unused + 9 + + + +

Implements decoding of the EAN-13 format.

+ + dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Initializes a new instance of the class. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + Get the format of this decoder. + The 1D format. + + + + + Based on pattern of odd-even ('L' and 'G') patterns used to encoded the explicitly-encoded + digits in a barcode, determines the implicitly encoded first digit and adds it to the + result string. + + string to insert decoded first digit into + int whose bits indicates the pattern of odd/even L/G patterns used to + encode digits + -1 if first digit cannot be determined + + + + This object renders an EAN13 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Implements decoding of the EAN-8 format.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Get the format of this decoder. + The 1D format. + + + + + This object renders an EAN8 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + + + a byte array of horizontal pixels (false = white, true = black) + + + + + Records EAN prefix to GS1 Member Organization, where the member organization + correlates strongly with a country. This is an imperfect means of identifying + a country of origin by EAN-13 barcode value. See + + http://en.wikipedia.org/wiki/List_of_GS1_country_codes. + + Sean Owen + + + + +

Implements decoding of the ITF format, or Interleaved Two of Five.

+ +

This Reader will scan ITF barcodes of certain lengths only. + At the moment it reads length 6, 8, 10, 12, 14, 16, 18, 20, 24, 44 and 48 as these have appeared "in the wild". Not all + lengths are scanned, especially shorter ones, to avoid false positives. This in turn is due to a lack of + required checksum function.

+ +

The checksum is optional and is not applied by this Reader. The consumer of the decoded + value will have to apply a checksum if required.

+ +

http://en.wikipedia.org/wiki/Interleaved_2_of_5 + is a great reference for Interleaved 2 of 5 information.

+ + kevin.osullivan@sita.aero, SITA Lab. +
+
+ + + Valid ITF lengths. Anything longer than the largest value is also allowed. + + + + + Start/end guard pattern. + + Note: The end pattern is reversed because the row is reversed before + searching for the END_PATTERN + + + + + Patterns of Wide / Narrow lines to indicate each digit + + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + + row of black/white values to search + offset of start pattern + The payload end. + to append decoded chars to + + false, if decoding could not complete successfully + + + + + Identify where the start of the middle / payload section starts. + + row of black/white values to search + Array, containing index of start of 'start block' and end of 'start block' + + + + The start & end patterns must be pre/post fixed by a quiet zone. This + zone must be at least 10 times the width of a narrow line. Scan back until + we either get to the start of the barcode or match the necessary number of + quiet zone pixels. + + Note: Its assumed the row is reversed when using this method to find + quiet zone after the end pattern. + + ref: http://www.barcode-1.net/i25code.html + + bit array representing the scanned barcode. + index into row of the start or end pattern. + false, if the quiet zone cannot be found + + + + Skip all whitespace until we get to the first black line. + + row of black/white values to search + index of the first black line or -1 if no black lines are found in the row. + + + + Identify where the end of the middle / payload section ends. + + row of black/white values to search + Array, containing index of start of 'end block' and end of 'end + block' or null, if nothing found + + + + + row of black/white values to search + position to start search + pattern of counts of number of black and white pixels that are being searched for as a pattern + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a sequence of ITF black/white lines into single + digit. + + the counts of runs of observed black/white/black/... values + The decoded digit + + false, if digit cannot be decoded + + + + + This object renders a ITF code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code bool[]} of horizontal pixels (false = white, true = black) + + + + + + + Decodes MSI barcodes. + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. + + + + + Creates a reader that can be configured to check the last character as a check digit, + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a MSI code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

A reader that can read all available UPC/EAN formats. If a caller wants to try to + read all such formats, it is most efficient to use this implementation rather than invoke + individual readers.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Encapsulates functionality and implementation that is common to one-dimensional barcodes.

+ dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + a byte array of horizontal pixels (0 = white, 1 = black) + + + + Appends the given pattern to the target array starting at pos. + + encode black/white pattern into this array + position to start encoding at in target + lengths of black/white runs to encode + starting color - false for white, true for black + the number of elements added to target. + + + + Gets the default margin. + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + + barcode contents to encode + a bool[] of horizontal pixels (false = white, true = black) + + + + Calculates the checksum digit modulo10. + + The contents. + + + + + Encapsulates functionality and implementation that is common to all families + of one-dimensional barcodes. + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + + + + + + + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + Note that we don't try rotation without the try harder flag, even if rotation was supported. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + We're going to examine rows from the middle outward, searching alternately above and below the + middle, and farther out each time. rowStep is the number of rows between each successive + attempt above and below the middle. So we'd scan row middle, then middle - rowStep, then + middle + rowStep, then middle - (2 * rowStep), etc. + rowStep is bigger as the image is taller, but is always at least 1. We've somewhat arbitrarily + decided that moving up and down by about 1/16 of the image is pretty good; we try more of the + image if "trying harder". + + The image to decode + Any hints that were requested + The contents of the decoded barcode + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the pattern in reverse. + + The row. + The start. + The counters. + + + + + Determines how closely a set of observed counts of runs of black/white values matches a given + target pattern. This is reported as the ratio of the total variance from the expected pattern + proportions across all pattern elements, to the length of the pattern. + + observed counters + expected pattern + The most any counter can differ before we give up + ratio of total variance between counters and pattern compared to total pattern size, + where the ratio has been multiplied by 256. So, 0 means no variance (perfect match); 256 means + the total variance between counters and patterns equals the pattern length, higher values mean + even more variance + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + This object renders a Plessey code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + Superclass of implementations that read barcodes in the RSS family of formats. + + + + + Initializes a new instance of the class. + + + + + Gets the decode finder counters. + + + + + + Gets the data character counters. + + + + + + Gets the odd rounding errors. + + + + + + Gets the even rounding errors. + + + + + + Gets the odd counts. + + + + + + Gets the even counts. + + + + + + Parses the finder value. + + The counters. + The finder patterns. + The value. + + + + + Counts the specified array. + + The array. + + + + + Increments the specified array. + + The array. + The errors. + + + + Decrements the specified array. + + The array. + The errors. + + + + Determines whether [is finder pattern] [the specified counters]. + + The counters. + + true if [is finder pattern] [the specified counters]; otherwise, false. + + + + + Encapsulates a since character value in an RSS barcode, including its checksum information. + + + + + Gets the value. + + + + + Gets the checksum portion. + + + + + Initializes a new instance of the class. + + The value. + The checksum portion. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Gets the information. + + + + + + Parses the information. + + + + + + Creates the decoder. + + The information. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + One row of an RSS Expanded Stacked symbol, consisting of 1+ expanded pairs. + + + + + Did this row of the image have to be reversed (mirrored) to recognize the pairs? + + + + + Two rows are equal if they contain the same pairs in the same order. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Encapsulates an RSS barcode finder pattern, including its start/end position and row. + + + + + Gets the value. + + + + + Gets the start end. + + + + + Gets the result points. + + + + + Initializes a new instance of the class. + + The value. + The start end. + The start. + The end. + The row number. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Decodes RSS-14, including truncated and stacked variants. See ISO/IEC 24724:2006. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Adapted from listings in ISO/IEC 24724 Appendix B and Appendix G. + + + + + Gets the RS svalue. + + The widths. + Width of the max. + if set to true [no narrow]. + + + + +

Implements decoding of the UPC-A format.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen +
+
+ + +

Like decodeRow(int, BitArray, java.util.Map), but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ + + + + +
+ + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Decodes the specified image. + + The image. + The hints. + + + + + Get the format of this decoder. + The 1D format. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + This object renders a UPC-A code as a . + qwandor@google.com (Andrew Walbran) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + @see UPCEANExtension5Support + + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + + + @see UPCEANExtension2Support + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + one {@link ResultMetadataType} to appropriate value, or {@code null} if not known + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Start/end guard pattern. + + + + + Pattern marking the middle of a UPC/EAN pattern, separating the two halves. + + + + + end guard pattern. + + + + + "Odd", or "L" patterns used to encode UPC/EAN digits. + + + + + As above but also including the "even", or "G" patterns used to encode UPC/EAN digits. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + +

Like , but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ row index into the image + encoding of the row of the barcode image + start/end column where the opening start pattern was found + optional hints that influence decoding + encapsulating the result of decoding a barcode in the row +
+ + + + string of digits to check + see + + + + Computes the UPC/EAN checksum on a string of digits, and reports + whether the checksum is correct or not. + + string of digits to check + true iff string of digits passes the UPC/EAN checksum algorithm + + + + Decodes the end. + + The row. + The end start. + + + + + + row of black/white values to search + position to start search + if true, indicates that the pattern specifies white/black/white/... + pixel counts, otherwise, it is interpreted as black/white/black/... + pattern of counts of number of black and white pixels that are being + searched for as a pattern + array of counters, as long as pattern, to re-use + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a single UPC/EAN-encoded digit. + + row of black/white values to decode + the counts of runs of observed black/white/black/... values + horizontal offset to start decoding from + the set of patterns to use to decode -- sometimes different encodings + for the digits 0-9 are used, and this indicates the encodings for 0 to 9 that should + be used + horizontal offset of first pixel beyond the decoded digit + + + + Get the format of this decoder. + + The 1D format. + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ aripollak@gmail.com (Ari Pollak) + dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Gets the default margin. + + + + +

Implements decoding of the UPC-E format.

+

Thisis a great reference for + UPC-E information.

+ Sean Owen +
+
+ + + The pattern that marks the middle, and end, of a UPC-E pattern. + There is no "second half" to a UPC-E barcode. + + + + + See L_AND_G_PATTERNS these values similarly represent patterns of + even-odd parity encodings of digits that imply both the number system (0 or 1) + used, and the check digit. + + + + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Decodes the end. + + The row. + The end start. + + + + + see checkStandardUPCEANChecksum(String) + + + + + + + Determines the num sys and check digit. + + The result string. + The lg pattern found. + + + + + Get the format of this decoder. + The 1D format. + + + + + Expands a UPC-E value back into its full, equivalent UPC-A code value. + + UPC-E code as string of digits + equivalent UPC-A code as string of digits + + + + + This object renders an UPC-E code as a {@link BitMatrix}. + @author 0979097955s@gmail.com (RX) + + + + + Metadata about a PDF417 Barcode + + Guenther Grau + + + + A Barcode Value for the PDF417 barcode. + The scanner will iterate through the bitmatrix, + and given the different methods or iterations + will increment a given barcode value's confidence. + + When done, this will return the values of highest confidence. + + Guenther Grau + + + + Incremenets the Confidence for a given value. (Adds an occurance of a value) + + + Value. + + + + Determines the maximum occurrence of a set value and returns all values which were set with this occurrence. + + an array of int, containing the values with the highest occurrence, or null, if no value was set. + + + + Returns the confience value for a given barcode value + + Barcode value. + + + + A Bounding Box helper class + + Guenther Grau + + + + Initializes a new instance of the class. + returns null if the corner points don't match up correctly + + The image. + The top left. + The bottom left. + The top right. + The bottom right. + + + + + Creates the specified box. + + The box. + + + + + Initializes a new instance of the class. + Will throw an exception if the corner points don't match up correctly + + Image. + Top left. + Top right. + Bottom left. + Bottom right. + + + + Merge two Bounding Boxes, getting the left corners of left, and the right corners of right + (Images should be the same) + + Left. + Right. + + + + Adds the missing rows. + + The missing rows. + Missing start rows. + Missing end rows. + If set to true is left. + + + + Calculates the minimum and maximum X & Y values based on the corner points. + + + + + If we adjust the width, set a new right corner coordinate and recalculate + + Bottom right. + + + + A Codeword in the PDF417 barcode + + Guenther Grau + + + + Default value for the RowNumber (-1 being an invalid real number) + + + + + Initializes a new instance of the class. + + Start x. + End x. + Bucket. + Value. + + + + Gets the width. + + The width. + + + + Gets a value indicating whether this instance has valid row number. + + true if this instance has valid row number; otherwise, false. + + + + Determines whether this instance is valid row number the specified rowNumber. + + true if this instance is valid row number the specified rowNumber; otherwise, false. + Row number. + + + + Sets the row number as the row's indicator column. + + + + + Returns a that represents the current . + + A that represents the current . + + + +

This class contains the methods for decoding the PDF417 codewords.

+ + SITA Lab (kevin.osullivan@sita.aero) +
+
+ + + Table containing values for the exponent of 900. + This is used in the numeric compaction decode algorithm. + + + + + Text Compaction mode (see 5.4.1.5) permits all printable ASCII characters to be + encoded, i.e. values 32 - 126 inclusive in accordance with ISO/IEC 646 (IRV), as + well as selected control characters. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + The Text Compaction mode includes all the printable ASCII characters + (i.e. values from 32 to 126) and three ASCII control characters: HT or tab + (ASCII value 9), LF or line feed (ASCII value 10), and CR or carriage + return (ASCII value 13). The Text Compaction mode also includes various latch + and shift characters which are used exclusively within the mode. The Text + Compaction mode encodes up to 2 characters per codeword. The compaction rules + for converting data into PDF417 codewords are defined in 5.4.2.2. The sub-mode + switches are defined in 5.4.2.3. + + The text compaction data. + The byte compaction data if there + was a mode shift. + The size of the text compaction and byte compaction data. + The decoded data is appended to the result. + + + + + Byte Compaction mode (see 5.4.3) permits all 256 possible 8-bit byte values to be encoded. + This includes all ASCII characters value 0 to 127 inclusive and provides for international + character set support. + + The byte compaction mode i.e. 901 or 924 + The array of codewords (data + error) + Currently active character encoding + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Numeric Compaction mode (see 5.4.4) permits efficient encoding of numeric data strings. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Convert a list of Numeric Compacted codewords from Base 900 to Base 10. + EXAMPLE + Encode the fifteen digit numeric string 000213298174000 + Prefix the numeric string with a 1 and set the initial value of + t = 1 000 213 298 174 000 + Calculate codeword 0 + d0 = 1 000 213 298 174 000 mod 900 = 200 + + t = 1 000 213 298 174 000 div 900 = 1 111 348 109 082 + Calculate codeword 1 + d1 = 1 111 348 109 082 mod 900 = 282 + + t = 1 111 348 109 082 div 900 = 1 234 831 232 + Calculate codeword 2 + d2 = 1 234 831 232 mod 900 = 632 + + t = 1 234 831 232 div 900 = 1 372 034 + Calculate codeword 3 + d3 = 1 372 034 mod 900 = 434 + + t = 1 372 034 div 900 = 1 524 + Calculate codeword 4 + d4 = 1 524 mod 900 = 624 + + t = 1 524 div 900 = 1 + Calculate codeword 5 + d5 = 1 mod 900 = 1 + t = 1 div 900 = 0 + Codeword sequence is: 1, 624, 434, 632, 282, 200 + + Decode the above codewords involves + 1 x 900 power of 5 + 624 x 900 power of 4 + 434 x 900 power of 3 + + 632 x 900 power of 2 + 282 x 900 power of 1 + 200 x 900 power of 0 = 1000213298174000 + + Remove leading 1 => Result is 000213298174000 + The array of codewords + The number of codewords + The decoded string representing the Numeric data. + + + + + + + Guenther Grau + + + + Returns the DetectionResult Columns. This does a fair bit of calculation, so call it sparingly. + + The detection result columns. + + + + Adjusts the indicator column row numbers. + + Detection result column. + + + + return number of codewords which don't have a valid row number. Note that the count is not accurate as codewords . + will be counted several times. It just serves as an indicator to see when we can stop adjusting row numbers + + The row numbers. + + + + Adjusts the row numbers by row. + + The row numbers by row. + + + + Adjusts the row numbers from both Row Indicators + + zero + + + + Adjusts the row numbers from Right Row Indicator. + + The unadjusted row count. + + + + Adjusts the row numbers from Left Row Indicator. + + Unadjusted row Count. + + + + Adjusts the row number if valid. + + The invalid rows + Row indicator row number. + Invalid row counts. + Codeword. + + + + Adjusts the row numbers. + + Barcode column. + Codewords row. + Codewords. + + + + Adjusts the row number. + + true, if row number was adjusted, false otherwise. + Codeword. + Other codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + The maximum distance to search in the codeword array in both the positive and negative directions + + + + + The Bounding Box around the column (in the BitMatrix) + + The box. + + + + The Codewords the Box encodes for, offset by the Box minY. + Remember to Access this ONLY through GetCodeword(imageRow) if you're accessing it in that manner. + + The codewords. + + + + Initializes a new instance of the class. + + The Bounding Box around the column (in the BitMatrix) + + + + Converts the Image's Row to the index in the Codewords array + + The Codeword Index. + Image row. + + + + Converts the Codeword array index into a Row in the Image (BitMatrix) + + The Image Row. + Codeword index. + + + + Gets the codeword for a given row + + The codeword. + Image row. + + + + Gets the codeword closest to the specified row in the image + + Image row. + + + + Sets the codeword for an image row + + Image row. + Codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + Gets or sets a value indicating whether this instance is the left indicator + + true if this instance is left; otherwise, false. + + + + Initializes a new instance of the class. + + Box. + If set to true is left. + + + + Sets the Row Numbers as Inidicator Columns + + + + + TODO implement properly + TODO maybe we should add missing codewords to store the correct row number to make + finding row numbers for other columns easier + use row height count to make detection of invalid row numbers more reliable + + The indicator column row numbers. + Metadata. + + + + Gets the row heights. + + The row heights. + + + + Adjusts the in omplete indicator column row numbers. + + Metadata. + + + + Gets the barcode metadata. + + The barcode metadata. + + + + Prune the codewords which do not match the metadata + TODO Maybe we should keep the incorrect codewords for the start and end positions? + + Codewords. + Metadata. + + + + Returns a that represents the current . + + A that represents the current . + + + +

PDF417 error correction implementation.

+

This example + is quite useful in understanding the algorithm.

+ Sean Owen + +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the specified received. + + received codewords + number of those codewords used for EC + location of erasures + The error locations count. + + + + + Runs the euclidean algorithm (Greatest Common Divisor) until r's degree is less than R/2 + + The euclidean algorithm. + + + + Finds the error locations as a direct application of Chien's search + + The error locations. + Error locator. + + + + Finds the error magnitudes by directly applying Forney's Formula + + The error magnitudes. + Error evaluator. + Error locator. + Error locations. + + + +

A field based on powers of a generator integer, modulo some modulus.

+ +
+ Sean Owen +
+ + + + + Sean Owen + + + + Gets the coefficients. + + The coefficients. + + + + degree of this polynomial + + + + + Gets a value indicating whether this instance is zero. + + true if this polynomial is the monomial "0" + + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + + + Adds another Modulus + + Other. + + + + Subtract another Modulus + + Other. + + + + Multiply by another Modulus + + Other. + + + + Returns a Negative version of this instance + + + + + Multiply by a Scalar. + + Scalar. + + + + Multiplies by a Monomial + + The by monomial. + Degree. + Coefficient. + + + + Returns a that represents the current . + + A that represents the current . + + + + + + Guenther Grau + creatale GmbH (christoph.schulz@creatale.de) + + + + The ratios table + + + + + Initializes the class & Pre-computes the symbol ratio table. + + + + + Gets the decoded value. + + The decoded value. + Module bit count. + + + + Samples the bit counts. + + The bit counts. + Module bit count. + + + + Gets the decoded codeword value. + + The decoded codeword value. + Module bit count. + + + + Gets the bit value. + + The bit value. + Module bit count. + + + + Gets the closest decoded value. + + The closest decoded value. + Module bit count. + + + + + + Guenther Grau + + + + Decode the specified image, imageTopLeft, imageBottomLeft, imageTopRight, imageBottomRight, minCodewordWidth + and maxCodewordWidth. + TODO: don't pass in minCodewordWidth and maxCodewordWidth, pass in barcode columns for start and stop pattern + columns. That way width can be deducted from the pattern column. + This approach also allows to detect more details about the barcode, e.g. if a bar type (white or black) is wider + than it should be. This can happen if the scanner used a bad blackpoint. + + Image. + Image top left. + Image bottom left. + Image top right. + Image bottom right. + Minimum codeword width. + Max codeword width. + + + + Merge the specified leftRowIndicatorColumn and rightRowIndicatorColumn. + + Left row indicator column. + Right row indicator column. + + + + Adjusts the bounding box. + + The bounding box. + Row indicator column. + + + + Gets the barcode metadata. + + The barcode metadata. + Left row indicator column. + Right row indicator column. + + + + Gets the row indicator column. + + The row indicator column. + Image. + Bounding box. + Start point. + If set to true left to right. + Minimum codeword width. + Max codeword width. + + + + Adjusts the codeword count. + + Detection result. + Barcode matrix. + + + + Creates the decoder result. + + The decoder result. + Detection result. + + + + This method deals with the fact, that the decoding process doesn't always yield a single most likely value. The + current error correction implementation doesn't deal with erasures very well, so it's better to provide a value + for these ambiguous codewords instead of treating it as an erasure. The problem is that we don't know which of + the ambiguous values to choose. We try decode using the first value, and if that fails, we use another of the + ambiguous values and try to decode again. This usually only happens on very hard to read and decode barcodes, + so decoding the normal barcodes is not affected by this. + + The decoder result from ambiguous values. + Ec level. + Codewords. + contains the indexes of erasures. + array with the indexes that have more than one most likely value. + two dimensional array that contains the ambiguous values. The first dimension must + be the same Length as the ambiguousIndexes array. + + + + Creates the barcode matrix. + + The barcode matrix. + Detection result. + + + + Tests to see if the Barcode Column is Valid + + true, if barcode column is valid, false otherwise. + Detection result. + Barcode column. + + + + Gets the start column. + + The start column. + Detection result. + Barcode column. + Image row. + If set to true left to right. + + + + Detects the codeword. + + The codeword. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + Minimum codeword width. + Max codeword width. + + + + Gets the module bit count. + + The module bit count. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + + + + Gets the number of EC code words. + + The number of EC code words. + Barcode EC level. + + + + Adjusts the codeword start column. + + The codeword start column. + Image. + Minimum column. + Max column. + If set to true left to right. + Codeword start column. + Image row. + + + + Checks the codeword for any skew. + + true, if codeword is within the skew, false otherwise. + Codeword size. + Minimum codeword width. + Max codeword width. + + + + Decodes the codewords. + + The codewords. + Codewords. + Ec level. + Erasures. + + + + Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place. + + The errors. + data and error correction codewords. + positions of any known erasures. + number of error correction codewords that are available in codewords. + + + + Verifies that all is well with the the codeword array. + + Codewords. + Number EC codewords. + + + + Gets the bit count for codeword. + + The bit count for codeword. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Module bit count. + + + + Returns a that represents the jagged array. + + A that represents the jagged array. + Barcode matrix as a jagged array. + + + +

Encapsulates logic that can detect a PDF417 Code in an image, even if the + PDF417 Code is rotated or skewed, or partially obscured.

+ + SITA Lab (kevin.osullivan@sita.aero) + dswitkin@google.com (Daniel Switkin) + Guenther Grau +
+
+ + + B S B S B S B S Bar/Space pattern + 11111111 0 1 0 1 0 1 000. + + + + + 1111111 0 1 000 1 0 1 00 1 + + + + + if we set the value too low, then we don't detect the correct height of the bar if the start patterns are damaged. + if we set the value too high, then we might detect the start pattern from a neighbor barcode. + + + + + A PDF471 barcode should have at least 3 rows, with each row being >= 3 times the module width. Therefore it should be at least + 9 pixels tall. To be conservative, we use about half the size to ensure we don't miss it. + + + + +

Detects a PDF417 Code in an image. Only checks 0 and 180 degree rotations.

+
+ barcode image to decode + optional hints to detector + if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned + + encapsulating results of detecting a PDF417 code + +
+ + + Detects PDF417 codes in an image. Only checks 0 degree rotation (so rotate the matrix and check again outside of this method) + + multiple if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned. + bit matrix to detect barcodes in. + List of ResultPoint arrays containing the coordinates of found barcodes + + + + Locate the vertices and the codewords area of a black blob using the Start and Stop patterns as locators. + + Matrix. + Start row. + Start column. + an array containing the vertices: + vertices[0] x, y top left barcode + vertices[1] x, y bottom left barcode + vertices[2] x, y top right barcode + vertices[3] x, y bottom right barcode + vertices[4] x, y top left codeword area + vertices[5] x, y bottom left codeword area + vertices[6] x, y top right codeword area + vertices[7] x, y bottom right codeword area + + + + + Copies the temp data to the final result + + Result. + Temp result. + Destination indexes. + + + + Finds the rows with the given pattern. + + The rows with pattern. + Matrix. + Height. + Width. + Start row. + Start column. + Pattern. + + + + Finds the guard pattern. Uses System.Linq.Enumerable.Repeat to fill in counters. This might be a performance issue? + + start/end horizontal offset of guard pattern, as an array of two ints. + matrix row of black/white values to search + column x position to start search. + row y position to start search. + width the number of pixels to search on this row. + If set to true search the white patterns first. + pattern of counts of number of black and white pixels that are being searched for as a pattern. + counters array of counters, as long as pattern, to re-use . + + + + Determines how closely a set of observed counts of runs of black/white. + values matches a given target pattern. This is reported as the ratio of + the total variance from the expected pattern proportions across all + pattern elements, to the length of the pattern. + + + ratio of total variance between counters and pattern compared to + total pattern size, where the ratio has been multiplied by 256. + So, 0 means no variance (perfect match); 256 means the total + variance between counters and patterns equals the pattern length, + higher values mean even more variance + + observed counters. + expected pattern. + The most any counter can differ before we give up. + + + + PDF 417 Detector Result class. Skipped private backing stores. + Guenther Grau + + + + + Initializes a new instance of the class. + + Bits. + Points. + + + + Holds all of the information for a barcode in a format where it can be easily accessible + + Jacob Haynes + + + + + the height of the matrix (Rows) + the width of the matrix (Cols) + + + + + Jacob Haynes + + + + + Creates a Barcode row of the width + + The width. + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + A boolean which is true if the bar black false if it is white + How many spots wide the bar is. + + + + + This function scales the row + + How much you want the image to be scaled, must be greater than or equal to 1. + the scaled row + + + + + Represents possible PDF417 barcode compaction types. + + + + + + + + + + + + + + + + + + + + + + + + + Data object to specify the minimum and maximum number of rows and columns for a PDF417 barcode. + @author qwandor@google.com (Andrew Walbran) + + + + + Initializes a new instance of the class. + + The min cols. + The max cols. + The min rows. + The max rows. + + + + Gets the min cols. + + + + + Gets the max cols. + + + + + Gets the min rows. + + + + + Gets the max rows. + + + + + Top-level class for the logic part of the PDF417 implementation. + + + + + The start pattern (17 bits) + + + + + The stop pattern (18 bits) + + + + + The codeword table from the Annex A of ISO/IEC 15438:2001(E). + + + + + Calculates the necessary number of rows as described in annex Q of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol (r) + + + + Calculates the number of pad codewords as described in 4.9.2 of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol + the number of pad codewords + + + + Generates the barcode logic. + + the message to encode + PDF417 error correction level to use + + + + Determine optimal nr of columns and rows for the specified number of + codewords. + + number of code words + number of error correction code words + The longest dimension of the barcode, used for columns + The short dimension of the barcode, used for rows + The height of a row, will alter this parameter if aspectRatio>4 (aspectRatio==AUTO) + dimension object containing cols as width and rows as height + + + + Sets max/min row/col values + + maximum allowed columns + minimum allowed columns + maximum allowed rows + minimum allowed rows + + + + Sets compaction to values stored in enum + + compaction mode to use + + + + Sets compact to be true or false + + if true, enables compaction + + + + Sets output encoding. + + sets character encoding to use + + + + Sets the disable eci. + + if set to true don't add an ECI segment for different encodings than default. + + + + defines the level of the error correction / count of error correction codewords + + + + + PDF417 error correction code following the algorithm described in ISO/IEC 15438:2001(E) in + chapter 4.10. + + + + + Tables of coefficients for calculating error correction words + (see annex F, ISO/IEC 15438:2001(E)) + + + + + Determines the number of error correction codewords for a specified error correction + level. + + the error correction level (0-8) + the number of codewords generated for error correction + + + + Determines the error correction level for AUTO + + The error correction level (0-9) + The number of codewords for AUTO errorCorrectionLevel + the number of codewords generated for error correction + + + + Returns the recommended minimum error correction level as described in annex E of + ISO/IEC 15438:2001(E). + + the number of data codewords + the recommended minimum error correction level + + + + Generates the error correction codewords according to 4.10 in ISO/IEC 15438:2001(E). + + the data codewords + the error correction level (0-8) + the String representing the error correction codewords + + + + defines the level of the error correction / count of error correction codewords + + + + + PDF417 high-level encoder following the algorithm described in ISO/IEC 15438:2001(E) in + annex P. + + + + + code for Text compaction + + + + + code for Byte compaction + + + + + code for Numeric compaction + + + + + Text compaction submode Alpha + + + + + Text compaction submode Lower + + + + + Text compaction submode Mixed + + + + + Text compaction submode Punctuation + + + + + mode latch to Text Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters NOT a multiple of 6) + + + + + mode latch to Numeric Compaction mode + + + + + mode shift to Byte Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters a multiple of 6) + + + + + identifier for a user defined Extended Channel Interpretation (ECI) + + + + + identifier for a general purpose ECO format + + + + + identifier for an ECI of a character set of code page + + + + + Raw code table for text compaction Mixed sub-mode + + + + + Raw code table for text compaction: Punctuation sub-mode + + + + + Performs high-level encoding of a PDF417 message using the algorithm described in annex P + of ISO/IEC 15438:2001(E). If byte compaction has been selected, then only byte compaction + is used. + + the message + compaction mode to use + character encoding used to encode in default or byte compaction + or null for default / not applicable + if true, don't add an ECI segment for different encodings than default + the encoded message (the char values range from 0 to 928) + + + + Encode parts of the message using Text Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.2. + + the message + the start position within the message + the number of characters to encode + receives the encoded codewords + should normally be SUBMODE_ALPHA + the text submode in which this method ends + + + + + Encode parts of the message using Byte Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.3. The Unicode characters will be converted to binary using the cp437 + codepage. + + the message converted to a byte array + the start position within the message + the number of bytes to encode + the mode from which this method starts + receives the encoded codewords + + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using text compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using binary compaction. + + the message + the message converted to a byte array + the start position within the message + + the requested character count + + + + The class holds the available options for the + + + + + Specifies whether to use compact mode for PDF417 (type ). + + + + + Specifies what compaction mode to use for PDF417 (type + ). + + + + + Specifies the minimum and maximum number of rows and columns for PDF417 (type + ). + + + + + Specifies what degree of error correction to use + + + + + Specifies what degree of error correction to use + + + + + Specifies what character encoding to use where applicable (type {@link String}) + + + + + Explicitly disables ECI segment when generating PDF417 Code + That is against the specification but some + readers have problems if the charset is switched from + CP437 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use different encodings + and the ECI segment is omitted. + + + + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Maximum Codewords (Data + Error). + + + + + Gets the bit count sum. + + The bit count sum. + Module bit count. + + + + Converts an ICollection<int> to an int[] + Carry-over from Java. Will likely remove and replace with the Generic .ToArray() method. + + The int array. + List. + + + + Translate the symbol into a codeword + + the codeword corresponding to the symbol. + encoded symbol to translate to a codeword + + + + The sorted table of all possible symbols. Extracted from the PDF417 + specification. The index of a symbol in this table corresponds to the + index into the codeword table. + + + + + This table contains to codewords for all symbols. + + + + + This implementation can detect and decode PDF417 codes in an image. + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Locates and decodes a PDF417 code in an image. + + a String representing the content encoded by the PDF417 code + if a PDF417 cannot be decoded + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + **Note** this will return the FIRST barcode discovered if there are many. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Locates and decodes Multiple PDF417 codes in an image. + + an array of Strings representing the content encoded by the PDF417 codes + + + + + Locates and decodes multiple barcodes in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcodes encode + + + + + Decode the specified image, with the hints and optionally multiple barcodes. + Based on Owen's Comments in , this method has been modified to continue silently + if a barcode was not decoded where it was detected instead of throwing a new exception object. + + Image. + Hints. + If set to true multiple. + + + + Gets the maximum width of the barcode + + The max width. + P1. + P2. + + + + Gets the minimum width of the barcode + + The minimum width. + P1. + P2. + + + + Gets the maximum width of the codeword. + + The max codeword width. + P. + + + + Gets the minimum width of the codeword. + + The minimum codeword width. + P. + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + PDF 417 result meta data. + Guenther Grau + + + + + The Segment ID represents the segment of the whole file distributed over different symbols. + + + + + Is the same for each related PDF417 symbol + + + + + always null + + + + + true if it is the last segment + + + + + count of segments, -1 if not set + + + + + Filename of the encoded file + + + + + filesize in bytes of the encoded file + returns filesize in bytes, -1 if not set + + + + + 16-bit CRC checksum using CCITT-16 + returns crc checksum, -1 if not set + + + + + unix epock timestamp, elapsed seconds since 1970-01-01 + returns elapsed seconds, -1 if not set + + + + + Jacob Haynes + qwandor@google.com (Andrew Walbran) + + + + + default white space (margin) around the code + + + + + default error correction level + + + + + default aspect ratio + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The height of a row in the barcode + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Takes encoder, accounts for width/height, and retrieves bit matrix + + + + + This takes an array holding the values of the PDF 417 + + a byte array of information with 0 is black, and 1 is white + border around the barcode + BitMatrix of the input + + + + Takes and rotates the it 90 degrees + + + + Sean Owen + + + {@link BitMatrix} to parse + ReaderException if dimension is not >= 21 and 1 mod 4 + + +

Reads format information from one of its two locations within the QR Code.

+ +
+ {@link FormatInformation} encapsulating the QR Code's format info + + ReaderException if both format information locations cannot be parsed as + the valid encoding of format information + +
+ +

Reads version information from one of its two locations within the QR Code.

+ +
+ {@link Version} encapsulating the QR Code's version + + ReaderException if both version information locations cannot be parsed as + the valid encoding of version information + +
+ +

Reads the bits in the {@link BitMatrix} representing the finder pattern in the + correct order in order to reconstruct the codewords bytes contained within the + QR Code.

+ +
+ bytes encoded within the QR Code + + ReaderException if the exact number of bytes expected is not read +
+ + Revert the mask removal done while reading the code words. The bit matrix should revert to its original state. + + + Prepare the parser for a mirrored operation. + This flag has effect only on the {@link #readFormatInformation()} and the + {@link #readVersion()}. Before proceeding with {@link #readCodewords()} the + {@link #mirror()} method should be called. + + @param mirror Whether to read version and format information mirrored. + + + Mirror the bit matrix in order to attempt a second reading. + + +

Encapsulates a block of data within a QR Code. QR Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

When QR Codes use multiple data blocks, they are actually interleaved. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ +
+ bytes as read directly from the QR Code + + version of the QR Code + + error-correction level of the QR Code + + {@link DataBlock}s containing original bytes, "de-interleaved" from representation in the + QR Code + +
+ +

Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations + of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix, + including areas used for finder patterns, timing patterns, etc. These areas should be unused + after the point they are unmasked anyway.

+ +

Note that the diagram in section 6.8.1 is misleading since it indicates that i is column position + and j is row position. In fact, as the text says, i is row position and j is column position.

+ +
+ Sean Owen +
+ + See ISO 18004:2006 6.8.1 + + +

Implementations of this method reverse the data masking process applied to a QR Code and + make its bits ready to read.

+
+ + representation of QR Code bits + dimension of QR Code, represented by bits, being unmasked +
+ +

QR Codes can encode text as bits in one of several modes, and can use multiple modes + in one QR Code. This class decodes the bits back into text.

+ +

See ISO 18004:2006, 6.4.3 - 6.4.7

+ Sean Owen +
+
+ + + See ISO 18004:2006, 6.4.4 Table 5 + + + + + See specification GBT 18284-2000 + + The bits. + The result. + The count. + + + + +

The main class which implements QR Code decoding -- as opposed to locating and extracting + the QR Code from an image.

+
+ + Sean Owen + +
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a QR Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Decodes a QR Code represented as a {@link BitMatrix}. A 1 or "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+
+ data and error correction codewords + number of codewords that are data bytes + +
+ + +

See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels + defined by the QR code standard.

+
+ Sean Owen +
+ + L = ~7% correction + + + M = ~15% correction + + + Q = ~25% correction + + + H = ~30% correction + + + + Gets the bits. + + + + + Gets the name. + + + + + Ordinals this instance. + + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Fors the bits. + + int containing the two bits encoding a QR Code's error correction level + + representing the encoded error correction level + + + +

Encapsulates a QR Code's format information, including the data mask used and + error correction level.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + +
+ + See ISO 18004:2006, Annex C, Table C.1 + + + Offset i holds the number of 1 bits in the binary representation of i + + + + Decodes the format information. + + format info indicator, with mask still applied + The masked format info2. + + information about the format it specifies, or null + if doesn't seem to match any known pattern + + + + +

See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which + data can be encoded to bits in the QR code standard.

+
+ Sean Owen +
+ + + Gets the name. + + + + + enumeration for encoding modes + + + + + + + + + + numeric encoding + + + + + alpha-numeric encoding + + + + + structured append + + + + + byte mode encoding + + + + + ECI segment + + + + + Kanji mode + + + + + FNC1 char, first position + + + + + FNC1 char, second position + + + + + Hanzi mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See GBT 18284-2000; "Hanzi" is a transliteration of this mode name. + + + + Fors the bits. + + four bits encoding a QR Code data mode + + encoded by these bits + + if bits do not correspond to a known mode + + + version in question + + number of bits used, in this QR Code symbol {@link Version}, to encode the + count of characters that will follow encoded in this {@link Mode} + + + + + Gets the bits. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Meta-data container for QR Code decoding. Instances of this class may be used to convey information back to the + decoding caller. Callers are expected to process this. + + + + + Initializes a new instance of the class. + + if set to true [mirrored]. + + + + true if the QR Code was mirrored. + + + + + Apply the result points' order correction due to mirroring. + + Array of points to apply mirror correction to. + + + + See ISO 18004:2006 Annex D + + Sean Owen + + + See ISO 18004:2006 Annex D. + Element i represents the raw version bits that specify version i + 7 + + + + + Gets the version number. + + + + + Gets the alignment pattern centers. + + + + + Gets the total codewords. + + + + + Gets the dimension for version. + + + + + Gets the EC blocks for level. + + The ec level. + + + +

Deduces version information purely from QR Code dimensions.

+ +
+ dimension in modules + + for a QR Code of that dimension or null +
+ + + Gets the version for number. + + The version number. + + + + See ISO 18004:2006 Annex E + + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + + Gets the EC codewords per block. + + + + + Gets the num blocks. + + + + + Gets the total EC codewords. + + + + + Gets the EC blocks. + + + + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the QR code version's format.

+
+
+ + + Gets the count. + + + + + Gets the data codewords. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + See ISO 18004:2006 6.5.1 Table 9 + + +

Encapsulates an alignment pattern, which are the smaller square patterns found in + all but the simplest QR Codes.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Determines if this alignment pattern "about equals" an alignment pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing an average of the two. + + The i. + The j. + New size of the module. + + + +

This class attempts to find alignment patterns in a QR Code. Alignment patterns look like finder + patterns but are smaller and appear at regular intervals throughout the image.

+ +

At the moment this only looks for the bottom-right alignment pattern.

+ +

This is mostly a simplified copy of {@link FinderPatternFinder}. It is copied, + pasted and stripped down here for maximum performance but does unfortunately duplicate + some code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Creates a finder that will look in a portion of the whole image.

+ +
+ image to search + + left column from which to start searching + + top row from which to start searching + + width of region to search + + height of region to search + + estimated module size so far + + callback function which is called, when a result point is found +
+ +

This method attempts to find the bottom-right alignment pattern in the image. It is a bit messy since + it's pretty performance-critical and so is written to be fast foremost.

+ +
+ if found +
+ + Given a count of black/white/black pixels just seen and an end position, + figures the location of the center of this black/white/black run. + + + + count of black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/1 ratios + used by alignment patterns to be considered a match + + + + +

After a horizontal scan finds a potential alignment pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + alignment pattern to see if the same proportion is detected.

+
+ row where an alignment pattern was detected + center of the section that appears to cross an alignment pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of alignment pattern, or null if not found + +
+ +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will see if this pattern had been + found on a previous horizontal scan. If so, we consider it confirmed and conclude we have + found the alignment pattern.

+ +
+ reading state module counts from horizontal scan + + row where alignment pattern may be found + + end of possible alignment pattern in row + + {@link AlignmentPattern} if we have found the same pattern twice, or null if not + +
+ + +

Encapsulates logic that can detect a QR Code in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + + Gets the image. + + + + + Gets the result point callback. + + + + +

Detects a QR Code in an image.

+
+ + encapsulating results of detecting a QR Code + +
+ + +

Detects a QR Code in an image.

+
+ optional hints to detector + + encapsulating results of detecting a QR Code + +
+ + + Processes the finder pattern info. + + The info. + + + +

Computes the dimension (number of modules on a size) of the QR Code based on the position + of the finder patterns and estimated module size.

+
+
+ + +

Computes an average estimated module size based on estimated derived from the positions + of the three finder patterns.

+
+ detected top-left finder pattern center + detected top-right finder pattern center + detected bottom-left finder pattern center + estimated module size +
+ +

Estimates module size based on two finder patterns -- it uses + {@link #sizeOfBlackWhiteBlackRunBothWays(int, int, int, int)} to figure the + width of each, measuring along the axis between their centers.

+
+
+ + See {@link #sizeOfBlackWhiteBlackRun(int, int, int, int)}; computes the total width of + a finder pattern by looking for a black-white-black run from the center in the direction + of another point (another finder pattern center), and in the opposite direction too. + + + +

This method traces a line from a point in the image, in the direction towards another point. + It begins in a black region, and keeps going until it finds white, then black, then white again. + It reports the distance from the start to this point.

+ +

This is used when figuring out how wide a finder pattern is, when the finder pattern + may be skewed or rotated.

+
+
+ + +

Attempts to locate an alignment pattern in a limited region of the image, which is + guessed to contain it. This method uses {@link AlignmentPattern}.

+
+ estimated module size so far + x coordinate of center of area probably containing alignment pattern + y coordinate of above + number of pixels in all directions to search from the center + + if found, or null otherwise + +
+ + +

Encapsulates a finder pattern, which are the three square patterns found in + the corners of QR Codes. It also encapsulates a count of similar finder patterns, + as a convenience to the finder's bookkeeping.

+
+ Sean Owen +
+ + + Gets the size of the estimated module. + + + The size of the estimated module. + + + +

Determines if this finder pattern "about equals" a finder pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing a weighted average + based on count. + + The i. + The j. + New size of the module. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+
+ Sean Owen +
+ + + 1 pixel/module times 3 modules/center + + + + + support up to version 20 for mobile clients + + + + +

Creates a finder that will search the image for three finder patterns.

+
+ image to search +
+ + + Initializes a new instance of the class. + + The image. + The result point callback. + + + + Gets the image. + + + + + Gets the possible centers. + + + + Given a count of black/white/black/white/black pixels just seen and an end position, + figures the location of the center of this run. + + + + count of black/white/black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/3/1/1 ratios + used by finder patterns to be considered a match + + + + + + count of black/white/black/white/black pixels just read + true if the proportions of the counts is close enough to the 1/1/3/1/1 ratios + by finder patterns to be considered a match + + + + After a vertical and horizontal scan finds a potential finder pattern, this method + "cross-cross-cross-checks" by scanning down diagonally through the center of the possible + finder pattern to see if the same proportion is detected. + @param maxCount maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + @param originalStateCountTotal The original state count total. + + row where a finder pattern was detected + center of the section that appears to cross a finder pattern + true if proportions are withing expected limits + + + +

After a horizontal scan finds a potential finder pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + finder pattern to see if the same proportion is detected.

+
+ row where a finder pattern was detected + center of the section that appears to cross a finder pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of finder pattern, or null if not found + +
+ +

Like {@link #crossCheckVertical(int, int, int, int)}, and in fact is basically identical, + except it reads horizontally instead of vertically. This is used to cross-cross + check a vertical cross check and locate the real center of the alignment pattern.

+
+
+ + + @see #handlePossibleCenter(int[], int, int) + + reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + ignored + true if a finder pattern candidate was found this time + + + +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will, ah, cross-cross-check + with another horizontal scan. This is needed primarily to locate the real horizontal + center of the pattern in cases of extreme skew. + And then we cross-cross-cross check with another diagonal scan.

+ If that succeeds the finder pattern location is added to a list that tracks + the number of times each location has been nearly-matched as a finder pattern. + Each additional find is more evidence that the location is in fact a finder + pattern center +
+ reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + + true if a finder pattern candidate was found this time + +
+ + number of rows we could safely skip during scanning, based on the first + two finder patterns that have been located. In some cases their position will + allow us to infer that the third pattern must lie below a certain point farther + down in the image. + + + + true iff we have found at least 3 finder patterns that have been detected + at least {@link #CENTER_QUORUM} times each, and, the estimated module size of the + candidates is "pretty similar" + + + + the 3 best {@link FinderPattern}s from our list of candidates. The "best" are + those that have been detected at least {@link #CENTER_QUORUM} times, and whose module + size differs from the average among those patterns the least + + + + + Orders by furthest from average + + + +

Orders by {@link FinderPattern#getCount()}, descending.

+
+ + +

Encapsulates information about finder patterns in an image, including the location of + the three finder patterns, and their estimated module size.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The pattern centers. + + + + Gets the bottom left. + + + + + Gets the top left. + + + + + Gets the top right. + + + + + JAVAPORT: The original code was a 2D array of ints, but since it only ever gets assigned + 0, 1 and 2 I'm going to use less memory and go with bytes. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Gets the height. + + + + + Gets the width. + + + + + Gets or sets the with the specified x. + + + + + an internal representation as bytes, in row-major order. array[y][x] represents point (x,y) + + + + + Sets the specified x. + + The x. + The y. + The value. + + + + Sets the specified x. + + The x. + The y. + if set to true [value]. + + + + Clears the specified value. + + The value. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + Encode "bytes" with the error correction level "ecLevel". The encoding mode will be chosen + internally by chooseMode(). On success, store the result in "qrCode". + We recommend you to use QRCode.EC_LEVEL_L (the lowest level) for + "getECLevel" since our primary use is to show QR code on desktop screens. We don't need very + strong error correction for this purpose. + Note that there is no way to encode bytes in MODE_KANJI. We might want to add EncodeWithMode() + with which clients can specify the encoding mode. For now, we don't need the functionality. + + text to encode + error correction level to use + representing the encoded QR code + + + + Encodes the specified content. + + The content. + The ec level. + The hints. + + + + + Decides the smallest version of QR code that will contain all of the provided data. + + if the data cannot fit in any version + + + + Gets the alphanumeric code. + + The code. + the code point of the table used in alphanumeric mode or + -1 if there is no corresponding code in the table. + + + + Chooses the mode. + + The content. + + + + + Choose the best mode by examining the content. Note that 'encoding' is used as a hint; + if it is Shift_JIS, and the input is only double-byte Kanji, then we return {@link Mode#KANJI}. + + The content. + The encoding. + + + + + true if the number of input bits will fit in a code with the specified version and error correction level. + + + + Terminate bits as described in 8.4.8 and 8.4.9 of JISX0510:2004 (p.24). + + The num data bytes. + The bits. + + + + Get number of data bytes and number of error correction bytes for block id "blockID". Store + the result in "numDataBytesInBlock", and "numECBytesInBlock". See table 12 in 8.5.1 of + JISX0510:2004 (p.30) + + The num total bytes. + The num data bytes. + The num RS blocks. + The block ID. + The num data bytes in block. + The num EC bytes in block. + + + + Interleave "bits" with corresponding error correction bytes. On success, store the result in + "result". The interleave rule is complicated. See 8.6 of JISX0510:2004 (p.37) for details. + + The bits. + The num total bytes. + The num data bytes. + The num RS blocks. + + + + + Append mode info. On success, store the result in "bits". + + The mode. + The bits. + + + + Append length info. On success, store the result in "bits". + + The num letters. + The version. + The mode. + The bits. + + + + Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits". + + The content. + The mode. + The bits. + The encoding. + + + + + + Satoru Takabayashi + Daniel Switkin + Sean Owen + + + + Apply mask penalty rule 1 and return the penalty. Find repetitive cells with the same color and + give penalty to them. Example: 00000 or 11111. + + The matrix. + + + + + Apply mask penalty rule 2 and return the penalty. Find 2x2 blocks with the same color and give + penalty to them. This is actually equivalent to the spec's rule, which is to find MxN blocks and give a + penalty proportional to (M-1)x(N-1), because this is the number of 2x2 blocks inside such a block. + + The matrix. + + + + + Apply mask penalty rule 3 and return the penalty. Find consecutive cells of 00001011101 or + 10111010000, and give penalty to them. If we find patterns like 000010111010000, we give + penalties twice (i.e. 40 * 2). + + The matrix. + + + + + Apply mask penalty rule 4 and return the penalty. Calculate the ratio of dark cells and give + penalty if the ratio is far from 50%. It gives 10 penalty for 5% distance. + + The matrix. + + + + + Return the mask bit for "getMaskPattern" at "x" and "y". See 8.8 of JISX0510:2004 for mask + pattern conditions. + + The mask pattern. + The x. + The y. + + + + + Helper function for applyMaskPenaltyRule1. We need this for doing this calculation in both + vertical and horizontal orders respectively. + + The matrix. + if set to true [is horizontal]. + + + + + + + + satorux@google.com (Satoru Takabayashi) - creator + + + + + Set all cells to 2. 2 means that the cell is empty (not set yet). + + JAVAPORT: We shouldn't need to do this at all. The code should be rewritten to begin encoding + with the ByteMatrix initialized all to zero. + + The matrix. + + + + Build 2D matrix of QR Code from "dataBits" with "ecLevel", "version" and "getMaskPattern". On + success, store the result in "matrix" and return true. + + The data bits. + The ec level. + The version. + The mask pattern. + The matrix. + + + + Embed basic patterns. On success, modify the matrix and return true. + The basic patterns are: + - Position detection patterns + - Timing patterns + - Dark dot at the left bottom corner + - Position adjustment patterns, if need be + + The version. + The matrix. + + + + Embed type information. On success, modify the matrix. + + The ec level. + The mask pattern. + The matrix. + + + + Embed version information if need be. On success, modify the matrix and return true. + See 8.10 of JISX0510:2004 (p.47) for how to embed version information. + + The version. + The matrix. + + + + Embed "dataBits" using "getMaskPattern". On success, modify the matrix and return true. + For debugging purposes, it skips masking process if "getMaskPattern" is -1. + See 8.7 of JISX0510:2004 (p.38) for how to embed data bits. + + The data bits. + The mask pattern. + The matrix. + + + + Return the position of the most significant bit set (to one) in the "value". The most + significant bit is position 32. If there is no bit set, return 0. Examples: + - findMSBSet(0) => 0 + - findMSBSet(1) => 1 + - findMSBSet(255) => 8 + + The value_ renamed. + + + + + Calculate BCH (Bose-Chaudhuri-Hocquenghem) code for "value" using polynomial "poly". The BCH + code is used for encoding type information and version information. + Example: Calculation of version information of 7. + f(x) is created from 7. + - 7 = 000111 in 6 bits + - f(x) = x^2 + x^2 + x^1 + g(x) is given by the standard (p. 67) + - g(x) = x^12 + x^11 + x^10 + x^9 + x^8 + x^5 + x^2 + 1 + Multiply f(x) by x^(18 - 6) + - f'(x) = f(x) * x^(18 - 6) + - f'(x) = x^14 + x^13 + x^12 + Calculate the remainder of f'(x) / g(x) + x^2 + __________________________________________________ + g(x) )x^14 + x^13 + x^12 + x^14 + x^13 + x^12 + x^11 + x^10 + x^7 + x^4 + x^2 + -------------------------------------------------- + x^11 + x^10 + x^7 + x^4 + x^2 + + The remainder is x^11 + x^10 + x^7 + x^4 + x^2 + Encode it in binary: 110010010100 + The return value is 0xc94 (1100 1001 0100) + + Since all coefficients in the polynomials are 1 or 0, we can do the calculation by bit + operations. We don't care if coefficients are positive or negative. + + The value. + The poly. + + + + + Make bit vector of type information. On success, store the result in "bits" and return true. + Encode error correction level and mask pattern. See 8.9 of + JISX0510:2004 (p.45) for details. + + The ec level. + The mask pattern. + The bits. + + + + Make bit vector of version information. On success, store the result in "bits" and return true. + See 8.10 of JISX0510:2004 (p.45) for details. + + The version. + The bits. + + + + Check if "value" is empty. + + The value. + + true if the specified value is empty; otherwise, false. + + + + + Embed the lonely dark dot at left bottom corner. JISX0510:2004 (p.46) + + The matrix. + + + + + + The x start. + The y start. + The matrix. + + + + Embed position detection patterns and surrounding vertical/horizontal separators. + + The matrix. + + + + Embed position adjustment patterns if need be. + + The version. + The matrix. + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + + + + + + Initializes a new instance of the class. + + + + + Gets or sets the mode. + + + The mode. + + + + + Gets or sets the EC level. + + + The EC level. + + + + + Gets or sets the version. + + + The version. + + + + + Gets or sets the mask pattern. + + + The mask pattern. + + + + + Gets or sets the matrix. + + + The matrix. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Check if "mask_pattern" is valid. + + The mask pattern. + + true if [is valid mask pattern] [the specified mask pattern]; otherwise, false. + + + + + The class holds the available options for the QrCodeWriter + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + . + + + + + Specifies what character encoding to use where applicable (type ) + + + + + Explicitly disables ECI segment when generating QR Code + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + + + + + Specifies the exact version of QR code to be encoded. An integer, range 1 to 40. If the data specified + cannot fit within the required version, a WriterException will be thrown. + + + + + This implementation can detect and decode QR Codes in an image. + Sean Owen + + + + + Gets the decoder. + + + + + + Locates and decodes a QR code in an image. + + a String representing the content encoded by the QR code + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a QR Code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + +
+
diff --git a/packages/ZXing.Net.0.16.4/lib/portable-win+net40+sl4+sl5+wp7+wp71+wp8/zxing.portable.XML b/packages/ZXing.Net.0.16.4/lib/portable-win+net40+sl4+sl5+wp7+wp71+wp8/zxing.portable.XML new file mode 100644 index 0000000..a6b8d45 --- /dev/null +++ b/packages/ZXing.Net.0.16.4/lib/portable-win+net40+sl4+sl5+wp7+wp71+wp8/zxing.portable.XML @@ -0,0 +1,11720 @@ + + + + zxing.portable + + + + + Extends with more information specific to the Aztec format, + like the number of layers and whether it's compact. + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + Initializes a new instance of the class. + + The bits. + The points. + if set to true [compact]. + The nb datablocks. + The nb layers. + + + + The main class which implements Aztec Code decoding -- as opposed to locating and extracting + the Aztec Code from an image. + + David Olivier + + + + Decodes the specified detector result. + + The detector result. + + + + + This method is used for testing the high-level encoder + + + + + + + Gets the string encoded in the aztec code bits + + The corrected bits. + the decoded string + + + + gets the table corresponding to the char passed + + The t. + + + + + Gets the character (or string) corresponding to the passed code in the given table + + the table used + the code of the character + + + + + Performs RS error correction on an array of bits. + + The rawbits. + the corrected array + + + + Gets the array of bits from an Aztec Code matrix + + The matrix. + the array of bits + + + + Reads a code of given length and at given index in an array of bits + + The rawbits. + The start index. + The length. + + + + + Reads a code of length 8 in an array of bits, padding with zeros + + + + + + + + Packs a bit array into bytes, most significant bit first + + + + + + + Encapsulates logic that can detect an Aztec Code in an image, even if the Aztec Code + is rotated or skewed, or partially obscured. + + David Olivier + + + + Initializes a new instance of the class. + + The image. + + + + Detects an Aztec Code in an image. + + + + + Detects an Aztec Code in an image. + + if true, image is a mirror-image of original. + + encapsulating results of detecting an Aztec Code + + + + + Extracts the number of data layers and data blocks from the layer around the bull's eye + + bullEyeCornerPoints the array of bull's eye corners + + + + + Corrects the parameter bits using Reed-Solomon algorithm + + paremeter bits + compact true if this is a compact Aztec code + + + + + Finds the corners of a bull-eye centered on the passed point + This returns the centers of the diagonal points just outside the bull's eye + Returns [topRight, bottomRight, bottomLeft, topLeft] + + Center point + The corners of the bull-eye + + + + Finds a candidate center point of an Aztec code from an image + + the center point + + + + Gets the Aztec code corners from the bull's eye corners and the parameters. + + the array of bull's eye corners + the array of aztec code corners + + + + Creates a BitMatrix by sampling the provided image. + topLeft, topRight, bottomRight, and bottomLeft are the centers of the squares on the + diagonal just outside the bull's eye. + + The image. + The top left. + The bottom left. + The bottom right. + The top right. + + + + + Samples a line + + start point (inclusive) + end point (exclusive) + number of bits + the array of bits as an int (first bit is high-order bit of result) + + + + Determines whether [is white or black rectangle] [the specified p1]. + + The p1. + The p2. + The p3. + The p4. + true if the border of the rectangle passed in parameter is compound of white points only + or black points only + + + + Gets the color of a segment + + The p1. + The p2. + 1 if segment more than 90% black, -1 if segment is more than 90% white, 0 else + + + + Gets the coordinate of the first point with a different color in the given direction + + The init. + if set to true [color]. + The dx. + The dy. + + + + + Expand the square represented by the corner points by pushing out equally in all directions + + the corners of the square, which has the bull's eye at its center + the original length of the side of the square in the target bit matrix + the new length of the size of the square in the target bit matrix + the corners of the expanded square + + + + Aztec 2D code representation + + Rustam Abdullaev + + + + Compact or full symbol indicator + + + + + Size in pixels (width and height) + + + + + Number of levels + + + + + Number of data codewords + + + + + The symbol image + + + + + represents a token for a binary shift + + + + + initializing constructor + + + + + + + + appends the byte array to the BitArray + + + + + + + string representation + + + + + + Generates Aztec 2D barcodes. + + Rustam Abdullaev + + + + Encodes the given binary content as an Aztec symbol + + input data string + Aztec symbol matrix with metadata + + + + Encodes the given binary content as an Aztec symbol + + input data string + minimal percentage of error check words (According to ISO/IEC 24778:2008, + a minimum of 23% + 3 words is recommended) + if non-zero, a user-specified value for the number of layers + + Aztec symbol matrix with metadata + + + + + This produces nearly optimal encodings of text into the first-level of + encoding used by Aztec code. + It uses a dynamic algorithm. For each prefix of the string, it determines + a set of encodings that could lead to this prefix. We repeatedly add a + character and generate a new set of optimal encodings until we have read + through the entire input. + @author Frank Yellin + @author Rustam Abdullaev + + + + + + + + + + + Convert the text represented by this High Level Encoder into a BitArray. + + text represented by this encoder encoded as a + + + + State represents all information about a sequence necessary to generate the current output. + Note that a state is immutable. + + + + + Create a new state representing this state with a latch to a (not + necessary different) mode, and then a code. + + + + + Create a new state representing this state, with a temporary shift + to a different mode to output a single value. + + + + + Create a new state representing this state, but an additional character + output in Binary Shift mode. + + + + + Create the state identical to this one, but we are no longer in + Binary Shift mode. + + + + + Returns true if "this" state is better (or equal) to be in than "that" + state under all possible circumstances. + + + + + This implementation can detect and decode Aztec codes in an image. + + David Olivier + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + a String representing the content encoded by the Data Matrix code + + + + + Locates and decodes a Data Matrix code in an image. + + image of barcode to decode + passed as a {@link java.util.Hashtable} from {@link com.google.zxing.DecodeHintType} + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Aztec result meta data. + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + + + + + + + + + Renders an Aztec code as a + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + The class holds the available options for the + + + + + Representing the minimal percentage of error correction words. + Note: an Aztec symbol should have a minimum of 25% EC words. + + + + + Specifies the required number of layers for an Aztec code: + a negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + a positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + + + + + Enumerates barcode formats known to this package. + + Sean Owen + + + Aztec 2D barcode format. + + + CODABAR 1D format. + + + Code 39 1D format. + + + Code 93 1D format. + + + Code 128 1D format. + + + Data Matrix 2D barcode format. + + + EAN-8 1D format. + + + EAN-13 1D format. + + + ITF (Interleaved Two of Five) 1D format. + + + MaxiCode 2D barcode format. + + + PDF417 format. + + + QR Code 2D barcode format. + + + RSS 14 + + + RSS EXPANDED + + + UPC-A 1D format. + + + UPC-E 1D format. + + + UPC/EAN extension format. Not a stand-alone format. + + + MSI + + + Plessey + + + Intelligent Mail barcode + + + + UPC_A | UPC_E | EAN_13 | EAN_8 | CODABAR | CODE_39 | CODE_93 | CODE_128 | ITF | RSS_14 | RSS_EXPANDED + without MSI (to many false-positives) and IMB (not enough tested, and it looks more like a 2D) + + + + + A smart class to decode the barcode inside a bitmap object or byte array with raw pixel color values + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Optional: Gets or sets the function to create a luminance source object for a bitmap. + If null a platform specific default LuminanceSource is used + + + The function to create a luminance source object. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + A smart class to decode the barcode inside a bitmap object + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Constructor for additional image formats for one BarcodeReader class + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Optional: Gets or sets the function to create a luminance source object for a bitmap. + If null a platform specific default LuminanceSource is used + + + The function to create a luminance source object. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + A smart class to decode the barcode inside a bitmap object + + + + + represents the default function which is called to get a instance from a raw byte array + + + + + Gets or sets the options. + + + The options. + + + + + Gets the reader which should be used to find and decode the barcode. + + + The reader. + + + + + Gets or sets a method which is called if an important point is found + + + The result point callback. + + + + + event is executed if a result was found via decode + + + + + Gets or sets a value indicating whether the image should be automatically rotated. + Rotation is supported for 90, 180 and 270 degrees + + + true if image should be rotated; otherwise, false. + + + + + Gets or sets a value indicating whether the image should be automatically inverted + if no result is found in the original image. + ATTENTION: Please be carefully because it slows down the decoding process if it is used + + + true if image should be inverted; otherwise, false. + + + + + Optional: Gets or sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + The function to create a binarizer object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb array. + If null the RGBLuminanceSource is used. The handler is only called when Decode with a byte[] array is called. + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + raises the ResultFound event + + + + + + raises the ResultFound event + + + + + + calls the explicitResultPointFound action + + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + A smart class to encode some content to raw pixel data + + + + + Initializes a new instance of the class. + + + + + A smart class to encode some content to a svg barcode image + + + + + Initializes a new instance of the class. + + + + + A base class for specific barcode writers with specific formats of barcode images. + + The type of the output. + + + + Gets or sets the renderer which should be used to render the encoded BitMatrix. + + + + + Encodes the specified contents and returns a rendered instance of the barcode. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The matrix. + + + + + A base class for specific barcode writers with specific formats of barcode images. + + + + + Gets or sets the barcode format. + The value is only suitable if the MultiFormatWriter is used. + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + + + + + + + + + + + + Encodes the specified contents and returns a BitMatrix array. + That array has to be rendered manually or with a IBarcodeRenderer. + + The contents. + + + + + The base class for luminance sources which supports + cropping and rotating based upon the luminance values. + + + + + weight of the red channel for calculating a gray scale image + + + + + weight of the green channel for calculating a gray scale image + + + + + weight of the blue channel for calculating a gray scale image + + + + + numbers of bits which for right shifting + + + + + + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + + The luminance array. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + gets the luminance matrix + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + TODO: not implemented yet + + + A rotated version of this object. + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + + Whether this subclass supports cropping. + + + + + Whether this subclass supports invertion. + + + + Inverts the luminance values (newValue = 255 - oldValue) + + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + This class hierarchy provides a set of methods to convert luminance data to 1 bit data. + It allows the algorithm to vary polymorphically, for example allowing a very expensive + thresholding technique for servers and a fast one for mobile. It also permits the implementation + to vary, e.g. a JNI version for Android and a Java fallback version for other platforms. + + dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The source. + + + + Gets the luminance source object. + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + For callers which only examine one row of pixels at a time, the same BitArray should be reused + and passed in with each call for performance. However it is legal to keep more than one row + at a time if needed. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + Converts a 2D array of luminance data to 1 bit data. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + A new concrete Binarizer implementation object. + + + + Gets the width of the luminance source object. + + + + + Gets the height of the luminance source object. + + + + + This class is the core bitmap class used by ZXing to represent 1 bit data. Reader objects + accept a BinaryBitmap and attempt to decode it. + + dswitkin@google.com (Daniel Switkin) + + + + + + + + + + The width of the bitmap. + + + + + The height of the bitmap. + + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + + The row to fetch, which must be in [0, bitmap height). + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + + Converts a 2D array of luminance data to 1 bit. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + + Whether this bitmap can be cropped. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if isCropSupported() is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + + Whether this bitmap supports counter-clockwise rotation. + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + +

See + + DoCoMo's documentation about the result types represented by subclasses of this class.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + Implements KDDI AU's address book format. See + + http://www.au.kddi.com/ezfactory/tec/two_dimensions/index.html. + (Thanks to Yuzo for translating!) + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Implements the "MECARD" address book entry format. + + Supported keys: N, SOUND, TEL, EMAIL, NOTE, ADR, BDAY, URL, plus ORG + Unsupported keys: TEL-AV, NICKNAME + + Except for TEL, multiple values for keys are also not supported; + the first one found takes precedence. + + Our understanding of the MECARD format is based on this document: + + http://www.mobicode.org.tw/files/OMIA%20Mobile%20Bar%20Code%20Standard%20v3.2.1.doc + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes contact information, like that in an address book entry. + + Sean Owen + + + + initializing constructor + + + + + + + + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + the names + + + + + the nicknames + + + + + In Japanese, the name is written in kanji, which can have multiple readings. Therefore a hint + is often provided, called furigana, which spells the name phonetically. + + The pronunciation of the getNames() field, often in hiragana or katakana. + + + + the phone numbers + + + + optional descriptions of the type of each phone number. It could be like "HOME", but, + there is no guaranteed or standard format. + + + + the e-mail addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the instant messenger addresses + + + + + the note field + + + + + the addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the title + + + + + the urls + + + + birthday formatted as yyyyMMdd (e.g. 19780917) + + + a location as a latitude/longitude pair + + + Implements the "BIZCARD" address book entry format, though this has been + largely reverse-engineered from examples observed in the wild -- still + looking for a definitive reference. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a calendar event at a certain time, optionally with attendees and a location. + + Sean Owen + + + + Gets the start. + + + + + Determines whether [is start all day]. + + if start time was specified as a whole day + + + + event end , or null if event has no duration + + + + + Gets a value indicating whether this instance is end all day. + + true if end time was specified as a whole day + + + + Parses a string as a date. RFC 2445 allows the start and end fields to be of type DATE (e.g. 20081021) + or DATE-TIME (e.g. 20081021T123000 for local time, or 20081021T123000Z for UTC). + + The string to parse + + if not a date formatted string + + + + Represents a parsed result that encodes an email message including recipients, subject and body text. + + Sean Owen + + + + the email address + + + + + the TOs + + + + + the CCs + + + + + the BCCs + + + + + the subject + + + + + the body + + + + + the mailto: uri + + + + + Represents a result that encodes an e-mail address, either as a plain address + like "joe@example.org" or a mailto: URL like "mailto:joe@example.org". + + Sean Owen + + + + Implements the "MATMSG" email message entry format. + + Supported keys: TO, SUB, BODY + + Sean Owen + + + + This implements only the most basic checking for an email address's validity -- that it contains + an '@' and contains no characters disallowed by RFC 2822. This is an overly lenient definition of + validity. We want to generally be lenient here since this class is only intended to encapsulate what's + in a barcode, not "judge" it. + + The email. + + true if it is basically a valid email address; otherwise, false. + + + + + Represents a parsed result that encodes extended product information as encoded by the RSS format, like weight, price, dates, etc. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + extension for kilogram weight type + + + + + extension for pounds weight type + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the raw text + + + + + the product id + + + + + the sscc + + + + + the lot number + + + + + the production date + + + + + the packaging date + + + + + the best before date + + + + + the expiration date + + + + + the weight + + + + + the weight type + + + + + the weight increment + + + + + the price + + + + + the price increment + + + + + the price currency + + + + + the uncommon AIs + + + + + the display representation (raw text) + + + + + Parses strings of digits that represent a RSS Extended code. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + tries to parse a text representation to a specific result object + + + + + + + Represents a parsed result that encodes a geographic coordinate, with latitude, longitude and altitude. + + Sean Owen + + + latitude in degrees + + + + longitude in degrees + + + + altitude in meters. If not specified, in the geo URI, returns 0.0 + + + + query string associated with geo URI or null if none exists + + + + the geo URI + + + + a URI link to Google Maps which display the point on the Earth described + by this instance, and sets the zoom level in a way that roughly reflects the + altitude, if specified + + + + Parses a "geo:" URI result, which specifies a location on the surface of + the Earth as well as an optional altitude above the surface. See + + http://tools.ietf.org/html/draft-mayrhofer-geo-uri-00. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a product ISBN number. + + jbreiden@google.com (Jeff Breidenbach) + + + + the ISBN number + + + + Parses strings of digits that represent a ISBN. + + + jbreiden@google.com (Jeff Breidenbach) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + See ISBN-13 For Dummies + + The result. + + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link ResultParser#parseResult(Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Represents the type of data encoded by a barcode -- from plain text, to a + URI, to an e-mail address, etc. + + Sean Owen + + + + Represents a parsed result that encodes a product by an identifier of some kind. + + dswitkin@google.com (Daniel Switkin) + + + + Parses strings of digits that represent a UPC code. + + dswitkin@google.com (Daniel Switkin) + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link #parseResult(com.google.zxing.Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Attempts to parse the raw {@link Result}'s contents as a particular type + of information (email, URL, etc.) and return a {@link ParsedResult} encapsulating + the result of parsing. + + the raw to parse + encapsulating the parsing result + + + + Parses the result. + + The result. + + + +

Parses an "sms:" URI result, which specifies a number to SMS and optional + "via" number. See + the IETF draft on this.

+ +

This actually also parses URIs starting with "mms:", "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + + Represents a parsed result that encodes an SMS message, including recipients, subject and body text. + + Sean Owen + + + +

Parses an "smsto:" URI result, whose format is not standardized but appears to be like: + {@code smsto:number(:body)}.

+

This actually also parses URIs starting with "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+
+ Sean Owen +
+ + +

Parses an "smtp:" URI result, whose format is not standardized but appears to be like: + smtp[:subject[:body]]}.

+

See http://code.google.com/p/zxing/issues/detail?id=536

+
+ Sean Owen +
+ + + Represents a parsed result that encodes a telephone number. + + Sean Owen + + + + Parses a "tel:" URI result, which specifies a phone number. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + A simple result type encapsulating a string that has no further interpretation. + + Sean Owen + + + + A simple result type encapsulating a URI that has no further interpretation. + + Sean Owen + + + true if the URI contains suspicious patterns that may suggest it intends to + mislead the user about its true nature. At the moment this looks for the presence + of user/password syntax in the host/authority portion of a URI which may be used + in attempts to make the URI's host appear to be other than it is. Example: + http://yourbank.com@phisher.com This URI connects to phisher.com but may appear + to connect to yourbank.com at first glance. + + + + Transforms a string that represents a URI into something more proper, by adding or canonicalizing + the protocol. + + + + + Tries to parse results that are a URI of some kind. + + Sean Owen + + + Parses the "URLTO" result format, which is of the form "URLTO:[title]:[url]". + This seems to be used sometimes, but I am not able to find documentation + on its origin or official format? + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Parses contact information formatted according to the VCard (2.1) format. This is not a complete + implementation but should parse information as commonly encoded in 2D barcodes. + + Sean Owen + + + Formats name fields of the form "Public;John;Q.;Reverend;III" into a form like + "Reverend John Q. Public III". + + @param names name values to format, in place + + + + Partially implements the iCalendar format's "VEVENT" format for specifying a + calendar event. See RFC 2445. This supports SUMMARY, DTSTART and DTEND fields. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a Vehicle Identification Number (VIN). + + + + + Detects a result that is likely a vehicle identification number. + @author Sean Owen + + + + + Represents a parsed result that encodes wifi network information, like SSID and password. + + Vikram Aggarwal + + + + + A simple, fast array of bits, represented compactly by an array of ints internally. + + Sean Owen + + + + size of the array, number of elements + + + + + size of the array in bytes + + + + + index accessor + + + + + + + default constructor + + + + + initializing constructor + + desired size of the array + + + + Flips bit i. + + bit to set + + + + + Gets the next set. + + first bit to check + index of first bit that is set, starting from the given index, or size if none are set + at or beyond this given index + + + + see getNextSet(int) + + index to start looking for unset bit + index of next unset bit, or if none are unset until the end + + + Sets a block of 32 bits, starting at bit i. + + + first bit to set + + the new value of the next 32 bits. Note again that the least-significant bit + corresponds to bit i, the next-least-significant to i+1, and so on. + + + + + Sets a range of bits. + + start of range, inclusive. + end of range, exclusive + + + Clears all bits (sets to false). + + + Efficient method to check if a range of bits is set, or not set. + + + start of range, inclusive. + + end of range, exclusive + + if true, checks that bits in range are set, otherwise checks that they are not set + + true iff all bits are set or not set in range, according to value argument + if end is less than start or the range is not contained in the array + + + + Appends the bit. + + The bit. + + + underlying array of ints. The first element holds the first 32 bits, and the least + significant bit is bit 0. + + + + + Appends the least-significant bits, from value, in order from most-significant to + least-significant. For example, appending 6 bits from 0x000001E will append the bits + 0, 1, 1, 1, 1, 0 in that order. + + containing bits to append + bits from value to append + + + + adds the array to the end + + + + + + XOR operation + + + + + + converts to bytes. + + first bit to start writing + array to write into. Bytes are written most-significant byte first. This is the opposite + of the internal representation, which is exposed by BitArray + position in array to start writing + how many bytes to write + + + Reverses all bits in the array. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Erstellt ein neues Objekt, das eine Kopie der aktuellen Instanz darstellt. + + + Ein neues Objekt, das eine Kopie dieser Instanz darstellt. + + + + +

Represents a 2D matrix of bits. In function arguments below, and throughout the common + module, x is the column position, and y is the row position. The ordering is always x, y. + The origin is at the top-left.

+

Internally the bits are represented in a 1-D array of 32-bit ints. However, each row begins + with a new int. This is done intentionally so that we can copy out a row into a BitArray very + efficiently.

+

The ordering of bits is row-major. Within each int, the least significant bits are used first, + meaning they represent lower x values. This is compatible with BitArray's implementation.

+
+ Sean Owen + dswitkin@google.com (Daniel Switkin) +
+ + The width of the matrix + + + + The height of the matrix + + + + This method is for compatibility with older code. It's only logical to call if the matrix + is square, so I'm throwing if that's not the case. + + + row/column dimension of this matrix + + + + + The rowsize of the matrix + + + + + Creates an empty square . + + height and width + + + + Creates an empty square . + + bit matrix width + bit matrix height + + + + Interprets a 2D array of booleans as a , where "true" means an "on" bit. + + bits of the image, as a row-major 2D array. Elements are arrays representing rows + representation of image + + +

Gets the requested bit, where true means black.

+ +
+ The horizontal component (i.e. which column) + + The vertical component (i.e. which row) + + value of given bit in matrix + +
+ + +

Flips the given bit.

+
+ The horizontal component (i.e. which column) + The vertical component (i.e. which row) +
+ + + flip all of the bits, if shouldBeFlipped is true for the coordinates + + should return true, if the bit at a given coordinate should be flipped + + + + Exclusive-or (XOR): Flip the bit in this {@code BitMatrix} if the corresponding + mask bit is set. + + The mask. + + + Clears all bits (sets to false). + + +

Sets a square region of the bit matrix to true.

+ +
+ The horizontal position to begin at (inclusive) + + The vertical position to begin at (inclusive) + + The width of the region + + The height of the region + +
+ + A fast method to retrieve one row of data from the matrix as a BitArray. + + + The row to retrieve + + An optional caller-allocated BitArray, will be allocated if null or too small + + The resulting BitArray - this reference should always be used even when passing + your own row + + + + + Sets the row. + + row to set + {@link BitArray} to copy from + + + + Modifies this {@code BitMatrix} to represent the same but rotated 180 degrees + + + + + This is useful in detecting the enclosing rectangle of a 'pure' barcode. + + {left,top,width,height} enclosing rectangle of all 1 bits, or null if it is all white + + + + This is useful in detecting a corner of a 'pure' barcode. + + {x,y} coordinate of top-left-most 1 bit, or null if it is all white + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + The line separator. + + A that represents this instance. + + + + + Clones this instance. + + + + +

This provides an easy abstraction to read bits at a time from a sequence of bytes, where the + number of bits read is not often a multiple of 8.

+ +

This class is thread-safe but not reentrant. Unless the caller modifies the bytes array + it passed in, in which case all bets are off.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + bytes from which this will read bits. Bits will be read from the first byte first. + Bits are read within a byte from most-significant to least-significant bit. + + + + + index of next bit in current byte which would be read by the next call to {@link #readBits(int)}. + + + + + index of next byte in input byte array which would be read by the next call to {@link #readBits(int)}. + + + + number of bits to read + + int representing the bits read. The bits will appear as the least-significant + bits of the int + + if numBits isn't in [1,32] or more than is available + + + number of bits that can be read successfully + + + + Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1 + of ISO 18004. + + + Sean Owen + + + character set ECI value + representing ECI of given value, or null if it is legal but unsupported + + + character set ECI encoding name + representing ECI for character encoding, or null if it is legalbut unsupported + + + + Encapsulates the result of decoding a matrix of bits. This typically + applies to 2D barcode formats. For now it contains the raw bytes obtained, + as well as a String interpretation of those bytes, if applicable. + Sean Owen + + + + + raw bytes representing the result, or null if not applicable + + + + + how many bits of are valid; typically 8 times its length + + + + + text representation of the result + + + + + list of byte segments in the result, or null if not applicable + + + + + name of error correction level used, or null if not applicable + + + + + gets a value which describe if structure append data was found + + + + + number of errors corrected, or null if not applicable + + + + + gives the sequence number of the result if structured append was found + + + + + number of erasures corrected, or null if not applicable + + + + + gives the parity information if structured append was found + + + + + Miscellanseous data value for the various decoders + + The other. + + + + initializing constructor + + + + + + + + + initializing constructor + + + + + + + + + + + initializing constructor + + + + + + + + + + initializing constructor + + + + + + + + + + + + Defines an container for encoder options + + + + + Gets the data container for all options + + + + + event is raised when a value is changed + + + + + Gets or sets a flag which cause a deeper look into the bitmap + + + true if [try harder]; otherwise, false. + + + + + Image is a pure monochrome image of a barcode. + + + true if monochrome image of a barcode; otherwise, false. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + The character set. + + + + + Image is known to be of one of a few possible formats. + Maps to a {@link java.util.List} of {@link BarcodeFormat}s. + + + The possible formats. + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + true if it should assume a Code 39 check digit; otherwise, false. + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). + + + true if it should assume GS1; otherwise, false. + + + + + Assume MSI codes employ a check digit. Maps to . + + + true if it should assume a MSI check digit; otherwise, false. + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Initializes a new instance of the class. + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Encapsulates the result of detecting a barcode in an image. This includes the raw + matrix of black/white pixels corresponding to the barcode, and possibly points of interest + in the image, like the location of finder patterns or corners of the barcode in the image.

+
+ Sean Owen +
+ + + the detected bits + + + + + the pixel points where the result is found + + + + + initializing constructor + + + + + + + General math-related and numeric utility functions. + + + + + Ends up being a bit faster than {@link Math#round(float)}. This merely rounds its + argument to the nearest int, where x.5 rounds up to x+1. Semantics of this shortcut + differ slightly from {@link Math#round(float)} in that half rounds down for negative + values. -2.5 rounds to -3, not -2. For purposes here it makes no difference. + + real value to round + nearest int + + + + + + + + + + Euclidean distance between points A and B + + + + + + + + + + Euclidean distance between points A and B + + + + + values to sum + sum of values in array + + +

A somewhat generic detector that looks for a barcode-like rectangular region within an image. + It looks within a mostly white region of an image for a region of black and white, but mostly + black. It returns the four corners of the region, as best it can determine.

+ +
+ Sean Owen +
+ + + initializing constructor + + + + + +

Detects a rectangular region of black and white -- mostly black -- with a region of mostly + white, in an image.

+
+ [] describing the corners of the rectangular region. The first and + last points are opposed on the diagonal, as are the second and third. The first point will be + the topmost point and the last, the bottommost. The second point will be leftmost and the + third, the rightmost + +
+ + Attempts to locate a corner of the barcode by scanning up, down, left or right from a center + point which should be within the barcode. + + + center's x component (horizontal) + + same as deltaY but change in x per step instead + + minimum value of x + + maximum value of x + + center's y component (vertical) + + change in y per step. If scanning up this is negative; down, positive; + left or right, 0 + + minimum value of y to search through (meaningless when di == 0) + + maximum value of y + + maximum run of white pixels that can still be considered to be within + the barcode + + a encapsulating the corner that was found + + + + Computes the start and end of a region of pixels, either horizontally or vertically, that could + be part of a Data Matrix barcode. + + + if scanning horizontally, this is the row (the fixed vertical location) + where we are scanning. If scanning vertically it's the column, the fixed horizontal location + + largest run of white pixels that can still be considered part of the + barcode region + + minimum pixel location, horizontally or vertically, to consider + + maximum pixel location, horizontally or vertically, to consider + + if true, we're scanning left-right, instead of up-down + + int[] with start and end of found range, or null if no such range is found + (e.g. only white was found) + + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. By keeping track of the + last black points it encountered, it determines the corners of the barcode. + + David Olivier + + + + Creates a WhiteRectangleDetector instance + + The image. + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + Creates a WhiteRectangleDetector instance + + barcode image to find a rectangle in + initial size of search area around center + x position of search center + y position of search center + + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + + Initializes a new instance of the class. + + The image. + if image is too small + + + + Initializes a new instance of the class. + + The image. + Size of the init. + The x. + The y. + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. + + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + recenters the points of a constant distance towards the center + + bottom most point + left most point + right most point + top most point + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + Determines whether a segment contains a black point + + min value of the scanned coordinate + max value of the scanned coordinate + value of fixed coordinate + set to true if scan must be horizontal, false if vertical + + true if a black point has been found, else false. + + + + + Superclass of classes encapsulating types ECIs, according to "Extended Channel Interpretations" + 5.3 of ISO 18004. + + Sean Owen + + + + the ECI value + + + + ECI value + representing ECI of given value, or null if it is legal but unsupported + ArgumentException if ECI value is invalid + + + + Defines an container for encoder options + + + + + Gets the data container for all options + + + + + Specifies the height of the barcode image + + + + + Specifies the width of the barcode image + + + + + Don't put the content string into the output image. + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + + + + + Specifies whether the data should be encoded to the GS1 standard; + FNC1 character is added in front of the data + + + + + Initializes a new instance of the class. + + + + This Binarizer implementation uses the old ZXing global histogram approach. It is suitable + for low-end mobile devices which don't have enough CPU or memory to use a local thresholding + algorithm. However, because it picks a global black point, it cannot handle difficult shadows + and gradients. + + Faster mobile devices and all desktop applications should probably use HybridBinarizer instead. + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The source. + + + + Applies simple sharpening to the row data to improve performance of the 1D Readers. + + + + + + + + Does not sharpen the data, as this call is intended to only be used by 2D Readers. + + + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + + A new concrete Binarizer implementation object. + + + + Implementations of this class can, given locations of finder patterns for a QR code in an + image, sample the right points in the image to reconstruct the QR code, accounting for + perspective distortion. It is abstracted since it is relatively expensive and should be allowed + to take advantage of platform-specific optimized implementations, like Sun's Java Advanced + Imaging library, but which may not be available in other environments such as J2ME, and vice + versa. + + The implementation used can be controlled by calling {@link #setGridSampler(GridSampler)} + with an instance of a class which implements this interface. + + Sean Owen + + + the current implementation of + + + + Sets the implementation of used by the library. One global + instance is stored, which may sound problematic. But, the implementation provided + ought to be appropriate for the entire platform, and all uses of this library + in the whole lifetime of the JVM. For instance, an Android activity can swap in + an implementation that takes advantage of native platform libraries. + + The platform-specific object to install. + + + +

Samples an image for a square matrix of bits of the given dimension. This is used to extract + the black/white modules of a 2D barcode like a QR Code found in an image. Because this barcode + may be rotated or perspective-distorted, the caller supplies four points in the source image + that define known points in the barcode, so that the image may be sampled appropriately.

+

The last eight "from" parameters are four X/Y coordinate pairs of locations of points in + the image that define some significant points in the image to be sample. For example, + these may be the location of finder pattern in a QR Code.

+

The first eight "to" parameters are four X/Y coordinate pairs measured in the destination + , from the top left, where the known points in the image given by the "from" + parameters map to.

+

These 16 parameters define the transformation needed to sample the image.

+
+ image to sample + The dimension X. + The dimension Y. + The p1 preimage X. + The p1 preimage Y. + The p2 preimage X. + The p2 preimage Y. + The p3 preimage X. + The p3 preimage Y. + The p4 preimage X. + The p4 preimage Y. + The p1 image X. + The p1 image Y. + The p2 image X. + The p2 image Y. + The p3 image X. + The p3 image Y. + The p4 image X. + The p4 image Y. + + representing a grid of points sampled from the image within a region + defined by the "from" parameters + + ReaderException if image can't be sampled, for example, if the transformation defined +
+ + + + + + + + + + + +

Checks a set of points that have been transformed to sample points on an image against + the image's dimensions to see if the point are even within the image.

+ +

This method will actually "nudge" the endpoints back onto the image if they are found to be + barely (less than 1 pixel) off the image. This accounts for imperfect detection of finder + patterns in an image where the QR Code runs all the way to the image border.

+ +

For efficiency, the method will check points from either end of the line until one is found + to be within the image. Because the set of points are assumed to be linear, this is valid.

+ +
+ image into which the points should map + + actual points in x1,y1,...,xn,yn form + +
+ + This class implements a local thresholding algorithm, which while slower than the + GlobalHistogramBinarizer, is fairly efficient for what it does. It is designed for + high frequency images of barcodes with black data on white backgrounds. For this application, + it does a much better job than a global blackpoint with severe shadows and gradients. + However it tends to produce artifacts on lower frequency images and is therefore not + a good general purpose binarizer for uses outside ZXing. + + This class extends GlobalHistogramBinarizer, using the older histogram approach for 1D readers, + and the newer local approach for 2D readers. 1D decoding using a per-row histogram is already + inherently local, and only fails for horizontal gradients. We can revisit that problem later, + but for now it was not a win to use local blocks for 1D. + + This Binarizer is the default for the unit tests and the recommended class for library users. + dswitkin@google.com (Daniel Switkin) + + + + + gives the black matrix + + + + + initializing constructor + + + + + + creates a new instance + + + + + + + Calculates the final BitMatrix once for all requests. This could be called once from the + constructor instead, but there are some advantages to doing it lazily, such as making + profiling easier, and not doing heavy lifting when callers don't expect it. + + + + + For each 8x8 block in the image, calculate the average black point using a 5x5 grid + of the blocks around it. Also handles the corner cases (fractional blocks are computed based + on the last 8 pixels in the row/column which are also used in the previous block). + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + The black points. + The matrix. + + + + Applies a single threshold to an 8x8 block of pixels. + + The luminances. + The xoffset. + The yoffset. + The threshold. + The stride. + The matrix. + + + + Calculates a single black point for each 8x8 block of pixels and saves it away. + See the following thread for a discussion of this algorithm: + http://groups.google.com/group/zxing/browse_thread/thread/d06efa2c35a7ddc0 + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + + + +

This class implements a perspective transform in two dimensions. Given four source and four + destination points, it will compute the transformation implied between them. The code is based + directly upon section 3.4.2 of George Wolberg's "Digital Image Warping"; see pages 54-56.

+
+ Sean Owen +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Convenience method, not optimized for performance. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

This class contains utility methods for performing mathematical operations over + the Galois Fields. Operations use a given primitive polynomial in calculations.

+

Throughout this package, elements of the GF are represented as an {@code int} + for convenience and speed (but at the cost of memory). +

+
+ Sean Owen +
+ + + Create a representation of GF(size) using the given primitive polynomial. + + irreducible polynomial whose coefficients are represented by + * the bits of an int, where the least-significant bit represents the constant + * coefficient + the size of the field + the factor b in the generator polynomial can be 0- or 1-based + * (g(x) = (x+a^b)(x+a^(b+1))...(x+a^(b+2t-1))). + * In most cases it should be 1, but for QR code it is 0. + + + + Builds the monomial. + + The degree. + The coefficient. + the monomial representing coefficient * x^degree + + + + Implements both addition and subtraction -- they are the same in GF(size). + + sum/difference of a and b + + + + Exps the specified a. + + 2 to the power of a in GF(size) + + + + Logs the specified a. + + A. + base 2 log of a in GF(size) + + + + Inverses the specified a. + + multiplicative inverse of a + + + + Multiplies the specified a with b. + + A. + The b. + product of a and b in GF(size) + + + + Gets the size. + + + + + Gets the generator base. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + +

Represents a polynomial whose coefficients are elements of a GF. + Instances of this class are immutable.

+

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + the {@link GenericGF} instance representing the field to use + to perform computations + coefficients as ints representing elements of GF(size), arranged + from most significant (highest-power term) coefficient to least significant + if argument is null or empty, + or if leading coefficient is 0 and this is not a + constant polynomial (that is, it is not the monomial "0") + + + + degree of this polynomial + + + + + Gets a value indicating whether this is zero. + + true iff this polynomial is the monomial "0" + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + +

Implements Reed-Solomon decoding, as the name implies.

+ +

The algorithm will not be explained here, but the following references were helpful + in creating this implementation:

+ + + +

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+ +
+ Sean Owen + William Rucklidge + sanfordsquires +
+ + +

Decodes given set of received codewords, which include both data and error-correction + codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place, + in the input.

+
+ data and error-correction codewords + number of error-correction codewords available + false: decoding fails +
+ + + Implements Reed-Solomon encoding, as the name implies. + + Sean Owen + William Rucklidge + + + + Common string-related functions. + + Sean Owen + Alex Dupre + + + + SJIS + + + + + GB2312 + + + + + Guesses the encoding. + + bytes encoding a string, whose encoding should be guessed + decode hints if applicable + name of guessed encoding; at the moment will only guess one of: + {@link #SHIFT_JIS}, {@link #UTF8}, {@link #ISO88591}, or the platform + default encoding if none of these can possibly be correct + + + + This implementation can detect and decode Data Matrix codes in an image. + + bbrown@google.com (Brian Brown) + + + + + Locates and decodes a Data Matrix code in an image. + + + a String representing the content encoded by the Data Matrix code + + + + Locates and decodes a Data Matrix code in an image. + + + + a String representing the content encoded by the Data Matrix code + + + + does nothing here + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a Data Matrix code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + Guillaume Le Biller Added to zxing lib. + + + + encodes the content to a BitMatrix + + + + + + + + + + encodes the content to a BitMatrix + + + + + + + + + + + Encode the given symbol info to a bit matrix. + + The DataMatrix placement. + The symbol info to encode. + + + The bit matrix generated. + + + + Convert the ByteMatrix to BitMatrix. + + The input matrix. + The requested width of the image (in pixels) with the Datamatrix code + The requested height of the image (in pixels) with the Datamatrix code + The output matrix. + + + + bbrown@google.com (Brian Brown) + + + + + to parse + if dimension is < 8 or > 144 or not 0 mod 2 + + + + +

Creates the version object based on the dimension of the original bit matrix from + the datamatrix code.

+ +

See ISO 16022:2006 Table 7 - ECC 200 symbol attributes

+ + Original including alignment patterns + encapsulating the Data Matrix Code's "version" + if the dimensions of the mapping matrix are not valid + Data Matrix dimensions. +
+
+ + +

Reads the bits in the representing the mapping matrix (No alignment patterns) + in the correct order in order to reconstitute the codewords bytes contained within the + Data Matrix Code.

+ + bytes encoded within the Data Matrix Code + if the exact number of bytes expected is not read +
+
+ + +

Reads a bit of the mapping matrix accounting for boundary wrapping.

+ + Row to read in the mapping matrix + Column to read in the mapping matrix + Number of rows in the mapping matrix + Number of columns in the mapping matrix + value of the given bit in the mapping matrix +
+
+ + +

Reads the 8 bits of the standard Utah-shaped pattern.

+ +

See ISO 16022:2006, 5.8.1 Figure 6

+ + Current row in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Current column in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the utah shape +
+
+ + +

Reads the 8 bits of the special corner condition 1.

+ +

See ISO 16022:2006, Figure F.3

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 1 +
+
+ + +

Reads the 8 bits of the special corner condition 2.

+ +

See ISO 16022:2006, Figure F.4

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 2 +
+
+ + +

Reads the 8 bits of the special corner condition 3.

+ +

See ISO 16022:2006, Figure F.5

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 3 +
+
+ + +

Reads the 8 bits of the special corner condition 4.

+ +

See ISO 16022:2006, Figure F.6

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 4 +
+
+ + +

Extracts the data region from a that contains + alignment patterns.

+ + Original with alignment patterns + BitMatrix that has the alignment patterns removed +
+
+ + +

Encapsulates a block of data within a Data Matrix Code. Data Matrix Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ + bbrown@google.com (Brian Brown) +
+
+ + +

When Data Matrix Codes use multiple data blocks, they actually interleave the bytes of each of them. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ + bytes as read directly from the Data Matrix Code + version of the Data Matrix Code + DataBlocks containing original bytes, "de-interleaved" from representation in the + Data Matrix Code +
+
+ + +

Data Matrix Codes can encode text as bits in one of several modes, and can use multiple modes + in one Data Matrix Code. This class decodes the bits back into text.

+ +

See ISO 16022:2006, 5.2.1 - 5.2.9.2

+ + bbrown@google.com (Brian Brown) + Sean Owen +
+
+ + + See ISO 16022:2006, Annex C Table C.1 + The C40 Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, Annex C Table C.2 + The Text Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, 5.2.3 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.5 and Annex C, Table C.1 + + + + + See ISO 16022:2006, 5.2.6 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.7 + + + + + See ISO 16022:2006, 5.2.8 and Annex C Table C.3 + + + + + See ISO 16022:2006, 5.2.9 and Annex B, B.2 + + + + + See ISO 16022:2006, Annex B, B.2 + + + + +

The main class which implements Data Matrix Code decoding -- as opposed to locating and extracting + the Data Matrix Code from an image.

+ + bbrown@google.com (Brian Brown) +
+
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a Data Matrix Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+ + booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code + if the Data Matrix Code cannot be decoded +
+
+ + +

Decodes a Data Matrix Code represented as a . A 1 or "true" is taken + to mean a black module.

+
+ booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+ + data and error correction codewords + number of codewords that are data bytes +
+
+ + + The Version object encapsulates attributes about a particular + size Data Matrix Code. + + bbrown@google.com (Brian Brown) + + + + + returns the version numer + + + + + + returns the symbol size rows + + + + + + returns the symbols size columns + + + + + + retursn the data region size rows + + + + + + returns the data region size columns + + + + + + returns the total codewords count + + + + + +

Deduces version information from Data Matrix dimensions.

+ + Number of rows in modules + Number of columns in modules + Version for a Data Matrix Code of those dimensions + if dimensions do correspond to a valid Data Matrix size +
+
+ + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the Data Matrix code version's format.

+
+
+ + + returns the version number as string + + + + + + See ISO 16022:2006 5.5.1 Table 7 + + + + +

Encapsulates logic that can detect a Data Matrix Code in an image, even if the Data Matrix Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + +

Detects a Data Matrix Code in an image.

+
+ encapsulating results of detecting a Data Matrix Code or null +
+ + + Calculates the position of the white top right module using the output of the rectangle detector + for a rectangular matrix + + + + + Calculates the position of the white top right module using the output of the rectangle detector + for a square matrix + + + + + Increments the Integer associated with a key by one. + + + + + Counts the number of black/white transitions between two points, using something like Bresenham's algorithm. + + + + + Simply encapsulates two points and a number of transitions between them. + + + + + Orders ResultPointsAndTransitions by number of transitions, ascending. + + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Symbol Character Placement Program. Adapted from Annex M.1 in ISO/IEC 16022:2000(E). + + + + + Main constructor + + the codewords to place + the number of columns + the number of rows + + + + Places the 8 bits of a utah-shaped symbol character in ECC200. + + The row. + The col. + character position + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Enumeration for encodation types + + + + + Error Correction Code for ECC200. + + + + + Lookup table which factors to use for which number of error correction codewords. + See FACTORS. + + + + + Precomputed polynomial factors for ECC 200. + + + + + Creates the ECC200 error correction for an encoded message. + + The codewords. + information about the symbol to be encoded + the codewords with interleaved error correction. + + + + DataMatrix ECC 200 data encoder following the algorithm described in ISO/IEC 16022:200(E) in + annex S. + + + + + Padding character + + + + + mode latch to C40 encodation mode + + + + + mode latch to Base 256 encodation mode + + + + + FNC1 Codeword + + + + + Structured Append Codeword + + + + + Reader Programming + + + + + Upper Shift + + + + + 05 Macro + + + + + 06 Macro + + + + + mode latch to ANSI X.12 encodation mode + + + + + mode latch to Text encodation mode + + + + + mode latch to EDIFACT encodation mode + + + + + ECI character (Extended Channel Interpretation) + + + + + Unlatch from C40 encodation + + + + + Unlatch from X12 encodation + + + + + 05 Macro header + + + + + 06 Macro header + + + + + Macro trailer + + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + the encoded message (the char values range from 0 to 255) + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + requested shape. May be {@code SymbolShapeHint.FORCE_NONE},{@code SymbolShapeHint.FORCE_SQUARE} or {@code SymbolShapeHint.FORCE_RECTANGLE}. + the minimum symbol size constraint or null for no constraint + the maximum symbol size constraint or null for no constraint + encoding mode to start with + the encoded message (the char values range from 0 to 255) + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + Symbol info table for DataMatrix. + + + + Overrides the symbol info set used by this class. Used for testing purposes. + + @param override the symbol info set to use + + + + Enumeration for DataMatrix symbol shape hint. It can be used to force square or rectangular + symbols. + + + + + The class holds the available options for the DatamatrixWriter + + + + + Specifies the matrix shape for Data Matrix + + + + + Specifies a minimum barcode size + + + + + Specifies a maximum barcode size + + + + + Specifies the default encodation + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Encapsulates a type of hint that a caller may pass to a barcode reader to help it + more quickly or accurately decode it. It is up to implementations to decide what, + if anything, to do with the information that is supplied. + + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Unspecified, application-specific hint. Maps to an unspecified . + + + + + Image is a pure monochrome image of a barcode. Doesn't matter what it maps to; + use = true. + + + + + Image is known to be of one of a few possible formats. + Maps to a of s. + + + + + Spend more time to try to find a barcode; optimize for accuracy, not speed. + Doesn't matter what it maps to; use = true. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + + + The caller needs to be notified via callback when a possible + is found. Maps to a . + + + + + Assume MSI codes employ a check digit. Maps to . + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + Maps to . + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + 1D readers supporting rotation with TRY_HARDER enabled. + But BarcodeReader class can do auto-rotating for 1D and 2D codes. + Enabling that option prevents 1D readers doing double rotation. + BarcodeReader enables that option automatically if "global" auto-rotation is enabled. + Maps to . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to; + use . + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Simply encapsulates a width and height. + + + + + initializing constructor + + + + + + + the width + + + + + the height + + + + + + + + + + + + + + + + + + + + + + + + These are a set of hints that you may pass to Writers to specify their behavior. + + dswitkin@google.com (Daniel Switkin) + + + + Specifies the width of the barcode image + type: + + + + + Specifies the height of the barcode image + type: + + + + + Don't put the content string into the output image. + type: + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + + For Aztec it is of type , representing the minimal percentage of error correction words. + In all cases, it can also be a representation of the desired value as well. + Note: an Aztec symbol should have a minimum of 25% EC words. + For PDF417 it is of type or (between 0 and 8), + + + + + Specifies what character encoding to use where applicable. + type: + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + type: , or representation of the integer value + + + + + Specifies the aspect ratio to use. Default is 4. + type: , or 1-4. + + + + + Specifies whether to use compact mode for PDF417 + type: , or "true" or "false" + value + + + + + Specifies what compaction mode to use for PDF417. + type: or value of one of its + enum values + + + + + Specifies the minimum and maximum number of rows and columns for PDF417. + type: + + + + + Don't append ECI segment. + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + type: + + + + + Specifies the matrix shape for Data Matrix (type ) + + + + + Specifies a minimum barcode size (type ). Only applicable to Data Matrix now. + + + + + Specifies a maximum barcode size (type ). Only applicable to Data Matrix now. + + + + + if true, don't switch to codeset C for numbers + + + + + Specifies the default encodation for Data Matrix (type ) + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Specifies the required number of layers for an Aztec code. + A negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + type: , or representation of the integer value + + + + + Specifies the exact version of QR code to be encoded. + (Type , or representation of the integer value). + + + + + Specifies whether the data should be encoded to the GS1 standard + type: , or "true" or "false" + value + + + + + Thrown when a barcode was successfully detected, but some aspect of + the content did not conform to the barcode's format rules. This could have + been due to a mis-detection. + Sean Owen + + + + + + + + + + + + + + + + + + + + + + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Decodes the specified barcode bitmap which is given by a generic byte array. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents. + + The contents. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + The matrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents. + + The contents. + + + + + implements an Intelligent Mail barcode + Rishabh Hatgadkar + + + + + A wrapper implementation of {@link LuminanceSource} which inverts the luminances it returns -- black becomes + white and vice versa, and each value becomes (255-value). + + Sean Owen + + + + Initializes a new instance of the class. + + The @delegate. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff; + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Inverts this instance. + + original delegate {@link LuminanceSource} since invert undoes itself + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + The purpose of this class hierarchy is to abstract different bitmap implementations across + platforms into a standard interface for requesting greyscale luminance values. The interface + only provides immutable methods; therefore crop and rotation create copies. This is to ensure + that one Reader does not modify the original luminance source and leave it in an unknown state + for other Readers in the chain. + + dswitkin@google.com (Daniel Switkin) + + + + initializing constructor + + + + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff + + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + The width of the bitmap. + + + The height of the bitmap. + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + Whether this subclass supports counter-clockwise rotation. + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + + Whether this subclass supports invertion. + + + + inverts the luminance values, not supported here. has to implemented in sub classes + + + + + + + + + + + + mike32767 + Manuel Kasten + + + + + to parse + + + + +

MaxiCodes can encode text or structured information as bits in one of several modes, + with multiple character sets in one code. This class decodes the bits back into text.

+ + mike32767 + Manuel Kasten +
+
+ + +

The main class which implements MaxiCode decoding -- as opposed to locating and extracting + the MaxiCode from an image.

+ + Manuel Kasten +
+
+ + + This implementation can detect and decode a MaxiCode in an image. + + + + + Locates and decodes a MaxiCode in an image. + + a String representing the content encoded by the MaxiCode + if a MaxiCode cannot be decoded + + + + + Locates and decodes a MaxiCode within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + + MultiFormatReader is a convenience class and the main entry point into the library for most uses. + By default it attempts to decode all barcode formats that the library supports. Optionally, you + can provide a hints object to request different behavior, for example only decoding QR codes. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + This version of decode honors the intent of Reader.decode(BinaryBitmap) in that it + passes null as a hint to the decoders. However, that makes it inefficient to call repeatedly. + Use setHints() followed by decodeWithState() for continuous scan applications. + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the hints provided. Does not honor existing state. + + + The pixel data to decode + + The hints to use, clearing the previous state. + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the state set up by calling setHints() previously. Continuous scan + clients will get a large speed increase by using this instead of decode(). + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls + to decodeWithState(image) can reuse the same set of readers without reallocating memory. This + is important for performance in continuous scan clients. + + + + + + resets all specific readers + + + + This is a factory class which finds the appropriate Writer subclass for the BarcodeFormat + requested and encodes the barcode with the supplied contents. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Gets the collection of supported writers. + + + + + encode the given data + + + + + + + + + + encode the given data + + + + + + + + + + + This class attempts to decode a barcode from an image, not by scanning the whole image, + but by scanning subsets of the image. This is important when there may be multiple barcodes in + an image, and detecting a barcode may find parts of multiple barcode and fail to decode + (e.g. QR Codes). Instead this scans the four quadrants of the image -- and also the center + 'quadrant' to cover the case where a barcode is found in the center. + + + + + + Initializes a new instance of the class. + + The @delegate. + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Attempts to locate multiple barcodes in an image by repeatedly decoding portion of the image. + After one barcode is found, the areas left, above, right and below the barcode's + {@link com.google.zxing.ResultPoint}s are scanned, recursively.

+

A caller may want to also employ {@link ByQuadrantReader} when attempting to find multiple + 2D barcodes, like QR Codes, in an image, where the presence of multiple barcodes might prevent + detecting any one of them.

+

That is, instead of passing a {@link Reader} a caller might pass + new ByQuadrantReader(reader).

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The @delegate. + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Implementation of this interface attempt to read several barcodes from one image. + Sean Owen + + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + +

Encapsulates logic that can detect one or more QR Codes in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+ + Sean Owen + Hannes Erven +
+
+ + + Initializes a new instance of the class. + + The image. + + + + Detects the multi. + + The hints. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +

In contrast to , this class will return an array of all possible + QR code locations in the image.

+ +

Use the TRY_HARDER hint to ask for a more thorough detection.

+ + Sean Owen + Hannes Erven +
+
+ + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF_PERCENT percent in their + estimated modules sizes. + + + + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF pixels/module in their + estimated modules sizes. + + + + + A comparator that orders FinderPatterns by their estimated module size. + + + + +

Creates a finder that will search the image for three finder patterns.

+ + image to search +
+
+ + + + the 3 best s from our list of candidates. The "best" are + those that have been detected at least CENTER_QUORUM times, and whose module + size differs from the average among those patterns the least + + + + + This implementation can detect and decode multiple QR Codes in an image. + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + +

Decodes Codabar barcodes.

+ + Bas Vijfwinkel +
+
+ + These represent the encodings of characters, as patterns of wide and narrow bars. The 7 least-significant bits of + each int correspond to the pattern of wide and narrow, with 1s representing "wide" and 0s representing narrow. + + + + Records the size of all runs of white and black pixels, starting with white. + This is just like recordPattern, except it records all the counters, and + uses our builtin "counters" member for storage. + + row to count from + + + + This class renders CodaBar as []. + + dsbnatut@gmail.com (Kazuki Nishiura) + + + + The class holds the available options for the QrCodeWriter + + + + + if true, don't switch to codeset C for numbers + + + + +

Decodes Code 128 barcodes.

+ + Sean Owen +
+
+ + + This object renders a CODE128 code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + +

Decodes Code 39 barcodes. Supports "Full ASCII Code 39" if USE_CODE_39_EXTENDED_MODE is set.

+ Sean Owen + @see Code93Reader +
+
+ + + Returns a string with all possible characters + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. It will not decoded "extended Code 39" sequences. + + + + + Creates a reader that can be configured to check the last character as a check digit. + It will not decoded "extended Code 39" sequences. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + + Creates a reader that can be configured to check the last character as a check digit, + or optionally attempt to decode "extended Code 39" sequences that are used to encode + the full ASCII character set. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + if true, will attempt to decode extended Code 39 sequences in the text. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a CODE39 code as a . + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Decodes Code 93 barcodes.

+ Sean Owen + +
+
+ + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a CODE93 code as a BitMatrix + + + + + + output to append to + start position + pattern to append + unused + 9 + + + +

Implements decoding of the EAN-13 format.

+ + dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Initializes a new instance of the class. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + Get the format of this decoder. + The 1D format. + + + + + Based on pattern of odd-even ('L' and 'G') patterns used to encoded the explicitly-encoded + digits in a barcode, determines the implicitly encoded first digit and adds it to the + result string. + + string to insert decoded first digit into + int whose bits indicates the pattern of odd/even L/G patterns used to + encode digits + -1 if first digit cannot be determined + + + + This object renders an EAN13 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Implements decoding of the EAN-8 format.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Get the format of this decoder. + The 1D format. + + + + + This object renders an EAN8 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + + + a byte array of horizontal pixels (false = white, true = black) + + + + + Records EAN prefix to GS1 Member Organization, where the member organization + correlates strongly with a country. This is an imperfect means of identifying + a country of origin by EAN-13 barcode value. See + + http://en.wikipedia.org/wiki/List_of_GS1_country_codes. + + Sean Owen + + + + +

Implements decoding of the ITF format, or Interleaved Two of Five.

+ +

This Reader will scan ITF barcodes of certain lengths only. + At the moment it reads length 6, 8, 10, 12, 14, 16, 18, 20, 24, 44 and 48 as these have appeared "in the wild". Not all + lengths are scanned, especially shorter ones, to avoid false positives. This in turn is due to a lack of + required checksum function.

+ +

The checksum is optional and is not applied by this Reader. The consumer of the decoded + value will have to apply a checksum if required.

+ +

http://en.wikipedia.org/wiki/Interleaved_2_of_5 + is a great reference for Interleaved 2 of 5 information.

+ + kevin.osullivan@sita.aero, SITA Lab. +
+
+ + + Valid ITF lengths. Anything longer than the largest value is also allowed. + + + + + Start/end guard pattern. + + Note: The end pattern is reversed because the row is reversed before + searching for the END_PATTERN + + + + + Patterns of Wide / Narrow lines to indicate each digit + + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + + row of black/white values to search + offset of start pattern + The payload end. + to append decoded chars to + + false, if decoding could not complete successfully + + + + + Identify where the start of the middle / payload section starts. + + row of black/white values to search + Array, containing index of start of 'start block' and end of 'start block' + + + + The start & end patterns must be pre/post fixed by a quiet zone. This + zone must be at least 10 times the width of a narrow line. Scan back until + we either get to the start of the barcode or match the necessary number of + quiet zone pixels. + + Note: Its assumed the row is reversed when using this method to find + quiet zone after the end pattern. + + ref: http://www.barcode-1.net/i25code.html + + bit array representing the scanned barcode. + index into row of the start or end pattern. + false, if the quiet zone cannot be found + + + + Skip all whitespace until we get to the first black line. + + row of black/white values to search + index of the first black line or -1 if no black lines are found in the row. + + + + Identify where the end of the middle / payload section ends. + + row of black/white values to search + Array, containing index of start of 'end block' and end of 'end + block' or null, if nothing found + + + + + row of black/white values to search + position to start search + pattern of counts of number of black and white pixels that are being searched for as a pattern + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a sequence of ITF black/white lines into single + digit. + + the counts of runs of observed black/white/black/... values + The decoded digit + + false, if digit cannot be decoded + + + + + This object renders a ITF code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code bool[]} of horizontal pixels (false = white, true = black) + + + + + + + Decodes MSI barcodes. + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. + + + + + Creates a reader that can be configured to check the last character as a check digit, + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a MSI code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

A reader that can read all available UPC/EAN formats. If a caller wants to try to + read all such formats, it is most efficient to use this implementation rather than invoke + individual readers.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Encapsulates functionality and implementation that is common to one-dimensional barcodes.

+ dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + a byte array of horizontal pixels (0 = white, 1 = black) + + + + Appends the given pattern to the target array starting at pos. + + encode black/white pattern into this array + position to start encoding at in target + lengths of black/white runs to encode + starting color - false for white, true for black + the number of elements added to target. + + + + Gets the default margin. + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + + barcode contents to encode + a bool[] of horizontal pixels (false = white, true = black) + + + + Calculates the checksum digit modulo10. + + The contents. + + + + + Encapsulates functionality and implementation that is common to all families + of one-dimensional barcodes. + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + + + + + + + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + Note that we don't try rotation without the try harder flag, even if rotation was supported. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + We're going to examine rows from the middle outward, searching alternately above and below the + middle, and farther out each time. rowStep is the number of rows between each successive + attempt above and below the middle. So we'd scan row middle, then middle - rowStep, then + middle + rowStep, then middle - (2 * rowStep), etc. + rowStep is bigger as the image is taller, but is always at least 1. We've somewhat arbitrarily + decided that moving up and down by about 1/16 of the image is pretty good; we try more of the + image if "trying harder". + + The image to decode + Any hints that were requested + The contents of the decoded barcode + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the pattern in reverse. + + The row. + The start. + The counters. + + + + + Determines how closely a set of observed counts of runs of black/white values matches a given + target pattern. This is reported as the ratio of the total variance from the expected pattern + proportions across all pattern elements, to the length of the pattern. + + observed counters + expected pattern + The most any counter can differ before we give up + ratio of total variance between counters and pattern compared to total pattern size, + where the ratio has been multiplied by 256. So, 0 means no variance (perfect match); 256 means + the total variance between counters and patterns equals the pattern length, higher values mean + even more variance + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + This object renders a Plessey code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + Superclass of implementations that read barcodes in the RSS family of formats. + + + + + Initializes a new instance of the class. + + + + + Gets the decode finder counters. + + + + + + Gets the data character counters. + + + + + + Gets the odd rounding errors. + + + + + + Gets the even rounding errors. + + + + + + Gets the odd counts. + + + + + + Gets the even counts. + + + + + + Parses the finder value. + + The counters. + The finder patterns. + The value. + + + + + Counts the specified array. + + The array. + + + + + Increments the specified array. + + The array. + The errors. + + + + Decrements the specified array. + + The array. + The errors. + + + + Determines whether [is finder pattern] [the specified counters]. + + The counters. + + true if [is finder pattern] [the specified counters]; otherwise, false. + + + + + Encapsulates a since character value in an RSS barcode, including its checksum information. + + + + + Gets the value. + + + + + Gets the checksum portion. + + + + + Initializes a new instance of the class. + + The value. + The checksum portion. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Gets the information. + + + + + + Parses the information. + + + + + + Creates the decoder. + + The information. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + One row of an RSS Expanded Stacked symbol, consisting of 1+ expanded pairs. + + + + + Did this row of the image have to be reversed (mirrored) to recognize the pairs? + + + + + Two rows are equal if they contain the same pairs in the same order. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Encapsulates an RSS barcode finder pattern, including its start/end position and row. + + + + + Gets the value. + + + + + Gets the start end. + + + + + Gets the result points. + + + + + Initializes a new instance of the class. + + The value. + The start end. + The start. + The end. + The row number. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Decodes RSS-14, including truncated and stacked variants. See ISO/IEC 24724:2006. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Adapted from listings in ISO/IEC 24724 Appendix B and Appendix G. + + + + + Gets the RS svalue. + + The widths. + Width of the max. + if set to true [no narrow]. + + + + +

Implements decoding of the UPC-A format.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen +
+
+ + +

Like decodeRow(int, BitArray, java.util.Map), but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ + + + + +
+ + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Decodes the specified image. + + The image. + The hints. + + + + + Get the format of this decoder. + The 1D format. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + This object renders a UPC-A code as a . + qwandor@google.com (Andrew Walbran) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + @see UPCEANExtension5Support + + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + + + @see UPCEANExtension2Support + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + one {@link ResultMetadataType} to appropriate value, or {@code null} if not known + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Start/end guard pattern. + + + + + Pattern marking the middle of a UPC/EAN pattern, separating the two halves. + + + + + end guard pattern. + + + + + "Odd", or "L" patterns used to encode UPC/EAN digits. + + + + + As above but also including the "even", or "G" patterns used to encode UPC/EAN digits. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + +

Like , but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ row index into the image + encoding of the row of the barcode image + start/end column where the opening start pattern was found + optional hints that influence decoding + encapsulating the result of decoding a barcode in the row +
+ + + + string of digits to check + see + + + + Computes the UPC/EAN checksum on a string of digits, and reports + whether the checksum is correct or not. + + string of digits to check + true iff string of digits passes the UPC/EAN checksum algorithm + + + + Decodes the end. + + The row. + The end start. + + + + + + row of black/white values to search + position to start search + if true, indicates that the pattern specifies white/black/white/... + pixel counts, otherwise, it is interpreted as black/white/black/... + pattern of counts of number of black and white pixels that are being + searched for as a pattern + array of counters, as long as pattern, to re-use + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a single UPC/EAN-encoded digit. + + row of black/white values to decode + the counts of runs of observed black/white/black/... values + horizontal offset to start decoding from + the set of patterns to use to decode -- sometimes different encodings + for the digits 0-9 are used, and this indicates the encodings for 0 to 9 that should + be used + horizontal offset of first pixel beyond the decoded digit + + + + Get the format of this decoder. + + The 1D format. + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ aripollak@gmail.com (Ari Pollak) + dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Gets the default margin. + + + + +

Implements decoding of the UPC-E format.

+

Thisis a great reference for + UPC-E information.

+ Sean Owen +
+
+ + + The pattern that marks the middle, and end, of a UPC-E pattern. + There is no "second half" to a UPC-E barcode. + + + + + See L_AND_G_PATTERNS these values similarly represent patterns of + even-odd parity encodings of digits that imply both the number system (0 or 1) + used, and the check digit. + + + + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Decodes the end. + + The row. + The end start. + + + + + see checkStandardUPCEANChecksum(String) + + + + + + + Determines the num sys and check digit. + + The result string. + The lg pattern found. + + + + + Get the format of this decoder. + The 1D format. + + + + + Expands a UPC-E value back into its full, equivalent UPC-A code value. + + UPC-E code as string of digits + equivalent UPC-A code as string of digits + + + + + This object renders an UPC-E code as a {@link BitMatrix}. + @author 0979097955s@gmail.com (RX) + + + + + Metadata about a PDF417 Barcode + + Guenther Grau + + + + A Barcode Value for the PDF417 barcode. + The scanner will iterate through the bitmatrix, + and given the different methods or iterations + will increment a given barcode value's confidence. + + When done, this will return the values of highest confidence. + + Guenther Grau + + + + Incremenets the Confidence for a given value. (Adds an occurance of a value) + + + Value. + + + + Determines the maximum occurrence of a set value and returns all values which were set with this occurrence. + + an array of int, containing the values with the highest occurrence, or null, if no value was set. + + + + Returns the confience value for a given barcode value + + Barcode value. + + + + A Bounding Box helper class + + Guenther Grau + + + + Initializes a new instance of the class. + returns null if the corner points don't match up correctly + + The image. + The top left. + The bottom left. + The top right. + The bottom right. + + + + + Creates the specified box. + + The box. + + + + + Initializes a new instance of the class. + Will throw an exception if the corner points don't match up correctly + + Image. + Top left. + Top right. + Bottom left. + Bottom right. + + + + Merge two Bounding Boxes, getting the left corners of left, and the right corners of right + (Images should be the same) + + Left. + Right. + + + + Adds the missing rows. + + The missing rows. + Missing start rows. + Missing end rows. + If set to true is left. + + + + Calculates the minimum and maximum X & Y values based on the corner points. + + + + + If we adjust the width, set a new right corner coordinate and recalculate + + Bottom right. + + + + A Codeword in the PDF417 barcode + + Guenther Grau + + + + Default value for the RowNumber (-1 being an invalid real number) + + + + + Initializes a new instance of the class. + + Start x. + End x. + Bucket. + Value. + + + + Gets the width. + + The width. + + + + Gets a value indicating whether this instance has valid row number. + + true if this instance has valid row number; otherwise, false. + + + + Determines whether this instance is valid row number the specified rowNumber. + + true if this instance is valid row number the specified rowNumber; otherwise, false. + Row number. + + + + Sets the row number as the row's indicator column. + + + + + Returns a that represents the current . + + A that represents the current . + + + +

This class contains the methods for decoding the PDF417 codewords.

+ + SITA Lab (kevin.osullivan@sita.aero) +
+
+ + + Table containing values for the exponent of 900. + This is used in the numeric compaction decode algorithm. + + + + + Text Compaction mode (see 5.4.1.5) permits all printable ASCII characters to be + encoded, i.e. values 32 - 126 inclusive in accordance with ISO/IEC 646 (IRV), as + well as selected control characters. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + The Text Compaction mode includes all the printable ASCII characters + (i.e. values from 32 to 126) and three ASCII control characters: HT or tab + (ASCII value 9), LF or line feed (ASCII value 10), and CR or carriage + return (ASCII value 13). The Text Compaction mode also includes various latch + and shift characters which are used exclusively within the mode. The Text + Compaction mode encodes up to 2 characters per codeword. The compaction rules + for converting data into PDF417 codewords are defined in 5.4.2.2. The sub-mode + switches are defined in 5.4.2.3. + + The text compaction data. + The byte compaction data if there + was a mode shift. + The size of the text compaction and byte compaction data. + The decoded data is appended to the result. + + + + + Byte Compaction mode (see 5.4.3) permits all 256 possible 8-bit byte values to be encoded. + This includes all ASCII characters value 0 to 127 inclusive and provides for international + character set support. + + The byte compaction mode i.e. 901 or 924 + The array of codewords (data + error) + Currently active character encoding + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Numeric Compaction mode (see 5.4.4) permits efficient encoding of numeric data strings. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Convert a list of Numeric Compacted codewords from Base 900 to Base 10. + EXAMPLE + Encode the fifteen digit numeric string 000213298174000 + Prefix the numeric string with a 1 and set the initial value of + t = 1 000 213 298 174 000 + Calculate codeword 0 + d0 = 1 000 213 298 174 000 mod 900 = 200 + + t = 1 000 213 298 174 000 div 900 = 1 111 348 109 082 + Calculate codeword 1 + d1 = 1 111 348 109 082 mod 900 = 282 + + t = 1 111 348 109 082 div 900 = 1 234 831 232 + Calculate codeword 2 + d2 = 1 234 831 232 mod 900 = 632 + + t = 1 234 831 232 div 900 = 1 372 034 + Calculate codeword 3 + d3 = 1 372 034 mod 900 = 434 + + t = 1 372 034 div 900 = 1 524 + Calculate codeword 4 + d4 = 1 524 mod 900 = 624 + + t = 1 524 div 900 = 1 + Calculate codeword 5 + d5 = 1 mod 900 = 1 + t = 1 div 900 = 0 + Codeword sequence is: 1, 624, 434, 632, 282, 200 + + Decode the above codewords involves + 1 x 900 power of 5 + 624 x 900 power of 4 + 434 x 900 power of 3 + + 632 x 900 power of 2 + 282 x 900 power of 1 + 200 x 900 power of 0 = 1000213298174000 + + Remove leading 1 => Result is 000213298174000 + The array of codewords + The number of codewords + The decoded string representing the Numeric data. + + + + + + + Guenther Grau + + + + Returns the DetectionResult Columns. This does a fair bit of calculation, so call it sparingly. + + The detection result columns. + + + + Adjusts the indicator column row numbers. + + Detection result column. + + + + return number of codewords which don't have a valid row number. Note that the count is not accurate as codewords . + will be counted several times. It just serves as an indicator to see when we can stop adjusting row numbers + + The row numbers. + + + + Adjusts the row numbers by row. + + The row numbers by row. + + + + Adjusts the row numbers from both Row Indicators + + zero + + + + Adjusts the row numbers from Right Row Indicator. + + The unadjusted row count. + + + + Adjusts the row numbers from Left Row Indicator. + + Unadjusted row Count. + + + + Adjusts the row number if valid. + + The invalid rows + Row indicator row number. + Invalid row counts. + Codeword. + + + + Adjusts the row numbers. + + Barcode column. + Codewords row. + Codewords. + + + + Adjusts the row number. + + true, if row number was adjusted, false otherwise. + Codeword. + Other codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + The maximum distance to search in the codeword array in both the positive and negative directions + + + + + The Bounding Box around the column (in the BitMatrix) + + The box. + + + + The Codewords the Box encodes for, offset by the Box minY. + Remember to Access this ONLY through GetCodeword(imageRow) if you're accessing it in that manner. + + The codewords. + + + + Initializes a new instance of the class. + + The Bounding Box around the column (in the BitMatrix) + + + + Converts the Image's Row to the index in the Codewords array + + The Codeword Index. + Image row. + + + + Converts the Codeword array index into a Row in the Image (BitMatrix) + + The Image Row. + Codeword index. + + + + Gets the codeword for a given row + + The codeword. + Image row. + + + + Gets the codeword closest to the specified row in the image + + Image row. + + + + Sets the codeword for an image row + + Image row. + Codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + Gets or sets a value indicating whether this instance is the left indicator + + true if this instance is left; otherwise, false. + + + + Initializes a new instance of the class. + + Box. + If set to true is left. + + + + Sets the Row Numbers as Inidicator Columns + + + + + TODO implement properly + TODO maybe we should add missing codewords to store the correct row number to make + finding row numbers for other columns easier + use row height count to make detection of invalid row numbers more reliable + + The indicator column row numbers. + Metadata. + + + + Gets the row heights. + + The row heights. + + + + Adjusts the in omplete indicator column row numbers. + + Metadata. + + + + Gets the barcode metadata. + + The barcode metadata. + + + + Prune the codewords which do not match the metadata + TODO Maybe we should keep the incorrect codewords for the start and end positions? + + Codewords. + Metadata. + + + + Returns a that represents the current . + + A that represents the current . + + + +

PDF417 error correction implementation.

+

This example + is quite useful in understanding the algorithm.

+ Sean Owen + +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the specified received. + + received codewords + number of those codewords used for EC + location of erasures + The error locations count. + + + + + Runs the euclidean algorithm (Greatest Common Divisor) until r's degree is less than R/2 + + The euclidean algorithm. + + + + Finds the error locations as a direct application of Chien's search + + The error locations. + Error locator. + + + + Finds the error magnitudes by directly applying Forney's Formula + + The error magnitudes. + Error evaluator. + Error locator. + Error locations. + + + +

A field based on powers of a generator integer, modulo some modulus.

+ +
+ Sean Owen +
+ + + + + Sean Owen + + + + Gets the coefficients. + + The coefficients. + + + + degree of this polynomial + + + + + Gets a value indicating whether this instance is zero. + + true if this polynomial is the monomial "0" + + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + + + Adds another Modulus + + Other. + + + + Subtract another Modulus + + Other. + + + + Multiply by another Modulus + + Other. + + + + Returns a Negative version of this instance + + + + + Multiply by a Scalar. + + Scalar. + + + + Multiplies by a Monomial + + The by monomial. + Degree. + Coefficient. + + + + Returns a that represents the current . + + A that represents the current . + + + + + + Guenther Grau + creatale GmbH (christoph.schulz@creatale.de) + + + + The ratios table + + + + + Initializes the class & Pre-computes the symbol ratio table. + + + + + Gets the decoded value. + + The decoded value. + Module bit count. + + + + Samples the bit counts. + + The bit counts. + Module bit count. + + + + Gets the decoded codeword value. + + The decoded codeword value. + Module bit count. + + + + Gets the bit value. + + The bit value. + Module bit count. + + + + Gets the closest decoded value. + + The closest decoded value. + Module bit count. + + + + + + Guenther Grau + + + + Decode the specified image, imageTopLeft, imageBottomLeft, imageTopRight, imageBottomRight, minCodewordWidth + and maxCodewordWidth. + TODO: don't pass in minCodewordWidth and maxCodewordWidth, pass in barcode columns for start and stop pattern + columns. That way width can be deducted from the pattern column. + This approach also allows to detect more details about the barcode, e.g. if a bar type (white or black) is wider + than it should be. This can happen if the scanner used a bad blackpoint. + + Image. + Image top left. + Image bottom left. + Image top right. + Image bottom right. + Minimum codeword width. + Max codeword width. + + + + Merge the specified leftRowIndicatorColumn and rightRowIndicatorColumn. + + Left row indicator column. + Right row indicator column. + + + + Adjusts the bounding box. + + The bounding box. + Row indicator column. + + + + Gets the barcode metadata. + + The barcode metadata. + Left row indicator column. + Right row indicator column. + + + + Gets the row indicator column. + + The row indicator column. + Image. + Bounding box. + Start point. + If set to true left to right. + Minimum codeword width. + Max codeword width. + + + + Adjusts the codeword count. + + Detection result. + Barcode matrix. + + + + Creates the decoder result. + + The decoder result. + Detection result. + + + + This method deals with the fact, that the decoding process doesn't always yield a single most likely value. The + current error correction implementation doesn't deal with erasures very well, so it's better to provide a value + for these ambiguous codewords instead of treating it as an erasure. The problem is that we don't know which of + the ambiguous values to choose. We try decode using the first value, and if that fails, we use another of the + ambiguous values and try to decode again. This usually only happens on very hard to read and decode barcodes, + so decoding the normal barcodes is not affected by this. + + The decoder result from ambiguous values. + Ec level. + Codewords. + contains the indexes of erasures. + array with the indexes that have more than one most likely value. + two dimensional array that contains the ambiguous values. The first dimension must + be the same Length as the ambiguousIndexes array. + + + + Creates the barcode matrix. + + The barcode matrix. + Detection result. + + + + Tests to see if the Barcode Column is Valid + + true, if barcode column is valid, false otherwise. + Detection result. + Barcode column. + + + + Gets the start column. + + The start column. + Detection result. + Barcode column. + Image row. + If set to true left to right. + + + + Detects the codeword. + + The codeword. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + Minimum codeword width. + Max codeword width. + + + + Gets the module bit count. + + The module bit count. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + + + + Gets the number of EC code words. + + The number of EC code words. + Barcode EC level. + + + + Adjusts the codeword start column. + + The codeword start column. + Image. + Minimum column. + Max column. + If set to true left to right. + Codeword start column. + Image row. + + + + Checks the codeword for any skew. + + true, if codeword is within the skew, false otherwise. + Codeword size. + Minimum codeword width. + Max codeword width. + + + + Decodes the codewords. + + The codewords. + Codewords. + Ec level. + Erasures. + + + + Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place. + + The errors. + data and error correction codewords. + positions of any known erasures. + number of error correction codewords that are available in codewords. + + + + Verifies that all is well with the the codeword array. + + Codewords. + Number EC codewords. + + + + Gets the bit count for codeword. + + The bit count for codeword. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Module bit count. + + + + Returns a that represents the jagged array. + + A that represents the jagged array. + Barcode matrix as a jagged array. + + + +

Encapsulates logic that can detect a PDF417 Code in an image, even if the + PDF417 Code is rotated or skewed, or partially obscured.

+ + SITA Lab (kevin.osullivan@sita.aero) + dswitkin@google.com (Daniel Switkin) + Guenther Grau +
+
+ + + B S B S B S B S Bar/Space pattern + 11111111 0 1 0 1 0 1 000. + + + + + 1111111 0 1 000 1 0 1 00 1 + + + + + if we set the value too low, then we don't detect the correct height of the bar if the start patterns are damaged. + if we set the value too high, then we might detect the start pattern from a neighbor barcode. + + + + + A PDF471 barcode should have at least 3 rows, with each row being >= 3 times the module width. Therefore it should be at least + 9 pixels tall. To be conservative, we use about half the size to ensure we don't miss it. + + + + +

Detects a PDF417 Code in an image. Only checks 0 and 180 degree rotations.

+
+ barcode image to decode + optional hints to detector + if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned + + encapsulating results of detecting a PDF417 code + +
+ + + Detects PDF417 codes in an image. Only checks 0 degree rotation (so rotate the matrix and check again outside of this method) + + multiple if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned. + bit matrix to detect barcodes in. + List of ResultPoint arrays containing the coordinates of found barcodes + + + + Locate the vertices and the codewords area of a black blob using the Start and Stop patterns as locators. + + Matrix. + Start row. + Start column. + an array containing the vertices: + vertices[0] x, y top left barcode + vertices[1] x, y bottom left barcode + vertices[2] x, y top right barcode + vertices[3] x, y bottom right barcode + vertices[4] x, y top left codeword area + vertices[5] x, y bottom left codeword area + vertices[6] x, y top right codeword area + vertices[7] x, y bottom right codeword area + + + + + Copies the temp data to the final result + + Result. + Temp result. + Destination indexes. + + + + Finds the rows with the given pattern. + + The rows with pattern. + Matrix. + Height. + Width. + Start row. + Start column. + Pattern. + + + + Finds the guard pattern. Uses System.Linq.Enumerable.Repeat to fill in counters. This might be a performance issue? + + start/end horizontal offset of guard pattern, as an array of two ints. + matrix row of black/white values to search + column x position to start search. + row y position to start search. + width the number of pixels to search on this row. + If set to true search the white patterns first. + pattern of counts of number of black and white pixels that are being searched for as a pattern. + counters array of counters, as long as pattern, to re-use . + + + + Determines how closely a set of observed counts of runs of black/white. + values matches a given target pattern. This is reported as the ratio of + the total variance from the expected pattern proportions across all + pattern elements, to the length of the pattern. + + + ratio of total variance between counters and pattern compared to + total pattern size, where the ratio has been multiplied by 256. + So, 0 means no variance (perfect match); 256 means the total + variance between counters and patterns equals the pattern length, + higher values mean even more variance + + observed counters. + expected pattern. + The most any counter can differ before we give up. + + + + PDF 417 Detector Result class. Skipped private backing stores. + Guenther Grau + + + + + Initializes a new instance of the class. + + Bits. + Points. + + + + defines the level of the error correction / count of error correction codewords + + + + + Holds all of the information for a barcode in a format where it can be easily accessible + + Jacob Haynes + + + + + the height of the matrix (Rows) + the width of the matrix (Cols) + + + + + Jacob Haynes + + + + + Creates a Barcode row of the width + + The width. + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + A boolean which is true if the bar black false if it is white + How many spots wide the bar is. + + + + + This function scales the row + + How much you want the image to be scaled, must be greater than or equal to 1. + the scaled row + + + + + Represents possible PDF417 barcode compaction types. + + + + + + + + + + + + + + + + + + + + + + + + + Data object to specify the minimum and maximum number of rows and columns for a PDF417 barcode. + @author qwandor@google.com (Andrew Walbran) + + + + + Initializes a new instance of the class. + + The min cols. + The max cols. + The min rows. + The max rows. + + + + Gets the min cols. + + + + + Gets the max cols. + + + + + Gets the min rows. + + + + + Gets the max rows. + + + + + Top-level class for the logic part of the PDF417 implementation. + + + + + The start pattern (17 bits) + + + + + The stop pattern (18 bits) + + + + + The codeword table from the Annex A of ISO/IEC 15438:2001(E). + + + + + Calculates the necessary number of rows as described in annex Q of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol (r) + + + + Calculates the number of pad codewords as described in 4.9.2 of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol + the number of pad codewords + + + + Generates the barcode logic. + + the message to encode + PDF417 error correction level to use + + + + Determine optimal nr of columns and rows for the specified number of + codewords. + + number of code words + number of error correction code words + The longest dimension of the barcode, used for columns + The short dimension of the barcode, used for rows + The height of a row, will alter this parameter if aspectRatio>4 (aspectRatio==AUTO) + dimension object containing cols as width and rows as height + + + + Sets max/min row/col values + + maximum allowed columns + minimum allowed columns + maximum allowed rows + minimum allowed rows + + + + Sets compaction to values stored in enum + + compaction mode to use + + + + Sets compact to be true or false + + if true, enables compaction + + + + Sets output encoding. + + sets character encoding to use + + + + Sets the disable eci. + + if set to true don't add an ECI segment for different encodings than default. + + + + PDF417 error correction code following the algorithm described in ISO/IEC 15438:2001(E) in + chapter 4.10. + + + + + Tables of coefficients for calculating error correction words + (see annex F, ISO/IEC 15438:2001(E)) + + + + + Determines the number of error correction codewords for a specified error correction + level. + + the error correction level (0-8) + the number of codewords generated for error correction + + + + Determines the error correction level for AUTO + + The error correction level (0-9) + The number of codewords for AUTO errorCorrectionLevel + the number of codewords generated for error correction + + + + Returns the recommended minimum error correction level as described in annex E of + ISO/IEC 15438:2001(E). + + the number of data codewords + the recommended minimum error correction level + + + + Generates the error correction codewords according to 4.10 in ISO/IEC 15438:2001(E). + + the data codewords + the error correction level (0-8) + the String representing the error correction codewords + + + + defines the level of the error correction / count of error correction codewords + + + + + PDF417 high-level encoder following the algorithm described in ISO/IEC 15438:2001(E) in + annex P. + + + + + code for Text compaction + + + + + code for Byte compaction + + + + + code for Numeric compaction + + + + + Text compaction submode Alpha + + + + + Text compaction submode Lower + + + + + Text compaction submode Mixed + + + + + Text compaction submode Punctuation + + + + + mode latch to Text Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters NOT a multiple of 6) + + + + + mode latch to Numeric Compaction mode + + + + + mode shift to Byte Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters a multiple of 6) + + + + + identifier for a user defined Extended Channel Interpretation (ECI) + + + + + identifier for a general purpose ECO format + + + + + identifier for an ECI of a character set of code page + + + + + Raw code table for text compaction Mixed sub-mode + + + + + Raw code table for text compaction: Punctuation sub-mode + + + + + Performs high-level encoding of a PDF417 message using the algorithm described in annex P + of ISO/IEC 15438:2001(E). If byte compaction has been selected, then only byte compaction + is used. + + the message + compaction mode to use + character encoding used to encode in default or byte compaction + or null for default / not applicable + if true, don't add an ECI segment for different encodings than default + the encoded message (the char values range from 0 to 928) + + + + Encode parts of the message using Text Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.2. + + the message + the start position within the message + the number of characters to encode + receives the encoded codewords + should normally be SUBMODE_ALPHA + the text submode in which this method ends + + + + + Encode parts of the message using Byte Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.3. The Unicode characters will be converted to binary using the cp437 + codepage. + + the message converted to a byte array + the start position within the message + the number of bytes to encode + the mode from which this method starts + receives the encoded codewords + + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using text compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using binary compaction. + + the message + the message converted to a byte array + the start position within the message + + the requested character count + + + + The class holds the available options for the + + + + + Specifies whether to use compact mode for PDF417 (type ). + + + + + Specifies what compaction mode to use for PDF417 (type + ). + + + + + Specifies the minimum and maximum number of rows and columns for PDF417 (type + ). + + + + + Specifies what degree of error correction to use + + + + + Specifies what degree of error correction to use + + + + + Specifies what character encoding to use where applicable (type {@link String}) + + + + + Explicitly disables ECI segment when generating PDF417 Code + That is against the specification but some + readers have problems if the charset is switched from + CP437 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use different encodings + and the ECI segment is omitted. + + + + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Maximum Codewords (Data + Error). + + + + + Gets the bit count sum. + + The bit count sum. + Module bit count. + + + + Converts an ICollection<int> to an int[] + Carry-over from Java. Will likely remove and replace with the Generic .ToArray() method. + + The int array. + List. + + + + Translate the symbol into a codeword + + the codeword corresponding to the symbol. + encoded symbol to translate to a codeword + + + + The sorted table of all possible symbols. Extracted from the PDF417 + specification. The index of a symbol in this table corresponds to the + index into the codeword table. + + + + + This table contains to codewords for all symbols. + + + + + This implementation can detect and decode PDF417 codes in an image. + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Locates and decodes a PDF417 code in an image. + + a String representing the content encoded by the PDF417 code + if a PDF417 cannot be decoded + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + **Note** this will return the FIRST barcode discovered if there are many. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Locates and decodes Multiple PDF417 codes in an image. + + an array of Strings representing the content encoded by the PDF417 codes + + + + + Locates and decodes multiple barcodes in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcodes encode + + + + + Decode the specified image, with the hints and optionally multiple barcodes. + Based on Owen's Comments in , this method has been modified to continue silently + if a barcode was not decoded where it was detected instead of throwing a new exception object. + + Image. + Hints. + If set to true multiple. + + + + Gets the maximum width of the barcode + + The max width. + P1. + P2. + + + + Gets the minimum width of the barcode + + The minimum width. + P1. + P2. + + + + Gets the maximum width of the codeword. + + The max codeword width. + P. + + + + Gets the minimum width of the codeword. + + The minimum codeword width. + P. + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + PDF 417 result meta data. + Guenther Grau + + + + + The Segment ID represents the segment of the whole file distributed over different symbols. + + + + + Is the same for each related PDF417 symbol + + + + + always null + + + + + true if it is the last segment + + + + + count of segments, -1 if not set + + + + + Filename of the encoded file + + + + + filesize in bytes of the encoded file + returns filesize in bytes, -1 if not set + + + + + 16-bit CRC checksum using CCITT-16 + returns crc checksum, -1 if not set + + + + + unix epock timestamp, elapsed seconds since 1970-01-01 + returns elapsed seconds, -1 if not set + + + + + Jacob Haynes + qwandor@google.com (Andrew Walbran) + + + + + default white space (margin) around the code + + + + + default error correction level + + + + + default aspect ratio + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The height of a row in the barcode + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Takes encoder, accounts for width/height, and retrieves bit matrix + + + + + This takes an array holding the values of the PDF 417 + + a byte array of information with 0 is black, and 1 is white + border around the barcode + BitMatrix of the input + + + + Takes and rotates the it 90 degrees + + + + + This object extends LuminanceSource around an array of YUV data returned from the camera driver, + with the option to crop to a rectangle within the full data. This can be used to exclude + superfluous pixels around the perimeter and speed up decoding. + It works for any pixel format where the Y channel is planar and appears first, including + YCbCr_420_SP and YCbCr_422_SP. + @author dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The yuv data. + Width of the data. + Height of the data. + The left. + The top. + The width. + The height. + if set to true [reverse horiz]. + + + + Initializes a new instance of the class. + + The luminances. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + + + + + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Renders the cropped greyscale bitmap. + + + + + + width of image from {@link #renderThumbnail()} + + + + + height of image from {@link #renderThumbnail()} + + + + + creates a new instance + + + + + + + + Sean Owen + + + {@link BitMatrix} to parse + ReaderException if dimension is not >= 21 and 1 mod 4 + + +

Reads format information from one of its two locations within the QR Code.

+ +
+ {@link FormatInformation} encapsulating the QR Code's format info + + ReaderException if both format information locations cannot be parsed as + the valid encoding of format information + +
+ +

Reads version information from one of its two locations within the QR Code.

+ +
+ {@link Version} encapsulating the QR Code's version + + ReaderException if both version information locations cannot be parsed as + the valid encoding of version information + +
+ +

Reads the bits in the {@link BitMatrix} representing the finder pattern in the + correct order in order to reconstruct the codewords bytes contained within the + QR Code.

+ +
+ bytes encoded within the QR Code + + ReaderException if the exact number of bytes expected is not read +
+ + Revert the mask removal done while reading the code words. The bit matrix should revert to its original state. + + + Prepare the parser for a mirrored operation. + This flag has effect only on the {@link #readFormatInformation()} and the + {@link #readVersion()}. Before proceeding with {@link #readCodewords()} the + {@link #mirror()} method should be called. + + @param mirror Whether to read version and format information mirrored. + + + Mirror the bit matrix in order to attempt a second reading. + + +

Encapsulates a block of data within a QR Code. QR Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

When QR Codes use multiple data blocks, they are actually interleaved. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ +
+ bytes as read directly from the QR Code + + version of the QR Code + + error-correction level of the QR Code + + {@link DataBlock}s containing original bytes, "de-interleaved" from representation in the + QR Code + +
+ +

Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations + of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix, + including areas used for finder patterns, timing patterns, etc. These areas should be unused + after the point they are unmasked anyway.

+ +

Note that the diagram in section 6.8.1 is misleading since it indicates that i is column position + and j is row position. In fact, as the text says, i is row position and j is column position.

+ +
+ Sean Owen +
+ + See ISO 18004:2006 6.8.1 + + +

Implementations of this method reverse the data masking process applied to a QR Code and + make its bits ready to read.

+
+ + representation of QR Code bits + dimension of QR Code, represented by bits, being unmasked +
+ +

QR Codes can encode text as bits in one of several modes, and can use multiple modes + in one QR Code. This class decodes the bits back into text.

+ +

See ISO 18004:2006, 6.4.3 - 6.4.7

+ Sean Owen +
+
+ + + See ISO 18004:2006, 6.4.4 Table 5 + + + + + See specification GBT 18284-2000 + + The bits. + The result. + The count. + + + + +

The main class which implements QR Code decoding -- as opposed to locating and extracting + the QR Code from an image.

+
+ + Sean Owen + +
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a QR Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Decodes a QR Code represented as a {@link BitMatrix}. A 1 or "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+
+ data and error correction codewords + number of codewords that are data bytes + +
+ + +

See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels + defined by the QR code standard.

+
+ Sean Owen +
+ + L = ~7% correction + + + M = ~15% correction + + + Q = ~25% correction + + + H = ~30% correction + + + + Gets the bits. + + + + + Gets the name. + + + + + Ordinals this instance. + + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Fors the bits. + + int containing the two bits encoding a QR Code's error correction level + + representing the encoded error correction level + + + +

Encapsulates a QR Code's format information, including the data mask used and + error correction level.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + +
+ + See ISO 18004:2006, Annex C, Table C.1 + + + Offset i holds the number of 1 bits in the binary representation of i + + + + Decodes the format information. + + format info indicator, with mask still applied + The masked format info2. + + information about the format it specifies, or null + if doesn't seem to match any known pattern + + + + +

See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which + data can be encoded to bits in the QR code standard.

+
+ Sean Owen +
+ + + Gets the name. + + + + + enumeration for encoding modes + + + + + + + + + + numeric encoding + + + + + alpha-numeric encoding + + + + + structured append + + + + + byte mode encoding + + + + + ECI segment + + + + + Kanji mode + + + + + FNC1 char, first position + + + + + FNC1 char, second position + + + + + Hanzi mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See GBT 18284-2000; "Hanzi" is a transliteration of this mode name. + + + + Fors the bits. + + four bits encoding a QR Code data mode + + encoded by these bits + + if bits do not correspond to a known mode + + + version in question + + number of bits used, in this QR Code symbol {@link Version}, to encode the + count of characters that will follow encoded in this {@link Mode} + + + + + Gets the bits. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Meta-data container for QR Code decoding. Instances of this class may be used to convey information back to the + decoding caller. Callers are expected to process this. + + + + + Initializes a new instance of the class. + + if set to true [mirrored]. + + + + true if the QR Code was mirrored. + + + + + Apply the result points' order correction due to mirroring. + + Array of points to apply mirror correction to. + + + + See ISO 18004:2006 Annex D + + Sean Owen + + + See ISO 18004:2006 Annex D. + Element i represents the raw version bits that specify version i + 7 + + + + + Gets the version number. + + + + + Gets the alignment pattern centers. + + + + + Gets the total codewords. + + + + + Gets the dimension for version. + + + + + Gets the EC blocks for level. + + The ec level. + + + +

Deduces version information purely from QR Code dimensions.

+ +
+ dimension in modules + + for a QR Code of that dimension or null +
+ + + Gets the version for number. + + The version number. + + + + See ISO 18004:2006 Annex E + + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + + Gets the EC codewords per block. + + + + + Gets the num blocks. + + + + + Gets the total EC codewords. + + + + + Gets the EC blocks. + + + + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the QR code version's format.

+
+
+ + + Gets the count. + + + + + Gets the data codewords. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + See ISO 18004:2006 6.5.1 Table 9 + + +

Encapsulates an alignment pattern, which are the smaller square patterns found in + all but the simplest QR Codes.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Determines if this alignment pattern "about equals" an alignment pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing an average of the two. + + The i. + The j. + New size of the module. + + + +

This class attempts to find alignment patterns in a QR Code. Alignment patterns look like finder + patterns but are smaller and appear at regular intervals throughout the image.

+ +

At the moment this only looks for the bottom-right alignment pattern.

+ +

This is mostly a simplified copy of {@link FinderPatternFinder}. It is copied, + pasted and stripped down here for maximum performance but does unfortunately duplicate + some code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Creates a finder that will look in a portion of the whole image.

+ +
+ image to search + + left column from which to start searching + + top row from which to start searching + + width of region to search + + height of region to search + + estimated module size so far + + callback function which is called, when a result point is found +
+ +

This method attempts to find the bottom-right alignment pattern in the image. It is a bit messy since + it's pretty performance-critical and so is written to be fast foremost.

+ +
+ if found +
+ + Given a count of black/white/black pixels just seen and an end position, + figures the location of the center of this black/white/black run. + + + + count of black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/1 ratios + used by alignment patterns to be considered a match + + + + +

After a horizontal scan finds a potential alignment pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + alignment pattern to see if the same proportion is detected.

+
+ row where an alignment pattern was detected + center of the section that appears to cross an alignment pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of alignment pattern, or null if not found + +
+ +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will see if this pattern had been + found on a previous horizontal scan. If so, we consider it confirmed and conclude we have + found the alignment pattern.

+ +
+ reading state module counts from horizontal scan + + row where alignment pattern may be found + + end of possible alignment pattern in row + + {@link AlignmentPattern} if we have found the same pattern twice, or null if not + +
+ + +

Encapsulates logic that can detect a QR Code in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + + Gets the image. + + + + + Gets the result point callback. + + + + +

Detects a QR Code in an image.

+
+ + encapsulating results of detecting a QR Code + +
+ + +

Detects a QR Code in an image.

+
+ optional hints to detector + + encapsulating results of detecting a QR Code + +
+ + + Processes the finder pattern info. + + The info. + + + +

Computes the dimension (number of modules on a size) of the QR Code based on the position + of the finder patterns and estimated module size.

+
+
+ + +

Computes an average estimated module size based on estimated derived from the positions + of the three finder patterns.

+
+ detected top-left finder pattern center + detected top-right finder pattern center + detected bottom-left finder pattern center + estimated module size +
+ +

Estimates module size based on two finder patterns -- it uses + {@link #sizeOfBlackWhiteBlackRunBothWays(int, int, int, int)} to figure the + width of each, measuring along the axis between their centers.

+
+
+ + See {@link #sizeOfBlackWhiteBlackRun(int, int, int, int)}; computes the total width of + a finder pattern by looking for a black-white-black run from the center in the direction + of another point (another finder pattern center), and in the opposite direction too. + + + +

This method traces a line from a point in the image, in the direction towards another point. + It begins in a black region, and keeps going until it finds white, then black, then white again. + It reports the distance from the start to this point.

+ +

This is used when figuring out how wide a finder pattern is, when the finder pattern + may be skewed or rotated.

+
+
+ + +

Attempts to locate an alignment pattern in a limited region of the image, which is + guessed to contain it. This method uses {@link AlignmentPattern}.

+
+ estimated module size so far + x coordinate of center of area probably containing alignment pattern + y coordinate of above + number of pixels in all directions to search from the center + + if found, or null otherwise + +
+ + +

Encapsulates a finder pattern, which are the three square patterns found in + the corners of QR Codes. It also encapsulates a count of similar finder patterns, + as a convenience to the finder's bookkeeping.

+
+ Sean Owen +
+ + + Gets the size of the estimated module. + + + The size of the estimated module. + + + +

Determines if this finder pattern "about equals" a finder pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing a weighted average + based on count. + + The i. + The j. + New size of the module. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+
+ Sean Owen +
+ + + 1 pixel/module times 3 modules/center + + + + + support up to version 20 for mobile clients + + + + +

Creates a finder that will search the image for three finder patterns.

+
+ image to search +
+ + + Initializes a new instance of the class. + + The image. + The result point callback. + + + + Gets the image. + + + + + Gets the possible centers. + + + + Given a count of black/white/black/white/black pixels just seen and an end position, + figures the location of the center of this run. + + + + count of black/white/black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/3/1/1 ratios + used by finder patterns to be considered a match + + + + + + count of black/white/black/white/black pixels just read + true if the proportions of the counts is close enough to the 1/1/3/1/1 ratios + by finder patterns to be considered a match + + + + After a vertical and horizontal scan finds a potential finder pattern, this method + "cross-cross-cross-checks" by scanning down diagonally through the center of the possible + finder pattern to see if the same proportion is detected. + @param maxCount maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + @param originalStateCountTotal The original state count total. + + row where a finder pattern was detected + center of the section that appears to cross a finder pattern + true if proportions are withing expected limits + + + +

After a horizontal scan finds a potential finder pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + finder pattern to see if the same proportion is detected.

+
+ row where a finder pattern was detected + center of the section that appears to cross a finder pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of finder pattern, or null if not found + +
+ +

Like {@link #crossCheckVertical(int, int, int, int)}, and in fact is basically identical, + except it reads horizontally instead of vertically. This is used to cross-cross + check a vertical cross check and locate the real center of the alignment pattern.

+
+
+ + + @see #handlePossibleCenter(int[], int, int) + + reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + ignored + true if a finder pattern candidate was found this time + + + +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will, ah, cross-cross-check + with another horizontal scan. This is needed primarily to locate the real horizontal + center of the pattern in cases of extreme skew. + And then we cross-cross-cross check with another diagonal scan.

+ If that succeeds the finder pattern location is added to a list that tracks + the number of times each location has been nearly-matched as a finder pattern. + Each additional find is more evidence that the location is in fact a finder + pattern center +
+ reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + + true if a finder pattern candidate was found this time + +
+ + number of rows we could safely skip during scanning, based on the first + two finder patterns that have been located. In some cases their position will + allow us to infer that the third pattern must lie below a certain point farther + down in the image. + + + + true iff we have found at least 3 finder patterns that have been detected + at least {@link #CENTER_QUORUM} times each, and, the estimated module size of the + candidates is "pretty similar" + + + + the 3 best {@link FinderPattern}s from our list of candidates. The "best" are + those that have been detected at least {@link #CENTER_QUORUM} times, and whose module + size differs from the average among those patterns the least + + + + + Orders by furthest from average + + + +

Orders by {@link FinderPattern#getCount()}, descending.

+
+ + +

Encapsulates information about finder patterns in an image, including the location of + the three finder patterns, and their estimated module size.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The pattern centers. + + + + Gets the bottom left. + + + + + Gets the top left. + + + + + Gets the top right. + + + + + JAVAPORT: The original code was a 2D array of ints, but since it only ever gets assigned + 0, 1 and 2 I'm going to use less memory and go with bytes. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Gets the height. + + + + + Gets the width. + + + + + Gets or sets the with the specified x. + + + + + an internal representation as bytes, in row-major order. array[y][x] represents point (x,y) + + + + + Sets the specified x. + + The x. + The y. + The value. + + + + Sets the specified x. + + The x. + The y. + if set to true [value]. + + + + Clears the specified value. + + The value. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + Encode "bytes" with the error correction level "ecLevel". The encoding mode will be chosen + internally by chooseMode(). On success, store the result in "qrCode". + We recommend you to use QRCode.EC_LEVEL_L (the lowest level) for + "getECLevel" since our primary use is to show QR code on desktop screens. We don't need very + strong error correction for this purpose. + Note that there is no way to encode bytes in MODE_KANJI. We might want to add EncodeWithMode() + with which clients can specify the encoding mode. For now, we don't need the functionality. + + text to encode + error correction level to use + representing the encoded QR code + + + + Encodes the specified content. + + The content. + The ec level. + The hints. + + + + + Decides the smallest version of QR code that will contain all of the provided data. + + if the data cannot fit in any version + + + + Gets the alphanumeric code. + + The code. + the code point of the table used in alphanumeric mode or + -1 if there is no corresponding code in the table. + + + + Chooses the mode. + + The content. + + + + + Choose the best mode by examining the content. Note that 'encoding' is used as a hint; + if it is Shift_JIS, and the input is only double-byte Kanji, then we return {@link Mode#KANJI}. + + The content. + The encoding. + + + + + true if the number of input bits will fit in a code with the specified version and error correction level. + + + + Terminate bits as described in 8.4.8 and 8.4.9 of JISX0510:2004 (p.24). + + The num data bytes. + The bits. + + + + Get number of data bytes and number of error correction bytes for block id "blockID". Store + the result in "numDataBytesInBlock", and "numECBytesInBlock". See table 12 in 8.5.1 of + JISX0510:2004 (p.30) + + The num total bytes. + The num data bytes. + The num RS blocks. + The block ID. + The num data bytes in block. + The num EC bytes in block. + + + + Interleave "bits" with corresponding error correction bytes. On success, store the result in + "result". The interleave rule is complicated. See 8.6 of JISX0510:2004 (p.37) for details. + + The bits. + The num total bytes. + The num data bytes. + The num RS blocks. + + + + + Append mode info. On success, store the result in "bits". + + The mode. + The bits. + + + + Append length info. On success, store the result in "bits". + + The num letters. + The version. + The mode. + The bits. + + + + Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits". + + The content. + The mode. + The bits. + The encoding. + + + + + + Satoru Takabayashi + Daniel Switkin + Sean Owen + + + + Apply mask penalty rule 1 and return the penalty. Find repetitive cells with the same color and + give penalty to them. Example: 00000 or 11111. + + The matrix. + + + + + Apply mask penalty rule 2 and return the penalty. Find 2x2 blocks with the same color and give + penalty to them. This is actually equivalent to the spec's rule, which is to find MxN blocks and give a + penalty proportional to (M-1)x(N-1), because this is the number of 2x2 blocks inside such a block. + + The matrix. + + + + + Apply mask penalty rule 3 and return the penalty. Find consecutive cells of 00001011101 or + 10111010000, and give penalty to them. If we find patterns like 000010111010000, we give + penalties twice (i.e. 40 * 2). + + The matrix. + + + + + Apply mask penalty rule 4 and return the penalty. Calculate the ratio of dark cells and give + penalty if the ratio is far from 50%. It gives 10 penalty for 5% distance. + + The matrix. + + + + + Return the mask bit for "getMaskPattern" at "x" and "y". See 8.8 of JISX0510:2004 for mask + pattern conditions. + + The mask pattern. + The x. + The y. + + + + + Helper function for applyMaskPenaltyRule1. We need this for doing this calculation in both + vertical and horizontal orders respectively. + + The matrix. + if set to true [is horizontal]. + + + + + + + + satorux@google.com (Satoru Takabayashi) - creator + + + + + Set all cells to 2. 2 means that the cell is empty (not set yet). + + JAVAPORT: We shouldn't need to do this at all. The code should be rewritten to begin encoding + with the ByteMatrix initialized all to zero. + + The matrix. + + + + Build 2D matrix of QR Code from "dataBits" with "ecLevel", "version" and "getMaskPattern". On + success, store the result in "matrix" and return true. + + The data bits. + The ec level. + The version. + The mask pattern. + The matrix. + + + + Embed basic patterns. On success, modify the matrix and return true. + The basic patterns are: + - Position detection patterns + - Timing patterns + - Dark dot at the left bottom corner + - Position adjustment patterns, if need be + + The version. + The matrix. + + + + Embed type information. On success, modify the matrix. + + The ec level. + The mask pattern. + The matrix. + + + + Embed version information if need be. On success, modify the matrix and return true. + See 8.10 of JISX0510:2004 (p.47) for how to embed version information. + + The version. + The matrix. + + + + Embed "dataBits" using "getMaskPattern". On success, modify the matrix and return true. + For debugging purposes, it skips masking process if "getMaskPattern" is -1. + See 8.7 of JISX0510:2004 (p.38) for how to embed data bits. + + The data bits. + The mask pattern. + The matrix. + + + + Return the position of the most significant bit set (to one) in the "value". The most + significant bit is position 32. If there is no bit set, return 0. Examples: + - findMSBSet(0) => 0 + - findMSBSet(1) => 1 + - findMSBSet(255) => 8 + + The value_ renamed. + + + + + Calculate BCH (Bose-Chaudhuri-Hocquenghem) code for "value" using polynomial "poly". The BCH + code is used for encoding type information and version information. + Example: Calculation of version information of 7. + f(x) is created from 7. + - 7 = 000111 in 6 bits + - f(x) = x^2 + x^2 + x^1 + g(x) is given by the standard (p. 67) + - g(x) = x^12 + x^11 + x^10 + x^9 + x^8 + x^5 + x^2 + 1 + Multiply f(x) by x^(18 - 6) + - f'(x) = f(x) * x^(18 - 6) + - f'(x) = x^14 + x^13 + x^12 + Calculate the remainder of f'(x) / g(x) + x^2 + __________________________________________________ + g(x) )x^14 + x^13 + x^12 + x^14 + x^13 + x^12 + x^11 + x^10 + x^7 + x^4 + x^2 + -------------------------------------------------- + x^11 + x^10 + x^7 + x^4 + x^2 + + The remainder is x^11 + x^10 + x^7 + x^4 + x^2 + Encode it in binary: 110010010100 + The return value is 0xc94 (1100 1001 0100) + + Since all coefficients in the polynomials are 1 or 0, we can do the calculation by bit + operations. We don't care if coefficients are positive or negative. + + The value. + The poly. + + + + + Make bit vector of type information. On success, store the result in "bits" and return true. + Encode error correction level and mask pattern. See 8.9 of + JISX0510:2004 (p.45) for details. + + The ec level. + The mask pattern. + The bits. + + + + Make bit vector of version information. On success, store the result in "bits" and return true. + See 8.10 of JISX0510:2004 (p.45) for details. + + The version. + The bits. + + + + Check if "value" is empty. + + The value. + + true if the specified value is empty; otherwise, false. + + + + + Embed the lonely dark dot at left bottom corner. JISX0510:2004 (p.46) + + The matrix. + + + + + + The x start. + The y start. + The matrix. + + + + Embed position detection patterns and surrounding vertical/horizontal separators. + + The matrix. + + + + Embed position adjustment patterns if need be. + + The version. + The matrix. + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + + + + + + Initializes a new instance of the class. + + + + + Gets or sets the mode. + + + The mode. + + + + + Gets or sets the EC level. + + + The EC level. + + + + + Gets or sets the version. + + + The version. + + + + + Gets or sets the mask pattern. + + + The mask pattern. + + + + + Gets or sets the matrix. + + + The matrix. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Check if "mask_pattern" is valid. + + The mask pattern. + + true if [is valid mask pattern] [the specified mask pattern]; otherwise, false. + + + + + The class holds the available options for the QrCodeWriter + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + . + + + + + Specifies what character encoding to use where applicable (type ) + + + + + Explicitly disables ECI segment when generating QR Code + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + + + + + Specifies the exact version of QR code to be encoded. An integer, range 1 to 40. If the data specified + cannot fit within the required version, a WriterException will be thrown. + + + + + This implementation can detect and decode QR Codes in an image. + Sean Owen + + + + + Gets the decoder. + + + + + + Locates and decodes a QR code in an image. + + a String representing the content encoded by the QR code + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a QR Code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Implementations of this interface can decode an image of a barcode in some format into + the String it encodes. For example, can + decode a QR code. The decoder may optionally receive hints from the caller which may help + it decode more quickly or accurately. + + See , which attempts to determine what barcode + format is present within the image as well, and then decodes it accordingly. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + String which the barcode encodes + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + The general exception class throw when something goes wrong during decoding of a barcode. + This includes, but is not limited to, failing checksums / error correction algorithms, being + unable to locate finder timing patterns, and so on. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class. + + The inner exception. + + + + Initializes a new instance of the class. + + The inner exception. + + + + + Interface for a class to convert a BitMatrix to an output image format + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + The options. + + + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + + + the generated code as byte array of BGRA pixels + + + + + the width of the image + + + + + the height of the image + + + + + Renders a to an byte array with pixel data (4 byte per pixel, BGRA) + + + + + represents a color defined as ARGB byte data + + + + + the color black + + + + + the color white + + + + + value of the alpha channel + + + + + value of the red channel + + + + + value of the green channel + + + + + value of the blue channel + + + + + Initializes a new instance of the struct. + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Renders a to a byte array with ARGB 32bit data + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Renders a barcode into a Svg image + + + + + represents a color value + + + + + color black + + + + + color white + + + + + alpha channel + + + + + red channel + + + + + green channel + + + + + blur channel + + + + + initializing constructor + + + + + initializing constructor + + + + + Gets or sets the foreground color. + + The foreground color. + + + + Gets or sets the background color. + + The background color. + + + + Gets or sets the font family name + + The font family name. + + + + Gets or sets the font size in pixel + + The font size in pixel. + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Represents a barcode as a Svg image + + + + + Gets or sets the content. + + + The content. + + + + + The original height of the bitmatrix for the barcode + + + + + The original width of the bitmatrix for the barcode + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The content. + + + + Gives the XML representation of the SVG image + + + + + Encapsulates the result of decoding a barcode within an image. + + + + raw text encoded by the barcode, if applicable, otherwise null + + + raw bytes encoded by the barcode, if applicable, otherwise null + + + + points related to the barcode in the image. These are typically points + identifying finder patterns or the corners of the barcode. The exact meaning is + specific to the type of barcode that was decoded. + + + + {@link BarcodeFormat} representing the format of the barcode that was decoded + + + + {@link Hashtable} mapping {@link ResultMetadataType} keys to values. May be + null. This contains optional metadata about what was detected about the barcode, + like orientation. + + + + + Gets the timestamp. + + + + + how many bits of are valid; typically 8 times its length + + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + The timestamp. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + The timestamp. + + + + Adds one metadata to the result + + The type. + The value. + + + + Adds a list of metadata to the result + + The metadata. + + + + Adds the result points. + + The new points. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Represents some type of metadata about the result of the decoding that the decoder + wishes to communicate back to the caller. + + Sean Owen + + + + Unspecified, application-specific metadata. Maps to an unspecified {@link Object}. + + + + + Denotes the likely approximate orientation of the barcode in the image. This value + is given as degrees rotated clockwise from the normal, upright orientation. + For example a 1D barcode which was found by reading top-to-bottom would be + said to have orientation "90". This key maps to an {@link Integer} whose + value is in the range [0,360). + + + + +

2D barcode formats typically encode text, but allow for a sort of 'byte mode' + which is sometimes used to encode binary data. While {@link Result} makes available + the complete raw bytes in the barcode for these formats, it does not offer the bytes + from the byte segments alone.

+

This maps to a {@link java.util.List} of byte arrays corresponding to the + raw bytes in the byte segments in the barcode, in order.

+
+
+ + + Error correction level used, if applicable. The value type depends on the + format, but is typically a String. + + + + + For some periodicals, indicates the issue number as an {@link Integer}. + + + + + For some products, indicates the suggested retail price in the barcode as a + formatted {@link String}. + + + + + For some products, the possible country of manufacture as a {@link String} denoting the + ISO country code. Some map to multiple possible countries, like "US/CA". + + + + + For some products, the extension text + + + + + If the code format supports structured append and + the current scanned code is part of one then the + sequence number is given with it. + + + + + If the code format supports structured append and + the current scanned code is part of one then the + parity is given with it. + + + + + PDF417-specific metadata + + + + + Aztec-specific metadata + + + + + Encapsulates a point of interest in an image containing a barcode. Typically, this + would be the location of a finder pattern or the corner of the barcode, for example. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The x. + The y. + + + + Gets the X. + + + + + Gets the Y. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC and + BC is less than AC and the angle between BC and BA is less than 180 degrees. + + array of three to order + + + + calculates the distance between two points + + first pattern + second pattern + + distance between two points + + + + + Returns the z component of the cross product between vectors BC and BA. + + + + Callback which is invoked when a possible result point (significant + point in the barcode image such as a corner) is found. + + + + + + + + Luminance source class which support different formats of images. + + + + + enumeration of supported bitmap format which the RGBLuminanceSource can process + + + + + format of the byte[] isn't known. RGBLuminanceSource tries to determine the best possible value + + + + + grayscale array, the byte array is a luminance array with 1 byte per pixel + + + + + grayscale array, the byte array is a luminance array with 2 bytes per pixel + + + + + 3 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels alpha, red, green and blue + + + + + 3 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green, red and alpha + + + + + 2 bytes per pixel, 5 bit red, 6 bits green and 5 bits blue + + + + + 4 bytes per pixel with the channels red, green, blue and alpha + + + + + 4 bytes for two pixels, UYVY formatted + + + + + 4 bytes for two pixels, YUYV formatted + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 1 byte per pixel (Gray8). + That means the whole array consists of the luminance values (grayscale). + + The luminance array. + The width. + The height. + if set to true [is8 bit]. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + The bitmap format. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + calculates the luminance values for the given byte array and bitmap format + + + + + + + Attribute is only for source code compatibility issues + + + + + Attribute is only for compatibility issues + + + + + Contains conversion support elements such as classes, interfaces and static methods. + + + + + Copies an array of chars obtained from a String into a specified array of chars + + The String to get the chars from + Position of the String to start getting the chars + Position of the String to end getting the chars + Array to return the chars + Position of the destination array of chars to start storing the chars + An array of chars + + + + Sets the capacity for the specified List + + The List which capacity will be set + The new capacity value + + + + Converts a string-Collection to an array + + The strings. + + + + + Joins all elements to one string. + + + The separator. + The values. + + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The value. + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The start index. + The end index. + The value. + + + + + + + + + + + + + + + + + + Savely gets the value of a decoding hint + if hints is null the default is returned + + + The hints. + Type of the hint. + The @default. + + + + The base class for all objects which encode/generate a barcode image. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + A base class which covers the range of exceptions which may occur when encoding a barcode using + the Writer framework. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner exc. + + + + Integer inefficiently represented internally using base-10 digits, in order to allow a + visual representation as a base-10 string. Only for internal use. + + + + + 10 numeration base for string representation, very inefficient for computations. + + + + + Maximum size for numbers is up to 10240 binary digits or approximately (safe to use) 3000 decimal digits. + The maximum size is, in fact, double the previously specified amount, in order to accommodate operations' + overflow. + + + + Integer constants + + + + The array of digits of the number. + + + + + The actual number of digits of the number. + + + + + The number sign. + + + + + Sets the number sign. + + + + + Default constructor, intializing the Base10BigInteger with zero. + + + + + Constructor creating a new Base10BigInteger as a conversion of a regular base-10 long. + + The base-10 long to be converted + + + + Constructor creating a new Base10BigInteger as a copy of an existing Base10BigInteger. + + The Base10BigInteger to be copied + + + + Determines whether the specified Base10BigInteger is equal to the current Base10BigInteger. + + The Base10BigInteger to compare with the current Base10BigInteger + True if the specified Base10BigInteger is equal to the current Base10BigInteger, + false otherwise + + + + Determines whether the specified System.Object is equal to the current Base10BigInteger. + + The System.Object to compare with the current Base10BigInteger + True if the specified System.Object is equal to the current Base10BigInteger, + false otherwise + + + + Serves as a hash function for the Base10BigInteger type. + + A hash code for the current Base10BigInteger + + + + String representation of the current Base10BigInteger, converted to its base-10 representation. + + The string representation of the current Base10BigInteger + + + + Base10BigInteger inverse with respect to addition. + + The Base10BigInteger whose opposite is to be computed + The Base10BigInteger inverse with respect to addition + + + + Greater test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a > b, false otherwise + + + + Greater or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a >= b, false otherwise + + + + Smaller test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a < b, false otherwise + + + + Smaller or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a <= b, false otherwise + + + + Computes the absolute value of a Base10BigInteger. + + The Base10BigInteger whose absolute value is to be computed + The absolute value of the given BigInteger + + + + Addition operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the addition + + + + Subtraction operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the subtraction + + + + Multiplication operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the multiplication + + + + Implicit conversion operator from long to Base10BigInteger. + + The long to be converted to a Base10BigInteger + The Base10BigInteger converted from the given long + + + + Equality test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a == b, false otherwise + + + + Inequality test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a != b, false otherwise + + + + Greater test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a > b, false otherwise + + + + Smaller test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a < b, false otherwise + + + + Greater or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a >= b, false otherwise + + + + Smaller or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a <= b, false otherwise + + + + Base10BigInteger inverse with respect to addition. + + The Base10BigInteger whose opposite is to be computed + The Base10BigInteger inverse with respect to addition + + + + Addition operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the addition + + + + Subtraction operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the subtraction + + + + Multiplication operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the multiplication + + + + Incremetation by one operation of a Base10BigInteger. + + The Base10BigInteger to be incremented by one + The Base10BigInteger result of incrementing by one + + + + Decremetation by one operation of a Base10BigInteger. + + The Base10BigInteger to be decremented by one + The Base10BigInteger result of decrementing by one + + + + Adds two BigNumbers a and b, where a >= b, a, b non-negative. + + + + + Subtracts the Base10BigInteger b from the Base10BigInteger a, where a >= b, a, b non-negative. + + + + + Multiplies two Base10BigIntegers. + + + + + .NET 2.0 class for handling of very large integers, up to 10240 binary digits or + approximately (safe to use) 3000 decimal digits. + + + + + 2^16 numeration base for internal computations, in order to benefit the most from the + 32 bit (or 64 bit) integer processor registers. + + + + + Maximum size for numbers is up to 10240 binary digits or approximately (safe to use) 3000 decimal digits. + The maximum size is, in fact, double the previously specified amount, in order to accommodate operations's + overflow. + + + + + Ratio for the convertion of a BigInteger's size to a binary digits size. + + + + Integer constants + + + + The array of digits of the number. + + + + + The actual number of digits of the number. + + + + + The number sign. + + + + + Default constructor, intializing the BigInteger with zero. + + + + + Constructor creating a new BigInteger as a conversion of a regular base-10 long. + + The base-10 long to be converted + + + + Constructor creating a new BigInteger as a copy of an existing BigInteger. + + The BigInteger to be copied + + + + Constructor creating a BigInteger instance out of a base-10 formatted string. + + The base-10 formatted string. + Invalid numeric string exception + + + + Constructor creating a positive BigInteger by extracting it's digits from a given byte array. + + The byte array + The byte array's content exceeds the maximum size of a BigInteger + exception + + + + Determines whether the specified BigInteger is equal to the current BigInteger. + + The BigInteger to compare with the current BigInteger + True if the specified BigInteger is equal to the current BigInteger, + false otherwise + + + + Determines whether the specified System.Object is equal to the current BigInteger. + + The System.Object to compare with the current BigInteger + True if the specified System.Object is equal to the current BigInteger, + false otherwise + + + + Serves as a hash function for the BigInteger type. + + A hash code for the current BigInteger + + + + String representation of the current BigInteger, converted to its base-10 representation. + + The string representation of the current BigInteger + + + + Parses the number given by a string + + the number as a string + + + + + Compares this instance to a specified BigInteger. + + The BigInteger to compare this instance with + -1 if the current instance is smaller than the given BigInteger, + 0 if the two are equal, 1 otherwise + + + + Compares this instance to a specified object. + + The object to compare this instance with + -1 if the current instance is smaller than the given object, + 0 if the two are equal, 1 otherwise + obj is not a BigInteger exception + + + + Returns a BigInteger's size in binary digits. + + The BigInteger whose size in binary digits is to be determined + The BigInteger's size in binary digits + + + + BigInteger inverse with respect to addition. + + The BigInteger whose opposite is to be computed + The BigInteger inverse with respect to addition + + + + Greater test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a > b, false otherwise + + + + Greater or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a >= b, false otherwise + + + + Smaller test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a < b, false otherwise + + + + Smaller or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a <= b, false otherwise + + + + Computes the absolute value of a BigInteger. + + The BigInteger whose absolute value is to be computed + The absolute value of the given BigInteger + + + + Addition operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the addition + + + + Subtraction operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the subtraction + + + + Multiplication operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the multiplication + + + + Division operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the division + Cannot divide by zero exception + + + + Modulo operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the modulo + Cannot divide by zero exception + + + + Returns the power of a BigInteger base to a non-negative exponent by using the + fast exponentiation algorithm (right to left binary exponentiation). + + The BigInteger base + The non-negative exponent + The power of the BigInteger base to the non-negative exponent + Cannot raise a BigInteger to a negative power exception. + + + + Integer square root of the given BigInteger using Newton's numeric method. + + The BigInteger whose integer square root is to be computed + The integer square root of the given BigInteger + Cannot compute the integer square root of a negative number exception + + + + Euclidean algorithm for computing the greatest common divisor of two non-negative BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The greatest common divisor of the two given BigIntegers + Cannot compute the Gcd of negative BigIntegers exception + + + + Extended Euclidian Gcd algorithm, returning the greatest common divisor of two non-negative BigIntegers, + while also providing u and v, where: a*u + b*v = gcd(a,b). + + The 1st BigInteger + The 2nd BigInteger + Output BigInteger parameter, where a*u + b*v = gcd(a,b) + Output BigInteger parameter, where a*u + b*v = gcd(a,b) + The greatest common divisor of the two given BigIntegers + Cannot compute the Gcd of negative BigIntegers exception + + + + Computes the modular inverse of a given BigInteger. + + The non-zero BigInteger whose inverse is to be computed + The BigInteger modulus, which must be greater than or equal to 2 + The BigInteger equal to a^(-1) mod n + Invalid number or modulus exception + + + + Returns the power of a BigInteger to a non-negative exponent modulo n, by using the + fast exponentiation algorithm (right to left binary exponentiation) and modulo optimizations. + + The BigInteger base + The non-negative exponent + The modulus, which must be greater than or equal to 2 + The power of the BigInteger to the non-negative exponent + Invalid exponent or modulus exception + + + + Implicit conversion operator from long to BigInteger. + + The long to be converted to a BigInteger + The BigInteger converted from the given long + + + + Implicit conversion operator from int to BigInteger. + + The int to be converted to a BigInteger + The BigInteger converted from the given int + + + + Equality test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a == b, false otherwise + + + + Inequality test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a != b, false otherwise + + + + Greater test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a > b, false otherwise + + + + Smaller test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a < b, false otherwise + + + + Greater or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a >= b, false otherwise + + + + Smaller or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a <= b, false otherwise + + + + BigInteger inverse with respect to addition. + + The BigInteger whose opposite is to be computed + The BigInteger inverse with respect to addition + + + + Addition operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the addition + + + + Subtraction operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the subtraction + + + + Multiplication operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the multiplication + + + + Division operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the division + Cannot divide by zero exception + + + + Modulo operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the modulo + Cannot divide by zero exception + + + + Incremetation by one operation of a BigInteger. + + The BigInteger to be incremented by one + The BigInteger result of incrementing by one + + + + Decremetation by one operation of a BigInteger. + + The BigInteger to be decremented by one + The BigInteger result of decrementing by one + + + + Adds two BigNumbers a and b, where a >= b, a, b non-negative. + + + + + Subtracts the BigInteger b from the BigInteger a, where a >= b, a, b non-negative. + + + + + Multiplies two BigIntegers. + + + + + Divides a BigInteger by a one-digit int. + + + + + Divides a BigInteger by another BigInteger. + + + + + DivideByBigNumber auxiliary method. + + + + + DivideByBigNumber auxilary method. + + + + + DivideByBigNumber auxilary method. + + + + + BigInteger-related exception class. + + + + + BigIntegerException constructor. + + The exception message + The inner exception + + + + The number's sign, where Positive also stands for the number zero. + + + + + Attribute is only for compatibility issues + + +
+
diff --git a/packages/ZXing.Net.0.16.4/lib/portable-win+net40+sl4+sl5+wp7+wp71+wp8/zxing.portable.dll b/packages/ZXing.Net.0.16.4/lib/portable-win+net40+sl4+sl5+wp7+wp71+wp8/zxing.portable.dll new file mode 100644 index 0000000..cac3a99 Binary files /dev/null and b/packages/ZXing.Net.0.16.4/lib/portable-win+net40+sl4+sl5+wp7+wp71+wp8/zxing.portable.dll differ diff --git a/packages/ZXing.Net.0.16.4/lib/sl3-wp/zxing.wp7.0.XML b/packages/ZXing.Net.0.16.4/lib/sl3-wp/zxing.wp7.0.XML new file mode 100644 index 0000000..277005c --- /dev/null +++ b/packages/ZXing.Net.0.16.4/lib/sl3-wp/zxing.wp7.0.XML @@ -0,0 +1,11718 @@ + + + + zxing.wp7.0 + + + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + + + converts the pixel data to a bitmap object + + + + + + the generated code as byte array of BGRA pixels + + + + + the width of the image + + + + + the height of the image + + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + + + + + + Initializes a new instance of the class. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Check if "mask_pattern" is valid. + + The mask pattern. + + true if [is valid mask pattern] [the specified mask pattern]; otherwise, false. + + + + + Gets or sets the mode. + + + The mode. + + + + + Gets or sets the EC level. + + + The EC level. + + + + + Gets or sets the version. + + + The version. + + + + + Gets or sets the mask pattern. + + + The mask pattern. + + + + + Gets or sets the matrix. + + + The matrix. + + + + + Holds all of the information for a barcode in a format where it can be easily accessible + + Jacob Haynes + + + + + the height of the matrix (Rows) + the width of the matrix (Cols) + + + + +

Encapsulates logic that can detect a PDF417 Code in an image, even if the + PDF417 Code is rotated or skewed, or partially obscured.

+ + SITA Lab (kevin.osullivan@sita.aero) + dswitkin@google.com (Daniel Switkin) + Guenther Grau +
+
+ + + if we set the value too low, then we don't detect the correct height of the bar if the start patterns are damaged. + if we set the value too high, then we might detect the start pattern from a neighbor barcode. + + + + + A PDF471 barcode should have at least 3 rows, with each row being >= 3 times the module width. Therefore it should be at least + 9 pixels tall. To be conservative, we use about half the size to ensure we don't miss it. + + + + + B S B S B S B S Bar/Space pattern + 11111111 0 1 0 1 0 1 000. + + + + + 1111111 0 1 000 1 0 1 00 1 + + + + +

Detects a PDF417 Code in an image. Only checks 0 and 180 degree rotations.

+
+ barcode image to decode + optional hints to detector + if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned + + encapsulating results of detecting a PDF417 code + +
+ + + Detects PDF417 codes in an image. Only checks 0 degree rotation (so rotate the matrix and check again outside of this method) + + multiple if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned. + bit matrix to detect barcodes in. + List of ResultPoint arrays containing the coordinates of found barcodes + + + + Locate the vertices and the codewords area of a black blob using the Start and Stop patterns as locators. + + Matrix. + Start row. + Start column. + an array containing the vertices: + vertices[0] x, y top left barcode + vertices[1] x, y bottom left barcode + vertices[2] x, y top right barcode + vertices[3] x, y bottom right barcode + vertices[4] x, y top left codeword area + vertices[5] x, y bottom left codeword area + vertices[6] x, y top right codeword area + vertices[7] x, y bottom right codeword area + + + + + Copies the temp data to the final result + + Result. + Temp result. + Destination indexes. + + + + Finds the rows with the given pattern. + + The rows with pattern. + Matrix. + Height. + Width. + Start row. + Start column. + Pattern. + + + + Finds the guard pattern. Uses System.Linq.Enumerable.Repeat to fill in counters. This might be a performance issue? + + start/end horizontal offset of guard pattern, as an array of two ints. + matrix row of black/white values to search + column x position to start search. + row y position to start search. + width the number of pixels to search on this row. + If set to true search the white patterns first. + pattern of counts of number of black and white pixels that are being searched for as a pattern. + counters array of counters, as long as pattern, to re-use . + + + + Determines how closely a set of observed counts of runs of black/white. + values matches a given target pattern. This is reported as the ratio of + the total variance from the expected pattern proportions across all + pattern elements, to the length of the pattern. + + + ratio of total variance between counters and pattern compared to + total pattern size, where the ratio has been multiplied by 256. + So, 0 means no variance (perfect match); 256 means the total + variance between counters and patterns equals the pattern length, + higher values mean even more variance + + observed counters. + expected pattern. + The most any counter can differ before we give up. + + + + Encapsulates an RSS barcode finder pattern, including its start/end position and row. + + + + + Initializes a new instance of the class. + + The value. + The start end. + The start. + The end. + The row number. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Gets the value. + + + + + Gets the start end. + + + + + Gets the result points. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Gets the information. + + + + + + Parses the information. + + + + + + Creates the decoder. + + The information. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + This object renders a ITF code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + +

Encapsulates functionality and implementation that is common to one-dimensional barcodes.

+ dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + The base class for all objects which encode/generate a barcode image. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + a byte array of horizontal pixels (0 = white, 1 = black) + + + + Appends the given pattern to the target array starting at pos. + + encode black/white pattern into this array + position to start encoding at in target + lengths of black/white runs to encode + starting color - false for white, true for black + the number of elements added to target. + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + + barcode contents to encode + a bool[] of horizontal pixels (false = white, true = black) + + + + Calculates the checksum digit modulo10. + + The contents. + + + + + Gets the default margin. + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code bool[]} of horizontal pixels (false = white, true = black) + + + + + + +

Implements decoding of the ITF format, or Interleaved Two of Five.

+ +

This Reader will scan ITF barcodes of certain lengths only. + At the moment it reads length 6, 8, 10, 12, 14, 16, 18, 20, 24, 44 and 48 as these have appeared "in the wild". Not all + lengths are scanned, especially shorter ones, to avoid false positives. This in turn is due to a lack of + required checksum function.

+ +

The checksum is optional and is not applied by this Reader. The consumer of the decoded + value will have to apply a checksum if required.

+ +

http://en.wikipedia.org/wiki/Interleaved_2_of_5 + is a great reference for Interleaved 2 of 5 information.

+ + kevin.osullivan@sita.aero, SITA Lab. +
+
+ + + Encapsulates functionality and implementation that is common to all families + of one-dimensional barcodes. + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Implementations of this interface can decode an image of a barcode in some format into + the String it encodes. For example, can + decode a QR code. The decoder may optionally receive hints from the caller which may help + it decode more quickly or accurately. + + See , which attempts to determine what barcode + format is present within the image as well, and then decodes it accordingly. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + String which the barcode encodes + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + + + + + + + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + Note that we don't try rotation without the try harder flag, even if rotation was supported. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + We're going to examine rows from the middle outward, searching alternately above and below the + middle, and farther out each time. rowStep is the number of rows between each successive + attempt above and below the middle. So we'd scan row middle, then middle - rowStep, then + middle + rowStep, then middle - (2 * rowStep), etc. + rowStep is bigger as the image is taller, but is always at least 1. We've somewhat arbitrarily + decided that moving up and down by about 1/16 of the image is pretty good; we try more of the + image if "trying harder". + + The image to decode + Any hints that were requested + The contents of the decoded barcode + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the pattern in reverse. + + The row. + The start. + The counters. + + + + + Determines how closely a set of observed counts of runs of black/white values matches a given + target pattern. This is reported as the ratio of the total variance from the expected pattern + proportions across all pattern elements, to the length of the pattern. + + observed counters + expected pattern + The most any counter can differ before we give up + ratio of total variance between counters and pattern compared to total pattern size, + where the ratio has been multiplied by 256. So, 0 means no variance (perfect match); 256 means + the total variance between counters and patterns equals the pattern length, higher values mean + even more variance + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + Valid ITF lengths. Anything longer than the largest value is also allowed. + + + + + Start/end guard pattern. + + Note: The end pattern is reversed because the row is reversed before + searching for the END_PATTERN + + + + + Patterns of Wide / Narrow lines to indicate each digit + + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + + row of black/white values to search + offset of start pattern + The payload end. + to append decoded chars to + + false, if decoding could not complete successfully + + + + + Identify where the start of the middle / payload section starts. + + row of black/white values to search + Array, containing index of start of 'start block' and end of 'start block' + + + + The start & end patterns must be pre/post fixed by a quiet zone. This + zone must be at least 10 times the width of a narrow line. Scan back until + we either get to the start of the barcode or match the necessary number of + quiet zone pixels. + + Note: Its assumed the row is reversed when using this method to find + quiet zone after the end pattern. + + ref: http://www.barcode-1.net/i25code.html + + bit array representing the scanned barcode. + index into row of the start or end pattern. + false, if the quiet zone cannot be found + + + + Skip all whitespace until we get to the first black line. + + row of black/white values to search + index of the first black line or -1 if no black lines are found in the row. + + + + Identify where the end of the middle / payload section ends. + + row of black/white values to search + Array, containing index of start of 'end block' and end of 'end + block' or null, if nothing found + + + + + row of black/white values to search + position to start search + pattern of counts of number of black and white pixels that are being searched for as a pattern + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a sequence of ITF black/white lines into single + digit. + + the counts of runs of observed black/white/black/... values + The decoded digit + + false, if digit cannot be decoded + + + + + mike32767 + Manuel Kasten + + + + + to parse + + + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode the barcode inside a bitmap object + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Common string-related functions. + + Sean Owen + Alex Dupre + + + + SJIS + + + + + GB2312 + + + + + Guesses the encoding. + + bytes encoding a string, whose encoding should be guessed + decode hints if applicable + name of guessed encoding; at the moment will only guess one of: + {@link #SHIFT_JIS}, {@link #UTF8}, {@link #ISO88591}, or the platform + default encoding if none of these can possibly be correct + + + Implementations of this class can, given locations of finder patterns for a QR code in an + image, sample the right points in the image to reconstruct the QR code, accounting for + perspective distortion. It is abstracted since it is relatively expensive and should be allowed + to take advantage of platform-specific optimized implementations, like Sun's Java Advanced + Imaging library, but which may not be available in other environments such as J2ME, and vice + versa. + + The implementation used can be controlled by calling {@link #setGridSampler(GridSampler)} + with an instance of a class which implements this interface. + + Sean Owen + + + Sets the implementation of used by the library. One global + instance is stored, which may sound problematic. But, the implementation provided + ought to be appropriate for the entire platform, and all uses of this library + in the whole lifetime of the JVM. For instance, an Android activity can swap in + an implementation that takes advantage of native platform libraries. + + The platform-specific object to install. + + + +

Samples an image for a square matrix of bits of the given dimension. This is used to extract + the black/white modules of a 2D barcode like a QR Code found in an image. Because this barcode + may be rotated or perspective-distorted, the caller supplies four points in the source image + that define known points in the barcode, so that the image may be sampled appropriately.

+

The last eight "from" parameters are four X/Y coordinate pairs of locations of points in + the image that define some significant points in the image to be sample. For example, + these may be the location of finder pattern in a QR Code.

+

The first eight "to" parameters are four X/Y coordinate pairs measured in the destination + , from the top left, where the known points in the image given by the "from" + parameters map to.

+

These 16 parameters define the transformation needed to sample the image.

+
+ image to sample + The dimension X. + The dimension Y. + The p1 preimage X. + The p1 preimage Y. + The p2 preimage X. + The p2 preimage Y. + The p3 preimage X. + The p3 preimage Y. + The p4 preimage X. + The p4 preimage Y. + The p1 image X. + The p1 image Y. + The p2 image X. + The p2 image Y. + The p3 image X. + The p3 image Y. + The p4 image X. + The p4 image Y. + + representing a grid of points sampled from the image within a region + defined by the "from" parameters + + ReaderException if image can't be sampled, for example, if the transformation defined +
+ + + + + + + + + + + +

Checks a set of points that have been transformed to sample points on an image against + the image's dimensions to see if the point are even within the image.

+ +

This method will actually "nudge" the endpoints back onto the image if they are found to be + barely (less than 1 pixel) off the image. This accounts for imperfect detection of finder + patterns in an image where the QR Code runs all the way to the image border.

+ +

For efficiency, the method will check points from either end of the line until one is found + to be within the image. Because the set of points are assumed to be linear, this is valid.

+ +
+ image into which the points should map + + actual points in x1,y1,...,xn,yn form + +
+ + the current implementation of + + + + + Represents a parsed result that encodes a product by an identifier of some kind. + + dswitkin@google.com (Daniel Switkin) + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link ResultParser#parseResult(Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + The base class for luminance sources which supports + cropping and rotating based upon the luminance values. + + + + + The purpose of this class hierarchy is to abstract different bitmap implementations across + platforms into a standard interface for requesting greyscale luminance values. The interface + only provides immutable methods; therefore crop and rotation create copies. This is to ensure + that one Reader does not modify the original luminance source and leave it in an unknown state + for other Readers in the chain. + + dswitkin@google.com (Daniel Switkin) + + + + initializing constructor + + + + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + inverts the luminance values, not supported here. has to implemented in sub classes + + + + + + + + + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff + + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + The width of the bitmap. + + + The height of the bitmap. + + + Whether this subclass supports cropping. + + + Whether this subclass supports counter-clockwise rotation. + + + + + Whether this subclass supports invertion. + + + + weight of the red channel for calculating a gray scale image + + + + + weight of the green channel for calculating a gray scale image + + + + + weight of the blue channel for calculating a gray scale image + + + + + numbers of bits which for right shifting + + + + + + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + + The luminance array. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + TODO: not implemented yet + + + A rotated version of this object. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Inverts the luminance values (newValue = 255 - oldValue) + + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + gets the luminance matrix + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + + Whether this subclass supports cropping. + + + + + Whether this subclass supports invertion. + + + + represents a token for a binary shift + + + + + initializing constructor + + + + + + + + appends the byte array to the BitArray + + + + + + + string representation + + + + + + The class holds the available options for the QrCodeWriter + + + + + Defines an container for encoder options + + + + + Initializes a new instance of the class. + + + + + Gets the data container for all options + + + + + Specifies the height of the barcode image + + + + + Specifies the width of the barcode image + + + + + Don't put the content string into the output image. + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + + + + + Specifies whether the data should be encoded to the GS1 standard; + FNC1 character is added in front of the data + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + . + + + + + Specifies what character encoding to use where applicable (type ) + + + + + Explicitly disables ECI segment when generating QR Code + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + + + + + Specifies the exact version of QR code to be encoded. An integer, range 1 to 40. If the data specified + cannot fit within the required version, a WriterException will be thrown. + + + + + Jacob Haynes + qwandor@google.com (Andrew Walbran) + + + + + default white space (margin) around the code + + + + + default error correction level + + + + + default aspect ratio + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The height of a row in the barcode + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Takes encoder, accounts for width/height, and retrieves bit matrix + + + + + This takes an array holding the values of the PDF 417 + + a byte array of information with 0 is black, and 1 is white + border around the barcode + BitMatrix of the input + + + + Takes and rotates the it 90 degrees + + + + + This implementation can detect and decode PDF417 codes in an image. + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Implementation of this interface attempt to read several barcodes from one image. + Sean Owen + + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Locates and decodes a PDF417 code in an image. + + a String representing the content encoded by the PDF417 code + if a PDF417 cannot be decoded + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + **Note** this will return the FIRST barcode discovered if there are many. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Locates and decodes Multiple PDF417 codes in an image. + + an array of Strings representing the content encoded by the PDF417 codes + + + + + Locates and decodes multiple barcodes in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcodes encode + + + + + Decode the specified image, with the hints and optionally multiple barcodes. + Based on Owen's Comments in , this method has been modified to continue silently + if a barcode was not decoded where it was detected instead of throwing a new exception object. + + Image. + Hints. + If set to true multiple. + + + + Gets the maximum width of the barcode + + The max width. + P1. + P2. + + + + Gets the minimum width of the barcode + + The minimum width. + P1. + P2. + + + + Gets the maximum width of the codeword. + + The max codeword width. + P. + + + + Gets the minimum width of the codeword. + + The minimum codeword width. + P. + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + + + Guenther Grau + + + + Decode the specified image, imageTopLeft, imageBottomLeft, imageTopRight, imageBottomRight, minCodewordWidth + and maxCodewordWidth. + TODO: don't pass in minCodewordWidth and maxCodewordWidth, pass in barcode columns for start and stop pattern + columns. That way width can be deducted from the pattern column. + This approach also allows to detect more details about the barcode, e.g. if a bar type (white or black) is wider + than it should be. This can happen if the scanner used a bad blackpoint. + + Image. + Image top left. + Image bottom left. + Image top right. + Image bottom right. + Minimum codeword width. + Max codeword width. + + + + Merge the specified leftRowIndicatorColumn and rightRowIndicatorColumn. + + Left row indicator column. + Right row indicator column. + + + + Adjusts the bounding box. + + The bounding box. + Row indicator column. + + + + Gets the barcode metadata. + + The barcode metadata. + Left row indicator column. + Right row indicator column. + + + + Gets the row indicator column. + + The row indicator column. + Image. + Bounding box. + Start point. + If set to true left to right. + Minimum codeword width. + Max codeword width. + + + + Adjusts the codeword count. + + Detection result. + Barcode matrix. + + + + Creates the decoder result. + + The decoder result. + Detection result. + + + + This method deals with the fact, that the decoding process doesn't always yield a single most likely value. The + current error correction implementation doesn't deal with erasures very well, so it's better to provide a value + for these ambiguous codewords instead of treating it as an erasure. The problem is that we don't know which of + the ambiguous values to choose. We try decode using the first value, and if that fails, we use another of the + ambiguous values and try to decode again. This usually only happens on very hard to read and decode barcodes, + so decoding the normal barcodes is not affected by this. + + The decoder result from ambiguous values. + Ec level. + Codewords. + contains the indexes of erasures. + array with the indexes that have more than one most likely value. + two dimensional array that contains the ambiguous values. The first dimension must + be the same Length as the ambiguousIndexes array. + + + + Creates the barcode matrix. + + The barcode matrix. + Detection result. + + + + Tests to see if the Barcode Column is Valid + + true, if barcode column is valid, false otherwise. + Detection result. + Barcode column. + + + + Gets the start column. + + The start column. + Detection result. + Barcode column. + Image row. + If set to true left to right. + + + + Detects the codeword. + + The codeword. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + Minimum codeword width. + Max codeword width. + + + + Gets the module bit count. + + The module bit count. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + + + + Gets the number of EC code words. + + The number of EC code words. + Barcode EC level. + + + + Adjusts the codeword start column. + + The codeword start column. + Image. + Minimum column. + Max column. + If set to true left to right. + Codeword start column. + Image row. + + + + Checks the codeword for any skew. + + true, if codeword is within the skew, false otherwise. + Codeword size. + Minimum codeword width. + Max codeword width. + + + + Decodes the codewords. + + The codewords. + Codewords. + Ec level. + Erasures. + + + + Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place. + + The errors. + data and error correction codewords. + positions of any known erasures. + number of error correction codewords that are available in codewords. + + + + Verifies that all is well with the the codeword array. + + Codewords. + Number EC codewords. + + + + Gets the bit count for codeword. + + The bit count for codeword. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Module bit count. + + + + Returns a that represents the jagged array. + + A that represents the jagged array. + Barcode matrix as a jagged array. + + + + + + Guenther Grau + creatale GmbH (christoph.schulz@creatale.de) + + + + The ratios table + + + + + Initializes the class & Pre-computes the symbol ratio table. + + + + + Gets the decoded value. + + The decoded value. + Module bit count. + + + + Samples the bit counts. + + The bit counts. + Module bit count. + + + + Gets the decoded codeword value. + + The decoded codeword value. + Module bit count. + + + + Gets the bit value. + + The bit value. + Module bit count. + + + + Gets the closest decoded value. + + The closest decoded value. + Module bit count. + + + +

This class contains the methods for decoding the PDF417 codewords.

+ + SITA Lab (kevin.osullivan@sita.aero) +
+
+ + + Table containing values for the exponent of 900. + This is used in the numeric compaction decode algorithm. + + + + + Text Compaction mode (see 5.4.1.5) permits all printable ASCII characters to be + encoded, i.e. values 32 - 126 inclusive in accordance with ISO/IEC 646 (IRV), as + well as selected control characters. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + The Text Compaction mode includes all the printable ASCII characters + (i.e. values from 32 to 126) and three ASCII control characters: HT or tab + (ASCII value 9), LF or line feed (ASCII value 10), and CR or carriage + return (ASCII value 13). The Text Compaction mode also includes various latch + and shift characters which are used exclusively within the mode. The Text + Compaction mode encodes up to 2 characters per codeword. The compaction rules + for converting data into PDF417 codewords are defined in 5.4.2.2. The sub-mode + switches are defined in 5.4.2.3. + + The text compaction data. + The byte compaction data if there + was a mode shift. + The size of the text compaction and byte compaction data. + The decoded data is appended to the result. + + + + + Byte Compaction mode (see 5.4.3) permits all 256 possible 8-bit byte values to be encoded. + This includes all ASCII characters value 0 to 127 inclusive and provides for international + character set support. + + The byte compaction mode i.e. 901 or 924 + The array of codewords (data + error) + Currently active character encoding + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Numeric Compaction mode (see 5.4.4) permits efficient encoding of numeric data strings. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Convert a list of Numeric Compacted codewords from Base 900 to Base 10. + EXAMPLE + Encode the fifteen digit numeric string 000213298174000 + Prefix the numeric string with a 1 and set the initial value of + t = 1 000 213 298 174 000 + Calculate codeword 0 + d0 = 1 000 213 298 174 000 mod 900 = 200 + + t = 1 000 213 298 174 000 div 900 = 1 111 348 109 082 + Calculate codeword 1 + d1 = 1 111 348 109 082 mod 900 = 282 + + t = 1 111 348 109 082 div 900 = 1 234 831 232 + Calculate codeword 2 + d2 = 1 234 831 232 mod 900 = 632 + + t = 1 234 831 232 div 900 = 1 372 034 + Calculate codeword 3 + d3 = 1 372 034 mod 900 = 434 + + t = 1 372 034 div 900 = 1 524 + Calculate codeword 4 + d4 = 1 524 mod 900 = 624 + + t = 1 524 div 900 = 1 + Calculate codeword 5 + d5 = 1 mod 900 = 1 + t = 1 div 900 = 0 + Codeword sequence is: 1, 624, 434, 632, 282, 200 + + Decode the above codewords involves + 1 x 900 power of 5 + 624 x 900 power of 4 + 434 x 900 power of 3 + + 632 x 900 power of 2 + 282 x 900 power of 1 + 200 x 900 power of 0 = 1000213298174000 + + Remove leading 1 => Result is 000213298174000 + The array of codewords + The number of codewords + The decoded string representing the Numeric data. + + + + + This object renders an UPC-E code as a {@link BitMatrix}. + @author 0979097955s@gmail.com (RX) + + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ aripollak@gmail.com (Ari Pollak) + dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Gets the default margin. + + + + +

Implements decoding of the UPC-E format.

+

Thisis a great reference for + UPC-E information.

+ Sean Owen +
+
+ + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Start/end guard pattern. + + + + + Pattern marking the middle of a UPC/EAN pattern, separating the two halves. + + + + + end guard pattern. + + + + + "Odd", or "L" patterns used to encode UPC/EAN digits. + + + + + As above but also including the "even", or "G" patterns used to encode UPC/EAN digits. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + +

Like , but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ row index into the image + encoding of the row of the barcode image + start/end column where the opening start pattern was found + optional hints that influence decoding + encapsulating the result of decoding a barcode in the row +
+ + + + string of digits to check + see + + + + Computes the UPC/EAN checksum on a string of digits, and reports + whether the checksum is correct or not. + + string of digits to check + true iff string of digits passes the UPC/EAN checksum algorithm + + + + Decodes the end. + + The row. + The end start. + + + + + + row of black/white values to search + position to start search + if true, indicates that the pattern specifies white/black/white/... + pixel counts, otherwise, it is interpreted as black/white/black/... + pattern of counts of number of black and white pixels that are being + searched for as a pattern + array of counters, as long as pattern, to re-use + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a single UPC/EAN-encoded digit. + + row of black/white values to decode + the counts of runs of observed black/white/black/... values + horizontal offset to start decoding from + the set of patterns to use to decode -- sometimes different encodings + for the digits 0-9 are used, and this indicates the encodings for 0 to 9 that should + be used + horizontal offset of first pixel beyond the decoded digit + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + Get the format of this decoder. + + The 1D format. + + + + The pattern that marks the middle, and end, of a UPC-E pattern. + There is no "second half" to a UPC-E barcode. + + + + + See L_AND_G_PATTERNS these values similarly represent patterns of + even-odd parity encodings of digits that imply both the number system (0 or 1) + used, and the check digit. + + + + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Decodes the end. + + The row. + The end start. + + + + + see checkStandardUPCEANChecksum(String) + + + + + + + Determines the num sys and check digit. + + The result string. + The lg pattern found. + + + + + Expands a UPC-E value back into its full, equivalent UPC-A code value. + + UPC-E code as string of digits + equivalent UPC-A code as string of digits + + + + + Get the format of this decoder. + The 1D format. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode the barcode inside a bitmap object + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Symbol Character Placement Program. Adapted from Annex M.1 in ISO/IEC 16022:2000(E). + + + + + Main constructor + + the codewords to place + the number of columns + the number of rows + + + + Places the 8 bits of a utah-shaped symbol character in ECC200. + + The row. + The col. + character position + + +

This provides an easy abstraction to read bits at a time from a sequence of bytes, where the + number of bits read is not often a multiple of 8.

+ +

This class is thread-safe but not reentrant. Unless the caller modifies the bytes array + it passed in, in which case all bets are off.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + bytes from which this will read bits. Bits will be read from the first byte first. + Bits are read within a byte from most-significant to least-significant bit. + + + + number of bits to read + + int representing the bits read. The bits will appear as the least-significant + bits of the int + + if numBits isn't in [1,32] or more than is available + + + number of bits that can be read successfully + + + + + index of next bit in current byte which would be read by the next call to {@link #readBits(int)}. + + + + + index of next byte in input byte array which would be read by the next call to {@link #readBits(int)}. + + + + + This class is the core bitmap class used by ZXing to represent 1 bit data. Reader objects + accept a BinaryBitmap and attempt to decode it. + + dswitkin@google.com (Daniel Switkin) + + + + + + + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + + The row to fetch, which must be in [0, bitmap height). + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if isCropSupported() is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + The width of the bitmap. + + + + + The height of the bitmap. + + + + + Converts a 2D array of luminance data to 1 bit. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + + Whether this bitmap can be cropped. + + + + + Whether this bitmap supports counter-clockwise rotation. + + + + + This produces nearly optimal encodings of text into the first-level of + encoding used by Aztec code. + It uses a dynamic algorithm. For each prefix of the string, it determines + a set of encodings that could lead to this prefix. We repeatedly add a + character and generate a new set of optimal encodings until we have read + through the entire input. + @author Frank Yellin + @author Rustam Abdullaev + + + + + + + + + + + Convert the text represented by this High Level Encoder into a BitArray. + + text represented by this encoder encoded as a + + + Callback which is invoked when a possible result point (significant + point in the barcode image such as a corner) is found. + + + + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+
+ Sean Owen +
+ + + 1 pixel/module times 3 modules/center + + + + + support up to version 20 for mobile clients + + + + +

Creates a finder that will search the image for three finder patterns.

+
+ image to search +
+ + + Initializes a new instance of the class. + + The image. + The result point callback. + + + Given a count of black/white/black/white/black pixels just seen and an end position, + figures the location of the center of this run. + + + + count of black/white/black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/3/1/1 ratios + used by finder patterns to be considered a match + + + + + + count of black/white/black/white/black pixels just read + true if the proportions of the counts is close enough to the 1/1/3/1/1 ratios + by finder patterns to be considered a match + + + + After a vertical and horizontal scan finds a potential finder pattern, this method + "cross-cross-cross-checks" by scanning down diagonally through the center of the possible + finder pattern to see if the same proportion is detected. + @param maxCount maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + @param originalStateCountTotal The original state count total. + + row where a finder pattern was detected + center of the section that appears to cross a finder pattern + true if proportions are withing expected limits + + + +

After a horizontal scan finds a potential finder pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + finder pattern to see if the same proportion is detected.

+
+ row where a finder pattern was detected + center of the section that appears to cross a finder pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of finder pattern, or null if not found + +
+ +

Like {@link #crossCheckVertical(int, int, int, int)}, and in fact is basically identical, + except it reads horizontally instead of vertically. This is used to cross-cross + check a vertical cross check and locate the real center of the alignment pattern.

+
+
+ + + @see #handlePossibleCenter(int[], int, int) + + reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + ignored + true if a finder pattern candidate was found this time + + + +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will, ah, cross-cross-check + with another horizontal scan. This is needed primarily to locate the real horizontal + center of the pattern in cases of extreme skew. + And then we cross-cross-cross check with another diagonal scan.

+ If that succeeds the finder pattern location is added to a list that tracks + the number of times each location has been nearly-matched as a finder pattern. + Each additional find is more evidence that the location is in fact a finder + pattern center +
+ reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + + true if a finder pattern candidate was found this time + +
+ + number of rows we could safely skip during scanning, based on the first + two finder patterns that have been located. In some cases their position will + allow us to infer that the third pattern must lie below a certain point farther + down in the image. + + + + true iff we have found at least 3 finder patterns that have been detected + at least {@link #CENTER_QUORUM} times each, and, the estimated module size of the + candidates is "pretty similar" + + + + the 3 best {@link FinderPattern}s from our list of candidates. The "best" are + those that have been detected at least {@link #CENTER_QUORUM} times, and whose module + size differs from the average among those patterns the least + + + + + Gets the image. + + + + + Gets the possible centers. + + + + + Orders by furthest from average + + + +

Orders by {@link FinderPattern#getCount()}, descending.

+
+ + +

Encapsulates a finder pattern, which are the three square patterns found in + the corners of QR Codes. It also encapsulates a count of similar finder patterns, + as a convenience to the finder's bookkeeping.

+
+ Sean Owen +
+ + + Encapsulates a point of interest in an image containing a barcode. Typically, this + would be the location of a finder pattern or the corner of the barcode, for example. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The x. + The y. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC and + BC is less than AC and the angle between BC and BA is less than 180 degrees. + + array of three to order + + + + calculates the distance between two points + + first pattern + second pattern + + distance between two points + + + + + Returns the z component of the cross product between vectors BC and BA. + + + + + Gets the X. + + + + + Gets the Y. + + + +

Determines if this finder pattern "about equals" a finder pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing a weighted average + based on count. + + The i. + The j. + New size of the module. + + + + + Gets the size of the estimated module. + + + The size of the estimated module. + + + + +

A field based on powers of a generator integer, modulo some modulus.

+ +
+ Sean Owen +
+ + + Interface for a smart class to encode some content into a barcode + + + + + Encodes the specified contents. + + The contents. + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + +

Data Matrix Codes can encode text as bits in one of several modes, and can use multiple modes + in one Data Matrix Code. This class decodes the bits back into text.

+ +

See ISO 16022:2006, 5.2.1 - 5.2.9.2

+ + bbrown@google.com (Brian Brown) + Sean Owen +
+
+ + + See ISO 16022:2006, Annex C Table C.1 + The C40 Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, Annex C Table C.2 + The Text Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, 5.2.3 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.5 and Annex C, Table C.1 + + + + + See ISO 16022:2006, 5.2.6 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.7 + + + + + See ISO 16022:2006, 5.2.8 and Annex C Table C.3 + + + + + See ISO 16022:2006, 5.2.9 and Annex B, B.2 + + + + + See ISO 16022:2006, Annex B, B.2 + + + + + bbrown@google.com (Brian Brown) + + + + + to parse + if dimension is < 8 or > 144 or not 0 mod 2 + + + + +

Creates the version object based on the dimension of the original bit matrix from + the datamatrix code.

+ +

See ISO 16022:2006 Table 7 - ECC 200 symbol attributes

+ + Original including alignment patterns + encapsulating the Data Matrix Code's "version" + if the dimensions of the mapping matrix are not valid + Data Matrix dimensions. +
+
+ + +

Reads the bits in the representing the mapping matrix (No alignment patterns) + in the correct order in order to reconstitute the codewords bytes contained within the + Data Matrix Code.

+ + bytes encoded within the Data Matrix Code + if the exact number of bytes expected is not read +
+
+ + +

Reads a bit of the mapping matrix accounting for boundary wrapping.

+ + Row to read in the mapping matrix + Column to read in the mapping matrix + Number of rows in the mapping matrix + Number of columns in the mapping matrix + value of the given bit in the mapping matrix +
+
+ + +

Reads the 8 bits of the standard Utah-shaped pattern.

+ +

See ISO 16022:2006, 5.8.1 Figure 6

+ + Current row in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Current column in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the utah shape +
+
+ + +

Reads the 8 bits of the special corner condition 1.

+ +

See ISO 16022:2006, Figure F.3

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 1 +
+
+ + +

Reads the 8 bits of the special corner condition 2.

+ +

See ISO 16022:2006, Figure F.4

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 2 +
+
+ + +

Reads the 8 bits of the special corner condition 3.

+ +

See ISO 16022:2006, Figure F.5

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 3 +
+
+ + +

Reads the 8 bits of the special corner condition 4.

+ +

See ISO 16022:2006, Figure F.6

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 4 +
+
+ + +

Extracts the data region from a that contains + alignment patterns.

+ + Original with alignment patterns + BitMatrix that has the alignment patterns removed +
+
+ +

This class implements a perspective transform in two dimensions. Given four source and four + destination points, it will compute the transformation implied between them. The code is based + directly upon section 3.4.2 of George Wolberg's "Digital Image Warping"; see pages 54-56.

+
+ Sean Owen +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Convenience method, not optimized for performance. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Represents a parsed result that encodes a product ISBN number. + + jbreiden@google.com (Jeff Breidenbach) + + + + the ISBN number + + + +

This class attempts to find alignment patterns in a QR Code. Alignment patterns look like finder + patterns but are smaller and appear at regular intervals throughout the image.

+ +

At the moment this only looks for the bottom-right alignment pattern.

+ +

This is mostly a simplified copy of {@link FinderPatternFinder}. It is copied, + pasted and stripped down here for maximum performance but does unfortunately duplicate + some code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Creates a finder that will look in a portion of the whole image.

+ +
+ image to search + + left column from which to start searching + + top row from which to start searching + + width of region to search + + height of region to search + + estimated module size so far + + callback function which is called, when a result point is found +
+ +

This method attempts to find the bottom-right alignment pattern in the image. It is a bit messy since + it's pretty performance-critical and so is written to be fast foremost.

+ +
+ if found +
+ + Given a count of black/white/black pixels just seen and an end position, + figures the location of the center of this black/white/black run. + + + + count of black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/1 ratios + used by alignment patterns to be considered a match + + + + +

After a horizontal scan finds a potential alignment pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + alignment pattern to see if the same proportion is detected.

+
+ row where an alignment pattern was detected + center of the section that appears to cross an alignment pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of alignment pattern, or null if not found + +
+ +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will see if this pattern had been + found on a previous horizontal scan. If so, we consider it confirmed and conclude we have + found the alignment pattern.

+ +
+ reading state module counts from horizontal scan + + row where alignment pattern may be found + + end of possible alignment pattern in row + + {@link AlignmentPattern} if we have found the same pattern twice, or null if not + +
+ + + PDF 417 result meta data. + Guenther Grau + + + + + The Segment ID represents the segment of the whole file distributed over different symbols. + + + + + Is the same for each related PDF417 symbol + + + + + always null + + + + + true if it is the last segment + + + + + count of segments, -1 if not set + + + + + Filename of the encoded file + + + + + filesize in bytes of the encoded file + returns filesize in bytes, -1 if not set + + + + + 16-bit CRC checksum using CCITT-16 + returns crc checksum, -1 if not set + + + + + unix epock timestamp, elapsed seconds since 1970-01-01 + returns elapsed seconds, -1 if not set + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + This object renders a CODE128 code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + +

Decodes Code 128 barcodes.

+ + Sean Owen +
+
+ + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + +

A somewhat generic detector that looks for a barcode-like rectangular region within an image. + It looks within a mostly white region of an image for a region of black and white, but mostly + black. It returns the four corners of the region, as best it can determine.

+ +
+ Sean Owen +
+ + + initializing constructor + + + + + +

Detects a rectangular region of black and white -- mostly black -- with a region of mostly + white, in an image.

+
+ [] describing the corners of the rectangular region. The first and + last points are opposed on the diagonal, as are the second and third. The first point will be + the topmost point and the last, the bottommost. The second point will be leftmost and the + third, the rightmost + +
+ + Attempts to locate a corner of the barcode by scanning up, down, left or right from a center + point which should be within the barcode. + + + center's x component (horizontal) + + same as deltaY but change in x per step instead + + minimum value of x + + maximum value of x + + center's y component (vertical) + + change in y per step. If scanning up this is negative; down, positive; + left or right, 0 + + minimum value of y to search through (meaningless when di == 0) + + maximum value of y + + maximum run of white pixels that can still be considered to be within + the barcode + + a encapsulating the corner that was found + + + + Computes the start and end of a region of pixels, either horizontally or vertically, that could + be part of a Data Matrix barcode. + + + if scanning horizontally, this is the row (the fixed vertical location) + where we are scanning. If scanning vertically it's the column, the fixed horizontal location + + largest run of white pixels that can still be considered part of the + barcode region + + minimum pixel location, horizontally or vertically, to consider + + maximum pixel location, horizontally or vertically, to consider + + if true, we're scanning left-right, instead of up-down + + int[] with start and end of found range, or null if no such range is found + (e.g. only white was found) + + + + + A simple result type encapsulating a URI that has no further interpretation. + + Sean Owen + + + Transforms a string that represents a URI into something more proper, by adding or canonicalizing + the protocol. + + + + true if the URI contains suspicious patterns that may suggest it intends to + mislead the user about its true nature. At the moment this looks for the presence + of user/password syntax in the host/authority portion of a URI which may be used + in attempts to make the URI's host appear to be other than it is. Example: + http://yourbank.com@phisher.com This URI connects to phisher.com but may appear + to connect to yourbank.com at first glance. + + + + + Parses a "tel:" URI result, which specifies a phone number. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link #parseResult(com.google.zxing.Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Attempts to parse the raw {@link Result}'s contents as a particular type + of information (email, URL, etc.) and return a {@link ParsedResult} encapsulating + the result of parsing. + + the raw to parse + encapsulating the parsing result + + + + Parses the result. + + The result. + + + + + A smart class to decode the barcode inside a bitmap object + + + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode the barcode inside a bitmap object + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap which is given by a generic byte array. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + represents the default function which is called to get a instance from a raw byte array + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb array. + If null the RGBLuminanceSource is used. The handler is only called when Decode with a byte[] array is called. + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + raises the ResultFound event + + + + + + raises the ResultFound event + + + + + + calls the explicitResultPointFound action + + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + Gets or sets the options. + + + The options. + + + + + Gets the reader which should be used to find and decode the barcode. + + + The reader. + + + + + Gets or sets a method which is called if an important point is found + + + The result point callback. + + + + + event is executed if a result was found via decode + + + + + Gets or sets a value indicating whether the image should be automatically rotated. + Rotation is supported for 90, 180 and 270 degrees + + + true if image should be rotated; otherwise, false. + + + + + Gets or sets a value indicating whether the image should be automatically inverted + if no result is found in the original image. + ATTENTION: Please be carefully because it slows down the decoding process if it is used + + + true if image should be inverted; otherwise, false. + + + + + Optional: Gets or sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + The function to create a binarizer object. + + + + + Attribute is only for compatibility issues + + + + + Luminance source class which support different formats of images. + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 1 byte per pixel (Gray8). + That means the whole array consists of the luminance values (grayscale). + + The luminance array. + The width. + The height. + if set to true [is8 bit]. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + The bitmap format. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + calculates the luminance values for the given byte array and bitmap format + + + + + + + enumeration of supported bitmap format which the RGBLuminanceSource can process + + + + + format of the byte[] isn't known. RGBLuminanceSource tries to determine the best possible value + + + + + grayscale array, the byte array is a luminance array with 1 byte per pixel + + + + + grayscale array, the byte array is a luminance array with 2 bytes per pixel + + + + + 3 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels alpha, red, green and blue + + + + + 3 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green, red and alpha + + + + + 2 bytes per pixel, 5 bit red, 6 bits green and 5 bits blue + + + + + 4 bytes per pixel with the channels red, green, blue and alpha + + + + + 4 bytes for two pixels, UYVY formatted + + + + + 4 bytes for two pixels, YUYV formatted + + + + + Represents some type of metadata about the result of the decoding that the decoder + wishes to communicate back to the caller. + + Sean Owen + + + + Unspecified, application-specific metadata. Maps to an unspecified {@link Object}. + + + + + Denotes the likely approximate orientation of the barcode in the image. This value + is given as degrees rotated clockwise from the normal, upright orientation. + For example a 1D barcode which was found by reading top-to-bottom would be + said to have orientation "90". This key maps to an {@link Integer} whose + value is in the range [0,360). + + + + +

2D barcode formats typically encode text, but allow for a sort of 'byte mode' + which is sometimes used to encode binary data. While {@link Result} makes available + the complete raw bytes in the barcode for these formats, it does not offer the bytes + from the byte segments alone.

+

This maps to a {@link java.util.List} of byte arrays corresponding to the + raw bytes in the byte segments in the barcode, in order.

+
+
+ + + Error correction level used, if applicable. The value type depends on the + format, but is typically a String. + + + + + For some periodicals, indicates the issue number as an {@link Integer}. + + + + + For some products, indicates the suggested retail price in the barcode as a + formatted {@link String}. + + + + + For some products, the possible country of manufacture as a {@link String} denoting the + ISO country code. Some map to multiple possible countries, like "US/CA". + + + + + For some products, the extension text + + + + + If the code format supports structured append and + the current scanned code is part of one then the + sequence number is given with it. + + + + + If the code format supports structured append and + the current scanned code is part of one then the + parity is given with it. + + + + + PDF417-specific metadata + + + + + Aztec-specific metadata + + + + +

See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels + defined by the QR code standard.

+
+ Sean Owen +
+ + L = ~7% correction + + + M = ~15% correction + + + Q = ~25% correction + + + H = ~30% correction + + + + Ordinals this instance. + + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Fors the bits. + + int containing the two bits encoding a QR Code's error correction level + + representing the encoded error correction level + + + + + Gets the bits. + + + + + Gets the name. + + + + + PDF417 high-level encoder following the algorithm described in ISO/IEC 15438:2001(E) in + annex P. + + + + + code for Text compaction + + + + + code for Byte compaction + + + + + code for Numeric compaction + + + + + Text compaction submode Alpha + + + + + Text compaction submode Lower + + + + + Text compaction submode Mixed + + + + + Text compaction submode Punctuation + + + + + mode latch to Text Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters NOT a multiple of 6) + + + + + mode latch to Numeric Compaction mode + + + + + mode shift to Byte Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters a multiple of 6) + + + + + identifier for a user defined Extended Channel Interpretation (ECI) + + + + + identifier for a general purpose ECO format + + + + + identifier for an ECI of a character set of code page + + + + + Raw code table for text compaction Mixed sub-mode + + + + + Raw code table for text compaction: Punctuation sub-mode + + + + + Performs high-level encoding of a PDF417 message using the algorithm described in annex P + of ISO/IEC 15438:2001(E). If byte compaction has been selected, then only byte compaction + is used. + + the message + compaction mode to use + character encoding used to encode in default or byte compaction + or null for default / not applicable + if true, don't add an ECI segment for different encodings than default + the encoded message (the char values range from 0 to 928) + + + + Encode parts of the message using Text Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.2. + + the message + the start position within the message + the number of characters to encode + receives the encoded codewords + should normally be SUBMODE_ALPHA + the text submode in which this method ends + + + + + Encode parts of the message using Byte Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.3. The Unicode characters will be converted to binary using the cp437 + codepage. + + the message converted to a byte array + the start position within the message + the number of bytes to encode + the mode from which this method starts + receives the encoded codewords + + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using text compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using binary compaction. + + the message + the message converted to a byte array + the start position within the message + + the requested character count + + + + Represents possible PDF417 barcode compaction types. + + + + + + + + + + + + + + + + + + + + + + + + + defines the level of the error correction / count of error correction codewords + + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + The maximum distance to search in the codeword array in both the positive and negative directions + + + + + Initializes a new instance of the class. + + The Bounding Box around the column (in the BitMatrix) + + + + Converts the Image's Row to the index in the Codewords array + + The Codeword Index. + Image row. + + + + Converts the Codeword array index into a Row in the Image (BitMatrix) + + The Image Row. + Codeword index. + + + + Gets the codeword for a given row + + The codeword. + Image row. + + + + Gets the codeword closest to the specified row in the image + + Image row. + + + + Sets the codeword for an image row + + Image row. + Codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + The Bounding Box around the column (in the BitMatrix) + + The box. + + + + The Codewords the Box encodes for, offset by the Box minY. + Remember to Access this ONLY through GetCodeword(imageRow) if you're accessing it in that manner. + + The codewords. + + + + Initializes a new instance of the class. + + Box. + If set to true is left. + + + + Sets the Row Numbers as Inidicator Columns + + + + + TODO implement properly + TODO maybe we should add missing codewords to store the correct row number to make + finding row numbers for other columns easier + use row height count to make detection of invalid row numbers more reliable + + The indicator column row numbers. + Metadata. + + + + Gets the row heights. + + The row heights. + + + + Adjusts the in omplete indicator column row numbers. + + Metadata. + + + + Gets the barcode metadata. + + The barcode metadata. + + + + Prune the codewords which do not match the metadata + TODO Maybe we should keep the incorrect codewords for the start and end positions? + + Codewords. + Metadata. + + + + Returns a that represents the current . + + A that represents the current . + + + + Gets or sets a value indicating whether this instance is the left indicator + + true if this instance is left; otherwise, false. + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + These are a set of hints that you may pass to Writers to specify their behavior. + + dswitkin@google.com (Daniel Switkin) + + + + Specifies the width of the barcode image + type: + + + + + Specifies the height of the barcode image + type: + + + + + Don't put the content string into the output image. + type: + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + + For Aztec it is of type , representing the minimal percentage of error correction words. + In all cases, it can also be a representation of the desired value as well. + Note: an Aztec symbol should have a minimum of 25% EC words. + For PDF417 it is of type or (between 0 and 8), + + + + + Specifies what character encoding to use where applicable. + type: + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + type: , or representation of the integer value + + + + + Specifies the aspect ratio to use. Default is 4. + type: , or 1-4. + + + + + Specifies whether to use compact mode for PDF417 + type: , or "true" or "false" + value + + + + + Specifies what compaction mode to use for PDF417. + type: or value of one of its + enum values + + + + + Specifies the minimum and maximum number of rows and columns for PDF417. + type: + + + + + Don't append ECI segment. + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + type: + + + + + Specifies the matrix shape for Data Matrix (type ) + + + + + Specifies a minimum barcode size (type ). Only applicable to Data Matrix now. + + + + + Specifies a maximum barcode size (type ). Only applicable to Data Matrix now. + + + + + if true, don't switch to codeset C for numbers + + + + + Specifies the default encodation for Data Matrix (type ) + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Specifies the required number of layers for an Aztec code. + A negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + type: , or representation of the integer value + + + + + Specifies the exact version of QR code to be encoded. + (Type , or representation of the integer value). + + + + + Specifies whether the data should be encoded to the GS1 standard + type: , or "true" or "false" + value + + + + + Parses strings of digits that represent a UPC code. + + dswitkin@google.com (Daniel Switkin) + + + + Represents the type of data encoded by a barcode -- from plain text, to a + URI, to an e-mail address, etc. + + Sean Owen + + + This class hierarchy provides a set of methods to convert luminance data to 1 bit data. + It allows the algorithm to vary polymorphically, for example allowing a very expensive + thresholding technique for servers and a fast one for mobile. It also permits the implementation + to vary, e.g. a JNI version for Android and a Java fallback version for other platforms. + + dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The source. + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + For callers which only examine one row of pixels at a time, the same BitArray should be reused + and passed in with each call for performance. However it is legal to keep more than one row + at a time if needed. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + A new concrete Binarizer implementation object. + + + + Gets the luminance source object. + + + + Converts a 2D array of luminance data to 1 bit data. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + + Gets the width of the luminance source object. + + + + + Gets the height of the luminance source object. + + + + + Contains conversion support elements such as classes, interfaces and static methods. + + + + + Copies an array of chars obtained from a String into a specified array of chars + + The String to get the chars from + Position of the String to start getting the chars + Position of the String to end getting the chars + Array to return the chars + Position of the destination array of chars to start storing the chars + An array of chars + + + + Sets the capacity for the specified List + + The List which capacity will be set + The new capacity value + + + + Converts a string-Collection to an array + + The strings. + + + + + Joins all elements to one string. + + + The separator. + The values. + + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The value. + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The start index. + The end index. + The value. + + + + + + + + + + + + + + + + + + Savely gets the value of a decoding hint + if hints is null the default is returned + + + The hints. + Type of the hint. + The @default. + + + + + Attribute is only for compatibility issues + + + + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + Encode "bytes" with the error correction level "ecLevel". The encoding mode will be chosen + internally by chooseMode(). On success, store the result in "qrCode". + We recommend you to use QRCode.EC_LEVEL_L (the lowest level) for + "getECLevel" since our primary use is to show QR code on desktop screens. We don't need very + strong error correction for this purpose. + Note that there is no way to encode bytes in MODE_KANJI. We might want to add EncodeWithMode() + with which clients can specify the encoding mode. For now, we don't need the functionality. + + text to encode + error correction level to use + representing the encoded QR code + + + + Encodes the specified content. + + The content. + The ec level. + The hints. + + + + + Decides the smallest version of QR code that will contain all of the provided data. + + if the data cannot fit in any version + + + + Gets the alphanumeric code. + + The code. + the code point of the table used in alphanumeric mode or + -1 if there is no corresponding code in the table. + + + + Chooses the mode. + + The content. + + + + + Choose the best mode by examining the content. Note that 'encoding' is used as a hint; + if it is Shift_JIS, and the input is only double-byte Kanji, then we return {@link Mode#KANJI}. + + The content. + The encoding. + + + + + true if the number of input bits will fit in a code with the specified version and error correction level. + + + + Terminate bits as described in 8.4.8 and 8.4.9 of JISX0510:2004 (p.24). + + The num data bytes. + The bits. + + + + Get number of data bytes and number of error correction bytes for block id "blockID". Store + the result in "numDataBytesInBlock", and "numECBytesInBlock". See table 12 in 8.5.1 of + JISX0510:2004 (p.30) + + The num total bytes. + The num data bytes. + The num RS blocks. + The block ID. + The num data bytes in block. + The num EC bytes in block. + + + + Interleave "bits" with corresponding error correction bytes. On success, store the result in + "result". The interleave rule is complicated. See 8.6 of JISX0510:2004 (p.37) for details. + + The bits. + The num total bytes. + The num data bytes. + The num RS blocks. + + + + + Append mode info. On success, store the result in "bits". + + The mode. + The bits. + + + + Append length info. On success, store the result in "bits". + + The num letters. + The version. + The mode. + The bits. + + + + Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits". + + The content. + The mode. + The bits. + The encoding. + + +

Encapsulates an alignment pattern, which are the smaller square patterns found in + all but the simplest QR Codes.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Determines if this alignment pattern "about equals" an alignment pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing an average of the two. + + The i. + The j. + New size of the module. + + + + + PDF417 error correction code following the algorithm described in ISO/IEC 15438:2001(E) in + chapter 4.10. + + + + + Tables of coefficients for calculating error correction words + (see annex F, ISO/IEC 15438:2001(E)) + + + + + Determines the number of error correction codewords for a specified error correction + level. + + the error correction level (0-8) + the number of codewords generated for error correction + + + + Determines the error correction level for AUTO + + The error correction level (0-9) + The number of codewords for AUTO errorCorrectionLevel + the number of codewords generated for error correction + + + + Returns the recommended minimum error correction level as described in annex E of + ISO/IEC 15438:2001(E). + + the number of data codewords + the recommended minimum error correction level + + + + Generates the error correction codewords according to 4.10 in ISO/IEC 15438:2001(E). + + the data codewords + the error correction level (0-8) + the String representing the error correction codewords + + + + defines the level of the error correction / count of error correction codewords + + + + + A Bounding Box helper class + + Guenther Grau + + + + Initializes a new instance of the class. + returns null if the corner points don't match up correctly + + The image. + The top left. + The bottom left. + The top right. + The bottom right. + + + + + Creates the specified box. + + The box. + + + + + Initializes a new instance of the class. + Will throw an exception if the corner points don't match up correctly + + Image. + Top left. + Top right. + Bottom left. + Bottom right. + + + + Merge two Bounding Boxes, getting the left corners of left, and the right corners of right + (Images should be the same) + + Left. + Right. + + + + Adds the missing rows. + + The missing rows. + Missing start rows. + Missing end rows. + If set to true is left. + + + + Calculates the minimum and maximum X & Y values based on the corner points. + + + + + If we adjust the width, set a new right corner coordinate and recalculate + + Bottom right. + + + + Adapted from listings in ISO/IEC 24724 Appendix B and Appendix G. + + + + + Gets the RS svalue. + + The widths. + Width of the max. + if set to true [no narrow]. + + + + + Encapsulates a since character value in an RSS barcode, including its checksum information. + + + + + Initializes a new instance of the class. + + The value. + The checksum portion. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Gets the value. + + + + + Gets the checksum portion. + + + + + Decodes MSI barcodes. + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. + + + + + Creates a reader that can be configured to check the last character as a check digit, + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + The matrix. + + + + +

Encapsulates logic that can detect a Data Matrix Code in an image, even if the Data Matrix Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + +

Detects a Data Matrix Code in an image.

+
+ encapsulating results of detecting a Data Matrix Code or null +
+ + + Calculates the position of the white top right module using the output of the rectangle detector + for a rectangular matrix + + + + + Calculates the position of the white top right module using the output of the rectangle detector + for a square matrix + + + + + Increments the Integer associated with a key by one. + + + + + Counts the number of black/white transitions between two points, using something like Bresenham's algorithm. + + + + + Simply encapsulates two points and a number of transitions between them. + + + + + Orders ResultPointsAndTransitions by number of transitions, ascending. + + + + +

This class contains utility methods for performing mathematical operations over + the Galois Fields. Operations use a given primitive polynomial in calculations.

+

Throughout this package, elements of the GF are represented as an {@code int} + for convenience and speed (but at the cost of memory). +

+
+ Sean Owen +
+ + + Create a representation of GF(size) using the given primitive polynomial. + + irreducible polynomial whose coefficients are represented by + * the bits of an int, where the least-significant bit represents the constant + * coefficient + the size of the field + the factor b in the generator polynomial can be 0- or 1-based + * (g(x) = (x+a^b)(x+a^(b+1))...(x+a^(b+2t-1))). + * In most cases it should be 1, but for QR code it is 0. + + + + Builds the monomial. + + The degree. + The coefficient. + the monomial representing coefficient * x^degree + + + + Implements both addition and subtraction -- they are the same in GF(size). + + sum/difference of a and b + + + + Exps the specified a. + + 2 to the power of a in GF(size) + + + + Logs the specified a. + + A. + base 2 log of a in GF(size) + + + + Inverses the specified a. + + multiplicative inverse of a + + + + Multiplies the specified a with b. + + A. + The b. + product of a and b in GF(size) + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Gets the size. + + + + + Gets the generator base. + + + + + Represents a parsed result that encodes wifi network information, like SSID and password. + + Vikram Aggarwal + + + + Represents a parsed result that encodes a geographic coordinate, with latitude, longitude and altitude. + + Sean Owen + + + latitude in degrees + + + + longitude in degrees + + + + altitude in meters. If not specified, in the geo URI, returns 0.0 + + + + query string associated with geo URI or null if none exists + + + + the geo URI + + + + a URI link to Google Maps which display the point on the Earth described + by this instance, and sets the zoom level in a way that roughly reflects the + altitude, if specified + + + + + Enumerates barcode formats known to this package. + + Sean Owen + + + Aztec 2D barcode format. + + + CODABAR 1D format. + + + Code 39 1D format. + + + Code 93 1D format. + + + Code 128 1D format. + + + Data Matrix 2D barcode format. + + + EAN-8 1D format. + + + EAN-13 1D format. + + + ITF (Interleaved Two of Five) 1D format. + + + MaxiCode 2D barcode format. + + + PDF417 format. + + + QR Code 2D barcode format. + + + RSS 14 + + + RSS EXPANDED + + + UPC-A 1D format. + + + UPC-E 1D format. + + + UPC/EAN extension format. Not a stand-alone format. + + + MSI + + + Plessey + + + Intelligent Mail barcode + + + + UPC_A | UPC_E | EAN_13 | EAN_8 | CODABAR | CODE_39 | CODE_93 | CODE_128 | ITF | RSS_14 | RSS_EXPANDED + without MSI (to many false-positives) and IMB (not enough tested, and it looks more like a 2D) + + + + + Renders an Aztec code as a + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + This implementation can detect and decode Aztec codes in an image. + + David Olivier + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + a String representing the content encoded by the Data Matrix code + + + + + Locates and decodes a Data Matrix code in an image. + + image of barcode to decode + passed as a {@link java.util.Hashtable} from {@link com.google.zxing.DecodeHintType} + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + The general exception class throw when something goes wrong during decoding of a barcode. + This includes, but is not limited to, failing checksums / error correction algorithms, being + unable to locate finder timing patterns, and so on. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class. + + The inner exception. + + + + Initializes a new instance of the class. + + The inner exception. + + + + + JAVAPORT: The original code was a 2D array of ints, but since it only ever gets assigned + 0, 1 and 2 I'm going to use less memory and go with bytes. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Sets the specified x. + + The x. + The y. + The value. + + + + Sets the specified x. + + The x. + The y. + if set to true [value]. + + + + Clears the specified value. + + The value. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Gets the height. + + + + + Gets the width. + + + + + Gets or sets the with the specified x. + + + + + an internal representation as bytes, in row-major order. array[y][x] represents point (x,y) + + + + + Jacob Haynes + + + + + Creates a Barcode row of the width + + The width. + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + A boolean which is true if the bar black false if it is white + How many spots wide the bar is. + + + + + This function scales the row + + How much you want the image to be scaled, must be greater than or equal to 1. + the scaled row + + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Superclass of implementations that read barcodes in the RSS family of formats. + + + + + Initializes a new instance of the class. + + + + + Gets the decode finder counters. + + + + + + Gets the data character counters. + + + + + + Gets the odd rounding errors. + + + + + + Gets the even rounding errors. + + + + + + Gets the odd counts. + + + + + + Gets the even counts. + + + + + + Parses the finder value. + + The counters. + The finder patterns. + The value. + + + + + Counts the specified array. + + The array. + + + + + Increments the specified array. + + The array. + The errors. + + + + Decrements the specified array. + + The array. + The errors. + + + + Determines whether [is finder pattern] [the specified counters]. + + The counters. + + true if [is finder pattern] [the specified counters]; otherwise, false. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + This object renders a MSI code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Implements decoding of the EAN-13 format.

+ + dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Initializes a new instance of the class. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + Based on pattern of odd-even ('L' and 'G') patterns used to encoded the explicitly-encoded + digits in a barcode, determines the implicitly encoded first digit and adds it to the + result string. + + string to insert decoded first digit into + int whose bits indicates the pattern of odd/even L/G patterns used to + encode digits + -1 if first digit cannot be determined + + + + Get the format of this decoder. + The 1D format. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Error Correction Code for ECC200. + + + + + Lookup table which factors to use for which number of error correction codewords. + See FACTORS. + + + + + Precomputed polynomial factors for ECC 200. + + + + + Creates the ECC200 error correction for an encoded message. + + The codewords. + information about the symbol to be encoded + the codewords with interleaved error correction. + + + +

Encapsulates a block of data within a Data Matrix Code. Data Matrix Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ + bbrown@google.com (Brian Brown) +
+
+ + +

When Data Matrix Codes use multiple data blocks, they actually interleave the bytes of each of them. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ + bytes as read directly from the Data Matrix Code + version of the Data Matrix Code + DataBlocks containing original bytes, "de-interleaved" from representation in the + Data Matrix Code +
+
+ + + Implements Reed-Solomon encoding, as the name implies. + + Sean Owen + William Rucklidge + + + This Binarizer implementation uses the old ZXing global histogram approach. It is suitable + for low-end mobile devices which don't have enough CPU or memory to use a local thresholding + algorithm. However, because it picks a global black point, it cannot handle difficult shadows + and gradients. + + Faster mobile devices and all desktop applications should probably use HybridBinarizer instead. + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The source. + + + + Applies simple sharpening to the row data to improve performance of the 1D Readers. + + + + + + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + + A new concrete Binarizer implementation object. + + + + + Does not sharpen the data, as this call is intended to only be used by 2D Readers. + + + + +

Encapsulates the result of detecting a barcode in an image. This includes the raw + matrix of black/white pixels corresponding to the barcode, and possibly points of interest + in the image, like the location of finder patterns or corners of the barcode in the image.

+
+ Sean Owen +
+ + + initializing constructor + + + + + + + the detected bits + + + + + the pixel points where the result is found + + + + + The number's sign, where Positive also stands for the number zero. + + + + + A simple result type encapsulating a string that has no further interpretation. + + Sean Owen + + + Parses strings of digits that represent a ISBN. + + + jbreiden@google.com (Jeff Breidenbach) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + See ISBN-13 For Dummies + + The result. + + + + + Represents a parsed result that encodes extended product information as encoded by the RSS format, like weight, price, dates, etc. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + extension for kilogram weight type + + + + + extension for pounds weight type + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the raw text + + + + + the product id + + + + + the sscc + + + + + the lot number + + + + + the production date + + + + + the packaging date + + + + + the best before date + + + + + the expiration date + + + + + the weight + + + + + the weight type + + + + + the weight increment + + + + + the price + + + + + the price increment + + + + + the price currency + + + + + the uncommon AIs + + + + + the display representation (raw text) + + + + + class which represents the luminance values for a bitmap object of a WriteableBitmap class + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + initializing constructor + + + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + A smart class to encode some content to raw pixel data + + + + + A base class for specific barcode writers with specific formats of barcode images. + + The type of the output. + + + + A base class for specific barcode writers with specific formats of barcode images. + + + + + + + + + + + + + + + + Encodes the specified contents and returns a BitMatrix array. + That array has to be rendered manually or with a IBarcodeRenderer. + + The contents. + + + + + Gets or sets the barcode format. + The value is only suitable if the MultiFormatWriter is used. + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents and returns a rendered instance of the barcode. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The matrix. + + + + + Gets or sets the renderer which should be used to render the encoded BitMatrix. + + + + + Initializes a new instance of the class. + + + + + + + Satoru Takabayashi + Daniel Switkin + Sean Owen + + + + Apply mask penalty rule 1 and return the penalty. Find repetitive cells with the same color and + give penalty to them. Example: 00000 or 11111. + + The matrix. + + + + + Apply mask penalty rule 2 and return the penalty. Find 2x2 blocks with the same color and give + penalty to them. This is actually equivalent to the spec's rule, which is to find MxN blocks and give a + penalty proportional to (M-1)x(N-1), because this is the number of 2x2 blocks inside such a block. + + The matrix. + + + + + Apply mask penalty rule 3 and return the penalty. Find consecutive cells of 00001011101 or + 10111010000, and give penalty to them. If we find patterns like 000010111010000, we give + penalties twice (i.e. 40 * 2). + + The matrix. + + + + + Apply mask penalty rule 4 and return the penalty. Calculate the ratio of dark cells and give + penalty if the ratio is far from 50%. It gives 10 penalty for 5% distance. + + The matrix. + + + + + Return the mask bit for "getMaskPattern" at "x" and "y". See 8.8 of JISX0510:2004 for mask + pattern conditions. + + The mask pattern. + The x. + The y. + + + + + Helper function for applyMaskPenaltyRule1. We need this for doing this calculation in both + vertical and horizontal orders respectively. + + The matrix. + if set to true [is horizontal]. + + + +

Encapsulates a QR Code's format information, including the data mask used and + error correction level.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + +
+ + See ISO 18004:2006, Annex C, Table C.1 + + + Offset i holds the number of 1 bits in the binary representation of i + + + + Decodes the format information. + + format info indicator, with mask still applied + The masked format info2. + + information about the format it specifies, or null + if doesn't seem to match any known pattern + + + +

Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations + of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix, + including areas used for finder patterns, timing patterns, etc. These areas should be unused + after the point they are unmasked anyway.

+ +

Note that the diagram in section 6.8.1 is misleading since it indicates that i is column position + and j is row position. In fact, as the text says, i is row position and j is column position.

+ +
+ Sean Owen +
+ + See ISO 18004:2006 6.8.1 + + +

Implementations of this method reverse the data masking process applied to a QR Code and + make its bits ready to read.

+
+ + representation of QR Code bits + dimension of QR Code, represented by bits, being unmasked +
+ + + A Barcode Value for the PDF417 barcode. + The scanner will iterate through the bitmatrix, + and given the different methods or iterations + will increment a given barcode value's confidence. + + When done, this will return the values of highest confidence. + + Guenther Grau + + + + Incremenets the Confidence for a given value. (Adds an occurance of a value) + + + Value. + + + + Determines the maximum occurrence of a set value and returns all values which were set with this occurrence. + + an array of int, containing the values with the highest occurrence, or null, if no value was set. + + + + Returns the confience value for a given barcode value + + Barcode value. + + + @see UPCEANExtension2Support + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + one {@link ResultMetadataType} to appropriate value, or {@code null} if not known + + + + @see UPCEANExtension5Support + + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + + + + One row of an RSS Expanded Stacked symbol, consisting of 1+ expanded pairs. + + + + + Two rows are equal if they contain the same pairs in the same order. + + + + + Did this row of the image have to be reversed (mirrored) to recognize the pairs? + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + This object renders an EAN13 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + This object renders a CODE39 code as a . + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Decodes Code 39 barcodes. Supports "Full ASCII Code 39" if USE_CODE_39_EXTENDED_MODE is set.

+ Sean Owen + @see Code93Reader +
+
+ + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. It will not decoded "extended Code 39" sequences. + + + + + Creates a reader that can be configured to check the last character as a check digit. + It will not decoded "extended Code 39" sequences. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + + Creates a reader that can be configured to check the last character as a check digit, + or optionally attempt to decode "extended Code 39" sequences that are used to encode + the full ASCII character set. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + if true, will attempt to decode extended Code 39 sequences in the text. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + Returns a string with all possible characters + + + + + implements an Intelligent Mail barcode + Rishabh Hatgadkar + + + + + Encapsulates the result of decoding a matrix of bits. This typically + applies to 2D barcode formats. For now it contains the raw bytes obtained, + as well as a String interpretation of those bytes, if applicable. + Sean Owen + + + + + initializing constructor + + + + + + + + + initializing constructor + + + + + + + + + + + initializing constructor + + + + + + + + + + initializing constructor + + + + + + + + + + + + raw bytes representing the result, or null if not applicable + + + + + how many bits of are valid; typically 8 times its length + + + + + text representation of the result + + + + + list of byte segments in the result, or null if not applicable + + + + + name of error correction level used, or null if not applicable + + + + + gets a value which describe if structure append data was found + + + + + number of errors corrected, or null if not applicable + + + + + gives the sequence number of the result if structured append was found + + + + + number of erasures corrected, or null if not applicable + + + + + gives the parity information if structured append was found + + + + + Miscellanseous data value for the various decoders + + The other. + + + + Integer inefficiently represented internally using base-10 digits, in order to allow a + visual representation as a base-10 string. Only for internal use. + + + + + 10 numeration base for string representation, very inefficient for computations. + + + + + Maximum size for numbers is up to 10240 binary digits or approximately (safe to use) 3000 decimal digits. + The maximum size is, in fact, double the previously specified amount, in order to accommodate operations' + overflow. + + + + Integer constants + + + + The array of digits of the number. + + + + + The actual number of digits of the number. + + + + + The number sign. + + + + + Default constructor, intializing the Base10BigInteger with zero. + + + + + Constructor creating a new Base10BigInteger as a conversion of a regular base-10 long. + + The base-10 long to be converted + + + + Constructor creating a new Base10BigInteger as a copy of an existing Base10BigInteger. + + The Base10BigInteger to be copied + + + + Determines whether the specified Base10BigInteger is equal to the current Base10BigInteger. + + The Base10BigInteger to compare with the current Base10BigInteger + True if the specified Base10BigInteger is equal to the current Base10BigInteger, + false otherwise + + + + Determines whether the specified System.Object is equal to the current Base10BigInteger. + + The System.Object to compare with the current Base10BigInteger + True if the specified System.Object is equal to the current Base10BigInteger, + false otherwise + + + + Serves as a hash function for the Base10BigInteger type. + + A hash code for the current Base10BigInteger + + + + String representation of the current Base10BigInteger, converted to its base-10 representation. + + The string representation of the current Base10BigInteger + + + + Base10BigInteger inverse with respect to addition. + + The Base10BigInteger whose opposite is to be computed + The Base10BigInteger inverse with respect to addition + + + + Greater test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a > b, false otherwise + + + + Greater or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a >= b, false otherwise + + + + Smaller test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a < b, false otherwise + + + + Smaller or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a <= b, false otherwise + + + + Computes the absolute value of a Base10BigInteger. + + The Base10BigInteger whose absolute value is to be computed + The absolute value of the given BigInteger + + + + Addition operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the addition + + + + Subtraction operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the subtraction + + + + Multiplication operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the multiplication + + + + Implicit conversion operator from long to Base10BigInteger. + + The long to be converted to a Base10BigInteger + The Base10BigInteger converted from the given long + + + + Equality test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a == b, false otherwise + + + + Inequality test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a != b, false otherwise + + + + Greater test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a > b, false otherwise + + + + Smaller test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a < b, false otherwise + + + + Greater or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a >= b, false otherwise + + + + Smaller or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a <= b, false otherwise + + + + Base10BigInteger inverse with respect to addition. + + The Base10BigInteger whose opposite is to be computed + The Base10BigInteger inverse with respect to addition + + + + Addition operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the addition + + + + Subtraction operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the subtraction + + + + Multiplication operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the multiplication + + + + Incremetation by one operation of a Base10BigInteger. + + The Base10BigInteger to be incremented by one + The Base10BigInteger result of incrementing by one + + + + Decremetation by one operation of a Base10BigInteger. + + The Base10BigInteger to be decremented by one + The Base10BigInteger result of decrementing by one + + + + Adds two BigNumbers a and b, where a >= b, a, b non-negative. + + + + + Subtracts the Base10BigInteger b from the Base10BigInteger a, where a >= b, a, b non-negative. + + + + + Multiplies two Base10BigIntegers. + + + + + Sets the number sign. + + + + + Tries to parse results that are a URI of some kind. + + Sean Owen + + + +

Parses an "smtp:" URI result, whose format is not standardized but appears to be like: + smtp[:subject[:body]]}.

+

See http://code.google.com/p/zxing/issues/detail?id=536

+
+ Sean Owen +
+ + Implements the "MECARD" address book entry format. + + Supported keys: N, SOUND, TEL, EMAIL, NOTE, ADR, BDAY, URL, plus ORG + Unsupported keys: TEL-AV, NICKNAME + + Except for TEL, multiple values for keys are also not supported; + the first one found takes precedence. + + Our understanding of the MECARD format is based on this document: + + http://www.mobicode.org.tw/files/OMIA%20Mobile%20Bar%20Code%20Standard%20v3.2.1.doc + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + +

See + + DoCoMo's documentation about the result types represented by subclasses of this class.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + Implements KDDI AU's address book format. See + + http://www.au.kddi.com/ezfactory/tec/two_dimensions/index.html. + (Thanks to Yuzo for translating!) + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Aztec result meta data. + + + + + + + + + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + This object extends LuminanceSource around an array of YUV data returned from the camera driver, + with the option to crop to a rectangle within the full data. This can be used to exclude + superfluous pixels around the perimeter and speed up decoding. + It works for any pixel format where the Y channel is planar and appears first, including + YCbCr_420_SP and YCbCr_422_SP. + @author dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The yuv data. + Width of the data. + Height of the data. + The left. + The top. + The width. + The height. + if set to true [reverse horiz]. + + + + Initializes a new instance of the class. + + The luminances. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Renders the cropped greyscale bitmap. + + + + + + creates a new instance + + + + + + + + + + + + + + + Whether this subclass supports cropping. + + + + width of image from {@link #renderThumbnail()} + + + + + height of image from {@link #renderThumbnail()} + + + + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Maximum Codewords (Data + Error). + + + + + Gets the bit count sum. + + The bit count sum. + Module bit count. + + + + Converts an ICollection<int> to an int[] + Carry-over from Java. Will likely remove and replace with the Generic .ToArray() method. + + The int array. + List. + + + + Translate the symbol into a codeword + + the codeword corresponding to the symbol. + encoded symbol to translate to a codeword + + + + The sorted table of all possible symbols. Extracted from the PDF417 + specification. The index of a symbol in this table corresponds to the + index into the codeword table. + + + + + This table contains to codewords for all symbols. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + The class holds the available options for the QrCodeWriter + + + + + if true, don't switch to codeset C for numbers + + + + + This class renders CodaBar as []. + + dsbnatut@gmail.com (Kazuki Nishiura) + + + +

Decodes Codabar barcodes.

+ + Bas Vijfwinkel +
+
+ + These represent the encodings of characters, as patterns of wide and narrow bars. The 7 least-significant bits of + each int correspond to the pattern of wide and narrow, with 1s representing "wide" and 0s representing narrow. + + + + Records the size of all runs of white and black pixels, starting with white. + This is just like recordPattern, except it records all the counters, and + uses our builtin "counters" member for storage. + + row to count from + + + + Encapsulates a type of hint that a caller may pass to a barcode reader to help it + more quickly or accurately decode it. It is up to implementations to decide what, + if anything, to do with the information that is supplied. + + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Unspecified, application-specific hint. Maps to an unspecified . + + + + + Image is a pure monochrome image of a barcode. Doesn't matter what it maps to; + use = true. + + + + + Image is known to be of one of a few possible formats. + Maps to a of s. + + + + + Spend more time to try to find a barcode; optimize for accuracy, not speed. + Doesn't matter what it maps to; use = true. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + + + The caller needs to be notified via callback when a possible + is found. Maps to a . + + + + + Assume MSI codes employ a check digit. Maps to . + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + Maps to . + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + 1D readers supporting rotation with TRY_HARDER enabled. + But BarcodeReader class can do auto-rotating for 1D and 2D codes. + Enabling that option prevents 1D readers doing double rotation. + BarcodeReader enables that option automatically if "global" auto-rotation is enabled. + Maps to . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to; + use . + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + The class holds the available options for the DatamatrixWriter + + + + + Specifies the matrix shape for Data Matrix + + + + + Specifies a minimum barcode size + + + + + Specifies a maximum barcode size + + + + + Specifies the default encodation + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + +

Represents a polynomial whose coefficients are elements of a GF. + Instances of this class are immutable.

+

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + the {@link GenericGF} instance representing the field to use + to perform computations + coefficients as ints representing elements of GF(size), arranged + from most significant (highest-power term) coefficient to least significant + if argument is null or empty, + or if leading coefficient is 0 and this is not a + constant polynomial (that is, it is not the monomial "0") + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + + + degree of this polynomial + + + + + Gets a value indicating whether this is zero. + + true iff this polynomial is the monomial "0" + + + +

Represents a 2D matrix of bits. In function arguments below, and throughout the common + module, x is the column position, and y is the row position. The ordering is always x, y. + The origin is at the top-left.

+

Internally the bits are represented in a 1-D array of 32-bit ints. However, each row begins + with a new int. This is done intentionally so that we can copy out a row into a BitArray very + efficiently.

+

The ordering of bits is row-major. Within each int, the least significant bits are used first, + meaning they represent lower x values. This is compatible with BitArray's implementation.

+
+ Sean Owen + dswitkin@google.com (Daniel Switkin) +
+ + + Creates an empty square . + + height and width + + + + Creates an empty square . + + bit matrix width + bit matrix height + + + + Interprets a 2D array of booleans as a , where "true" means an "on" bit. + + bits of the image, as a row-major 2D array. Elements are arrays representing rows + representation of image + + + +

Flips the given bit.

+
+ The horizontal component (i.e. which column) + The vertical component (i.e. which row) +
+ + + flip all of the bits, if shouldBeFlipped is true for the coordinates + + should return true, if the bit at a given coordinate should be flipped + + + + Exclusive-or (XOR): Flip the bit in this {@code BitMatrix} if the corresponding + mask bit is set. + + The mask. + + + Clears all bits (sets to false). + + +

Sets a square region of the bit matrix to true.

+ +
+ The horizontal position to begin at (inclusive) + + The vertical position to begin at (inclusive) + + The width of the region + + The height of the region + +
+ + A fast method to retrieve one row of data from the matrix as a BitArray. + + + The row to retrieve + + An optional caller-allocated BitArray, will be allocated if null or too small + + The resulting BitArray - this reference should always be used even when passing + your own row + + + + + Sets the row. + + row to set + {@link BitArray} to copy from + + + + Modifies this {@code BitMatrix} to represent the same but rotated 180 degrees + + + + + This is useful in detecting the enclosing rectangle of a 'pure' barcode. + + {left,top,width,height} enclosing rectangle of all 1 bits, or null if it is all white + + + + This is useful in detecting a corner of a 'pure' barcode. + + {x,y} coordinate of top-left-most 1 bit, or null if it is all white + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + The line separator. + + A that represents this instance. + + + + + Clones this instance. + + + + + + Converts this ByteMatrix to a black and white bitmap. + + A black and white bitmap converted from this ByteMatrix. + + + The width of the matrix + + + + The height of the matrix + + + + This method is for compatibility with older code. It's only logical to call if the matrix + is square, so I'm throwing if that's not the case. + + + row/column dimension of this matrix + + + + + The rowsize of the matrix + + + +

Gets the requested bit, where true means black.

+ +
+ The horizontal component (i.e. which column) + + The vertical component (i.e. which row) + + value of given bit in matrix + +
+ + + Represents a parsed result that encodes a Vehicle Identification Number (VIN). + + + + + A smart class to decode the barcode inside a bitmap object + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Constructor for additional image formats for one BarcodeReader class + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Optional: Gets or sets the function to create a luminance source object for a bitmap. + If null a platform specific default LuminanceSource is used + + + The function to create a luminance source object. + + + + + A smart class to decode the barcode inside a bitmap object + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + State represents all information about a sequence necessary to generate the current output. + Note that a state is immutable. + + + + + Create a new state representing this state with a latch to a (not + necessary different) mode, and then a code. + + + + + Create a new state representing this state, with a temporary shift + to a different mode to output a single value. + + + + + Create a new state representing this state, but an additional character + output in Binary Shift mode. + + + + + Create the state identical to this one, but we are no longer in + Binary Shift mode. + + + + + Returns true if "this" state is better (or equal) to be in than "that" + state under all possible circumstances. + + + + + Generates Aztec 2D barcodes. + + Rustam Abdullaev + + + + Encodes the given binary content as an Aztec symbol + + input data string + Aztec symbol matrix with metadata + + + + Encodes the given binary content as an Aztec symbol + + input data string + minimal percentage of error check words (According to ISO/IEC 24778:2008, + a minimum of 23% + 3 words is recommended) + if non-zero, a user-specified value for the number of layers + + Aztec symbol matrix with metadata + + + + + Renders a to a + + + + + Interface for a class to convert a BitMatrix to an output image format + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + The options. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + + Gets or sets the font family. + + + The font family. + + + + + Gets or sets the size of the font. + + + The size of the font. + + + + + Gets or sets the font stretch. + + + The font stretch. + + + + + Gets or sets the font style. + + + The font style. + + + + + Gets or sets the font weight. + + + The font weight. + + + + + A Codeword in the PDF417 barcode + + Guenther Grau + + + + Default value for the RowNumber (-1 being an invalid real number) + + + + + Initializes a new instance of the class. + + Start x. + End x. + Bucket. + Value. + + + + Determines whether this instance is valid row number the specified rowNumber. + + true if this instance is valid row number the specified rowNumber; otherwise, false. + Row number. + + + + Sets the row number as the row's indicator column. + + + + + Returns a that represents the current . + + A that represents the current . + + + + Gets the width. + + The width. + + + + Gets a value indicating whether this instance has valid row number. + + true if this instance has valid row number; otherwise, false. + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + This implementation can detect and decode multiple QR Codes in an image. + + + + + This implementation can detect and decode QR Codes in an image. + Sean Owen + + + + + Gets the decoder. + + + + + + Locates and decodes a QR code in an image. + + a String representing the content encoded by the QR code + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Simply encapsulates a width and height. + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + + + + + + the width + + + + + the height + + + + + Enumeration for encodation types + + + + +

The main class which implements Data Matrix Code decoding -- as opposed to locating and extracting + the Data Matrix Code from an image.

+ + bbrown@google.com (Brian Brown) +
+
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a Data Matrix Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+ + booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code + if the Data Matrix Code cannot be decoded +
+
+ + +

Decodes a Data Matrix Code represented as a . A 1 or "true" is taken + to mean a black module.

+
+ booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+ + data and error correction codewords + number of codewords that are data bytes +
+
+ + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. By keeping track of the + last black points it encountered, it determines the corners of the barcode. + + David Olivier + + + + Creates a WhiteRectangleDetector instance + + The image. + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + Creates a WhiteRectangleDetector instance + + barcode image to find a rectangle in + initial size of search area around center + x position of search center + y position of search center + + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + + Initializes a new instance of the class. + + The image. + if image is too small + + + + Initializes a new instance of the class. + + The image. + Size of the init. + The x. + The y. + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. + + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + recenters the points of a constant distance towards the center + + bottom most point + left most point + right most point + top most point + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + Determines whether a segment contains a black point + + min value of the scanned coordinate + max value of the scanned coordinate + value of fixed coordinate + set to true if scan must be horizontal, false if vertical + + true if a black point has been found, else false. + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Parses the "URLTO" result format, which is of the form "URLTO:[title]:[url]". + This seems to be used sometimes, but I am not able to find documentation + on its origin or official format? + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Parses a "geo:" URI result, which specifies a location on the surface of + the Earth as well as an optional altitude above the surface. See + + http://tools.ietf.org/html/draft-mayrhofer-geo-uri-00. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a calendar event at a certain time, optionally with attendees and a location. + + Sean Owen + + + + Determines whether [is start all day]. + + if start time was specified as a whole day + + + + Parses a string as a date. RFC 2445 allows the start and end fields to be of type DATE (e.g. 20081021) + or DATE-TIME (e.g. 20081021T123000 for local time, or 20081021T123000Z for UTC). + + The string to parse + + if not a date formatted string + + + + Gets the start. + + + + + event end , or null if event has no duration + + + + + Gets a value indicating whether this instance is end all day. + + true if end time was specified as a whole day + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Aztec 2D code representation + + Rustam Abdullaev + + + + Compact or full symbol indicator + + + + + Size in pixels (width and height) + + + + + Number of levels + + + + + Number of data codewords + + + + + The symbol image + + + + + Encapsulates logic that can detect an Aztec Code in an image, even if the Aztec Code + is rotated or skewed, or partially obscured. + + David Olivier + + + + Initializes a new instance of the class. + + The image. + + + + Detects an Aztec Code in an image. + + + + + Detects an Aztec Code in an image. + + if true, image is a mirror-image of original. + + encapsulating results of detecting an Aztec Code + + + + + Extracts the number of data layers and data blocks from the layer around the bull's eye + + bullEyeCornerPoints the array of bull's eye corners + + + + + Corrects the parameter bits using Reed-Solomon algorithm + + paremeter bits + compact true if this is a compact Aztec code + + + + + Finds the corners of a bull-eye centered on the passed point + This returns the centers of the diagonal points just outside the bull's eye + Returns [topRight, bottomRight, bottomLeft, topLeft] + + Center point + The corners of the bull-eye + + + + Finds a candidate center point of an Aztec code from an image + + the center point + + + + Gets the Aztec code corners from the bull's eye corners and the parameters. + + the array of bull's eye corners + the array of aztec code corners + + + + Creates a BitMatrix by sampling the provided image. + topLeft, topRight, bottomRight, and bottomLeft are the centers of the squares on the + diagonal just outside the bull's eye. + + The image. + The top left. + The bottom left. + The bottom right. + The top right. + + + + + Samples a line + + start point (inclusive) + end point (exclusive) + number of bits + the array of bits as an int (first bit is high-order bit of result) + + + + Determines whether [is white or black rectangle] [the specified p1]. + + The p1. + The p2. + The p3. + The p4. + true if the border of the rectangle passed in parameter is compound of white points only + or black points only + + + + Gets the color of a segment + + The p1. + The p2. + 1 if segment more than 90% black, -1 if segment is more than 90% white, 0 else + + + + Gets the coordinate of the first point with a different color in the given direction + + The init. + if set to true [color]. + The dx. + The dy. + + + + + Expand the square represented by the corner points by pushing out equally in all directions + + the corners of the square, which has the bull's eye at its center + the original length of the side of the square in the target bit matrix + the new length of the size of the square in the target bit matrix + the corners of the expanded square + + + +

The main class which implements QR Code decoding -- as opposed to locating and extracting + the QR Code from an image.

+
+ + Sean Owen + +
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a QR Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Decodes a QR Code represented as a {@link BitMatrix}. A 1 or "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+
+ data and error correction codewords + number of codewords that are data bytes + +
+ + Sean Owen + + + {@link BitMatrix} to parse + ReaderException if dimension is not >= 21 and 1 mod 4 + + +

Reads format information from one of its two locations within the QR Code.

+ +
+ {@link FormatInformation} encapsulating the QR Code's format info + + ReaderException if both format information locations cannot be parsed as + the valid encoding of format information + +
+ +

Reads version information from one of its two locations within the QR Code.

+ +
+ {@link Version} encapsulating the QR Code's version + + ReaderException if both version information locations cannot be parsed as + the valid encoding of version information + +
+ +

Reads the bits in the {@link BitMatrix} representing the finder pattern in the + correct order in order to reconstruct the codewords bytes contained within the + QR Code.

+ +
+ bytes encoded within the QR Code + + ReaderException if the exact number of bytes expected is not read +
+ + Revert the mask removal done while reading the code words. The bit matrix should revert to its original state. + + + Prepare the parser for a mirrored operation. + This flag has effect only on the {@link #readFormatInformation()} and the + {@link #readVersion()}. Before proceeding with {@link #readCodewords()} the + {@link #mirror()} method should be called. + + @param mirror Whether to read version and format information mirrored. + + + Mirror the bit matrix in order to attempt a second reading. + + + + The class holds the available options for the + + + + + Specifies whether to use compact mode for PDF417 (type ). + + + + + Specifies what compaction mode to use for PDF417 (type + ). + + + + + Specifies the minimum and maximum number of rows and columns for PDF417 (type + ). + + + + + Specifies what degree of error correction to use + + + + + Specifies what degree of error correction to use + + + + + Specifies what character encoding to use where applicable (type {@link String}) + + + + + Explicitly disables ECI segment when generating PDF417 Code + That is against the specification but some + readers have problems if the charset is switched from + CP437 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use different encodings + and the ECI segment is omitted. + + + + + Data object to specify the minimum and maximum number of rows and columns for a PDF417 barcode. + @author qwandor@google.com (Andrew Walbran) + + + + + Initializes a new instance of the class. + + The min cols. + The max cols. + The min rows. + The max rows. + + + + Gets the min cols. + + + + + Gets the max cols. + + + + + Gets the min rows. + + + + + Gets the max rows. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + MultiFormatReader is a convenience class and the main entry point into the library for most uses. + By default it attempts to decode all barcode formats that the library supports. Optionally, you + can provide a hints object to request different behavior, for example only decoding QR codes. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + This version of decode honors the intent of Reader.decode(BinaryBitmap) in that it + passes null as a hint to the decoders. However, that makes it inefficient to call repeatedly. + Use setHints() followed by decodeWithState() for continuous scan applications. + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the hints provided. Does not honor existing state. + + + The pixel data to decode + + The hints to use, clearing the previous state. + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the state set up by calling setHints() previously. Continuous scan + clients will get a large speed increase by using this instead of decode(). + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + + resets all specific readers + + + + This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls + to decodeWithState(image) can reuse the same set of readers without reallocating memory. This + is important for performance in continuous scan clients. + + + + + + A wrapper implementation of {@link LuminanceSource} which inverts the luminances it returns -- black becomes + white and vice versa, and each value becomes (255-value). + + Sean Owen + + + + Initializes a new instance of the class. + + The @delegate. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Inverts this instance. + + original delegate {@link LuminanceSource} since invert undoes itself + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff; + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + + + Whether this subclass supports cropping. + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + This object renders a Data Matrix code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + Guillaume Le Biller Added to zxing lib. + + + + encodes the content to a BitMatrix + + + + + + + + + + encodes the content to a BitMatrix + + + + + + + + + + + Encode the given symbol info to a bit matrix. + + The DataMatrix placement. + The symbol info to encode. + + + The bit matrix generated. + + + + Convert the ByteMatrix to BitMatrix. + + The input matrix. + The requested width of the image (in pixels) with the Datamatrix code + The requested height of the image (in pixels) with the Datamatrix code + The output matrix. + + + + This implementation can detect and decode Data Matrix codes in an image. + + bbrown@google.com (Brian Brown) + + + + + Locates and decodes a Data Matrix code in an image. + + + a String representing the content encoded by the Data Matrix code + + + + Locates and decodes a Data Matrix code in an image. + + + + a String representing the content encoded by the Data Matrix code + + + + does nothing here + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + This class implements a local thresholding algorithm, which while slower than the + GlobalHistogramBinarizer, is fairly efficient for what it does. It is designed for + high frequency images of barcodes with black data on white backgrounds. For this application, + it does a much better job than a global blackpoint with severe shadows and gradients. + However it tends to produce artifacts on lower frequency images and is therefore not + a good general purpose binarizer for uses outside ZXing. + + This class extends GlobalHistogramBinarizer, using the older histogram approach for 1D readers, + and the newer local approach for 2D readers. 1D decoding using a per-row histogram is already + inherently local, and only fails for horizontal gradients. We can revisit that problem later, + but for now it was not a win to use local blocks for 1D. + + This Binarizer is the default for the unit tests and the recommended class for library users. + dswitkin@google.com (Daniel Switkin) + + + + + initializing constructor + + + + + + creates a new instance + + + + + + + Calculates the final BitMatrix once for all requests. This could be called once from the + constructor instead, but there are some advantages to doing it lazily, such as making + profiling easier, and not doing heavy lifting when callers don't expect it. + + + + + For each 8x8 block in the image, calculate the average black point using a 5x5 grid + of the blocks around it. Also handles the corner cases (fractional blocks are computed based + on the last 8 pixels in the row/column which are also used in the previous block). + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + The black points. + The matrix. + + + + Applies a single threshold to an 8x8 block of pixels. + + The luminances. + The xoffset. + The yoffset. + The threshold. + The stride. + The matrix. + + + + Calculates a single black point for each 8x8 block of pixels and saves it away. + See the following thread for a discussion of this algorithm: + http://groups.google.com/group/zxing/browse_thread/thread/d06efa2c35a7ddc0 + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + + + + + gives the black matrix + + + + + Superclass of classes encapsulating types ECIs, according to "Extended Channel Interpretations" + 5.3 of ISO 18004. + + Sean Owen + + + ECI value + representing ECI of given value, or null if it is legal but unsupported + ArgumentException if ECI value is invalid + + + + the ECI value + + + + + A simple, fast array of bits, represented compactly by an array of ints internally. + + Sean Owen + + + + default constructor + + + + + initializing constructor + + desired size of the array + + + + Flips bit i. + + bit to set + + + + + Gets the next set. + + first bit to check + index of first bit that is set, starting from the given index, or size if none are set + at or beyond this given index + + + + see getNextSet(int) + + index to start looking for unset bit + index of next unset bit, or if none are unset until the end + + + Sets a block of 32 bits, starting at bit i. + + + first bit to set + + the new value of the next 32 bits. Note again that the least-significant bit + corresponds to bit i, the next-least-significant to i+1, and so on. + + + + + Sets a range of bits. + + start of range, inclusive. + end of range, exclusive + + + Clears all bits (sets to false). + + + Efficient method to check if a range of bits is set, or not set. + + + start of range, inclusive. + + end of range, exclusive + + if true, checks that bits in range are set, otherwise checks that they are not set + + true iff all bits are set or not set in range, according to value argument + if end is less than start or the range is not contained in the array + + + + Appends the bit. + + The bit. + + + + Appends the least-significant bits, from value, in order from most-significant to + least-significant. For example, appending 6 bits from 0x000001E will append the bits + 0, 1, 1, 1, 1, 0 in that order. + + containing bits to append + bits from value to append + + + + adds the array to the end + + + + + + XOR operation + + + + + + converts to bytes. + + first bit to start writing + array to write into. Bytes are written most-significant byte first. This is the opposite + of the internal representation, which is exposed by BitArray + position in array to start writing + how many bytes to write + + + Reverses all bits in the array. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Erstellt ein neues Objekt, das eine Kopie der aktuellen Instanz darstellt. + + + Ein neues Objekt, das eine Kopie dieser Instanz darstellt. + + + + + size of the array, number of elements + + + + + size of the array in bytes + + + + + index accessor + + + + + + underlying array of ints. The first element holds the first 32 bits, and the least + significant bit is bit 0. + + + +

Parses an "sms:" URI result, which specifies a number to SMS and optional + "via" number. See + the IETF draft on this.

+ +

This actually also parses URIs starting with "mms:", "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + + Parses strings of digits that represent a RSS Extended code. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + tries to parse a text representation to a specific result object + + + + + + + A smart class to encode some content to a barcode image + + + + + Interface for a smart class to encode some content into a barcode + + + Interface for a smart class to encode some content into a barcode + + + + + Encodes the specified contents. + + The contents. + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Initializes a new instance of the class. + + + + + Extends with more information specific to the Aztec format, + like the number of layers and whether it's compact. + + + + + Initializes a new instance of the class. + + The bits. + The points. + if set to true [compact]. + The nb datablocks. + The nb layers. + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + Encapsulates the result of decoding a barcode within an image. + + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + The timestamp. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + The timestamp. + + + + Adds one metadata to the result + + The type. + The value. + + + + Adds a list of metadata to the result + + The metadata. + + + + Adds the result points. + + The new points. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + raw text encoded by the barcode, if applicable, otherwise null + + + raw bytes encoded by the barcode, if applicable, otherwise null + + + + points related to the barcode in the image. These are typically points + identifying finder patterns or the corners of the barcode. The exact meaning is + specific to the type of barcode that was decoded. + + + + {@link BarcodeFormat} representing the format of the barcode that was decoded + + + + {@link Hashtable} mapping {@link ResultMetadataType} keys to values. May be + null. This contains optional metadata about what was detected about the barcode, + like orientation. + + + + + Gets the timestamp. + + + + + how many bits of are valid; typically 8 times its length + + + + + This object renders a QR Code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + PDF 417 Detector Result class. Skipped private backing stores. + Guenther Grau + + + + + Initializes a new instance of the class. + + Bits. + Points. + + + + + + Sean Owen + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + + + Adds another Modulus + + Other. + + + + Subtract another Modulus + + Other. + + + + Multiply by another Modulus + + Other. + + + + Returns a Negative version of this instance + + + + + Multiply by a Scalar. + + Scalar. + + + + Multiplies by a Monomial + + The by monomial. + Degree. + Coefficient. + + + + Returns a that represents the current . + + A that represents the current . + + + + Gets the coefficients. + + The coefficients. + + + + degree of this polynomial + + + + + Gets a value indicating whether this instance is zero. + + true if this polynomial is the monomial "0" + + + + + Metadata about a PDF417 Barcode + + Guenther Grau + + + + Decodes RSS-14, including truncated and stacked variants. See ISO/IEC 24724:2006. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + This object renders a Plessey code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + This object renders an EAN8 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + + + a byte array of horizontal pixels (false = white, true = black) + + + + +

Implements decoding of the EAN-8 format.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Get the format of this decoder. + The 1D format. + + + + This is a factory class which finds the appropriate Writer subclass for the BarcodeFormat + requested and encodes the barcode with the supplied contents. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + encode the given data + + + + + + + + + + encode the given data + + + + + + + + + + + Gets the collection of supported writers. + + + + + This implementation can detect and decode a MaxiCode in an image. + + + + + Locates and decodes a MaxiCode in an image. + + a String representing the content encoded by the MaxiCode + if a MaxiCode cannot be decoded + + + + + Locates and decodes a MaxiCode within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + + Symbol info table for DataMatrix. + + + + Overrides the symbol info set used by this class. Used for testing purposes. + + @param override the symbol info set to use + + + + DataMatrix ECC 200 data encoder following the algorithm described in ISO/IEC 16022:200(E) in + annex S. + + + + + Padding character + + + + + mode latch to C40 encodation mode + + + + + mode latch to Base 256 encodation mode + + + + + FNC1 Codeword + + + + + Structured Append Codeword + + + + + Reader Programming + + + + + Upper Shift + + + + + 05 Macro + + + + + 06 Macro + + + + + mode latch to ANSI X.12 encodation mode + + + + + mode latch to Text encodation mode + + + + + mode latch to EDIFACT encodation mode + + + + + ECI character (Extended Channel Interpretation) + + + + + Unlatch from C40 encodation + + + + + Unlatch from X12 encodation + + + + + 05 Macro header + + + + + 06 Macro header + + + + + Macro trailer + + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + the encoded message (the char values range from 0 to 255) + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + requested shape. May be {@code SymbolShapeHint.FORCE_NONE},{@code SymbolShapeHint.FORCE_SQUARE} or {@code SymbolShapeHint.FORCE_RECTANGLE}. + the minimum symbol size constraint or null for no constraint + the maximum symbol size constraint or null for no constraint + encoding mode to start with + the encoded message (the char values range from 0 to 255) + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + General math-related and numeric utility functions. + + + + + Ends up being a bit faster than {@link Math#round(float)}. This merely rounds its + argument to the nearest int, where x.5 rounds up to x+1. Semantics of this shortcut + differ slightly from {@link Math#round(float)} in that half rounds down for negative + values. -2.5 rounds to -3, not -2. For purposes here it makes no difference. + + real value to round + nearest int + + + + + + + + + + Euclidean distance between points A and B + + + + + + + + + + Euclidean distance between points A and B + + + + + values to sum + sum of values in array + + + Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1 + of ISO 18004. + + + Sean Owen + + + character set ECI value + representing ECI of given value, or null if it is legal but unsupported + + + character set ECI encoding name + representing ECI for character encoding, or null if it is legalbut unsupported + + + + Represents a parsed result that encodes an email message including recipients, subject and body text. + + Sean Owen + + + + the email address + + + + + the TOs + + + + + the CCs + + + + + the BCCs + + + + + the subject + + + + + the body + + + + + the mailto: uri + + + + + A smart class to encode some content to a svg barcode image + + + + + Initializes a new instance of the class. + + + + + A base class which covers the range of exceptions which may occur when encoding a barcode using + the Writer framework. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner exc. + + + + + + + satorux@google.com (Satoru Takabayashi) - creator + + + + + Set all cells to 2. 2 means that the cell is empty (not set yet). + + JAVAPORT: We shouldn't need to do this at all. The code should be rewritten to begin encoding + with the ByteMatrix initialized all to zero. + + The matrix. + + + + Build 2D matrix of QR Code from "dataBits" with "ecLevel", "version" and "getMaskPattern". On + success, store the result in "matrix" and return true. + + The data bits. + The ec level. + The version. + The mask pattern. + The matrix. + + + + Embed basic patterns. On success, modify the matrix and return true. + The basic patterns are: + - Position detection patterns + - Timing patterns + - Dark dot at the left bottom corner + - Position adjustment patterns, if need be + + The version. + The matrix. + + + + Embed type information. On success, modify the matrix. + + The ec level. + The mask pattern. + The matrix. + + + + Embed version information if need be. On success, modify the matrix and return true. + See 8.10 of JISX0510:2004 (p.47) for how to embed version information. + + The version. + The matrix. + + + + Embed "dataBits" using "getMaskPattern". On success, modify the matrix and return true. + For debugging purposes, it skips masking process if "getMaskPattern" is -1. + See 8.7 of JISX0510:2004 (p.38) for how to embed data bits. + + The data bits. + The mask pattern. + The matrix. + + + + Return the position of the most significant bit set (to one) in the "value". The most + significant bit is position 32. If there is no bit set, return 0. Examples: + - findMSBSet(0) => 0 + - findMSBSet(1) => 1 + - findMSBSet(255) => 8 + + The value_ renamed. + + + + + Calculate BCH (Bose-Chaudhuri-Hocquenghem) code for "value" using polynomial "poly". The BCH + code is used for encoding type information and version information. + Example: Calculation of version information of 7. + f(x) is created from 7. + - 7 = 000111 in 6 bits + - f(x) = x^2 + x^2 + x^1 + g(x) is given by the standard (p. 67) + - g(x) = x^12 + x^11 + x^10 + x^9 + x^8 + x^5 + x^2 + 1 + Multiply f(x) by x^(18 - 6) + - f'(x) = f(x) * x^(18 - 6) + - f'(x) = x^14 + x^13 + x^12 + Calculate the remainder of f'(x) / g(x) + x^2 + __________________________________________________ + g(x) )x^14 + x^13 + x^12 + x^14 + x^13 + x^12 + x^11 + x^10 + x^7 + x^4 + x^2 + -------------------------------------------------- + x^11 + x^10 + x^7 + x^4 + x^2 + + The remainder is x^11 + x^10 + x^7 + x^4 + x^2 + Encode it in binary: 110010010100 + The return value is 0xc94 (1100 1001 0100) + + Since all coefficients in the polynomials are 1 or 0, we can do the calculation by bit + operations. We don't care if coefficients are positive or negative. + + The value. + The poly. + + + + + Make bit vector of type information. On success, store the result in "bits" and return true. + Encode error correction level and mask pattern. See 8.9 of + JISX0510:2004 (p.45) for details. + + The ec level. + The mask pattern. + The bits. + + + + Make bit vector of version information. On success, store the result in "bits" and return true. + See 8.10 of JISX0510:2004 (p.45) for details. + + The version. + The bits. + + + + Check if "value" is empty. + + The value. + + true if the specified value is empty; otherwise, false. + + + + + Embed the lonely dark dot at left bottom corner. JISX0510:2004 (p.46) + + The matrix. + + + + + + The x start. + The y start. + The matrix. + + + + Embed position detection patterns and surrounding vertical/horizontal separators. + + The matrix. + + + + Embed position adjustment patterns if need be. + + The version. + The matrix. + + + +

Encapsulates logic that can detect a QR Code in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + +

Detects a QR Code in an image.

+
+ + encapsulating results of detecting a QR Code + +
+ + +

Detects a QR Code in an image.

+
+ optional hints to detector + + encapsulating results of detecting a QR Code + +
+ + + Processes the finder pattern info. + + The info. + + + +

Computes the dimension (number of modules on a size) of the QR Code based on the position + of the finder patterns and estimated module size.

+
+
+ + +

Computes an average estimated module size based on estimated derived from the positions + of the three finder patterns.

+
+ detected top-left finder pattern center + detected top-right finder pattern center + detected bottom-left finder pattern center + estimated module size +
+ +

Estimates module size based on two finder patterns -- it uses + {@link #sizeOfBlackWhiteBlackRunBothWays(int, int, int, int)} to figure the + width of each, measuring along the axis between their centers.

+
+
+ + See {@link #sizeOfBlackWhiteBlackRun(int, int, int, int)}; computes the total width of + a finder pattern by looking for a black-white-black run from the center in the direction + of another point (another finder pattern center), and in the opposite direction too. + + + +

This method traces a line from a point in the image, in the direction towards another point. + It begins in a black region, and keeps going until it finds white, then black, then white again. + It reports the distance from the start to this point.

+ +

This is used when figuring out how wide a finder pattern is, when the finder pattern + may be skewed or rotated.

+
+
+ + +

Attempts to locate an alignment pattern in a limited region of the image, which is + guessed to contain it. This method uses {@link AlignmentPattern}.

+
+ estimated module size so far + x coordinate of center of area probably containing alignment pattern + y coordinate of above + number of pixels in all directions to search from the center + + if found, or null otherwise + +
+ + + Gets the image. + + + + + Gets the result point callback. + + + + + Meta-data container for QR Code decoding. Instances of this class may be used to convey information back to the + decoding caller. Callers are expected to process this. + + + + + Initializes a new instance of the class. + + if set to true [mirrored]. + + + + Apply the result points' order correction due to mirroring. + + Array of points to apply mirror correction to. + + + + true if the QR Code was mirrored. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + This object renders a CODE93 code as a BitMatrix + + + + + + output to append to + start position + pattern to append + unused + 9 + + + +

Decodes Code 93 barcodes.

+ Sean Owen + +
+
+ + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +

In contrast to , this class will return an array of all possible + QR code locations in the image.

+ +

Use the TRY_HARDER hint to ask for a more thorough detection.

+ + Sean Owen + Hannes Erven +
+
+ + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF pixels/module in their + estimated modules sizes. + + + + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF_PERCENT percent in their + estimated modules sizes. + + + + +

Creates a finder that will search the image for three finder patterns.

+ + image to search +
+
+ + + + the 3 best s from our list of candidates. The "best" are + those that have been detected at least CENTER_QUORUM times, and whose module + size differs from the average among those patterns the least + + + + + A comparator that orders FinderPatterns by their estimated module size. + + + + +

MaxiCodes can encode text or structured information as bits in one of several modes, + with multiple character sets in one code. This class decodes the bits back into text.

+ + mike32767 + Manuel Kasten +
+
+ + + Defines an container for encoder options + + + + + Initializes a new instance of the class. + + + + + Gets the data container for all options + + + + + event is raised when a value is changed + + + + + Gets or sets a flag which cause a deeper look into the bitmap + + + true if [try harder]; otherwise, false. + + + + + Image is a pure monochrome image of a barcode. + + + true if monochrome image of a barcode; otherwise, false. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + The character set. + + + + + Image is known to be of one of a few possible formats. + Maps to a {@link java.util.List} of {@link BarcodeFormat}s. + + + The possible formats. + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + true if it should assume a Code 39 check digit; otherwise, false. + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). + + + true if it should assume GS1; otherwise, false. + + + + + Assume MSI codes employ a check digit. Maps to . + + + true if it should assume a MSI check digit; otherwise, false. + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + .NET 2.0 class for handling of very large integers, up to 10240 binary digits or + approximately (safe to use) 3000 decimal digits. + + + + + 2^16 numeration base for internal computations, in order to benefit the most from the + 32 bit (or 64 bit) integer processor registers. + + + + + Maximum size for numbers is up to 10240 binary digits or approximately (safe to use) 3000 decimal digits. + The maximum size is, in fact, double the previously specified amount, in order to accommodate operations's + overflow. + + + + + Ratio for the convertion of a BigInteger's size to a binary digits size. + + + + Integer constants + + + + The array of digits of the number. + + + + + The actual number of digits of the number. + + + + + The number sign. + + + + + Default constructor, intializing the BigInteger with zero. + + + + + Constructor creating a new BigInteger as a conversion of a regular base-10 long. + + The base-10 long to be converted + + + + Constructor creating a new BigInteger as a copy of an existing BigInteger. + + The BigInteger to be copied + + + + Constructor creating a BigInteger instance out of a base-10 formatted string. + + The base-10 formatted string. + Invalid numeric string exception + + + + Constructor creating a positive BigInteger by extracting it's digits from a given byte array. + + The byte array + The byte array's content exceeds the maximum size of a BigInteger + exception + + + + Determines whether the specified BigInteger is equal to the current BigInteger. + + The BigInteger to compare with the current BigInteger + True if the specified BigInteger is equal to the current BigInteger, + false otherwise + + + + Determines whether the specified System.Object is equal to the current BigInteger. + + The System.Object to compare with the current BigInteger + True if the specified System.Object is equal to the current BigInteger, + false otherwise + + + + Serves as a hash function for the BigInteger type. + + A hash code for the current BigInteger + + + + String representation of the current BigInteger, converted to its base-10 representation. + + The string representation of the current BigInteger + + + + Parses the number given by a string + + the number as a string + + + + + Compares this instance to a specified BigInteger. + + The BigInteger to compare this instance with + -1 if the current instance is smaller than the given BigInteger, + 0 if the two are equal, 1 otherwise + + + + Compares this instance to a specified object. + + The object to compare this instance with + -1 if the current instance is smaller than the given object, + 0 if the two are equal, 1 otherwise + obj is not a BigInteger exception + + + + Returns a BigInteger's size in binary digits. + + The BigInteger whose size in binary digits is to be determined + The BigInteger's size in binary digits + + + + BigInteger inverse with respect to addition. + + The BigInteger whose opposite is to be computed + The BigInteger inverse with respect to addition + + + + Greater test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a > b, false otherwise + + + + Greater or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a >= b, false otherwise + + + + Smaller test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a < b, false otherwise + + + + Smaller or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a <= b, false otherwise + + + + Computes the absolute value of a BigInteger. + + The BigInteger whose absolute value is to be computed + The absolute value of the given BigInteger + + + + Addition operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the addition + + + + Subtraction operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the subtraction + + + + Multiplication operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the multiplication + + + + Division operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the division + Cannot divide by zero exception + + + + Modulo operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the modulo + Cannot divide by zero exception + + + + Returns the power of a BigInteger base to a non-negative exponent by using the + fast exponentiation algorithm (right to left binary exponentiation). + + The BigInteger base + The non-negative exponent + The power of the BigInteger base to the non-negative exponent + Cannot raise a BigInteger to a negative power exception. + + + + Integer square root of the given BigInteger using Newton's numeric method. + + The BigInteger whose integer square root is to be computed + The integer square root of the given BigInteger + Cannot compute the integer square root of a negative number exception + + + + Euclidean algorithm for computing the greatest common divisor of two non-negative BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The greatest common divisor of the two given BigIntegers + Cannot compute the Gcd of negative BigIntegers exception + + + + Extended Euclidian Gcd algorithm, returning the greatest common divisor of two non-negative BigIntegers, + while also providing u and v, where: a*u + b*v = gcd(a,b). + + The 1st BigInteger + The 2nd BigInteger + Output BigInteger parameter, where a*u + b*v = gcd(a,b) + Output BigInteger parameter, where a*u + b*v = gcd(a,b) + The greatest common divisor of the two given BigIntegers + Cannot compute the Gcd of negative BigIntegers exception + + + + Computes the modular inverse of a given BigInteger. + + The non-zero BigInteger whose inverse is to be computed + The BigInteger modulus, which must be greater than or equal to 2 + The BigInteger equal to a^(-1) mod n + Invalid number or modulus exception + + + + Returns the power of a BigInteger to a non-negative exponent modulo n, by using the + fast exponentiation algorithm (right to left binary exponentiation) and modulo optimizations. + + The BigInteger base + The non-negative exponent + The modulus, which must be greater than or equal to 2 + The power of the BigInteger to the non-negative exponent + Invalid exponent or modulus exception + + + + Implicit conversion operator from long to BigInteger. + + The long to be converted to a BigInteger + The BigInteger converted from the given long + + + + Implicit conversion operator from int to BigInteger. + + The int to be converted to a BigInteger + The BigInteger converted from the given int + + + + Equality test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a == b, false otherwise + + + + Inequality test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a != b, false otherwise + + + + Greater test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a > b, false otherwise + + + + Smaller test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a < b, false otherwise + + + + Greater or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a >= b, false otherwise + + + + Smaller or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a <= b, false otherwise + + + + BigInteger inverse with respect to addition. + + The BigInteger whose opposite is to be computed + The BigInteger inverse with respect to addition + + + + Addition operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the addition + + + + Subtraction operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the subtraction + + + + Multiplication operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the multiplication + + + + Division operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the division + Cannot divide by zero exception + + + + Modulo operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the modulo + Cannot divide by zero exception + + + + Incremetation by one operation of a BigInteger. + + The BigInteger to be incremented by one + The BigInteger result of incrementing by one + + + + Decremetation by one operation of a BigInteger. + + The BigInteger to be decremented by one + The BigInteger result of decrementing by one + + + + Adds two BigNumbers a and b, where a >= b, a, b non-negative. + + + + + Subtracts the BigInteger b from the BigInteger a, where a >= b, a, b non-negative. + + + + + Multiplies two BigIntegers. + + + + + Divides a BigInteger by a one-digit int. + + + + + Divides a BigInteger by another BigInteger. + + + + + DivideByBigNumber auxiliary method. + + + + + DivideByBigNumber auxilary method. + + + + + DivideByBigNumber auxilary method. + + + + + Detects a result that is likely a vehicle identification number. + @author Sean Owen + + + +

QR Codes can encode text as bits in one of several modes, and can use multiple modes + in one QR Code. This class decodes the bits back into text.

+ +

See ISO 18004:2006, 6.4.3 - 6.4.7

+ Sean Owen +
+
+ + + See ISO 18004:2006, 6.4.4 Table 5 + + + + + See specification GBT 18284-2000 + + The bits. + The result. + The count. + + + +

Encapsulates a block of data within a QR Code. QR Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

When QR Codes use multiple data blocks, they are actually interleaved. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ +
+ bytes as read directly from the QR Code + + version of the QR Code + + error-correction level of the QR Code + + {@link DataBlock}s containing original bytes, "de-interleaved" from representation in the + QR Code + +
+ + + + + Guenther Grau + + + + Returns the DetectionResult Columns. This does a fair bit of calculation, so call it sparingly. + + The detection result columns. + + + + Adjusts the indicator column row numbers. + + Detection result column. + + + + return number of codewords which don't have a valid row number. Note that the count is not accurate as codewords . + will be counted several times. It just serves as an indicator to see when we can stop adjusting row numbers + + The row numbers. + + + + Adjusts the row numbers by row. + + The row numbers by row. + + + + Adjusts the row numbers from both Row Indicators + + zero + + + + Adjusts the row numbers from Right Row Indicator. + + The unadjusted row count. + + + + Adjusts the row numbers from Left Row Indicator. + + Unadjusted row Count. + + + + Adjusts the row number if valid. + + The invalid rows + Row indicator row number. + Invalid row counts. + Codeword. + + + + Adjusts the row numbers. + + Barcode column. + Codewords row. + Codewords. + + + + Adjusts the row number. + + true, if row number was adjusted, false otherwise. + Codeword. + Other codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + +

Attempts to locate multiple barcodes in an image by repeatedly decoding portion of the image. + After one barcode is found, the areas left, above, right and below the barcode's + {@link com.google.zxing.ResultPoint}s are scanned, recursively.

+

A caller may want to also employ {@link ByQuadrantReader} when attempting to find multiple + 2D barcodes, like QR Codes, in an image, where the presence of multiple barcodes might prevent + detecting any one of them.

+

That is, instead of passing a {@link Reader} a caller might pass + new ByQuadrantReader(reader).

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The @delegate. + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Thrown when a barcode was successfully detected, but some aspect of + the content did not conform to the barcode's format rules. This could have + been due to a mis-detection. + Sean Owen + + + + + + + + + + + + + + + + + + + + + + + + +

Parses an "smsto:" URI result, whose format is not standardized but appears to be like: + {@code smsto:number(:body)}.

+

This actually also parses URIs starting with "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+
+ Sean Owen +
+ + + Represents a parsed result that encodes an SMS message, including recipients, subject and body text. + + Sean Owen + + + + The class holds the available options for the + + + + + Representing the minimal percentage of error correction words. + Note: an Aztec symbol should have a minimum of 25% EC words. + + + + + Specifies the required number of layers for an Aztec code: + a negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + a positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + + + + + The main class which implements Aztec Code decoding -- as opposed to locating and extracting + the Aztec Code from an image. + + David Olivier + + + + Decodes the specified detector result. + + The detector result. + + + + + This method is used for testing the high-level encoder + + + + + + + Gets the string encoded in the aztec code bits + + The corrected bits. + the decoded string + + + + gets the table corresponding to the char passed + + The t. + + + + + Gets the character (or string) corresponding to the passed code in the given table + + the table used + the code of the character + + + + + Performs RS error correction on an array of bits. + + The rawbits. + the corrected array + + + + Gets the array of bits from an Aztec Code matrix + + The matrix. + the array of bits + + + + Reads a code of given length and at given index in an array of bits + + The rawbits. + The start index. + The length. + + + + + Reads a code of length 8 in an array of bits, padding with zeros + + + + + + + + Packs a bit array into bytes, most significant bit first + + + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + This class attempts to decode a barcode from an image, not by scanning the whole image, + but by scanning subsets of the image. This is important when there may be multiple barcodes in + an image, and detecting a barcode may find parts of multiple barcode and fail to decode + (e.g. QR Codes). Instead this scans the four quadrants of the image -- and also the center + 'quadrant' to cover the case where a barcode is found in the center. + + + + + + Initializes a new instance of the class. + + The @delegate. + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

The main class which implements MaxiCode decoding -- as opposed to locating and extracting + the MaxiCode from an image.

+ + Manuel Kasten +
+
+ + + Implements the "MATMSG" email message entry format. + + Supported keys: TO, SUB, BODY + + Sean Owen + + + + This implements only the most basic checking for an email address's validity -- that it contains + an '@' and contains no characters disallowed by RFC 2822. This is an overly lenient definition of + validity. We want to generally be lenient here since this class is only intended to encapsulate what's + in a barcode, not "judge" it. + + The email. + + true if it is basically a valid email address; otherwise, false. + + + + + Renders a barcode into a Svg image + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Gets or sets the foreground color. + + The foreground color. + + + + Gets or sets the background color. + + The background color. + + + + Gets or sets the font family name + + The font family name. + + + + Gets or sets the font size in pixel + + The font size in pixel. + + + + Represents a barcode as a Svg image + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The content. + + + + Gives the XML representation of the SVG image + + + + + Gets or sets the content. + + + The content. + + + + + The original height of the bitmatrix for the barcode + + + + + The original width of the bitmatrix for the barcode + + + + + Renders a to an byte array with pixel data (4 byte per pixel, BGRA) + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + +

PDF417 error correction implementation.

+

This example + is quite useful in understanding the algorithm.

+ Sean Owen + +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the specified received. + + received codewords + number of those codewords used for EC + location of erasures + The error locations count. + + + + + Runs the euclidean algorithm (Greatest Common Divisor) until r's degree is less than R/2 + + The euclidean algorithm. + + + + Finds the error locations as a direct application of Chien's search + + The error locations. + Error locator. + + + + Finds the error magnitudes by directly applying Forney's Formula + + The error magnitudes. + Error evaluator. + Error locator. + Error locations. + + + + This object renders a UPC-A code as a . + qwandor@google.com (Andrew Walbran) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + +

Implements decoding of the UPC-A format.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen +
+
+ + +

Like decodeRow(int, BitArray, java.util.Map), but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ + + + + +
+ + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Decodes the specified image. + + The image. + The hints. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + Get the format of this decoder. + The 1D format. + + + + + Enumeration for DataMatrix symbol shape hint. It can be used to force square or rectangular + symbols. + + + + + The Version object encapsulates attributes about a particular + size Data Matrix Code. + + bbrown@google.com (Brian Brown) + + + + + returns the version numer + + + + + + returns the symbol size rows + + + + + + returns the symbols size columns + + + + + + retursn the data region size rows + + + + + + returns the data region size columns + + + + + + returns the total codewords count + + + + + +

Deduces version information from Data Matrix dimensions.

+ + Number of rows in modules + Number of columns in modules + Version for a Data Matrix Code of those dimensions + if dimensions do correspond to a valid Data Matrix size +
+
+ + + returns the version number as string + + + + + + See ISO 16022:2006 5.5.1 Table 7 + + + + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the Data Matrix code version's format.

+
+
+ +

Implements Reed-Solomon decoding, as the name implies.

+ +

The algorithm will not be explained here, but the following references were helpful + in creating this implementation:

+ + + +

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+ +
+ Sean Owen + William Rucklidge + sanfordsquires +
+ + +

Decodes given set of received codewords, which include both data and error-correction + codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place, + in the input.

+
+ data and error-correction codewords + number of error-correction codewords available + false: decoding fails +
+ + + Partially implements the iCalendar format's "VEVENT" format for specifying a + calendar event. See RFC 2445. This supports SUMMARY, DTSTART and DTEND fields. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Parses contact information formatted according to the VCard (2.1) format. This is not a complete + implementation but should parse information as commonly encoded in 2D barcodes. + + Sean Owen + + + Formats name fields of the form "Public;John;Q.;Reverend;III" into a form like + "Reverend John Q. Public III". + + @param names name values to format, in place + + + + Represents a result that encodes an e-mail address, either as a plain address + like "joe@example.org" or a mailto: URL like "mailto:joe@example.org". + + Sean Owen + + + Implements the "BIZCARD" address book entry format, though this has been + largely reverse-engineered from examples observed in the wild -- still + looking for a definitive reference. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Attribute is only for source code compatibility issues + + + + +

Encapsulates information about finder patterns in an image, including the location of + the three finder patterns, and their estimated module size.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The pattern centers. + + + + Gets the bottom left. + + + + + Gets the top left. + + + + + Gets the top right. + + + + + See ISO 18004:2006 Annex D + + Sean Owen + + + See ISO 18004:2006 Annex D. + Element i represents the raw version bits that specify version i + 7 + + + + + Gets the EC blocks for level. + + The ec level. + + + +

Deduces version information purely from QR Code dimensions.

+ +
+ dimension in modules + + for a QR Code of that dimension or null +
+ + + Gets the version for number. + + The version number. + + + + See ISO 18004:2006 Annex E + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + See ISO 18004:2006 6.5.1 Table 9 + + + + Gets the version number. + + + + + Gets the alignment pattern centers. + + + + + Gets the total codewords. + + + + + Gets the dimension for version. + + + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + + Gets the EC blocks. + + + + + + Gets the EC codewords per block. + + + + + Gets the num blocks. + + + + + Gets the total EC codewords. + + + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the QR code version's format.

+
+
+ + + Gets the count. + + + + + Gets the data codewords. + + + + +

See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which + data can be encoded to bits in the QR code standard.

+
+ Sean Owen +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See GBT 18284-2000; "Hanzi" is a transliteration of this mode name. + + + + Fors the bits. + + four bits encoding a QR Code data mode + + encoded by these bits + + if bits do not correspond to a known mode + + + version in question + + number of bits used, in this QR Code symbol {@link Version}, to encode the + count of characters that will follow encoded in this {@link Mode} + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Gets the name. + + + + + Gets the bits. + + + + + enumeration for encoding modes + + + + + + + + + + numeric encoding + + + + + alpha-numeric encoding + + + + + structured append + + + + + byte mode encoding + + + + + ECI segment + + + + + Kanji mode + + + + + FNC1 char, first position + + + + + FNC1 char, second position + + + + + Hanzi mode + + + + + Top-level class for the logic part of the PDF417 implementation. + + + + + The start pattern (17 bits) + + + + + The stop pattern (18 bits) + + + + + The codeword table from the Annex A of ISO/IEC 15438:2001(E). + + + + + Calculates the necessary number of rows as described in annex Q of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol (r) + + + + Calculates the number of pad codewords as described in 4.9.2 of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol + the number of pad codewords + + + + Generates the barcode logic. + + the message to encode + PDF417 error correction level to use + + + + Determine optimal nr of columns and rows for the specified number of + codewords. + + number of code words + number of error correction code words + The longest dimension of the barcode, used for columns + The short dimension of the barcode, used for rows + The height of a row, will alter this parameter if aspectRatio>4 (aspectRatio==AUTO) + dimension object containing cols as width and rows as height + + + + Sets max/min row/col values + + maximum allowed columns + minimum allowed columns + maximum allowed rows + minimum allowed rows + + + + Sets compaction to values stored in enum + + compaction mode to use + + + + Sets compact to be true or false + + if true, enables compaction + + + + Sets output encoding. + + sets character encoding to use + + + + Sets the disable eci. + + if set to true don't add an ECI segment for different encodings than default. + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + +

A reader that can read all available UPC/EAN formats. If a caller wants to try to + read all such formats, it is most efficient to use this implementation rather than invoke + individual readers.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Records EAN prefix to GS1 Member Organization, where the member organization + correlates strongly with a country. This is an imperfect means of identifying + a country of origin by EAN-13 barcode value. See + + http://en.wikipedia.org/wiki/List_of_GS1_country_codes. + + Sean Owen + + + + +

Encapsulates logic that can detect one or more QR Codes in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+ + Sean Owen + Hannes Erven +
+
+ + + Initializes a new instance of the class. + + The image. + + + + Detects the multi. + + The hints. + + + + + BigInteger-related exception class. + + + + + BigIntegerException constructor. + + The exception message + The inner exception + + + + Represents a parsed result that encodes a telephone number. + + Sean Owen + + + + Represents a parsed result that encodes contact information, like that in an address book entry. + + Sean Owen + + + + initializing constructor + + + + + + + + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + the names + + + + + the nicknames + + + + + In Japanese, the name is written in kanji, which can have multiple readings. Therefore a hint + is often provided, called furigana, which spells the name phonetically. + + The pronunciation of the getNames() field, often in hiragana or katakana. + + + + the phone numbers + + + + optional descriptions of the type of each phone number. It could be like "HOME", but, + there is no guaranteed or standard format. + + + + the e-mail addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the instant messenger addresses + + + + + the note field + + + + + the addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the title + + + + + the urls + + + + birthday formatted as yyyyMMdd (e.g. 19780917) + + + a location as a latitude/longitude pair + +
+
diff --git a/packages/ZXing.Net.0.16.4/lib/sl3-wp/zxing.wp7.0.dll b/packages/ZXing.Net.0.16.4/lib/sl3-wp/zxing.wp7.0.dll new file mode 100644 index 0000000..7f369a7 Binary files /dev/null and b/packages/ZXing.Net.0.16.4/lib/sl3-wp/zxing.wp7.0.dll differ diff --git a/packages/ZXing.Net.0.16.4/lib/sl4-wp71/zxing.wp7.1.XML b/packages/ZXing.Net.0.16.4/lib/sl4-wp71/zxing.wp7.1.XML new file mode 100644 index 0000000..8982875 --- /dev/null +++ b/packages/ZXing.Net.0.16.4/lib/sl4-wp71/zxing.wp7.1.XML @@ -0,0 +1,11713 @@ + + + + zxing.wp7.1 + + + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + + + converts the pixel data to a bitmap object + + + + + + the generated code as byte array of BGRA pixels + + + + + the width of the image + + + + + the height of the image + + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + + + + + + Initializes a new instance of the class. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Check if "mask_pattern" is valid. + + The mask pattern. + + true if [is valid mask pattern] [the specified mask pattern]; otherwise, false. + + + + + Gets or sets the mode. + + + The mode. + + + + + Gets or sets the EC level. + + + The EC level. + + + + + Gets or sets the version. + + + The version. + + + + + Gets or sets the mask pattern. + + + The mask pattern. + + + + + Gets or sets the matrix. + + + The matrix. + + + + + Holds all of the information for a barcode in a format where it can be easily accessible + + Jacob Haynes + + + + + the height of the matrix (Rows) + the width of the matrix (Cols) + + + + +

Encapsulates logic that can detect a PDF417 Code in an image, even if the + PDF417 Code is rotated or skewed, or partially obscured.

+ + SITA Lab (kevin.osullivan@sita.aero) + dswitkin@google.com (Daniel Switkin) + Guenther Grau +
+
+ + + if we set the value too low, then we don't detect the correct height of the bar if the start patterns are damaged. + if we set the value too high, then we might detect the start pattern from a neighbor barcode. + + + + + A PDF471 barcode should have at least 3 rows, with each row being >= 3 times the module width. Therefore it should be at least + 9 pixels tall. To be conservative, we use about half the size to ensure we don't miss it. + + + + + B S B S B S B S Bar/Space pattern + 11111111 0 1 0 1 0 1 000. + + + + + 1111111 0 1 000 1 0 1 00 1 + + + + +

Detects a PDF417 Code in an image. Only checks 0 and 180 degree rotations.

+
+ barcode image to decode + optional hints to detector + if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned + + encapsulating results of detecting a PDF417 code + +
+ + + Detects PDF417 codes in an image. Only checks 0 degree rotation (so rotate the matrix and check again outside of this method) + + multiple if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned. + bit matrix to detect barcodes in. + List of ResultPoint arrays containing the coordinates of found barcodes + + + + Locate the vertices and the codewords area of a black blob using the Start and Stop patterns as locators. + + Matrix. + Start row. + Start column. + an array containing the vertices: + vertices[0] x, y top left barcode + vertices[1] x, y bottom left barcode + vertices[2] x, y top right barcode + vertices[3] x, y bottom right barcode + vertices[4] x, y top left codeword area + vertices[5] x, y bottom left codeword area + vertices[6] x, y top right codeword area + vertices[7] x, y bottom right codeword area + + + + + Copies the temp data to the final result + + Result. + Temp result. + Destination indexes. + + + + Finds the rows with the given pattern. + + The rows with pattern. + Matrix. + Height. + Width. + Start row. + Start column. + Pattern. + + + + Finds the guard pattern. Uses System.Linq.Enumerable.Repeat to fill in counters. This might be a performance issue? + + start/end horizontal offset of guard pattern, as an array of two ints. + matrix row of black/white values to search + column x position to start search. + row y position to start search. + width the number of pixels to search on this row. + If set to true search the white patterns first. + pattern of counts of number of black and white pixels that are being searched for as a pattern. + counters array of counters, as long as pattern, to re-use . + + + + Determines how closely a set of observed counts of runs of black/white. + values matches a given target pattern. This is reported as the ratio of + the total variance from the expected pattern proportions across all + pattern elements, to the length of the pattern. + + + ratio of total variance between counters and pattern compared to + total pattern size, where the ratio has been multiplied by 256. + So, 0 means no variance (perfect match); 256 means the total + variance between counters and patterns equals the pattern length, + higher values mean even more variance + + observed counters. + expected pattern. + The most any counter can differ before we give up. + + + + Encapsulates an RSS barcode finder pattern, including its start/end position and row. + + + + + Initializes a new instance of the class. + + The value. + The start end. + The start. + The end. + The row number. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Gets the value. + + + + + Gets the start end. + + + + + Gets the result points. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Gets the information. + + + + + + Parses the information. + + + + + + Creates the decoder. + + The information. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + This object renders a ITF code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + +

Encapsulates functionality and implementation that is common to one-dimensional barcodes.

+ dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + The base class for all objects which encode/generate a barcode image. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + a byte array of horizontal pixels (0 = white, 1 = black) + + + + Appends the given pattern to the target array starting at pos. + + encode black/white pattern into this array + position to start encoding at in target + lengths of black/white runs to encode + starting color - false for white, true for black + the number of elements added to target. + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + + barcode contents to encode + a bool[] of horizontal pixels (false = white, true = black) + + + + Calculates the checksum digit modulo10. + + The contents. + + + + + Gets the default margin. + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code bool[]} of horizontal pixels (false = white, true = black) + + + + + + +

Implements decoding of the ITF format, or Interleaved Two of Five.

+ +

This Reader will scan ITF barcodes of certain lengths only. + At the moment it reads length 6, 8, 10, 12, 14, 16, 18, 20, 24, 44 and 48 as these have appeared "in the wild". Not all + lengths are scanned, especially shorter ones, to avoid false positives. This in turn is due to a lack of + required checksum function.

+ +

The checksum is optional and is not applied by this Reader. The consumer of the decoded + value will have to apply a checksum if required.

+ +

http://en.wikipedia.org/wiki/Interleaved_2_of_5 + is a great reference for Interleaved 2 of 5 information.

+ + kevin.osullivan@sita.aero, SITA Lab. +
+
+ + + Encapsulates functionality and implementation that is common to all families + of one-dimensional barcodes. + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Implementations of this interface can decode an image of a barcode in some format into + the String it encodes. For example, can + decode a QR code. The decoder may optionally receive hints from the caller which may help + it decode more quickly or accurately. + + See , which attempts to determine what barcode + format is present within the image as well, and then decodes it accordingly. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + String which the barcode encodes + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + + + + + + + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + Note that we don't try rotation without the try harder flag, even if rotation was supported. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + We're going to examine rows from the middle outward, searching alternately above and below the + middle, and farther out each time. rowStep is the number of rows between each successive + attempt above and below the middle. So we'd scan row middle, then middle - rowStep, then + middle + rowStep, then middle - (2 * rowStep), etc. + rowStep is bigger as the image is taller, but is always at least 1. We've somewhat arbitrarily + decided that moving up and down by about 1/16 of the image is pretty good; we try more of the + image if "trying harder". + + The image to decode + Any hints that were requested + The contents of the decoded barcode + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the pattern in reverse. + + The row. + The start. + The counters. + + + + + Determines how closely a set of observed counts of runs of black/white values matches a given + target pattern. This is reported as the ratio of the total variance from the expected pattern + proportions across all pattern elements, to the length of the pattern. + + observed counters + expected pattern + The most any counter can differ before we give up + ratio of total variance between counters and pattern compared to total pattern size, + where the ratio has been multiplied by 256. So, 0 means no variance (perfect match); 256 means + the total variance between counters and patterns equals the pattern length, higher values mean + even more variance + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + Valid ITF lengths. Anything longer than the largest value is also allowed. + + + + + Start/end guard pattern. + + Note: The end pattern is reversed because the row is reversed before + searching for the END_PATTERN + + + + + Patterns of Wide / Narrow lines to indicate each digit + + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + + row of black/white values to search + offset of start pattern + The payload end. + to append decoded chars to + + false, if decoding could not complete successfully + + + + + Identify where the start of the middle / payload section starts. + + row of black/white values to search + Array, containing index of start of 'start block' and end of 'start block' + + + + The start & end patterns must be pre/post fixed by a quiet zone. This + zone must be at least 10 times the width of a narrow line. Scan back until + we either get to the start of the barcode or match the necessary number of + quiet zone pixels. + + Note: Its assumed the row is reversed when using this method to find + quiet zone after the end pattern. + + ref: http://www.barcode-1.net/i25code.html + + bit array representing the scanned barcode. + index into row of the start or end pattern. + false, if the quiet zone cannot be found + + + + Skip all whitespace until we get to the first black line. + + row of black/white values to search + index of the first black line or -1 if no black lines are found in the row. + + + + Identify where the end of the middle / payload section ends. + + row of black/white values to search + Array, containing index of start of 'end block' and end of 'end + block' or null, if nothing found + + + + + row of black/white values to search + position to start search + pattern of counts of number of black and white pixels that are being searched for as a pattern + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a sequence of ITF black/white lines into single + digit. + + the counts of runs of observed black/white/black/... values + The decoded digit + + false, if digit cannot be decoded + + + + + mike32767 + Manuel Kasten + + + + + to parse + + + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode the barcode inside a bitmap object + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Common string-related functions. + + Sean Owen + Alex Dupre + + + + SJIS + + + + + GB2312 + + + + + Guesses the encoding. + + bytes encoding a string, whose encoding should be guessed + decode hints if applicable + name of guessed encoding; at the moment will only guess one of: + {@link #SHIFT_JIS}, {@link #UTF8}, {@link #ISO88591}, or the platform + default encoding if none of these can possibly be correct + + + Implementations of this class can, given locations of finder patterns for a QR code in an + image, sample the right points in the image to reconstruct the QR code, accounting for + perspective distortion. It is abstracted since it is relatively expensive and should be allowed + to take advantage of platform-specific optimized implementations, like Sun's Java Advanced + Imaging library, but which may not be available in other environments such as J2ME, and vice + versa. + + The implementation used can be controlled by calling {@link #setGridSampler(GridSampler)} + with an instance of a class which implements this interface. + + Sean Owen + + + Sets the implementation of used by the library. One global + instance is stored, which may sound problematic. But, the implementation provided + ought to be appropriate for the entire platform, and all uses of this library + in the whole lifetime of the JVM. For instance, an Android activity can swap in + an implementation that takes advantage of native platform libraries. + + The platform-specific object to install. + + + +

Samples an image for a square matrix of bits of the given dimension. This is used to extract + the black/white modules of a 2D barcode like a QR Code found in an image. Because this barcode + may be rotated or perspective-distorted, the caller supplies four points in the source image + that define known points in the barcode, so that the image may be sampled appropriately.

+

The last eight "from" parameters are four X/Y coordinate pairs of locations of points in + the image that define some significant points in the image to be sample. For example, + these may be the location of finder pattern in a QR Code.

+

The first eight "to" parameters are four X/Y coordinate pairs measured in the destination + , from the top left, where the known points in the image given by the "from" + parameters map to.

+

These 16 parameters define the transformation needed to sample the image.

+
+ image to sample + The dimension X. + The dimension Y. + The p1 preimage X. + The p1 preimage Y. + The p2 preimage X. + The p2 preimage Y. + The p3 preimage X. + The p3 preimage Y. + The p4 preimage X. + The p4 preimage Y. + The p1 image X. + The p1 image Y. + The p2 image X. + The p2 image Y. + The p3 image X. + The p3 image Y. + The p4 image X. + The p4 image Y. + + representing a grid of points sampled from the image within a region + defined by the "from" parameters + + ReaderException if image can't be sampled, for example, if the transformation defined +
+ + + + + + + + + + + +

Checks a set of points that have been transformed to sample points on an image against + the image's dimensions to see if the point are even within the image.

+ +

This method will actually "nudge" the endpoints back onto the image if they are found to be + barely (less than 1 pixel) off the image. This accounts for imperfect detection of finder + patterns in an image where the QR Code runs all the way to the image border.

+ +

For efficiency, the method will check points from either end of the line until one is found + to be within the image. Because the set of points are assumed to be linear, this is valid.

+ +
+ image into which the points should map + + actual points in x1,y1,...,xn,yn form + +
+ + the current implementation of + + + + + Represents a parsed result that encodes a product by an identifier of some kind. + + dswitkin@google.com (Daniel Switkin) + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link ResultParser#parseResult(Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + The base class for luminance sources which supports + cropping and rotating based upon the luminance values. + + + + + The purpose of this class hierarchy is to abstract different bitmap implementations across + platforms into a standard interface for requesting greyscale luminance values. The interface + only provides immutable methods; therefore crop and rotation create copies. This is to ensure + that one Reader does not modify the original luminance source and leave it in an unknown state + for other Readers in the chain. + + dswitkin@google.com (Daniel Switkin) + + + + initializing constructor + + + + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + inverts the luminance values, not supported here. has to implemented in sub classes + + + + + + + + + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff + + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + The width of the bitmap. + + + The height of the bitmap. + + + Whether this subclass supports cropping. + + + Whether this subclass supports counter-clockwise rotation. + + + + + Whether this subclass supports invertion. + + + + weight of the red channel for calculating a gray scale image + + + + + weight of the green channel for calculating a gray scale image + + + + + weight of the blue channel for calculating a gray scale image + + + + + numbers of bits which for right shifting + + + + + + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + + The luminance array. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + TODO: not implemented yet + + + A rotated version of this object. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Inverts the luminance values (newValue = 255 - oldValue) + + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + gets the luminance matrix + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + + Whether this subclass supports cropping. + + + + + Whether this subclass supports invertion. + + + + represents a token for a binary shift + + + + + initializing constructor + + + + + + + + appends the byte array to the BitArray + + + + + + + string representation + + + + + + The class holds the available options for the QrCodeWriter + + + + + Defines an container for encoder options + + + + + Initializes a new instance of the class. + + + + + Gets the data container for all options + + + + + Specifies the height of the barcode image + + + + + Specifies the width of the barcode image + + + + + Don't put the content string into the output image. + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + + + + + Specifies whether the data should be encoded to the GS1 standard; + FNC1 character is added in front of the data + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + . + + + + + Specifies what character encoding to use where applicable (type ) + + + + + Explicitly disables ECI segment when generating QR Code + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + + + + + Specifies the exact version of QR code to be encoded. An integer, range 1 to 40. If the data specified + cannot fit within the required version, a WriterException will be thrown. + + + + + Jacob Haynes + qwandor@google.com (Andrew Walbran) + + + + + default white space (margin) around the code + + + + + default error correction level + + + + + default aspect ratio + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The height of a row in the barcode + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Takes encoder, accounts for width/height, and retrieves bit matrix + + + + + This takes an array holding the values of the PDF 417 + + a byte array of information with 0 is black, and 1 is white + border around the barcode + BitMatrix of the input + + + + Takes and rotates the it 90 degrees + + + + + This implementation can detect and decode PDF417 codes in an image. + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Implementation of this interface attempt to read several barcodes from one image. + Sean Owen + + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Locates and decodes a PDF417 code in an image. + + a String representing the content encoded by the PDF417 code + if a PDF417 cannot be decoded + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + **Note** this will return the FIRST barcode discovered if there are many. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Locates and decodes Multiple PDF417 codes in an image. + + an array of Strings representing the content encoded by the PDF417 codes + + + + + Locates and decodes multiple barcodes in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcodes encode + + + + + Decode the specified image, with the hints and optionally multiple barcodes. + Based on Owen's Comments in , this method has been modified to continue silently + if a barcode was not decoded where it was detected instead of throwing a new exception object. + + Image. + Hints. + If set to true multiple. + + + + Gets the maximum width of the barcode + + The max width. + P1. + P2. + + + + Gets the minimum width of the barcode + + The minimum width. + P1. + P2. + + + + Gets the maximum width of the codeword. + + The max codeword width. + P. + + + + Gets the minimum width of the codeword. + + The minimum codeword width. + P. + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + + + Guenther Grau + + + + Decode the specified image, imageTopLeft, imageBottomLeft, imageTopRight, imageBottomRight, minCodewordWidth + and maxCodewordWidth. + TODO: don't pass in minCodewordWidth and maxCodewordWidth, pass in barcode columns for start and stop pattern + columns. That way width can be deducted from the pattern column. + This approach also allows to detect more details about the barcode, e.g. if a bar type (white or black) is wider + than it should be. This can happen if the scanner used a bad blackpoint. + + Image. + Image top left. + Image bottom left. + Image top right. + Image bottom right. + Minimum codeword width. + Max codeword width. + + + + Merge the specified leftRowIndicatorColumn and rightRowIndicatorColumn. + + Left row indicator column. + Right row indicator column. + + + + Adjusts the bounding box. + + The bounding box. + Row indicator column. + + + + Gets the barcode metadata. + + The barcode metadata. + Left row indicator column. + Right row indicator column. + + + + Gets the row indicator column. + + The row indicator column. + Image. + Bounding box. + Start point. + If set to true left to right. + Minimum codeword width. + Max codeword width. + + + + Adjusts the codeword count. + + Detection result. + Barcode matrix. + + + + Creates the decoder result. + + The decoder result. + Detection result. + + + + This method deals with the fact, that the decoding process doesn't always yield a single most likely value. The + current error correction implementation doesn't deal with erasures very well, so it's better to provide a value + for these ambiguous codewords instead of treating it as an erasure. The problem is that we don't know which of + the ambiguous values to choose. We try decode using the first value, and if that fails, we use another of the + ambiguous values and try to decode again. This usually only happens on very hard to read and decode barcodes, + so decoding the normal barcodes is not affected by this. + + The decoder result from ambiguous values. + Ec level. + Codewords. + contains the indexes of erasures. + array with the indexes that have more than one most likely value. + two dimensional array that contains the ambiguous values. The first dimension must + be the same Length as the ambiguousIndexes array. + + + + Creates the barcode matrix. + + The barcode matrix. + Detection result. + + + + Tests to see if the Barcode Column is Valid + + true, if barcode column is valid, false otherwise. + Detection result. + Barcode column. + + + + Gets the start column. + + The start column. + Detection result. + Barcode column. + Image row. + If set to true left to right. + + + + Detects the codeword. + + The codeword. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + Minimum codeword width. + Max codeword width. + + + + Gets the module bit count. + + The module bit count. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + + + + Gets the number of EC code words. + + The number of EC code words. + Barcode EC level. + + + + Adjusts the codeword start column. + + The codeword start column. + Image. + Minimum column. + Max column. + If set to true left to right. + Codeword start column. + Image row. + + + + Checks the codeword for any skew. + + true, if codeword is within the skew, false otherwise. + Codeword size. + Minimum codeword width. + Max codeword width. + + + + Decodes the codewords. + + The codewords. + Codewords. + Ec level. + Erasures. + + + + Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place. + + The errors. + data and error correction codewords. + positions of any known erasures. + number of error correction codewords that are available in codewords. + + + + Verifies that all is well with the the codeword array. + + Codewords. + Number EC codewords. + + + + Gets the bit count for codeword. + + The bit count for codeword. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Module bit count. + + + + Returns a that represents the jagged array. + + A that represents the jagged array. + Barcode matrix as a jagged array. + + + + + + Guenther Grau + creatale GmbH (christoph.schulz@creatale.de) + + + + The ratios table + + + + + Initializes the class & Pre-computes the symbol ratio table. + + + + + Gets the decoded value. + + The decoded value. + Module bit count. + + + + Samples the bit counts. + + The bit counts. + Module bit count. + + + + Gets the decoded codeword value. + + The decoded codeword value. + Module bit count. + + + + Gets the bit value. + + The bit value. + Module bit count. + + + + Gets the closest decoded value. + + The closest decoded value. + Module bit count. + + + +

This class contains the methods for decoding the PDF417 codewords.

+ + SITA Lab (kevin.osullivan@sita.aero) +
+
+ + + Table containing values for the exponent of 900. + This is used in the numeric compaction decode algorithm. + + + + + Text Compaction mode (see 5.4.1.5) permits all printable ASCII characters to be + encoded, i.e. values 32 - 126 inclusive in accordance with ISO/IEC 646 (IRV), as + well as selected control characters. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + The Text Compaction mode includes all the printable ASCII characters + (i.e. values from 32 to 126) and three ASCII control characters: HT or tab + (ASCII value 9), LF or line feed (ASCII value 10), and CR or carriage + return (ASCII value 13). The Text Compaction mode also includes various latch + and shift characters which are used exclusively within the mode. The Text + Compaction mode encodes up to 2 characters per codeword. The compaction rules + for converting data into PDF417 codewords are defined in 5.4.2.2. The sub-mode + switches are defined in 5.4.2.3. + + The text compaction data. + The byte compaction data if there + was a mode shift. + The size of the text compaction and byte compaction data. + The decoded data is appended to the result. + + + + + Byte Compaction mode (see 5.4.3) permits all 256 possible 8-bit byte values to be encoded. + This includes all ASCII characters value 0 to 127 inclusive and provides for international + character set support. + + The byte compaction mode i.e. 901 or 924 + The array of codewords (data + error) + Currently active character encoding + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Numeric Compaction mode (see 5.4.4) permits efficient encoding of numeric data strings. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Convert a list of Numeric Compacted codewords from Base 900 to Base 10. + EXAMPLE + Encode the fifteen digit numeric string 000213298174000 + Prefix the numeric string with a 1 and set the initial value of + t = 1 000 213 298 174 000 + Calculate codeword 0 + d0 = 1 000 213 298 174 000 mod 900 = 200 + + t = 1 000 213 298 174 000 div 900 = 1 111 348 109 082 + Calculate codeword 1 + d1 = 1 111 348 109 082 mod 900 = 282 + + t = 1 111 348 109 082 div 900 = 1 234 831 232 + Calculate codeword 2 + d2 = 1 234 831 232 mod 900 = 632 + + t = 1 234 831 232 div 900 = 1 372 034 + Calculate codeword 3 + d3 = 1 372 034 mod 900 = 434 + + t = 1 372 034 div 900 = 1 524 + Calculate codeword 4 + d4 = 1 524 mod 900 = 624 + + t = 1 524 div 900 = 1 + Calculate codeword 5 + d5 = 1 mod 900 = 1 + t = 1 div 900 = 0 + Codeword sequence is: 1, 624, 434, 632, 282, 200 + + Decode the above codewords involves + 1 x 900 power of 5 + 624 x 900 power of 4 + 434 x 900 power of 3 + + 632 x 900 power of 2 + 282 x 900 power of 1 + 200 x 900 power of 0 = 1000213298174000 + + Remove leading 1 => Result is 000213298174000 + The array of codewords + The number of codewords + The decoded string representing the Numeric data. + + + + + This object renders an UPC-E code as a {@link BitMatrix}. + @author 0979097955s@gmail.com (RX) + + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ aripollak@gmail.com (Ari Pollak) + dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Gets the default margin. + + + + +

Implements decoding of the UPC-E format.

+

Thisis a great reference for + UPC-E information.

+ Sean Owen +
+
+ + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Start/end guard pattern. + + + + + Pattern marking the middle of a UPC/EAN pattern, separating the two halves. + + + + + end guard pattern. + + + + + "Odd", or "L" patterns used to encode UPC/EAN digits. + + + + + As above but also including the "even", or "G" patterns used to encode UPC/EAN digits. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + +

Like , but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ row index into the image + encoding of the row of the barcode image + start/end column where the opening start pattern was found + optional hints that influence decoding + encapsulating the result of decoding a barcode in the row +
+ + + + string of digits to check + see + + + + Computes the UPC/EAN checksum on a string of digits, and reports + whether the checksum is correct or not. + + string of digits to check + true iff string of digits passes the UPC/EAN checksum algorithm + + + + Decodes the end. + + The row. + The end start. + + + + + + row of black/white values to search + position to start search + if true, indicates that the pattern specifies white/black/white/... + pixel counts, otherwise, it is interpreted as black/white/black/... + pattern of counts of number of black and white pixels that are being + searched for as a pattern + array of counters, as long as pattern, to re-use + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a single UPC/EAN-encoded digit. + + row of black/white values to decode + the counts of runs of observed black/white/black/... values + horizontal offset to start decoding from + the set of patterns to use to decode -- sometimes different encodings + for the digits 0-9 are used, and this indicates the encodings for 0 to 9 that should + be used + horizontal offset of first pixel beyond the decoded digit + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + Get the format of this decoder. + + The 1D format. + + + + The pattern that marks the middle, and end, of a UPC-E pattern. + There is no "second half" to a UPC-E barcode. + + + + + See L_AND_G_PATTERNS these values similarly represent patterns of + even-odd parity encodings of digits that imply both the number system (0 or 1) + used, and the check digit. + + + + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Decodes the end. + + The row. + The end start. + + + + + see checkStandardUPCEANChecksum(String) + + + + + + + Determines the num sys and check digit. + + The result string. + The lg pattern found. + + + + + Expands a UPC-E value back into its full, equivalent UPC-A code value. + + UPC-E code as string of digits + equivalent UPC-A code as string of digits + + + + + Get the format of this decoder. + The 1D format. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode the barcode inside a bitmap object + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Symbol Character Placement Program. Adapted from Annex M.1 in ISO/IEC 16022:2000(E). + + + + + Main constructor + + the codewords to place + the number of columns + the number of rows + + + + Places the 8 bits of a utah-shaped symbol character in ECC200. + + The row. + The col. + character position + + +

This provides an easy abstraction to read bits at a time from a sequence of bytes, where the + number of bits read is not often a multiple of 8.

+ +

This class is thread-safe but not reentrant. Unless the caller modifies the bytes array + it passed in, in which case all bets are off.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + bytes from which this will read bits. Bits will be read from the first byte first. + Bits are read within a byte from most-significant to least-significant bit. + + + + number of bits to read + + int representing the bits read. The bits will appear as the least-significant + bits of the int + + if numBits isn't in [1,32] or more than is available + + + number of bits that can be read successfully + + + + + index of next bit in current byte which would be read by the next call to {@link #readBits(int)}. + + + + + index of next byte in input byte array which would be read by the next call to {@link #readBits(int)}. + + + + + This class is the core bitmap class used by ZXing to represent 1 bit data. Reader objects + accept a BinaryBitmap and attempt to decode it. + + dswitkin@google.com (Daniel Switkin) + + + + + + + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + + The row to fetch, which must be in [0, bitmap height). + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if isCropSupported() is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + The width of the bitmap. + + + + + The height of the bitmap. + + + + + Converts a 2D array of luminance data to 1 bit. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + + Whether this bitmap can be cropped. + + + + + Whether this bitmap supports counter-clockwise rotation. + + + + + This produces nearly optimal encodings of text into the first-level of + encoding used by Aztec code. + It uses a dynamic algorithm. For each prefix of the string, it determines + a set of encodings that could lead to this prefix. We repeatedly add a + character and generate a new set of optimal encodings until we have read + through the entire input. + @author Frank Yellin + @author Rustam Abdullaev + + + + + + + + + + + Convert the text represented by this High Level Encoder into a BitArray. + + text represented by this encoder encoded as a + + + Callback which is invoked when a possible result point (significant + point in the barcode image such as a corner) is found. + + + + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+
+ Sean Owen +
+ + + 1 pixel/module times 3 modules/center + + + + + support up to version 20 for mobile clients + + + + +

Creates a finder that will search the image for three finder patterns.

+
+ image to search +
+ + + Initializes a new instance of the class. + + The image. + The result point callback. + + + Given a count of black/white/black/white/black pixels just seen and an end position, + figures the location of the center of this run. + + + + count of black/white/black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/3/1/1 ratios + used by finder patterns to be considered a match + + + + + + count of black/white/black/white/black pixels just read + true if the proportions of the counts is close enough to the 1/1/3/1/1 ratios + by finder patterns to be considered a match + + + + After a vertical and horizontal scan finds a potential finder pattern, this method + "cross-cross-cross-checks" by scanning down diagonally through the center of the possible + finder pattern to see if the same proportion is detected. + @param maxCount maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + @param originalStateCountTotal The original state count total. + + row where a finder pattern was detected + center of the section that appears to cross a finder pattern + true if proportions are withing expected limits + + + +

After a horizontal scan finds a potential finder pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + finder pattern to see if the same proportion is detected.

+
+ row where a finder pattern was detected + center of the section that appears to cross a finder pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of finder pattern, or null if not found + +
+ +

Like {@link #crossCheckVertical(int, int, int, int)}, and in fact is basically identical, + except it reads horizontally instead of vertically. This is used to cross-cross + check a vertical cross check and locate the real center of the alignment pattern.

+
+
+ + + @see #handlePossibleCenter(int[], int, int) + + reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + ignored + true if a finder pattern candidate was found this time + + + +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will, ah, cross-cross-check + with another horizontal scan. This is needed primarily to locate the real horizontal + center of the pattern in cases of extreme skew. + And then we cross-cross-cross check with another diagonal scan.

+ If that succeeds the finder pattern location is added to a list that tracks + the number of times each location has been nearly-matched as a finder pattern. + Each additional find is more evidence that the location is in fact a finder + pattern center +
+ reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + + true if a finder pattern candidate was found this time + +
+ + number of rows we could safely skip during scanning, based on the first + two finder patterns that have been located. In some cases their position will + allow us to infer that the third pattern must lie below a certain point farther + down in the image. + + + + true iff we have found at least 3 finder patterns that have been detected + at least {@link #CENTER_QUORUM} times each, and, the estimated module size of the + candidates is "pretty similar" + + + + the 3 best {@link FinderPattern}s from our list of candidates. The "best" are + those that have been detected at least {@link #CENTER_QUORUM} times, and whose module + size differs from the average among those patterns the least + + + + + Gets the image. + + + + + Gets the possible centers. + + + + + Orders by furthest from average + + + +

Orders by {@link FinderPattern#getCount()}, descending.

+
+ + +

Encapsulates a finder pattern, which are the three square patterns found in + the corners of QR Codes. It also encapsulates a count of similar finder patterns, + as a convenience to the finder's bookkeeping.

+
+ Sean Owen +
+ + + Encapsulates a point of interest in an image containing a barcode. Typically, this + would be the location of a finder pattern or the corner of the barcode, for example. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The x. + The y. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC and + BC is less than AC and the angle between BC and BA is less than 180 degrees. + + array of three to order + + + + calculates the distance between two points + + first pattern + second pattern + + distance between two points + + + + + Returns the z component of the cross product between vectors BC and BA. + + + + + Gets the X. + + + + + Gets the Y. + + + +

Determines if this finder pattern "about equals" a finder pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing a weighted average + based on count. + + The i. + The j. + New size of the module. + + + + + Gets the size of the estimated module. + + + The size of the estimated module. + + + + +

A field based on powers of a generator integer, modulo some modulus.

+ +
+ Sean Owen +
+ + + Interface for a smart class to encode some content into a barcode + + + + + Encodes the specified contents. + + The contents. + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + +

Data Matrix Codes can encode text as bits in one of several modes, and can use multiple modes + in one Data Matrix Code. This class decodes the bits back into text.

+ +

See ISO 16022:2006, 5.2.1 - 5.2.9.2

+ + bbrown@google.com (Brian Brown) + Sean Owen +
+
+ + + See ISO 16022:2006, Annex C Table C.1 + The C40 Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, Annex C Table C.2 + The Text Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, 5.2.3 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.5 and Annex C, Table C.1 + + + + + See ISO 16022:2006, 5.2.6 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.7 + + + + + See ISO 16022:2006, 5.2.8 and Annex C Table C.3 + + + + + See ISO 16022:2006, 5.2.9 and Annex B, B.2 + + + + + See ISO 16022:2006, Annex B, B.2 + + + + + bbrown@google.com (Brian Brown) + + + + + to parse + if dimension is < 8 or > 144 or not 0 mod 2 + + + + +

Creates the version object based on the dimension of the original bit matrix from + the datamatrix code.

+ +

See ISO 16022:2006 Table 7 - ECC 200 symbol attributes

+ + Original including alignment patterns + encapsulating the Data Matrix Code's "version" + if the dimensions of the mapping matrix are not valid + Data Matrix dimensions. +
+
+ + +

Reads the bits in the representing the mapping matrix (No alignment patterns) + in the correct order in order to reconstitute the codewords bytes contained within the + Data Matrix Code.

+ + bytes encoded within the Data Matrix Code + if the exact number of bytes expected is not read +
+
+ + +

Reads a bit of the mapping matrix accounting for boundary wrapping.

+ + Row to read in the mapping matrix + Column to read in the mapping matrix + Number of rows in the mapping matrix + Number of columns in the mapping matrix + value of the given bit in the mapping matrix +
+
+ + +

Reads the 8 bits of the standard Utah-shaped pattern.

+ +

See ISO 16022:2006, 5.8.1 Figure 6

+ + Current row in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Current column in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the utah shape +
+
+ + +

Reads the 8 bits of the special corner condition 1.

+ +

See ISO 16022:2006, Figure F.3

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 1 +
+
+ + +

Reads the 8 bits of the special corner condition 2.

+ +

See ISO 16022:2006, Figure F.4

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 2 +
+
+ + +

Reads the 8 bits of the special corner condition 3.

+ +

See ISO 16022:2006, Figure F.5

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 3 +
+
+ + +

Reads the 8 bits of the special corner condition 4.

+ +

See ISO 16022:2006, Figure F.6

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 4 +
+
+ + +

Extracts the data region from a that contains + alignment patterns.

+ + Original with alignment patterns + BitMatrix that has the alignment patterns removed +
+
+ +

This class implements a perspective transform in two dimensions. Given four source and four + destination points, it will compute the transformation implied between them. The code is based + directly upon section 3.4.2 of George Wolberg's "Digital Image Warping"; see pages 54-56.

+
+ Sean Owen +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Convenience method, not optimized for performance. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Represents a parsed result that encodes a product ISBN number. + + jbreiden@google.com (Jeff Breidenbach) + + + + the ISBN number + + + +

This class attempts to find alignment patterns in a QR Code. Alignment patterns look like finder + patterns but are smaller and appear at regular intervals throughout the image.

+ +

At the moment this only looks for the bottom-right alignment pattern.

+ +

This is mostly a simplified copy of {@link FinderPatternFinder}. It is copied, + pasted and stripped down here for maximum performance but does unfortunately duplicate + some code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Creates a finder that will look in a portion of the whole image.

+ +
+ image to search + + left column from which to start searching + + top row from which to start searching + + width of region to search + + height of region to search + + estimated module size so far + + callback function which is called, when a result point is found +
+ +

This method attempts to find the bottom-right alignment pattern in the image. It is a bit messy since + it's pretty performance-critical and so is written to be fast foremost.

+ +
+ if found +
+ + Given a count of black/white/black pixels just seen and an end position, + figures the location of the center of this black/white/black run. + + + + count of black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/1 ratios + used by alignment patterns to be considered a match + + + + +

After a horizontal scan finds a potential alignment pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + alignment pattern to see if the same proportion is detected.

+
+ row where an alignment pattern was detected + center of the section that appears to cross an alignment pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of alignment pattern, or null if not found + +
+ +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will see if this pattern had been + found on a previous horizontal scan. If so, we consider it confirmed and conclude we have + found the alignment pattern.

+ +
+ reading state module counts from horizontal scan + + row where alignment pattern may be found + + end of possible alignment pattern in row + + {@link AlignmentPattern} if we have found the same pattern twice, or null if not + +
+ + + PDF 417 result meta data. + Guenther Grau + + + + + The Segment ID represents the segment of the whole file distributed over different symbols. + + + + + Is the same for each related PDF417 symbol + + + + + always null + + + + + true if it is the last segment + + + + + count of segments, -1 if not set + + + + + Filename of the encoded file + + + + + filesize in bytes of the encoded file + returns filesize in bytes, -1 if not set + + + + + 16-bit CRC checksum using CCITT-16 + returns crc checksum, -1 if not set + + + + + unix epock timestamp, elapsed seconds since 1970-01-01 + returns elapsed seconds, -1 if not set + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + This object renders a CODE128 code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + +

Decodes Code 128 barcodes.

+ + Sean Owen +
+
+ + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + +

A somewhat generic detector that looks for a barcode-like rectangular region within an image. + It looks within a mostly white region of an image for a region of black and white, but mostly + black. It returns the four corners of the region, as best it can determine.

+ +
+ Sean Owen +
+ + + initializing constructor + + + + + +

Detects a rectangular region of black and white -- mostly black -- with a region of mostly + white, in an image.

+
+ [] describing the corners of the rectangular region. The first and + last points are opposed on the diagonal, as are the second and third. The first point will be + the topmost point and the last, the bottommost. The second point will be leftmost and the + third, the rightmost + +
+ + Attempts to locate a corner of the barcode by scanning up, down, left or right from a center + point which should be within the barcode. + + + center's x component (horizontal) + + same as deltaY but change in x per step instead + + minimum value of x + + maximum value of x + + center's y component (vertical) + + change in y per step. If scanning up this is negative; down, positive; + left or right, 0 + + minimum value of y to search through (meaningless when di == 0) + + maximum value of y + + maximum run of white pixels that can still be considered to be within + the barcode + + a encapsulating the corner that was found + + + + Computes the start and end of a region of pixels, either horizontally or vertically, that could + be part of a Data Matrix barcode. + + + if scanning horizontally, this is the row (the fixed vertical location) + where we are scanning. If scanning vertically it's the column, the fixed horizontal location + + largest run of white pixels that can still be considered part of the + barcode region + + minimum pixel location, horizontally or vertically, to consider + + maximum pixel location, horizontally or vertically, to consider + + if true, we're scanning left-right, instead of up-down + + int[] with start and end of found range, or null if no such range is found + (e.g. only white was found) + + + + + A simple result type encapsulating a URI that has no further interpretation. + + Sean Owen + + + Transforms a string that represents a URI into something more proper, by adding or canonicalizing + the protocol. + + + + true if the URI contains suspicious patterns that may suggest it intends to + mislead the user about its true nature. At the moment this looks for the presence + of user/password syntax in the host/authority portion of a URI which may be used + in attempts to make the URI's host appear to be other than it is. Example: + http://yourbank.com@phisher.com This URI connects to phisher.com but may appear + to connect to yourbank.com at first glance. + + + + + Parses a "tel:" URI result, which specifies a phone number. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link #parseResult(com.google.zxing.Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Attempts to parse the raw {@link Result}'s contents as a particular type + of information (email, URL, etc.) and return a {@link ParsedResult} encapsulating + the result of parsing. + + the raw to parse + encapsulating the parsing result + + + + Parses the result. + + The result. + + + + + A smart class to decode the barcode inside a bitmap object + + + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode the barcode inside a bitmap object + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap which is given by a generic byte array. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + represents the default function which is called to get a instance from a raw byte array + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb array. + If null the RGBLuminanceSource is used. The handler is only called when Decode with a byte[] array is called. + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + raises the ResultFound event + + + + + + raises the ResultFound event + + + + + + calls the explicitResultPointFound action + + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + Gets or sets the options. + + + The options. + + + + + Gets the reader which should be used to find and decode the barcode. + + + The reader. + + + + + Gets or sets a method which is called if an important point is found + + + The result point callback. + + + + + event is executed if a result was found via decode + + + + + Gets or sets a value indicating whether the image should be automatically rotated. + Rotation is supported for 90, 180 and 270 degrees + + + true if image should be rotated; otherwise, false. + + + + + Gets or sets a value indicating whether the image should be automatically inverted + if no result is found in the original image. + ATTENTION: Please be carefully because it slows down the decoding process if it is used + + + true if image should be inverted; otherwise, false. + + + + + Optional: Gets or sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + The function to create a binarizer object. + + + + + Luminance source class which support different formats of images. + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 1 byte per pixel (Gray8). + That means the whole array consists of the luminance values (grayscale). + + The luminance array. + The width. + The height. + if set to true [is8 bit]. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + The bitmap format. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + calculates the luminance values for the given byte array and bitmap format + + + + + + + enumeration of supported bitmap format which the RGBLuminanceSource can process + + + + + format of the byte[] isn't known. RGBLuminanceSource tries to determine the best possible value + + + + + grayscale array, the byte array is a luminance array with 1 byte per pixel + + + + + grayscale array, the byte array is a luminance array with 2 bytes per pixel + + + + + 3 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels alpha, red, green and blue + + + + + 3 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green, red and alpha + + + + + 2 bytes per pixel, 5 bit red, 6 bits green and 5 bits blue + + + + + 4 bytes per pixel with the channels red, green, blue and alpha + + + + + 4 bytes for two pixels, UYVY formatted + + + + + 4 bytes for two pixels, YUYV formatted + + + + + Represents some type of metadata about the result of the decoding that the decoder + wishes to communicate back to the caller. + + Sean Owen + + + + Unspecified, application-specific metadata. Maps to an unspecified {@link Object}. + + + + + Denotes the likely approximate orientation of the barcode in the image. This value + is given as degrees rotated clockwise from the normal, upright orientation. + For example a 1D barcode which was found by reading top-to-bottom would be + said to have orientation "90". This key maps to an {@link Integer} whose + value is in the range [0,360). + + + + +

2D barcode formats typically encode text, but allow for a sort of 'byte mode' + which is sometimes used to encode binary data. While {@link Result} makes available + the complete raw bytes in the barcode for these formats, it does not offer the bytes + from the byte segments alone.

+

This maps to a {@link java.util.List} of byte arrays corresponding to the + raw bytes in the byte segments in the barcode, in order.

+
+
+ + + Error correction level used, if applicable. The value type depends on the + format, but is typically a String. + + + + + For some periodicals, indicates the issue number as an {@link Integer}. + + + + + For some products, indicates the suggested retail price in the barcode as a + formatted {@link String}. + + + + + For some products, the possible country of manufacture as a {@link String} denoting the + ISO country code. Some map to multiple possible countries, like "US/CA". + + + + + For some products, the extension text + + + + + If the code format supports structured append and + the current scanned code is part of one then the + sequence number is given with it. + + + + + If the code format supports structured append and + the current scanned code is part of one then the + parity is given with it. + + + + + PDF417-specific metadata + + + + + Aztec-specific metadata + + + + +

See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels + defined by the QR code standard.

+
+ Sean Owen +
+ + L = ~7% correction + + + M = ~15% correction + + + Q = ~25% correction + + + H = ~30% correction + + + + Ordinals this instance. + + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Fors the bits. + + int containing the two bits encoding a QR Code's error correction level + + representing the encoded error correction level + + + + + Gets the bits. + + + + + Gets the name. + + + + + PDF417 high-level encoder following the algorithm described in ISO/IEC 15438:2001(E) in + annex P. + + + + + code for Text compaction + + + + + code for Byte compaction + + + + + code for Numeric compaction + + + + + Text compaction submode Alpha + + + + + Text compaction submode Lower + + + + + Text compaction submode Mixed + + + + + Text compaction submode Punctuation + + + + + mode latch to Text Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters NOT a multiple of 6) + + + + + mode latch to Numeric Compaction mode + + + + + mode shift to Byte Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters a multiple of 6) + + + + + identifier for a user defined Extended Channel Interpretation (ECI) + + + + + identifier for a general purpose ECO format + + + + + identifier for an ECI of a character set of code page + + + + + Raw code table for text compaction Mixed sub-mode + + + + + Raw code table for text compaction: Punctuation sub-mode + + + + + Performs high-level encoding of a PDF417 message using the algorithm described in annex P + of ISO/IEC 15438:2001(E). If byte compaction has been selected, then only byte compaction + is used. + + the message + compaction mode to use + character encoding used to encode in default or byte compaction + or null for default / not applicable + if true, don't add an ECI segment for different encodings than default + the encoded message (the char values range from 0 to 928) + + + + Encode parts of the message using Text Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.2. + + the message + the start position within the message + the number of characters to encode + receives the encoded codewords + should normally be SUBMODE_ALPHA + the text submode in which this method ends + + + + + Encode parts of the message using Byte Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.3. The Unicode characters will be converted to binary using the cp437 + codepage. + + the message converted to a byte array + the start position within the message + the number of bytes to encode + the mode from which this method starts + receives the encoded codewords + + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using text compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using binary compaction. + + the message + the message converted to a byte array + the start position within the message + + the requested character count + + + + Represents possible PDF417 barcode compaction types. + + + + + + + + + + + + + + + + + + + + + + + + + defines the level of the error correction / count of error correction codewords + + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + The maximum distance to search in the codeword array in both the positive and negative directions + + + + + Initializes a new instance of the class. + + The Bounding Box around the column (in the BitMatrix) + + + + Converts the Image's Row to the index in the Codewords array + + The Codeword Index. + Image row. + + + + Converts the Codeword array index into a Row in the Image (BitMatrix) + + The Image Row. + Codeword index. + + + + Gets the codeword for a given row + + The codeword. + Image row. + + + + Gets the codeword closest to the specified row in the image + + Image row. + + + + Sets the codeword for an image row + + Image row. + Codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + The Bounding Box around the column (in the BitMatrix) + + The box. + + + + The Codewords the Box encodes for, offset by the Box minY. + Remember to Access this ONLY through GetCodeword(imageRow) if you're accessing it in that manner. + + The codewords. + + + + Initializes a new instance of the class. + + Box. + If set to true is left. + + + + Sets the Row Numbers as Inidicator Columns + + + + + TODO implement properly + TODO maybe we should add missing codewords to store the correct row number to make + finding row numbers for other columns easier + use row height count to make detection of invalid row numbers more reliable + + The indicator column row numbers. + Metadata. + + + + Gets the row heights. + + The row heights. + + + + Adjusts the in omplete indicator column row numbers. + + Metadata. + + + + Gets the barcode metadata. + + The barcode metadata. + + + + Prune the codewords which do not match the metadata + TODO Maybe we should keep the incorrect codewords for the start and end positions? + + Codewords. + Metadata. + + + + Returns a that represents the current . + + A that represents the current . + + + + Gets or sets a value indicating whether this instance is the left indicator + + true if this instance is left; otherwise, false. + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + These are a set of hints that you may pass to Writers to specify their behavior. + + dswitkin@google.com (Daniel Switkin) + + + + Specifies the width of the barcode image + type: + + + + + Specifies the height of the barcode image + type: + + + + + Don't put the content string into the output image. + type: + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + + For Aztec it is of type , representing the minimal percentage of error correction words. + In all cases, it can also be a representation of the desired value as well. + Note: an Aztec symbol should have a minimum of 25% EC words. + For PDF417 it is of type or (between 0 and 8), + + + + + Specifies what character encoding to use where applicable. + type: + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + type: , or representation of the integer value + + + + + Specifies the aspect ratio to use. Default is 4. + type: , or 1-4. + + + + + Specifies whether to use compact mode for PDF417 + type: , or "true" or "false" + value + + + + + Specifies what compaction mode to use for PDF417. + type: or value of one of its + enum values + + + + + Specifies the minimum and maximum number of rows and columns for PDF417. + type: + + + + + Don't append ECI segment. + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + type: + + + + + Specifies the matrix shape for Data Matrix (type ) + + + + + Specifies a minimum barcode size (type ). Only applicable to Data Matrix now. + + + + + Specifies a maximum barcode size (type ). Only applicable to Data Matrix now. + + + + + if true, don't switch to codeset C for numbers + + + + + Specifies the default encodation for Data Matrix (type ) + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Specifies the required number of layers for an Aztec code. + A negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + type: , or representation of the integer value + + + + + Specifies the exact version of QR code to be encoded. + (Type , or representation of the integer value). + + + + + Specifies whether the data should be encoded to the GS1 standard + type: , or "true" or "false" + value + + + + + Parses strings of digits that represent a UPC code. + + dswitkin@google.com (Daniel Switkin) + + + + Represents the type of data encoded by a barcode -- from plain text, to a + URI, to an e-mail address, etc. + + Sean Owen + + + This class hierarchy provides a set of methods to convert luminance data to 1 bit data. + It allows the algorithm to vary polymorphically, for example allowing a very expensive + thresholding technique for servers and a fast one for mobile. It also permits the implementation + to vary, e.g. a JNI version for Android and a Java fallback version for other platforms. + + dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The source. + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + For callers which only examine one row of pixels at a time, the same BitArray should be reused + and passed in with each call for performance. However it is legal to keep more than one row + at a time if needed. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + A new concrete Binarizer implementation object. + + + + Gets the luminance source object. + + + + Converts a 2D array of luminance data to 1 bit data. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + + Gets the width of the luminance source object. + + + + + Gets the height of the luminance source object. + + + + + Contains conversion support elements such as classes, interfaces and static methods. + + + + + Copies an array of chars obtained from a String into a specified array of chars + + The String to get the chars from + Position of the String to start getting the chars + Position of the String to end getting the chars + Array to return the chars + Position of the destination array of chars to start storing the chars + An array of chars + + + + Sets the capacity for the specified List + + The List which capacity will be set + The new capacity value + + + + Converts a string-Collection to an array + + The strings. + + + + + Joins all elements to one string. + + + The separator. + The values. + + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The value. + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The start index. + The end index. + The value. + + + + + + + + + + + + + + + + + + Savely gets the value of a decoding hint + if hints is null the default is returned + + + The hints. + Type of the hint. + The @default. + + + + + Attribute is only for compatibility issues + + + + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + Encode "bytes" with the error correction level "ecLevel". The encoding mode will be chosen + internally by chooseMode(). On success, store the result in "qrCode". + We recommend you to use QRCode.EC_LEVEL_L (the lowest level) for + "getECLevel" since our primary use is to show QR code on desktop screens. We don't need very + strong error correction for this purpose. + Note that there is no way to encode bytes in MODE_KANJI. We might want to add EncodeWithMode() + with which clients can specify the encoding mode. For now, we don't need the functionality. + + text to encode + error correction level to use + representing the encoded QR code + + + + Encodes the specified content. + + The content. + The ec level. + The hints. + + + + + Decides the smallest version of QR code that will contain all of the provided data. + + if the data cannot fit in any version + + + + Gets the alphanumeric code. + + The code. + the code point of the table used in alphanumeric mode or + -1 if there is no corresponding code in the table. + + + + Chooses the mode. + + The content. + + + + + Choose the best mode by examining the content. Note that 'encoding' is used as a hint; + if it is Shift_JIS, and the input is only double-byte Kanji, then we return {@link Mode#KANJI}. + + The content. + The encoding. + + + + + true if the number of input bits will fit in a code with the specified version and error correction level. + + + + Terminate bits as described in 8.4.8 and 8.4.9 of JISX0510:2004 (p.24). + + The num data bytes. + The bits. + + + + Get number of data bytes and number of error correction bytes for block id "blockID". Store + the result in "numDataBytesInBlock", and "numECBytesInBlock". See table 12 in 8.5.1 of + JISX0510:2004 (p.30) + + The num total bytes. + The num data bytes. + The num RS blocks. + The block ID. + The num data bytes in block. + The num EC bytes in block. + + + + Interleave "bits" with corresponding error correction bytes. On success, store the result in + "result". The interleave rule is complicated. See 8.6 of JISX0510:2004 (p.37) for details. + + The bits. + The num total bytes. + The num data bytes. + The num RS blocks. + + + + + Append mode info. On success, store the result in "bits". + + The mode. + The bits. + + + + Append length info. On success, store the result in "bits". + + The num letters. + The version. + The mode. + The bits. + + + + Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits". + + The content. + The mode. + The bits. + The encoding. + + +

Encapsulates an alignment pattern, which are the smaller square patterns found in + all but the simplest QR Codes.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Determines if this alignment pattern "about equals" an alignment pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing an average of the two. + + The i. + The j. + New size of the module. + + + + + PDF417 error correction code following the algorithm described in ISO/IEC 15438:2001(E) in + chapter 4.10. + + + + + Tables of coefficients for calculating error correction words + (see annex F, ISO/IEC 15438:2001(E)) + + + + + Determines the number of error correction codewords for a specified error correction + level. + + the error correction level (0-8) + the number of codewords generated for error correction + + + + Determines the error correction level for AUTO + + The error correction level (0-9) + The number of codewords for AUTO errorCorrectionLevel + the number of codewords generated for error correction + + + + Returns the recommended minimum error correction level as described in annex E of + ISO/IEC 15438:2001(E). + + the number of data codewords + the recommended minimum error correction level + + + + Generates the error correction codewords according to 4.10 in ISO/IEC 15438:2001(E). + + the data codewords + the error correction level (0-8) + the String representing the error correction codewords + + + + defines the level of the error correction / count of error correction codewords + + + + + A Bounding Box helper class + + Guenther Grau + + + + Initializes a new instance of the class. + returns null if the corner points don't match up correctly + + The image. + The top left. + The bottom left. + The top right. + The bottom right. + + + + + Creates the specified box. + + The box. + + + + + Initializes a new instance of the class. + Will throw an exception if the corner points don't match up correctly + + Image. + Top left. + Top right. + Bottom left. + Bottom right. + + + + Merge two Bounding Boxes, getting the left corners of left, and the right corners of right + (Images should be the same) + + Left. + Right. + + + + Adds the missing rows. + + The missing rows. + Missing start rows. + Missing end rows. + If set to true is left. + + + + Calculates the minimum and maximum X & Y values based on the corner points. + + + + + If we adjust the width, set a new right corner coordinate and recalculate + + Bottom right. + + + + Adapted from listings in ISO/IEC 24724 Appendix B and Appendix G. + + + + + Gets the RS svalue. + + The widths. + Width of the max. + if set to true [no narrow]. + + + + + Encapsulates a since character value in an RSS barcode, including its checksum information. + + + + + Initializes a new instance of the class. + + The value. + The checksum portion. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Gets the value. + + + + + Gets the checksum portion. + + + + + Decodes MSI barcodes. + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. + + + + + Creates a reader that can be configured to check the last character as a check digit, + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + The matrix. + + + + +

Encapsulates logic that can detect a Data Matrix Code in an image, even if the Data Matrix Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + +

Detects a Data Matrix Code in an image.

+
+ encapsulating results of detecting a Data Matrix Code or null +
+ + + Calculates the position of the white top right module using the output of the rectangle detector + for a rectangular matrix + + + + + Calculates the position of the white top right module using the output of the rectangle detector + for a square matrix + + + + + Increments the Integer associated with a key by one. + + + + + Counts the number of black/white transitions between two points, using something like Bresenham's algorithm. + + + + + Simply encapsulates two points and a number of transitions between them. + + + + + Orders ResultPointsAndTransitions by number of transitions, ascending. + + + + +

This class contains utility methods for performing mathematical operations over + the Galois Fields. Operations use a given primitive polynomial in calculations.

+

Throughout this package, elements of the GF are represented as an {@code int} + for convenience and speed (but at the cost of memory). +

+
+ Sean Owen +
+ + + Create a representation of GF(size) using the given primitive polynomial. + + irreducible polynomial whose coefficients are represented by + * the bits of an int, where the least-significant bit represents the constant + * coefficient + the size of the field + the factor b in the generator polynomial can be 0- or 1-based + * (g(x) = (x+a^b)(x+a^(b+1))...(x+a^(b+2t-1))). + * In most cases it should be 1, but for QR code it is 0. + + + + Builds the monomial. + + The degree. + The coefficient. + the monomial representing coefficient * x^degree + + + + Implements both addition and subtraction -- they are the same in GF(size). + + sum/difference of a and b + + + + Exps the specified a. + + 2 to the power of a in GF(size) + + + + Logs the specified a. + + A. + base 2 log of a in GF(size) + + + + Inverses the specified a. + + multiplicative inverse of a + + + + Multiplies the specified a with b. + + A. + The b. + product of a and b in GF(size) + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Gets the size. + + + + + Gets the generator base. + + + + + Represents a parsed result that encodes wifi network information, like SSID and password. + + Vikram Aggarwal + + + + Represents a parsed result that encodes a geographic coordinate, with latitude, longitude and altitude. + + Sean Owen + + + latitude in degrees + + + + longitude in degrees + + + + altitude in meters. If not specified, in the geo URI, returns 0.0 + + + + query string associated with geo URI or null if none exists + + + + the geo URI + + + + a URI link to Google Maps which display the point on the Earth described + by this instance, and sets the zoom level in a way that roughly reflects the + altitude, if specified + + + + + Enumerates barcode formats known to this package. + + Sean Owen + + + Aztec 2D barcode format. + + + CODABAR 1D format. + + + Code 39 1D format. + + + Code 93 1D format. + + + Code 128 1D format. + + + Data Matrix 2D barcode format. + + + EAN-8 1D format. + + + EAN-13 1D format. + + + ITF (Interleaved Two of Five) 1D format. + + + MaxiCode 2D barcode format. + + + PDF417 format. + + + QR Code 2D barcode format. + + + RSS 14 + + + RSS EXPANDED + + + UPC-A 1D format. + + + UPC-E 1D format. + + + UPC/EAN extension format. Not a stand-alone format. + + + MSI + + + Plessey + + + Intelligent Mail barcode + + + + UPC_A | UPC_E | EAN_13 | EAN_8 | CODABAR | CODE_39 | CODE_93 | CODE_128 | ITF | RSS_14 | RSS_EXPANDED + without MSI (to many false-positives) and IMB (not enough tested, and it looks more like a 2D) + + + + + Renders an Aztec code as a + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + This implementation can detect and decode Aztec codes in an image. + + David Olivier + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + a String representing the content encoded by the Data Matrix code + + + + + Locates and decodes a Data Matrix code in an image. + + image of barcode to decode + passed as a {@link java.util.Hashtable} from {@link com.google.zxing.DecodeHintType} + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + The general exception class throw when something goes wrong during decoding of a barcode. + This includes, but is not limited to, failing checksums / error correction algorithms, being + unable to locate finder timing patterns, and so on. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class. + + The inner exception. + + + + Initializes a new instance of the class. + + The inner exception. + + + + + JAVAPORT: The original code was a 2D array of ints, but since it only ever gets assigned + 0, 1 and 2 I'm going to use less memory and go with bytes. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Sets the specified x. + + The x. + The y. + The value. + + + + Sets the specified x. + + The x. + The y. + if set to true [value]. + + + + Clears the specified value. + + The value. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Gets the height. + + + + + Gets the width. + + + + + Gets or sets the with the specified x. + + + + + an internal representation as bytes, in row-major order. array[y][x] represents point (x,y) + + + + + Jacob Haynes + + + + + Creates a Barcode row of the width + + The width. + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + A boolean which is true if the bar black false if it is white + How many spots wide the bar is. + + + + + This function scales the row + + How much you want the image to be scaled, must be greater than or equal to 1. + the scaled row + + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Superclass of implementations that read barcodes in the RSS family of formats. + + + + + Initializes a new instance of the class. + + + + + Gets the decode finder counters. + + + + + + Gets the data character counters. + + + + + + Gets the odd rounding errors. + + + + + + Gets the even rounding errors. + + + + + + Gets the odd counts. + + + + + + Gets the even counts. + + + + + + Parses the finder value. + + The counters. + The finder patterns. + The value. + + + + + Counts the specified array. + + The array. + + + + + Increments the specified array. + + The array. + The errors. + + + + Decrements the specified array. + + The array. + The errors. + + + + Determines whether [is finder pattern] [the specified counters]. + + The counters. + + true if [is finder pattern] [the specified counters]; otherwise, false. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + This object renders a MSI code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Implements decoding of the EAN-13 format.

+ + dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Initializes a new instance of the class. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + Based on pattern of odd-even ('L' and 'G') patterns used to encoded the explicitly-encoded + digits in a barcode, determines the implicitly encoded first digit and adds it to the + result string. + + string to insert decoded first digit into + int whose bits indicates the pattern of odd/even L/G patterns used to + encode digits + -1 if first digit cannot be determined + + + + Get the format of this decoder. + The 1D format. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Error Correction Code for ECC200. + + + + + Lookup table which factors to use for which number of error correction codewords. + See FACTORS. + + + + + Precomputed polynomial factors for ECC 200. + + + + + Creates the ECC200 error correction for an encoded message. + + The codewords. + information about the symbol to be encoded + the codewords with interleaved error correction. + + + +

Encapsulates a block of data within a Data Matrix Code. Data Matrix Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ + bbrown@google.com (Brian Brown) +
+
+ + +

When Data Matrix Codes use multiple data blocks, they actually interleave the bytes of each of them. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ + bytes as read directly from the Data Matrix Code + version of the Data Matrix Code + DataBlocks containing original bytes, "de-interleaved" from representation in the + Data Matrix Code +
+
+ + + Implements Reed-Solomon encoding, as the name implies. + + Sean Owen + William Rucklidge + + + This Binarizer implementation uses the old ZXing global histogram approach. It is suitable + for low-end mobile devices which don't have enough CPU or memory to use a local thresholding + algorithm. However, because it picks a global black point, it cannot handle difficult shadows + and gradients. + + Faster mobile devices and all desktop applications should probably use HybridBinarizer instead. + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The source. + + + + Applies simple sharpening to the row data to improve performance of the 1D Readers. + + + + + + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + + A new concrete Binarizer implementation object. + + + + + Does not sharpen the data, as this call is intended to only be used by 2D Readers. + + + + +

Encapsulates the result of detecting a barcode in an image. This includes the raw + matrix of black/white pixels corresponding to the barcode, and possibly points of interest + in the image, like the location of finder patterns or corners of the barcode in the image.

+
+ Sean Owen +
+ + + initializing constructor + + + + + + + the detected bits + + + + + the pixel points where the result is found + + + + + The number's sign, where Positive also stands for the number zero. + + + + + A simple result type encapsulating a string that has no further interpretation. + + Sean Owen + + + Parses strings of digits that represent a ISBN. + + + jbreiden@google.com (Jeff Breidenbach) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + See ISBN-13 For Dummies + + The result. + + + + + Represents a parsed result that encodes extended product information as encoded by the RSS format, like weight, price, dates, etc. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + extension for kilogram weight type + + + + + extension for pounds weight type + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the raw text + + + + + the product id + + + + + the sscc + + + + + the lot number + + + + + the production date + + + + + the packaging date + + + + + the best before date + + + + + the expiration date + + + + + the weight + + + + + the weight type + + + + + the weight increment + + + + + the price + + + + + the price increment + + + + + the price currency + + + + + the uncommon AIs + + + + + the display representation (raw text) + + + + + class which represents the luminance values for a bitmap object of a WriteableBitmap class + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + initializing constructor + + + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + A smart class to encode some content to raw pixel data + + + + + A base class for specific barcode writers with specific formats of barcode images. + + The type of the output. + + + + A base class for specific barcode writers with specific formats of barcode images. + + + + + + + + + + + + + + + + Encodes the specified contents and returns a BitMatrix array. + That array has to be rendered manually or with a IBarcodeRenderer. + + The contents. + + + + + Gets or sets the barcode format. + The value is only suitable if the MultiFormatWriter is used. + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents and returns a rendered instance of the barcode. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The matrix. + + + + + Gets or sets the renderer which should be used to render the encoded BitMatrix. + + + + + Initializes a new instance of the class. + + + + + + + Satoru Takabayashi + Daniel Switkin + Sean Owen + + + + Apply mask penalty rule 1 and return the penalty. Find repetitive cells with the same color and + give penalty to them. Example: 00000 or 11111. + + The matrix. + + + + + Apply mask penalty rule 2 and return the penalty. Find 2x2 blocks with the same color and give + penalty to them. This is actually equivalent to the spec's rule, which is to find MxN blocks and give a + penalty proportional to (M-1)x(N-1), because this is the number of 2x2 blocks inside such a block. + + The matrix. + + + + + Apply mask penalty rule 3 and return the penalty. Find consecutive cells of 00001011101 or + 10111010000, and give penalty to them. If we find patterns like 000010111010000, we give + penalties twice (i.e. 40 * 2). + + The matrix. + + + + + Apply mask penalty rule 4 and return the penalty. Calculate the ratio of dark cells and give + penalty if the ratio is far from 50%. It gives 10 penalty for 5% distance. + + The matrix. + + + + + Return the mask bit for "getMaskPattern" at "x" and "y". See 8.8 of JISX0510:2004 for mask + pattern conditions. + + The mask pattern. + The x. + The y. + + + + + Helper function for applyMaskPenaltyRule1. We need this for doing this calculation in both + vertical and horizontal orders respectively. + + The matrix. + if set to true [is horizontal]. + + + +

Encapsulates a QR Code's format information, including the data mask used and + error correction level.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + +
+ + See ISO 18004:2006, Annex C, Table C.1 + + + Offset i holds the number of 1 bits in the binary representation of i + + + + Decodes the format information. + + format info indicator, with mask still applied + The masked format info2. + + information about the format it specifies, or null + if doesn't seem to match any known pattern + + + +

Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations + of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix, + including areas used for finder patterns, timing patterns, etc. These areas should be unused + after the point they are unmasked anyway.

+ +

Note that the diagram in section 6.8.1 is misleading since it indicates that i is column position + and j is row position. In fact, as the text says, i is row position and j is column position.

+ +
+ Sean Owen +
+ + See ISO 18004:2006 6.8.1 + + +

Implementations of this method reverse the data masking process applied to a QR Code and + make its bits ready to read.

+
+ + representation of QR Code bits + dimension of QR Code, represented by bits, being unmasked +
+ + + A Barcode Value for the PDF417 barcode. + The scanner will iterate through the bitmatrix, + and given the different methods or iterations + will increment a given barcode value's confidence. + + When done, this will return the values of highest confidence. + + Guenther Grau + + + + Incremenets the Confidence for a given value. (Adds an occurance of a value) + + + Value. + + + + Determines the maximum occurrence of a set value and returns all values which were set with this occurrence. + + an array of int, containing the values with the highest occurrence, or null, if no value was set. + + + + Returns the confience value for a given barcode value + + Barcode value. + + + @see UPCEANExtension2Support + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + one {@link ResultMetadataType} to appropriate value, or {@code null} if not known + + + + @see UPCEANExtension5Support + + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + + + + One row of an RSS Expanded Stacked symbol, consisting of 1+ expanded pairs. + + + + + Two rows are equal if they contain the same pairs in the same order. + + + + + Did this row of the image have to be reversed (mirrored) to recognize the pairs? + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + This object renders an EAN13 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + This object renders a CODE39 code as a . + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Decodes Code 39 barcodes. Supports "Full ASCII Code 39" if USE_CODE_39_EXTENDED_MODE is set.

+ Sean Owen + @see Code93Reader +
+
+ + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. It will not decoded "extended Code 39" sequences. + + + + + Creates a reader that can be configured to check the last character as a check digit. + It will not decoded "extended Code 39" sequences. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + + Creates a reader that can be configured to check the last character as a check digit, + or optionally attempt to decode "extended Code 39" sequences that are used to encode + the full ASCII character set. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + if true, will attempt to decode extended Code 39 sequences in the text. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + Returns a string with all possible characters + + + + + implements an Intelligent Mail barcode + Rishabh Hatgadkar + + + + + Encapsulates the result of decoding a matrix of bits. This typically + applies to 2D barcode formats. For now it contains the raw bytes obtained, + as well as a String interpretation of those bytes, if applicable. + Sean Owen + + + + + initializing constructor + + + + + + + + + initializing constructor + + + + + + + + + + + initializing constructor + + + + + + + + + + initializing constructor + + + + + + + + + + + + raw bytes representing the result, or null if not applicable + + + + + how many bits of are valid; typically 8 times its length + + + + + text representation of the result + + + + + list of byte segments in the result, or null if not applicable + + + + + name of error correction level used, or null if not applicable + + + + + gets a value which describe if structure append data was found + + + + + number of errors corrected, or null if not applicable + + + + + gives the sequence number of the result if structured append was found + + + + + number of erasures corrected, or null if not applicable + + + + + gives the parity information if structured append was found + + + + + Miscellanseous data value for the various decoders + + The other. + + + + Integer inefficiently represented internally using base-10 digits, in order to allow a + visual representation as a base-10 string. Only for internal use. + + + + + 10 numeration base for string representation, very inefficient for computations. + + + + + Maximum size for numbers is up to 10240 binary digits or approximately (safe to use) 3000 decimal digits. + The maximum size is, in fact, double the previously specified amount, in order to accommodate operations' + overflow. + + + + Integer constants + + + + The array of digits of the number. + + + + + The actual number of digits of the number. + + + + + The number sign. + + + + + Default constructor, intializing the Base10BigInteger with zero. + + + + + Constructor creating a new Base10BigInteger as a conversion of a regular base-10 long. + + The base-10 long to be converted + + + + Constructor creating a new Base10BigInteger as a copy of an existing Base10BigInteger. + + The Base10BigInteger to be copied + + + + Determines whether the specified Base10BigInteger is equal to the current Base10BigInteger. + + The Base10BigInteger to compare with the current Base10BigInteger + True if the specified Base10BigInteger is equal to the current Base10BigInteger, + false otherwise + + + + Determines whether the specified System.Object is equal to the current Base10BigInteger. + + The System.Object to compare with the current Base10BigInteger + True if the specified System.Object is equal to the current Base10BigInteger, + false otherwise + + + + Serves as a hash function for the Base10BigInteger type. + + A hash code for the current Base10BigInteger + + + + String representation of the current Base10BigInteger, converted to its base-10 representation. + + The string representation of the current Base10BigInteger + + + + Base10BigInteger inverse with respect to addition. + + The Base10BigInteger whose opposite is to be computed + The Base10BigInteger inverse with respect to addition + + + + Greater test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a > b, false otherwise + + + + Greater or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a >= b, false otherwise + + + + Smaller test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a < b, false otherwise + + + + Smaller or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a <= b, false otherwise + + + + Computes the absolute value of a Base10BigInteger. + + The Base10BigInteger whose absolute value is to be computed + The absolute value of the given BigInteger + + + + Addition operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the addition + + + + Subtraction operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the subtraction + + + + Multiplication operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the multiplication + + + + Implicit conversion operator from long to Base10BigInteger. + + The long to be converted to a Base10BigInteger + The Base10BigInteger converted from the given long + + + + Equality test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a == b, false otherwise + + + + Inequality test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a != b, false otherwise + + + + Greater test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a > b, false otherwise + + + + Smaller test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a < b, false otherwise + + + + Greater or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a >= b, false otherwise + + + + Smaller or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a <= b, false otherwise + + + + Base10BigInteger inverse with respect to addition. + + The Base10BigInteger whose opposite is to be computed + The Base10BigInteger inverse with respect to addition + + + + Addition operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the addition + + + + Subtraction operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the subtraction + + + + Multiplication operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the multiplication + + + + Incremetation by one operation of a Base10BigInteger. + + The Base10BigInteger to be incremented by one + The Base10BigInteger result of incrementing by one + + + + Decremetation by one operation of a Base10BigInteger. + + The Base10BigInteger to be decremented by one + The Base10BigInteger result of decrementing by one + + + + Adds two BigNumbers a and b, where a >= b, a, b non-negative. + + + + + Subtracts the Base10BigInteger b from the Base10BigInteger a, where a >= b, a, b non-negative. + + + + + Multiplies two Base10BigIntegers. + + + + + Sets the number sign. + + + + + Tries to parse results that are a URI of some kind. + + Sean Owen + + + +

Parses an "smtp:" URI result, whose format is not standardized but appears to be like: + smtp[:subject[:body]]}.

+

See http://code.google.com/p/zxing/issues/detail?id=536

+
+ Sean Owen +
+ + Implements the "MECARD" address book entry format. + + Supported keys: N, SOUND, TEL, EMAIL, NOTE, ADR, BDAY, URL, plus ORG + Unsupported keys: TEL-AV, NICKNAME + + Except for TEL, multiple values for keys are also not supported; + the first one found takes precedence. + + Our understanding of the MECARD format is based on this document: + + http://www.mobicode.org.tw/files/OMIA%20Mobile%20Bar%20Code%20Standard%20v3.2.1.doc + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + +

See + + DoCoMo's documentation about the result types represented by subclasses of this class.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + Implements KDDI AU's address book format. See + + http://www.au.kddi.com/ezfactory/tec/two_dimensions/index.html. + (Thanks to Yuzo for translating!) + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Aztec result meta data. + + + + + + + + + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + This object extends LuminanceSource around an array of YUV data returned from the camera driver, + with the option to crop to a rectangle within the full data. This can be used to exclude + superfluous pixels around the perimeter and speed up decoding. + It works for any pixel format where the Y channel is planar and appears first, including + YCbCr_420_SP and YCbCr_422_SP. + @author dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The yuv data. + Width of the data. + Height of the data. + The left. + The top. + The width. + The height. + if set to true [reverse horiz]. + + + + Initializes a new instance of the class. + + The luminances. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Renders the cropped greyscale bitmap. + + + + + + creates a new instance + + + + + + + + + + + + + + + Whether this subclass supports cropping. + + + + width of image from {@link #renderThumbnail()} + + + + + height of image from {@link #renderThumbnail()} + + + + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Maximum Codewords (Data + Error). + + + + + Gets the bit count sum. + + The bit count sum. + Module bit count. + + + + Converts an ICollection<int> to an int[] + Carry-over from Java. Will likely remove and replace with the Generic .ToArray() method. + + The int array. + List. + + + + Translate the symbol into a codeword + + the codeword corresponding to the symbol. + encoded symbol to translate to a codeword + + + + The sorted table of all possible symbols. Extracted from the PDF417 + specification. The index of a symbol in this table corresponds to the + index into the codeword table. + + + + + This table contains to codewords for all symbols. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + The class holds the available options for the QrCodeWriter + + + + + if true, don't switch to codeset C for numbers + + + + + This class renders CodaBar as []. + + dsbnatut@gmail.com (Kazuki Nishiura) + + + +

Decodes Codabar barcodes.

+ + Bas Vijfwinkel +
+
+ + These represent the encodings of characters, as patterns of wide and narrow bars. The 7 least-significant bits of + each int correspond to the pattern of wide and narrow, with 1s representing "wide" and 0s representing narrow. + + + + Records the size of all runs of white and black pixels, starting with white. + This is just like recordPattern, except it records all the counters, and + uses our builtin "counters" member for storage. + + row to count from + + + + Encapsulates a type of hint that a caller may pass to a barcode reader to help it + more quickly or accurately decode it. It is up to implementations to decide what, + if anything, to do with the information that is supplied. + + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Unspecified, application-specific hint. Maps to an unspecified . + + + + + Image is a pure monochrome image of a barcode. Doesn't matter what it maps to; + use = true. + + + + + Image is known to be of one of a few possible formats. + Maps to a of s. + + + + + Spend more time to try to find a barcode; optimize for accuracy, not speed. + Doesn't matter what it maps to; use = true. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + + + The caller needs to be notified via callback when a possible + is found. Maps to a . + + + + + Assume MSI codes employ a check digit. Maps to . + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + Maps to . + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + 1D readers supporting rotation with TRY_HARDER enabled. + But BarcodeReader class can do auto-rotating for 1D and 2D codes. + Enabling that option prevents 1D readers doing double rotation. + BarcodeReader enables that option automatically if "global" auto-rotation is enabled. + Maps to . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to; + use . + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + The class holds the available options for the DatamatrixWriter + + + + + Specifies the matrix shape for Data Matrix + + + + + Specifies a minimum barcode size + + + + + Specifies a maximum barcode size + + + + + Specifies the default encodation + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + +

Represents a polynomial whose coefficients are elements of a GF. + Instances of this class are immutable.

+

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + the {@link GenericGF} instance representing the field to use + to perform computations + coefficients as ints representing elements of GF(size), arranged + from most significant (highest-power term) coefficient to least significant + if argument is null or empty, + or if leading coefficient is 0 and this is not a + constant polynomial (that is, it is not the monomial "0") + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + + + degree of this polynomial + + + + + Gets a value indicating whether this is zero. + + true iff this polynomial is the monomial "0" + + + +

Represents a 2D matrix of bits. In function arguments below, and throughout the common + module, x is the column position, and y is the row position. The ordering is always x, y. + The origin is at the top-left.

+

Internally the bits are represented in a 1-D array of 32-bit ints. However, each row begins + with a new int. This is done intentionally so that we can copy out a row into a BitArray very + efficiently.

+

The ordering of bits is row-major. Within each int, the least significant bits are used first, + meaning they represent lower x values. This is compatible with BitArray's implementation.

+
+ Sean Owen + dswitkin@google.com (Daniel Switkin) +
+ + + Creates an empty square . + + height and width + + + + Creates an empty square . + + bit matrix width + bit matrix height + + + + Interprets a 2D array of booleans as a , where "true" means an "on" bit. + + bits of the image, as a row-major 2D array. Elements are arrays representing rows + representation of image + + + +

Flips the given bit.

+
+ The horizontal component (i.e. which column) + The vertical component (i.e. which row) +
+ + + flip all of the bits, if shouldBeFlipped is true for the coordinates + + should return true, if the bit at a given coordinate should be flipped + + + + Exclusive-or (XOR): Flip the bit in this {@code BitMatrix} if the corresponding + mask bit is set. + + The mask. + + + Clears all bits (sets to false). + + +

Sets a square region of the bit matrix to true.

+ +
+ The horizontal position to begin at (inclusive) + + The vertical position to begin at (inclusive) + + The width of the region + + The height of the region + +
+ + A fast method to retrieve one row of data from the matrix as a BitArray. + + + The row to retrieve + + An optional caller-allocated BitArray, will be allocated if null or too small + + The resulting BitArray - this reference should always be used even when passing + your own row + + + + + Sets the row. + + row to set + {@link BitArray} to copy from + + + + Modifies this {@code BitMatrix} to represent the same but rotated 180 degrees + + + + + This is useful in detecting the enclosing rectangle of a 'pure' barcode. + + {left,top,width,height} enclosing rectangle of all 1 bits, or null if it is all white + + + + This is useful in detecting a corner of a 'pure' barcode. + + {x,y} coordinate of top-left-most 1 bit, or null if it is all white + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + The line separator. + + A that represents this instance. + + + + + Clones this instance. + + + + + + Converts this ByteMatrix to a black and white bitmap. + + A black and white bitmap converted from this ByteMatrix. + + + The width of the matrix + + + + The height of the matrix + + + + This method is for compatibility with older code. It's only logical to call if the matrix + is square, so I'm throwing if that's not the case. + + + row/column dimension of this matrix + + + + + The rowsize of the matrix + + + +

Gets the requested bit, where true means black.

+ +
+ The horizontal component (i.e. which column) + + The vertical component (i.e. which row) + + value of given bit in matrix + +
+ + + Represents a parsed result that encodes a Vehicle Identification Number (VIN). + + + + + A smart class to decode the barcode inside a bitmap object + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Constructor for additional image formats for one BarcodeReader class + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Optional: Gets or sets the function to create a luminance source object for a bitmap. + If null a platform specific default LuminanceSource is used + + + The function to create a luminance source object. + + + + + A smart class to decode the barcode inside a bitmap object + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + State represents all information about a sequence necessary to generate the current output. + Note that a state is immutable. + + + + + Create a new state representing this state with a latch to a (not + necessary different) mode, and then a code. + + + + + Create a new state representing this state, with a temporary shift + to a different mode to output a single value. + + + + + Create a new state representing this state, but an additional character + output in Binary Shift mode. + + + + + Create the state identical to this one, but we are no longer in + Binary Shift mode. + + + + + Returns true if "this" state is better (or equal) to be in than "that" + state under all possible circumstances. + + + + + Generates Aztec 2D barcodes. + + Rustam Abdullaev + + + + Encodes the given binary content as an Aztec symbol + + input data string + Aztec symbol matrix with metadata + + + + Encodes the given binary content as an Aztec symbol + + input data string + minimal percentage of error check words (According to ISO/IEC 24778:2008, + a minimum of 23% + 3 words is recommended) + if non-zero, a user-specified value for the number of layers + + Aztec symbol matrix with metadata + + + + + Renders a to a + + + + + Interface for a class to convert a BitMatrix to an output image format + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + The options. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + + Gets or sets the font family. + + + The font family. + + + + + Gets or sets the size of the font. + + + The size of the font. + + + + + Gets or sets the font stretch. + + + The font stretch. + + + + + Gets or sets the font style. + + + The font style. + + + + + Gets or sets the font weight. + + + The font weight. + + + + + A Codeword in the PDF417 barcode + + Guenther Grau + + + + Default value for the RowNumber (-1 being an invalid real number) + + + + + Initializes a new instance of the class. + + Start x. + End x. + Bucket. + Value. + + + + Determines whether this instance is valid row number the specified rowNumber. + + true if this instance is valid row number the specified rowNumber; otherwise, false. + Row number. + + + + Sets the row number as the row's indicator column. + + + + + Returns a that represents the current . + + A that represents the current . + + + + Gets the width. + + The width. + + + + Gets a value indicating whether this instance has valid row number. + + true if this instance has valid row number; otherwise, false. + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + This implementation can detect and decode multiple QR Codes in an image. + + + + + This implementation can detect and decode QR Codes in an image. + Sean Owen + + + + + Gets the decoder. + + + + + + Locates and decodes a QR code in an image. + + a String representing the content encoded by the QR code + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Simply encapsulates a width and height. + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + + + + + + the width + + + + + the height + + + + + Enumeration for encodation types + + + + +

The main class which implements Data Matrix Code decoding -- as opposed to locating and extracting + the Data Matrix Code from an image.

+ + bbrown@google.com (Brian Brown) +
+
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a Data Matrix Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+ + booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code + if the Data Matrix Code cannot be decoded +
+
+ + +

Decodes a Data Matrix Code represented as a . A 1 or "true" is taken + to mean a black module.

+
+ booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+ + data and error correction codewords + number of codewords that are data bytes +
+
+ + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. By keeping track of the + last black points it encountered, it determines the corners of the barcode. + + David Olivier + + + + Creates a WhiteRectangleDetector instance + + The image. + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + Creates a WhiteRectangleDetector instance + + barcode image to find a rectangle in + initial size of search area around center + x position of search center + y position of search center + + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + + Initializes a new instance of the class. + + The image. + if image is too small + + + + Initializes a new instance of the class. + + The image. + Size of the init. + The x. + The y. + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. + + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + recenters the points of a constant distance towards the center + + bottom most point + left most point + right most point + top most point + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + Determines whether a segment contains a black point + + min value of the scanned coordinate + max value of the scanned coordinate + value of fixed coordinate + set to true if scan must be horizontal, false if vertical + + true if a black point has been found, else false. + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Parses the "URLTO" result format, which is of the form "URLTO:[title]:[url]". + This seems to be used sometimes, but I am not able to find documentation + on its origin or official format? + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Parses a "geo:" URI result, which specifies a location on the surface of + the Earth as well as an optional altitude above the surface. See + + http://tools.ietf.org/html/draft-mayrhofer-geo-uri-00. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a calendar event at a certain time, optionally with attendees and a location. + + Sean Owen + + + + Determines whether [is start all day]. + + if start time was specified as a whole day + + + + Parses a string as a date. RFC 2445 allows the start and end fields to be of type DATE (e.g. 20081021) + or DATE-TIME (e.g. 20081021T123000 for local time, or 20081021T123000Z for UTC). + + The string to parse + + if not a date formatted string + + + + Gets the start. + + + + + event end , or null if event has no duration + + + + + Gets a value indicating whether this instance is end all day. + + true if end time was specified as a whole day + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Aztec 2D code representation + + Rustam Abdullaev + + + + Compact or full symbol indicator + + + + + Size in pixels (width and height) + + + + + Number of levels + + + + + Number of data codewords + + + + + The symbol image + + + + + Encapsulates logic that can detect an Aztec Code in an image, even if the Aztec Code + is rotated or skewed, or partially obscured. + + David Olivier + + + + Initializes a new instance of the class. + + The image. + + + + Detects an Aztec Code in an image. + + + + + Detects an Aztec Code in an image. + + if true, image is a mirror-image of original. + + encapsulating results of detecting an Aztec Code + + + + + Extracts the number of data layers and data blocks from the layer around the bull's eye + + bullEyeCornerPoints the array of bull's eye corners + + + + + Corrects the parameter bits using Reed-Solomon algorithm + + paremeter bits + compact true if this is a compact Aztec code + + + + + Finds the corners of a bull-eye centered on the passed point + This returns the centers of the diagonal points just outside the bull's eye + Returns [topRight, bottomRight, bottomLeft, topLeft] + + Center point + The corners of the bull-eye + + + + Finds a candidate center point of an Aztec code from an image + + the center point + + + + Gets the Aztec code corners from the bull's eye corners and the parameters. + + the array of bull's eye corners + the array of aztec code corners + + + + Creates a BitMatrix by sampling the provided image. + topLeft, topRight, bottomRight, and bottomLeft are the centers of the squares on the + diagonal just outside the bull's eye. + + The image. + The top left. + The bottom left. + The bottom right. + The top right. + + + + + Samples a line + + start point (inclusive) + end point (exclusive) + number of bits + the array of bits as an int (first bit is high-order bit of result) + + + + Determines whether [is white or black rectangle] [the specified p1]. + + The p1. + The p2. + The p3. + The p4. + true if the border of the rectangle passed in parameter is compound of white points only + or black points only + + + + Gets the color of a segment + + The p1. + The p2. + 1 if segment more than 90% black, -1 if segment is more than 90% white, 0 else + + + + Gets the coordinate of the first point with a different color in the given direction + + The init. + if set to true [color]. + The dx. + The dy. + + + + + Expand the square represented by the corner points by pushing out equally in all directions + + the corners of the square, which has the bull's eye at its center + the original length of the side of the square in the target bit matrix + the new length of the size of the square in the target bit matrix + the corners of the expanded square + + + +

The main class which implements QR Code decoding -- as opposed to locating and extracting + the QR Code from an image.

+
+ + Sean Owen + +
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a QR Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Decodes a QR Code represented as a {@link BitMatrix}. A 1 or "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+
+ data and error correction codewords + number of codewords that are data bytes + +
+ + Sean Owen + + + {@link BitMatrix} to parse + ReaderException if dimension is not >= 21 and 1 mod 4 + + +

Reads format information from one of its two locations within the QR Code.

+ +
+ {@link FormatInformation} encapsulating the QR Code's format info + + ReaderException if both format information locations cannot be parsed as + the valid encoding of format information + +
+ +

Reads version information from one of its two locations within the QR Code.

+ +
+ {@link Version} encapsulating the QR Code's version + + ReaderException if both version information locations cannot be parsed as + the valid encoding of version information + +
+ +

Reads the bits in the {@link BitMatrix} representing the finder pattern in the + correct order in order to reconstruct the codewords bytes contained within the + QR Code.

+ +
+ bytes encoded within the QR Code + + ReaderException if the exact number of bytes expected is not read +
+ + Revert the mask removal done while reading the code words. The bit matrix should revert to its original state. + + + Prepare the parser for a mirrored operation. + This flag has effect only on the {@link #readFormatInformation()} and the + {@link #readVersion()}. Before proceeding with {@link #readCodewords()} the + {@link #mirror()} method should be called. + + @param mirror Whether to read version and format information mirrored. + + + Mirror the bit matrix in order to attempt a second reading. + + + + The class holds the available options for the + + + + + Specifies whether to use compact mode for PDF417 (type ). + + + + + Specifies what compaction mode to use for PDF417 (type + ). + + + + + Specifies the minimum and maximum number of rows and columns for PDF417 (type + ). + + + + + Specifies what degree of error correction to use + + + + + Specifies what degree of error correction to use + + + + + Specifies what character encoding to use where applicable (type {@link String}) + + + + + Explicitly disables ECI segment when generating PDF417 Code + That is against the specification but some + readers have problems if the charset is switched from + CP437 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use different encodings + and the ECI segment is omitted. + + + + + Data object to specify the minimum and maximum number of rows and columns for a PDF417 barcode. + @author qwandor@google.com (Andrew Walbran) + + + + + Initializes a new instance of the class. + + The min cols. + The max cols. + The min rows. + The max rows. + + + + Gets the min cols. + + + + + Gets the max cols. + + + + + Gets the min rows. + + + + + Gets the max rows. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + MultiFormatReader is a convenience class and the main entry point into the library for most uses. + By default it attempts to decode all barcode formats that the library supports. Optionally, you + can provide a hints object to request different behavior, for example only decoding QR codes. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + This version of decode honors the intent of Reader.decode(BinaryBitmap) in that it + passes null as a hint to the decoders. However, that makes it inefficient to call repeatedly. + Use setHints() followed by decodeWithState() for continuous scan applications. + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the hints provided. Does not honor existing state. + + + The pixel data to decode + + The hints to use, clearing the previous state. + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the state set up by calling setHints() previously. Continuous scan + clients will get a large speed increase by using this instead of decode(). + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + + resets all specific readers + + + + This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls + to decodeWithState(image) can reuse the same set of readers without reallocating memory. This + is important for performance in continuous scan clients. + + + + + + A wrapper implementation of {@link LuminanceSource} which inverts the luminances it returns -- black becomes + white and vice versa, and each value becomes (255-value). + + Sean Owen + + + + Initializes a new instance of the class. + + The @delegate. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Inverts this instance. + + original delegate {@link LuminanceSource} since invert undoes itself + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff; + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + + + Whether this subclass supports cropping. + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + This object renders a Data Matrix code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + Guillaume Le Biller Added to zxing lib. + + + + encodes the content to a BitMatrix + + + + + + + + + + encodes the content to a BitMatrix + + + + + + + + + + + Encode the given symbol info to a bit matrix. + + The DataMatrix placement. + The symbol info to encode. + + + The bit matrix generated. + + + + Convert the ByteMatrix to BitMatrix. + + The input matrix. + The requested width of the image (in pixels) with the Datamatrix code + The requested height of the image (in pixels) with the Datamatrix code + The output matrix. + + + + This implementation can detect and decode Data Matrix codes in an image. + + bbrown@google.com (Brian Brown) + + + + + Locates and decodes a Data Matrix code in an image. + + + a String representing the content encoded by the Data Matrix code + + + + Locates and decodes a Data Matrix code in an image. + + + + a String representing the content encoded by the Data Matrix code + + + + does nothing here + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + This class implements a local thresholding algorithm, which while slower than the + GlobalHistogramBinarizer, is fairly efficient for what it does. It is designed for + high frequency images of barcodes with black data on white backgrounds. For this application, + it does a much better job than a global blackpoint with severe shadows and gradients. + However it tends to produce artifacts on lower frequency images and is therefore not + a good general purpose binarizer for uses outside ZXing. + + This class extends GlobalHistogramBinarizer, using the older histogram approach for 1D readers, + and the newer local approach for 2D readers. 1D decoding using a per-row histogram is already + inherently local, and only fails for horizontal gradients. We can revisit that problem later, + but for now it was not a win to use local blocks for 1D. + + This Binarizer is the default for the unit tests and the recommended class for library users. + dswitkin@google.com (Daniel Switkin) + + + + + initializing constructor + + + + + + creates a new instance + + + + + + + Calculates the final BitMatrix once for all requests. This could be called once from the + constructor instead, but there are some advantages to doing it lazily, such as making + profiling easier, and not doing heavy lifting when callers don't expect it. + + + + + For each 8x8 block in the image, calculate the average black point using a 5x5 grid + of the blocks around it. Also handles the corner cases (fractional blocks are computed based + on the last 8 pixels in the row/column which are also used in the previous block). + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + The black points. + The matrix. + + + + Applies a single threshold to an 8x8 block of pixels. + + The luminances. + The xoffset. + The yoffset. + The threshold. + The stride. + The matrix. + + + + Calculates a single black point for each 8x8 block of pixels and saves it away. + See the following thread for a discussion of this algorithm: + http://groups.google.com/group/zxing/browse_thread/thread/d06efa2c35a7ddc0 + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + + + + + gives the black matrix + + + + + Superclass of classes encapsulating types ECIs, according to "Extended Channel Interpretations" + 5.3 of ISO 18004. + + Sean Owen + + + ECI value + representing ECI of given value, or null if it is legal but unsupported + ArgumentException if ECI value is invalid + + + + the ECI value + + + + + A simple, fast array of bits, represented compactly by an array of ints internally. + + Sean Owen + + + + default constructor + + + + + initializing constructor + + desired size of the array + + + + Flips bit i. + + bit to set + + + + + Gets the next set. + + first bit to check + index of first bit that is set, starting from the given index, or size if none are set + at or beyond this given index + + + + see getNextSet(int) + + index to start looking for unset bit + index of next unset bit, or if none are unset until the end + + + Sets a block of 32 bits, starting at bit i. + + + first bit to set + + the new value of the next 32 bits. Note again that the least-significant bit + corresponds to bit i, the next-least-significant to i+1, and so on. + + + + + Sets a range of bits. + + start of range, inclusive. + end of range, exclusive + + + Clears all bits (sets to false). + + + Efficient method to check if a range of bits is set, or not set. + + + start of range, inclusive. + + end of range, exclusive + + if true, checks that bits in range are set, otherwise checks that they are not set + + true iff all bits are set or not set in range, according to value argument + if end is less than start or the range is not contained in the array + + + + Appends the bit. + + The bit. + + + + Appends the least-significant bits, from value, in order from most-significant to + least-significant. For example, appending 6 bits from 0x000001E will append the bits + 0, 1, 1, 1, 1, 0 in that order. + + containing bits to append + bits from value to append + + + + adds the array to the end + + + + + + XOR operation + + + + + + converts to bytes. + + first bit to start writing + array to write into. Bytes are written most-significant byte first. This is the opposite + of the internal representation, which is exposed by BitArray + position in array to start writing + how many bytes to write + + + Reverses all bits in the array. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Erstellt ein neues Objekt, das eine Kopie der aktuellen Instanz darstellt. + + + Ein neues Objekt, das eine Kopie dieser Instanz darstellt. + + + + + size of the array, number of elements + + + + + size of the array in bytes + + + + + index accessor + + + + + + underlying array of ints. The first element holds the first 32 bits, and the least + significant bit is bit 0. + + + +

Parses an "sms:" URI result, which specifies a number to SMS and optional + "via" number. See + the IETF draft on this.

+ +

This actually also parses URIs starting with "mms:", "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + + Parses strings of digits that represent a RSS Extended code. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + tries to parse a text representation to a specific result object + + + + + + + A smart class to encode some content to a barcode image + + + + + Interface for a smart class to encode some content into a barcode + + + Interface for a smart class to encode some content into a barcode + + + + + Encodes the specified contents. + + The contents. + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Initializes a new instance of the class. + + + + + Extends with more information specific to the Aztec format, + like the number of layers and whether it's compact. + + + + + Initializes a new instance of the class. + + The bits. + The points. + if set to true [compact]. + The nb datablocks. + The nb layers. + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + Encapsulates the result of decoding a barcode within an image. + + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + The timestamp. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + The timestamp. + + + + Adds one metadata to the result + + The type. + The value. + + + + Adds a list of metadata to the result + + The metadata. + + + + Adds the result points. + + The new points. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + raw text encoded by the barcode, if applicable, otherwise null + + + raw bytes encoded by the barcode, if applicable, otherwise null + + + + points related to the barcode in the image. These are typically points + identifying finder patterns or the corners of the barcode. The exact meaning is + specific to the type of barcode that was decoded. + + + + {@link BarcodeFormat} representing the format of the barcode that was decoded + + + + {@link Hashtable} mapping {@link ResultMetadataType} keys to values. May be + null. This contains optional metadata about what was detected about the barcode, + like orientation. + + + + + Gets the timestamp. + + + + + how many bits of are valid; typically 8 times its length + + + + + This object renders a QR Code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + PDF 417 Detector Result class. Skipped private backing stores. + Guenther Grau + + + + + Initializes a new instance of the class. + + Bits. + Points. + + + + + + Sean Owen + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + + + Adds another Modulus + + Other. + + + + Subtract another Modulus + + Other. + + + + Multiply by another Modulus + + Other. + + + + Returns a Negative version of this instance + + + + + Multiply by a Scalar. + + Scalar. + + + + Multiplies by a Monomial + + The by monomial. + Degree. + Coefficient. + + + + Returns a that represents the current . + + A that represents the current . + + + + Gets the coefficients. + + The coefficients. + + + + degree of this polynomial + + + + + Gets a value indicating whether this instance is zero. + + true if this polynomial is the monomial "0" + + + + + Metadata about a PDF417 Barcode + + Guenther Grau + + + + Decodes RSS-14, including truncated and stacked variants. See ISO/IEC 24724:2006. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + This object renders a Plessey code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + This object renders an EAN8 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + + + a byte array of horizontal pixels (false = white, true = black) + + + + +

Implements decoding of the EAN-8 format.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Get the format of this decoder. + The 1D format. + + + + This is a factory class which finds the appropriate Writer subclass for the BarcodeFormat + requested and encodes the barcode with the supplied contents. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + encode the given data + + + + + + + + + + encode the given data + + + + + + + + + + + Gets the collection of supported writers. + + + + + This implementation can detect and decode a MaxiCode in an image. + + + + + Locates and decodes a MaxiCode in an image. + + a String representing the content encoded by the MaxiCode + if a MaxiCode cannot be decoded + + + + + Locates and decodes a MaxiCode within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + + Symbol info table for DataMatrix. + + + + Overrides the symbol info set used by this class. Used for testing purposes. + + @param override the symbol info set to use + + + + DataMatrix ECC 200 data encoder following the algorithm described in ISO/IEC 16022:200(E) in + annex S. + + + + + Padding character + + + + + mode latch to C40 encodation mode + + + + + mode latch to Base 256 encodation mode + + + + + FNC1 Codeword + + + + + Structured Append Codeword + + + + + Reader Programming + + + + + Upper Shift + + + + + 05 Macro + + + + + 06 Macro + + + + + mode latch to ANSI X.12 encodation mode + + + + + mode latch to Text encodation mode + + + + + mode latch to EDIFACT encodation mode + + + + + ECI character (Extended Channel Interpretation) + + + + + Unlatch from C40 encodation + + + + + Unlatch from X12 encodation + + + + + 05 Macro header + + + + + 06 Macro header + + + + + Macro trailer + + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + the encoded message (the char values range from 0 to 255) + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + requested shape. May be {@code SymbolShapeHint.FORCE_NONE},{@code SymbolShapeHint.FORCE_SQUARE} or {@code SymbolShapeHint.FORCE_RECTANGLE}. + the minimum symbol size constraint or null for no constraint + the maximum symbol size constraint or null for no constraint + encoding mode to start with + the encoded message (the char values range from 0 to 255) + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + General math-related and numeric utility functions. + + + + + Ends up being a bit faster than {@link Math#round(float)}. This merely rounds its + argument to the nearest int, where x.5 rounds up to x+1. Semantics of this shortcut + differ slightly from {@link Math#round(float)} in that half rounds down for negative + values. -2.5 rounds to -3, not -2. For purposes here it makes no difference. + + real value to round + nearest int + + + + + + + + + + Euclidean distance between points A and B + + + + + + + + + + Euclidean distance between points A and B + + + + + values to sum + sum of values in array + + + Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1 + of ISO 18004. + + + Sean Owen + + + character set ECI value + representing ECI of given value, or null if it is legal but unsupported + + + character set ECI encoding name + representing ECI for character encoding, or null if it is legalbut unsupported + + + + Represents a parsed result that encodes an email message including recipients, subject and body text. + + Sean Owen + + + + the email address + + + + + the TOs + + + + + the CCs + + + + + the BCCs + + + + + the subject + + + + + the body + + + + + the mailto: uri + + + + + A smart class to encode some content to a svg barcode image + + + + + Initializes a new instance of the class. + + + + + A base class which covers the range of exceptions which may occur when encoding a barcode using + the Writer framework. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner exc. + + + + + + + satorux@google.com (Satoru Takabayashi) - creator + + + + + Set all cells to 2. 2 means that the cell is empty (not set yet). + + JAVAPORT: We shouldn't need to do this at all. The code should be rewritten to begin encoding + with the ByteMatrix initialized all to zero. + + The matrix. + + + + Build 2D matrix of QR Code from "dataBits" with "ecLevel", "version" and "getMaskPattern". On + success, store the result in "matrix" and return true. + + The data bits. + The ec level. + The version. + The mask pattern. + The matrix. + + + + Embed basic patterns. On success, modify the matrix and return true. + The basic patterns are: + - Position detection patterns + - Timing patterns + - Dark dot at the left bottom corner + - Position adjustment patterns, if need be + + The version. + The matrix. + + + + Embed type information. On success, modify the matrix. + + The ec level. + The mask pattern. + The matrix. + + + + Embed version information if need be. On success, modify the matrix and return true. + See 8.10 of JISX0510:2004 (p.47) for how to embed version information. + + The version. + The matrix. + + + + Embed "dataBits" using "getMaskPattern". On success, modify the matrix and return true. + For debugging purposes, it skips masking process if "getMaskPattern" is -1. + See 8.7 of JISX0510:2004 (p.38) for how to embed data bits. + + The data bits. + The mask pattern. + The matrix. + + + + Return the position of the most significant bit set (to one) in the "value". The most + significant bit is position 32. If there is no bit set, return 0. Examples: + - findMSBSet(0) => 0 + - findMSBSet(1) => 1 + - findMSBSet(255) => 8 + + The value_ renamed. + + + + + Calculate BCH (Bose-Chaudhuri-Hocquenghem) code for "value" using polynomial "poly". The BCH + code is used for encoding type information and version information. + Example: Calculation of version information of 7. + f(x) is created from 7. + - 7 = 000111 in 6 bits + - f(x) = x^2 + x^2 + x^1 + g(x) is given by the standard (p. 67) + - g(x) = x^12 + x^11 + x^10 + x^9 + x^8 + x^5 + x^2 + 1 + Multiply f(x) by x^(18 - 6) + - f'(x) = f(x) * x^(18 - 6) + - f'(x) = x^14 + x^13 + x^12 + Calculate the remainder of f'(x) / g(x) + x^2 + __________________________________________________ + g(x) )x^14 + x^13 + x^12 + x^14 + x^13 + x^12 + x^11 + x^10 + x^7 + x^4 + x^2 + -------------------------------------------------- + x^11 + x^10 + x^7 + x^4 + x^2 + + The remainder is x^11 + x^10 + x^7 + x^4 + x^2 + Encode it in binary: 110010010100 + The return value is 0xc94 (1100 1001 0100) + + Since all coefficients in the polynomials are 1 or 0, we can do the calculation by bit + operations. We don't care if coefficients are positive or negative. + + The value. + The poly. + + + + + Make bit vector of type information. On success, store the result in "bits" and return true. + Encode error correction level and mask pattern. See 8.9 of + JISX0510:2004 (p.45) for details. + + The ec level. + The mask pattern. + The bits. + + + + Make bit vector of version information. On success, store the result in "bits" and return true. + See 8.10 of JISX0510:2004 (p.45) for details. + + The version. + The bits. + + + + Check if "value" is empty. + + The value. + + true if the specified value is empty; otherwise, false. + + + + + Embed the lonely dark dot at left bottom corner. JISX0510:2004 (p.46) + + The matrix. + + + + + + The x start. + The y start. + The matrix. + + + + Embed position detection patterns and surrounding vertical/horizontal separators. + + The matrix. + + + + Embed position adjustment patterns if need be. + + The version. + The matrix. + + + +

Encapsulates logic that can detect a QR Code in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + +

Detects a QR Code in an image.

+
+ + encapsulating results of detecting a QR Code + +
+ + +

Detects a QR Code in an image.

+
+ optional hints to detector + + encapsulating results of detecting a QR Code + +
+ + + Processes the finder pattern info. + + The info. + + + +

Computes the dimension (number of modules on a size) of the QR Code based on the position + of the finder patterns and estimated module size.

+
+
+ + +

Computes an average estimated module size based on estimated derived from the positions + of the three finder patterns.

+
+ detected top-left finder pattern center + detected top-right finder pattern center + detected bottom-left finder pattern center + estimated module size +
+ +

Estimates module size based on two finder patterns -- it uses + {@link #sizeOfBlackWhiteBlackRunBothWays(int, int, int, int)} to figure the + width of each, measuring along the axis between their centers.

+
+
+ + See {@link #sizeOfBlackWhiteBlackRun(int, int, int, int)}; computes the total width of + a finder pattern by looking for a black-white-black run from the center in the direction + of another point (another finder pattern center), and in the opposite direction too. + + + +

This method traces a line from a point in the image, in the direction towards another point. + It begins in a black region, and keeps going until it finds white, then black, then white again. + It reports the distance from the start to this point.

+ +

This is used when figuring out how wide a finder pattern is, when the finder pattern + may be skewed or rotated.

+
+
+ + +

Attempts to locate an alignment pattern in a limited region of the image, which is + guessed to contain it. This method uses {@link AlignmentPattern}.

+
+ estimated module size so far + x coordinate of center of area probably containing alignment pattern + y coordinate of above + number of pixels in all directions to search from the center + + if found, or null otherwise + +
+ + + Gets the image. + + + + + Gets the result point callback. + + + + + Meta-data container for QR Code decoding. Instances of this class may be used to convey information back to the + decoding caller. Callers are expected to process this. + + + + + Initializes a new instance of the class. + + if set to true [mirrored]. + + + + Apply the result points' order correction due to mirroring. + + Array of points to apply mirror correction to. + + + + true if the QR Code was mirrored. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + This object renders a CODE93 code as a BitMatrix + + + + + + output to append to + start position + pattern to append + unused + 9 + + + +

Decodes Code 93 barcodes.

+ Sean Owen + +
+
+ + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +

In contrast to , this class will return an array of all possible + QR code locations in the image.

+ +

Use the TRY_HARDER hint to ask for a more thorough detection.

+ + Sean Owen + Hannes Erven +
+
+ + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF pixels/module in their + estimated modules sizes. + + + + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF_PERCENT percent in their + estimated modules sizes. + + + + +

Creates a finder that will search the image for three finder patterns.

+ + image to search +
+
+ + + + the 3 best s from our list of candidates. The "best" are + those that have been detected at least CENTER_QUORUM times, and whose module + size differs from the average among those patterns the least + + + + + A comparator that orders FinderPatterns by their estimated module size. + + + + +

MaxiCodes can encode text or structured information as bits in one of several modes, + with multiple character sets in one code. This class decodes the bits back into text.

+ + mike32767 + Manuel Kasten +
+
+ + + Defines an container for encoder options + + + + + Initializes a new instance of the class. + + + + + Gets the data container for all options + + + + + event is raised when a value is changed + + + + + Gets or sets a flag which cause a deeper look into the bitmap + + + true if [try harder]; otherwise, false. + + + + + Image is a pure monochrome image of a barcode. + + + true if monochrome image of a barcode; otherwise, false. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + The character set. + + + + + Image is known to be of one of a few possible formats. + Maps to a {@link java.util.List} of {@link BarcodeFormat}s. + + + The possible formats. + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + true if it should assume a Code 39 check digit; otherwise, false. + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). + + + true if it should assume GS1; otherwise, false. + + + + + Assume MSI codes employ a check digit. Maps to . + + + true if it should assume a MSI check digit; otherwise, false. + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + .NET 2.0 class for handling of very large integers, up to 10240 binary digits or + approximately (safe to use) 3000 decimal digits. + + + + + 2^16 numeration base for internal computations, in order to benefit the most from the + 32 bit (or 64 bit) integer processor registers. + + + + + Maximum size for numbers is up to 10240 binary digits or approximately (safe to use) 3000 decimal digits. + The maximum size is, in fact, double the previously specified amount, in order to accommodate operations's + overflow. + + + + + Ratio for the convertion of a BigInteger's size to a binary digits size. + + + + Integer constants + + + + The array of digits of the number. + + + + + The actual number of digits of the number. + + + + + The number sign. + + + + + Default constructor, intializing the BigInteger with zero. + + + + + Constructor creating a new BigInteger as a conversion of a regular base-10 long. + + The base-10 long to be converted + + + + Constructor creating a new BigInteger as a copy of an existing BigInteger. + + The BigInteger to be copied + + + + Constructor creating a BigInteger instance out of a base-10 formatted string. + + The base-10 formatted string. + Invalid numeric string exception + + + + Constructor creating a positive BigInteger by extracting it's digits from a given byte array. + + The byte array + The byte array's content exceeds the maximum size of a BigInteger + exception + + + + Determines whether the specified BigInteger is equal to the current BigInteger. + + The BigInteger to compare with the current BigInteger + True if the specified BigInteger is equal to the current BigInteger, + false otherwise + + + + Determines whether the specified System.Object is equal to the current BigInteger. + + The System.Object to compare with the current BigInteger + True if the specified System.Object is equal to the current BigInteger, + false otherwise + + + + Serves as a hash function for the BigInteger type. + + A hash code for the current BigInteger + + + + String representation of the current BigInteger, converted to its base-10 representation. + + The string representation of the current BigInteger + + + + Parses the number given by a string + + the number as a string + + + + + Compares this instance to a specified BigInteger. + + The BigInteger to compare this instance with + -1 if the current instance is smaller than the given BigInteger, + 0 if the two are equal, 1 otherwise + + + + Compares this instance to a specified object. + + The object to compare this instance with + -1 if the current instance is smaller than the given object, + 0 if the two are equal, 1 otherwise + obj is not a BigInteger exception + + + + Returns a BigInteger's size in binary digits. + + The BigInteger whose size in binary digits is to be determined + The BigInteger's size in binary digits + + + + BigInteger inverse with respect to addition. + + The BigInteger whose opposite is to be computed + The BigInteger inverse with respect to addition + + + + Greater test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a > b, false otherwise + + + + Greater or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a >= b, false otherwise + + + + Smaller test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a < b, false otherwise + + + + Smaller or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a <= b, false otherwise + + + + Computes the absolute value of a BigInteger. + + The BigInteger whose absolute value is to be computed + The absolute value of the given BigInteger + + + + Addition operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the addition + + + + Subtraction operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the subtraction + + + + Multiplication operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the multiplication + + + + Division operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the division + Cannot divide by zero exception + + + + Modulo operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the modulo + Cannot divide by zero exception + + + + Returns the power of a BigInteger base to a non-negative exponent by using the + fast exponentiation algorithm (right to left binary exponentiation). + + The BigInteger base + The non-negative exponent + The power of the BigInteger base to the non-negative exponent + Cannot raise a BigInteger to a negative power exception. + + + + Integer square root of the given BigInteger using Newton's numeric method. + + The BigInteger whose integer square root is to be computed + The integer square root of the given BigInteger + Cannot compute the integer square root of a negative number exception + + + + Euclidean algorithm for computing the greatest common divisor of two non-negative BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The greatest common divisor of the two given BigIntegers + Cannot compute the Gcd of negative BigIntegers exception + + + + Extended Euclidian Gcd algorithm, returning the greatest common divisor of two non-negative BigIntegers, + while also providing u and v, where: a*u + b*v = gcd(a,b). + + The 1st BigInteger + The 2nd BigInteger + Output BigInteger parameter, where a*u + b*v = gcd(a,b) + Output BigInteger parameter, where a*u + b*v = gcd(a,b) + The greatest common divisor of the two given BigIntegers + Cannot compute the Gcd of negative BigIntegers exception + + + + Computes the modular inverse of a given BigInteger. + + The non-zero BigInteger whose inverse is to be computed + The BigInteger modulus, which must be greater than or equal to 2 + The BigInteger equal to a^(-1) mod n + Invalid number or modulus exception + + + + Returns the power of a BigInteger to a non-negative exponent modulo n, by using the + fast exponentiation algorithm (right to left binary exponentiation) and modulo optimizations. + + The BigInteger base + The non-negative exponent + The modulus, which must be greater than or equal to 2 + The power of the BigInteger to the non-negative exponent + Invalid exponent or modulus exception + + + + Implicit conversion operator from long to BigInteger. + + The long to be converted to a BigInteger + The BigInteger converted from the given long + + + + Implicit conversion operator from int to BigInteger. + + The int to be converted to a BigInteger + The BigInteger converted from the given int + + + + Equality test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a == b, false otherwise + + + + Inequality test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a != b, false otherwise + + + + Greater test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a > b, false otherwise + + + + Smaller test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a < b, false otherwise + + + + Greater or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a >= b, false otherwise + + + + Smaller or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a <= b, false otherwise + + + + BigInteger inverse with respect to addition. + + The BigInteger whose opposite is to be computed + The BigInteger inverse with respect to addition + + + + Addition operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the addition + + + + Subtraction operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the subtraction + + + + Multiplication operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the multiplication + + + + Division operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the division + Cannot divide by zero exception + + + + Modulo operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the modulo + Cannot divide by zero exception + + + + Incremetation by one operation of a BigInteger. + + The BigInteger to be incremented by one + The BigInteger result of incrementing by one + + + + Decremetation by one operation of a BigInteger. + + The BigInteger to be decremented by one + The BigInteger result of decrementing by one + + + + Adds two BigNumbers a and b, where a >= b, a, b non-negative. + + + + + Subtracts the BigInteger b from the BigInteger a, where a >= b, a, b non-negative. + + + + + Multiplies two BigIntegers. + + + + + Divides a BigInteger by a one-digit int. + + + + + Divides a BigInteger by another BigInteger. + + + + + DivideByBigNumber auxiliary method. + + + + + DivideByBigNumber auxilary method. + + + + + DivideByBigNumber auxilary method. + + + + + Detects a result that is likely a vehicle identification number. + @author Sean Owen + + + +

QR Codes can encode text as bits in one of several modes, and can use multiple modes + in one QR Code. This class decodes the bits back into text.

+ +

See ISO 18004:2006, 6.4.3 - 6.4.7

+ Sean Owen +
+
+ + + See ISO 18004:2006, 6.4.4 Table 5 + + + + + See specification GBT 18284-2000 + + The bits. + The result. + The count. + + + +

Encapsulates a block of data within a QR Code. QR Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

When QR Codes use multiple data blocks, they are actually interleaved. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ +
+ bytes as read directly from the QR Code + + version of the QR Code + + error-correction level of the QR Code + + {@link DataBlock}s containing original bytes, "de-interleaved" from representation in the + QR Code + +
+ + + + + Guenther Grau + + + + Returns the DetectionResult Columns. This does a fair bit of calculation, so call it sparingly. + + The detection result columns. + + + + Adjusts the indicator column row numbers. + + Detection result column. + + + + return number of codewords which don't have a valid row number. Note that the count is not accurate as codewords . + will be counted several times. It just serves as an indicator to see when we can stop adjusting row numbers + + The row numbers. + + + + Adjusts the row numbers by row. + + The row numbers by row. + + + + Adjusts the row numbers from both Row Indicators + + zero + + + + Adjusts the row numbers from Right Row Indicator. + + The unadjusted row count. + + + + Adjusts the row numbers from Left Row Indicator. + + Unadjusted row Count. + + + + Adjusts the row number if valid. + + The invalid rows + Row indicator row number. + Invalid row counts. + Codeword. + + + + Adjusts the row numbers. + + Barcode column. + Codewords row. + Codewords. + + + + Adjusts the row number. + + true, if row number was adjusted, false otherwise. + Codeword. + Other codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + +

Attempts to locate multiple barcodes in an image by repeatedly decoding portion of the image. + After one barcode is found, the areas left, above, right and below the barcode's + {@link com.google.zxing.ResultPoint}s are scanned, recursively.

+

A caller may want to also employ {@link ByQuadrantReader} when attempting to find multiple + 2D barcodes, like QR Codes, in an image, where the presence of multiple barcodes might prevent + detecting any one of them.

+

That is, instead of passing a {@link Reader} a caller might pass + new ByQuadrantReader(reader).

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The @delegate. + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Thrown when a barcode was successfully detected, but some aspect of + the content did not conform to the barcode's format rules. This could have + been due to a mis-detection. + Sean Owen + + + + + + + + + + + + + + + + + + + + + + + + +

Parses an "smsto:" URI result, whose format is not standardized but appears to be like: + {@code smsto:number(:body)}.

+

This actually also parses URIs starting with "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+
+ Sean Owen +
+ + + Represents a parsed result that encodes an SMS message, including recipients, subject and body text. + + Sean Owen + + + + The class holds the available options for the + + + + + Representing the minimal percentage of error correction words. + Note: an Aztec symbol should have a minimum of 25% EC words. + + + + + Specifies the required number of layers for an Aztec code: + a negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + a positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + + + + + The main class which implements Aztec Code decoding -- as opposed to locating and extracting + the Aztec Code from an image. + + David Olivier + + + + Decodes the specified detector result. + + The detector result. + + + + + This method is used for testing the high-level encoder + + + + + + + Gets the string encoded in the aztec code bits + + The corrected bits. + the decoded string + + + + gets the table corresponding to the char passed + + The t. + + + + + Gets the character (or string) corresponding to the passed code in the given table + + the table used + the code of the character + + + + + Performs RS error correction on an array of bits. + + The rawbits. + the corrected array + + + + Gets the array of bits from an Aztec Code matrix + + The matrix. + the array of bits + + + + Reads a code of given length and at given index in an array of bits + + The rawbits. + The start index. + The length. + + + + + Reads a code of length 8 in an array of bits, padding with zeros + + + + + + + + Packs a bit array into bytes, most significant bit first + + + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + This class attempts to decode a barcode from an image, not by scanning the whole image, + but by scanning subsets of the image. This is important when there may be multiple barcodes in + an image, and detecting a barcode may find parts of multiple barcode and fail to decode + (e.g. QR Codes). Instead this scans the four quadrants of the image -- and also the center + 'quadrant' to cover the case where a barcode is found in the center. + + + + + + Initializes a new instance of the class. + + The @delegate. + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

The main class which implements MaxiCode decoding -- as opposed to locating and extracting + the MaxiCode from an image.

+ + Manuel Kasten +
+
+ + + Implements the "MATMSG" email message entry format. + + Supported keys: TO, SUB, BODY + + Sean Owen + + + + This implements only the most basic checking for an email address's validity -- that it contains + an '@' and contains no characters disallowed by RFC 2822. This is an overly lenient definition of + validity. We want to generally be lenient here since this class is only intended to encapsulate what's + in a barcode, not "judge" it. + + The email. + + true if it is basically a valid email address; otherwise, false. + + + + + Renders a barcode into a Svg image + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Gets or sets the foreground color. + + The foreground color. + + + + Gets or sets the background color. + + The background color. + + + + Gets or sets the font family name + + The font family name. + + + + Gets or sets the font size in pixel + + The font size in pixel. + + + + Represents a barcode as a Svg image + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The content. + + + + Gives the XML representation of the SVG image + + + + + Gets or sets the content. + + + The content. + + + + + The original height of the bitmatrix for the barcode + + + + + The original width of the bitmatrix for the barcode + + + + + Renders a to an byte array with pixel data (4 byte per pixel, BGRA) + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + +

PDF417 error correction implementation.

+

This example + is quite useful in understanding the algorithm.

+ Sean Owen + +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the specified received. + + received codewords + number of those codewords used for EC + location of erasures + The error locations count. + + + + + Runs the euclidean algorithm (Greatest Common Divisor) until r's degree is less than R/2 + + The euclidean algorithm. + + + + Finds the error locations as a direct application of Chien's search + + The error locations. + Error locator. + + + + Finds the error magnitudes by directly applying Forney's Formula + + The error magnitudes. + Error evaluator. + Error locator. + Error locations. + + + + This object renders a UPC-A code as a . + qwandor@google.com (Andrew Walbran) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + +

Implements decoding of the UPC-A format.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen +
+
+ + +

Like decodeRow(int, BitArray, java.util.Map), but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ + + + + +
+ + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Decodes the specified image. + + The image. + The hints. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + Get the format of this decoder. + The 1D format. + + + + + Enumeration for DataMatrix symbol shape hint. It can be used to force square or rectangular + symbols. + + + + + The Version object encapsulates attributes about a particular + size Data Matrix Code. + + bbrown@google.com (Brian Brown) + + + + + returns the version numer + + + + + + returns the symbol size rows + + + + + + returns the symbols size columns + + + + + + retursn the data region size rows + + + + + + returns the data region size columns + + + + + + returns the total codewords count + + + + + +

Deduces version information from Data Matrix dimensions.

+ + Number of rows in modules + Number of columns in modules + Version for a Data Matrix Code of those dimensions + if dimensions do correspond to a valid Data Matrix size +
+
+ + + returns the version number as string + + + + + + See ISO 16022:2006 5.5.1 Table 7 + + + + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the Data Matrix code version's format.

+
+
+ +

Implements Reed-Solomon decoding, as the name implies.

+ +

The algorithm will not be explained here, but the following references were helpful + in creating this implementation:

+ + + +

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+ +
+ Sean Owen + William Rucklidge + sanfordsquires +
+ + +

Decodes given set of received codewords, which include both data and error-correction + codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place, + in the input.

+
+ data and error-correction codewords + number of error-correction codewords available + false: decoding fails +
+ + + Partially implements the iCalendar format's "VEVENT" format for specifying a + calendar event. See RFC 2445. This supports SUMMARY, DTSTART and DTEND fields. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Parses contact information formatted according to the VCard (2.1) format. This is not a complete + implementation but should parse information as commonly encoded in 2D barcodes. + + Sean Owen + + + Formats name fields of the form "Public;John;Q.;Reverend;III" into a form like + "Reverend John Q. Public III". + + @param names name values to format, in place + + + + Represents a result that encodes an e-mail address, either as a plain address + like "joe@example.org" or a mailto: URL like "mailto:joe@example.org". + + Sean Owen + + + Implements the "BIZCARD" address book entry format, though this has been + largely reverse-engineered from examples observed in the wild -- still + looking for a definitive reference. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Attribute is only for source code compatibility issues + + + + +

Encapsulates information about finder patterns in an image, including the location of + the three finder patterns, and their estimated module size.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The pattern centers. + + + + Gets the bottom left. + + + + + Gets the top left. + + + + + Gets the top right. + + + + + See ISO 18004:2006 Annex D + + Sean Owen + + + See ISO 18004:2006 Annex D. + Element i represents the raw version bits that specify version i + 7 + + + + + Gets the EC blocks for level. + + The ec level. + + + +

Deduces version information purely from QR Code dimensions.

+ +
+ dimension in modules + + for a QR Code of that dimension or null +
+ + + Gets the version for number. + + The version number. + + + + See ISO 18004:2006 Annex E + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + See ISO 18004:2006 6.5.1 Table 9 + + + + Gets the version number. + + + + + Gets the alignment pattern centers. + + + + + Gets the total codewords. + + + + + Gets the dimension for version. + + + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + + Gets the EC blocks. + + + + + + Gets the EC codewords per block. + + + + + Gets the num blocks. + + + + + Gets the total EC codewords. + + + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the QR code version's format.

+
+
+ + + Gets the count. + + + + + Gets the data codewords. + + + + +

See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which + data can be encoded to bits in the QR code standard.

+
+ Sean Owen +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See GBT 18284-2000; "Hanzi" is a transliteration of this mode name. + + + + Fors the bits. + + four bits encoding a QR Code data mode + + encoded by these bits + + if bits do not correspond to a known mode + + + version in question + + number of bits used, in this QR Code symbol {@link Version}, to encode the + count of characters that will follow encoded in this {@link Mode} + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Gets the name. + + + + + Gets the bits. + + + + + enumeration for encoding modes + + + + + + + + + + numeric encoding + + + + + alpha-numeric encoding + + + + + structured append + + + + + byte mode encoding + + + + + ECI segment + + + + + Kanji mode + + + + + FNC1 char, first position + + + + + FNC1 char, second position + + + + + Hanzi mode + + + + + Top-level class for the logic part of the PDF417 implementation. + + + + + The start pattern (17 bits) + + + + + The stop pattern (18 bits) + + + + + The codeword table from the Annex A of ISO/IEC 15438:2001(E). + + + + + Calculates the necessary number of rows as described in annex Q of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol (r) + + + + Calculates the number of pad codewords as described in 4.9.2 of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol + the number of pad codewords + + + + Generates the barcode logic. + + the message to encode + PDF417 error correction level to use + + + + Determine optimal nr of columns and rows for the specified number of + codewords. + + number of code words + number of error correction code words + The longest dimension of the barcode, used for columns + The short dimension of the barcode, used for rows + The height of a row, will alter this parameter if aspectRatio>4 (aspectRatio==AUTO) + dimension object containing cols as width and rows as height + + + + Sets max/min row/col values + + maximum allowed columns + minimum allowed columns + maximum allowed rows + minimum allowed rows + + + + Sets compaction to values stored in enum + + compaction mode to use + + + + Sets compact to be true or false + + if true, enables compaction + + + + Sets output encoding. + + sets character encoding to use + + + + Sets the disable eci. + + if set to true don't add an ECI segment for different encodings than default. + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + +

A reader that can read all available UPC/EAN formats. If a caller wants to try to + read all such formats, it is most efficient to use this implementation rather than invoke + individual readers.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Records EAN prefix to GS1 Member Organization, where the member organization + correlates strongly with a country. This is an imperfect means of identifying + a country of origin by EAN-13 barcode value. See + + http://en.wikipedia.org/wiki/List_of_GS1_country_codes. + + Sean Owen + + + + +

Encapsulates logic that can detect one or more QR Codes in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+ + Sean Owen + Hannes Erven +
+
+ + + Initializes a new instance of the class. + + The image. + + + + Detects the multi. + + The hints. + + + + + BigInteger-related exception class. + + + + + BigIntegerException constructor. + + The exception message + The inner exception + + + + Represents a parsed result that encodes a telephone number. + + Sean Owen + + + + Represents a parsed result that encodes contact information, like that in an address book entry. + + Sean Owen + + + + initializing constructor + + + + + + + + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + the names + + + + + the nicknames + + + + + In Japanese, the name is written in kanji, which can have multiple readings. Therefore a hint + is often provided, called furigana, which spells the name phonetically. + + The pronunciation of the getNames() field, often in hiragana or katakana. + + + + the phone numbers + + + + optional descriptions of the type of each phone number. It could be like "HOME", but, + there is no guaranteed or standard format. + + + + the e-mail addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the instant messenger addresses + + + + + the note field + + + + + the addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the title + + + + + the urls + + + + birthday formatted as yyyyMMdd (e.g. 19780917) + + + a location as a latitude/longitude pair + +
+
diff --git a/packages/ZXing.Net.0.16.4/lib/sl4-wp71/zxing.wp7.1.dll b/packages/ZXing.Net.0.16.4/lib/sl4-wp71/zxing.wp7.1.dll new file mode 100644 index 0000000..f7bde6d Binary files /dev/null and b/packages/ZXing.Net.0.16.4/lib/sl4-wp71/zxing.wp7.1.dll differ diff --git a/packages/ZXing.Net.0.16.4/lib/sl4/zxing.sl4.XML b/packages/ZXing.Net.0.16.4/lib/sl4/zxing.sl4.XML new file mode 100644 index 0000000..2ac2c96 --- /dev/null +++ b/packages/ZXing.Net.0.16.4/lib/sl4/zxing.sl4.XML @@ -0,0 +1,11713 @@ + + + + zxing.sl4 + + + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + + + converts the pixel data to a bitmap object + + + + + + the generated code as byte array of BGRA pixels + + + + + the width of the image + + + + + the height of the image + + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + + + + + + Initializes a new instance of the class. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Check if "mask_pattern" is valid. + + The mask pattern. + + true if [is valid mask pattern] [the specified mask pattern]; otherwise, false. + + + + + Gets or sets the mode. + + + The mode. + + + + + Gets or sets the EC level. + + + The EC level. + + + + + Gets or sets the version. + + + The version. + + + + + Gets or sets the mask pattern. + + + The mask pattern. + + + + + Gets or sets the matrix. + + + The matrix. + + + + + Holds all of the information for a barcode in a format where it can be easily accessible + + Jacob Haynes + + + + + the height of the matrix (Rows) + the width of the matrix (Cols) + + + + +

Encapsulates logic that can detect a PDF417 Code in an image, even if the + PDF417 Code is rotated or skewed, or partially obscured.

+ + SITA Lab (kevin.osullivan@sita.aero) + dswitkin@google.com (Daniel Switkin) + Guenther Grau +
+
+ + + if we set the value too low, then we don't detect the correct height of the bar if the start patterns are damaged. + if we set the value too high, then we might detect the start pattern from a neighbor barcode. + + + + + A PDF471 barcode should have at least 3 rows, with each row being >= 3 times the module width. Therefore it should be at least + 9 pixels tall. To be conservative, we use about half the size to ensure we don't miss it. + + + + + B S B S B S B S Bar/Space pattern + 11111111 0 1 0 1 0 1 000. + + + + + 1111111 0 1 000 1 0 1 00 1 + + + + +

Detects a PDF417 Code in an image. Only checks 0 and 180 degree rotations.

+
+ barcode image to decode + optional hints to detector + if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned + + encapsulating results of detecting a PDF417 code + +
+ + + Detects PDF417 codes in an image. Only checks 0 degree rotation (so rotate the matrix and check again outside of this method) + + multiple if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned. + bit matrix to detect barcodes in. + List of ResultPoint arrays containing the coordinates of found barcodes + + + + Locate the vertices and the codewords area of a black blob using the Start and Stop patterns as locators. + + Matrix. + Start row. + Start column. + an array containing the vertices: + vertices[0] x, y top left barcode + vertices[1] x, y bottom left barcode + vertices[2] x, y top right barcode + vertices[3] x, y bottom right barcode + vertices[4] x, y top left codeword area + vertices[5] x, y bottom left codeword area + vertices[6] x, y top right codeword area + vertices[7] x, y bottom right codeword area + + + + + Copies the temp data to the final result + + Result. + Temp result. + Destination indexes. + + + + Finds the rows with the given pattern. + + The rows with pattern. + Matrix. + Height. + Width. + Start row. + Start column. + Pattern. + + + + Finds the guard pattern. Uses System.Linq.Enumerable.Repeat to fill in counters. This might be a performance issue? + + start/end horizontal offset of guard pattern, as an array of two ints. + matrix row of black/white values to search + column x position to start search. + row y position to start search. + width the number of pixels to search on this row. + If set to true search the white patterns first. + pattern of counts of number of black and white pixels that are being searched for as a pattern. + counters array of counters, as long as pattern, to re-use . + + + + Determines how closely a set of observed counts of runs of black/white. + values matches a given target pattern. This is reported as the ratio of + the total variance from the expected pattern proportions across all + pattern elements, to the length of the pattern. + + + ratio of total variance between counters and pattern compared to + total pattern size, where the ratio has been multiplied by 256. + So, 0 means no variance (perfect match); 256 means the total + variance between counters and patterns equals the pattern length, + higher values mean even more variance + + observed counters. + expected pattern. + The most any counter can differ before we give up. + + + + Encapsulates an RSS barcode finder pattern, including its start/end position and row. + + + + + Initializes a new instance of the class. + + The value. + The start end. + The start. + The end. + The row number. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Gets the value. + + + + + Gets the start end. + + + + + Gets the result points. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Gets the information. + + + + + + Parses the information. + + + + + + Creates the decoder. + + The information. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + This object renders a ITF code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + +

Encapsulates functionality and implementation that is common to one-dimensional barcodes.

+ dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + The base class for all objects which encode/generate a barcode image. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + a byte array of horizontal pixels (0 = white, 1 = black) + + + + Appends the given pattern to the target array starting at pos. + + encode black/white pattern into this array + position to start encoding at in target + lengths of black/white runs to encode + starting color - false for white, true for black + the number of elements added to target. + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + + barcode contents to encode + a bool[] of horizontal pixels (false = white, true = black) + + + + Calculates the checksum digit modulo10. + + The contents. + + + + + Gets the default margin. + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code bool[]} of horizontal pixels (false = white, true = black) + + + + + + +

Implements decoding of the ITF format, or Interleaved Two of Five.

+ +

This Reader will scan ITF barcodes of certain lengths only. + At the moment it reads length 6, 8, 10, 12, 14, 16, 18, 20, 24, 44 and 48 as these have appeared "in the wild". Not all + lengths are scanned, especially shorter ones, to avoid false positives. This in turn is due to a lack of + required checksum function.

+ +

The checksum is optional and is not applied by this Reader. The consumer of the decoded + value will have to apply a checksum if required.

+ +

http://en.wikipedia.org/wiki/Interleaved_2_of_5 + is a great reference for Interleaved 2 of 5 information.

+ + kevin.osullivan@sita.aero, SITA Lab. +
+
+ + + Encapsulates functionality and implementation that is common to all families + of one-dimensional barcodes. + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Implementations of this interface can decode an image of a barcode in some format into + the String it encodes. For example, can + decode a QR code. The decoder may optionally receive hints from the caller which may help + it decode more quickly or accurately. + + See , which attempts to determine what barcode + format is present within the image as well, and then decodes it accordingly. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + String which the barcode encodes + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + + + + + + + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + Note that we don't try rotation without the try harder flag, even if rotation was supported. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + We're going to examine rows from the middle outward, searching alternately above and below the + middle, and farther out each time. rowStep is the number of rows between each successive + attempt above and below the middle. So we'd scan row middle, then middle - rowStep, then + middle + rowStep, then middle - (2 * rowStep), etc. + rowStep is bigger as the image is taller, but is always at least 1. We've somewhat arbitrarily + decided that moving up and down by about 1/16 of the image is pretty good; we try more of the + image if "trying harder". + + The image to decode + Any hints that were requested + The contents of the decoded barcode + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the pattern in reverse. + + The row. + The start. + The counters. + + + + + Determines how closely a set of observed counts of runs of black/white values matches a given + target pattern. This is reported as the ratio of the total variance from the expected pattern + proportions across all pattern elements, to the length of the pattern. + + observed counters + expected pattern + The most any counter can differ before we give up + ratio of total variance between counters and pattern compared to total pattern size, + where the ratio has been multiplied by 256. So, 0 means no variance (perfect match); 256 means + the total variance between counters and patterns equals the pattern length, higher values mean + even more variance + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + Valid ITF lengths. Anything longer than the largest value is also allowed. + + + + + Start/end guard pattern. + + Note: The end pattern is reversed because the row is reversed before + searching for the END_PATTERN + + + + + Patterns of Wide / Narrow lines to indicate each digit + + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + + row of black/white values to search + offset of start pattern + The payload end. + to append decoded chars to + + false, if decoding could not complete successfully + + + + + Identify where the start of the middle / payload section starts. + + row of black/white values to search + Array, containing index of start of 'start block' and end of 'start block' + + + + The start & end patterns must be pre/post fixed by a quiet zone. This + zone must be at least 10 times the width of a narrow line. Scan back until + we either get to the start of the barcode or match the necessary number of + quiet zone pixels. + + Note: Its assumed the row is reversed when using this method to find + quiet zone after the end pattern. + + ref: http://www.barcode-1.net/i25code.html + + bit array representing the scanned barcode. + index into row of the start or end pattern. + false, if the quiet zone cannot be found + + + + Skip all whitespace until we get to the first black line. + + row of black/white values to search + index of the first black line or -1 if no black lines are found in the row. + + + + Identify where the end of the middle / payload section ends. + + row of black/white values to search + Array, containing index of start of 'end block' and end of 'end + block' or null, if nothing found + + + + + row of black/white values to search + position to start search + pattern of counts of number of black and white pixels that are being searched for as a pattern + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a sequence of ITF black/white lines into single + digit. + + the counts of runs of observed black/white/black/... values + The decoded digit + + false, if digit cannot be decoded + + + + + mike32767 + Manuel Kasten + + + + + to parse + + + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode the barcode inside a bitmap object + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Common string-related functions. + + Sean Owen + Alex Dupre + + + + SJIS + + + + + GB2312 + + + + + Guesses the encoding. + + bytes encoding a string, whose encoding should be guessed + decode hints if applicable + name of guessed encoding; at the moment will only guess one of: + {@link #SHIFT_JIS}, {@link #UTF8}, {@link #ISO88591}, or the platform + default encoding if none of these can possibly be correct + + + Implementations of this class can, given locations of finder patterns for a QR code in an + image, sample the right points in the image to reconstruct the QR code, accounting for + perspective distortion. It is abstracted since it is relatively expensive and should be allowed + to take advantage of platform-specific optimized implementations, like Sun's Java Advanced + Imaging library, but which may not be available in other environments such as J2ME, and vice + versa. + + The implementation used can be controlled by calling {@link #setGridSampler(GridSampler)} + with an instance of a class which implements this interface. + + Sean Owen + + + Sets the implementation of used by the library. One global + instance is stored, which may sound problematic. But, the implementation provided + ought to be appropriate for the entire platform, and all uses of this library + in the whole lifetime of the JVM. For instance, an Android activity can swap in + an implementation that takes advantage of native platform libraries. + + The platform-specific object to install. + + + +

Samples an image for a square matrix of bits of the given dimension. This is used to extract + the black/white modules of a 2D barcode like a QR Code found in an image. Because this barcode + may be rotated or perspective-distorted, the caller supplies four points in the source image + that define known points in the barcode, so that the image may be sampled appropriately.

+

The last eight "from" parameters are four X/Y coordinate pairs of locations of points in + the image that define some significant points in the image to be sample. For example, + these may be the location of finder pattern in a QR Code.

+

The first eight "to" parameters are four X/Y coordinate pairs measured in the destination + , from the top left, where the known points in the image given by the "from" + parameters map to.

+

These 16 parameters define the transformation needed to sample the image.

+
+ image to sample + The dimension X. + The dimension Y. + The p1 preimage X. + The p1 preimage Y. + The p2 preimage X. + The p2 preimage Y. + The p3 preimage X. + The p3 preimage Y. + The p4 preimage X. + The p4 preimage Y. + The p1 image X. + The p1 image Y. + The p2 image X. + The p2 image Y. + The p3 image X. + The p3 image Y. + The p4 image X. + The p4 image Y. + + representing a grid of points sampled from the image within a region + defined by the "from" parameters + + ReaderException if image can't be sampled, for example, if the transformation defined +
+ + + + + + + + + + + +

Checks a set of points that have been transformed to sample points on an image against + the image's dimensions to see if the point are even within the image.

+ +

This method will actually "nudge" the endpoints back onto the image if they are found to be + barely (less than 1 pixel) off the image. This accounts for imperfect detection of finder + patterns in an image where the QR Code runs all the way to the image border.

+ +

For efficiency, the method will check points from either end of the line until one is found + to be within the image. Because the set of points are assumed to be linear, this is valid.

+ +
+ image into which the points should map + + actual points in x1,y1,...,xn,yn form + +
+ + the current implementation of + + + + + Represents a parsed result that encodes a product by an identifier of some kind. + + dswitkin@google.com (Daniel Switkin) + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link ResultParser#parseResult(Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + The base class for luminance sources which supports + cropping and rotating based upon the luminance values. + + + + + The purpose of this class hierarchy is to abstract different bitmap implementations across + platforms into a standard interface for requesting greyscale luminance values. The interface + only provides immutable methods; therefore crop and rotation create copies. This is to ensure + that one Reader does not modify the original luminance source and leave it in an unknown state + for other Readers in the chain. + + dswitkin@google.com (Daniel Switkin) + + + + initializing constructor + + + + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + inverts the luminance values, not supported here. has to implemented in sub classes + + + + + + + + + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff + + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + The width of the bitmap. + + + The height of the bitmap. + + + Whether this subclass supports cropping. + + + Whether this subclass supports counter-clockwise rotation. + + + + + Whether this subclass supports invertion. + + + + weight of the red channel for calculating a gray scale image + + + + + weight of the green channel for calculating a gray scale image + + + + + weight of the blue channel for calculating a gray scale image + + + + + numbers of bits which for right shifting + + + + + + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + + The luminance array. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + TODO: not implemented yet + + + A rotated version of this object. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Inverts the luminance values (newValue = 255 - oldValue) + + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + gets the luminance matrix + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + + Whether this subclass supports cropping. + + + + + Whether this subclass supports invertion. + + + + represents a token for a binary shift + + + + + initializing constructor + + + + + + + + appends the byte array to the BitArray + + + + + + + string representation + + + + + + The class holds the available options for the QrCodeWriter + + + + + Defines an container for encoder options + + + + + Initializes a new instance of the class. + + + + + Gets the data container for all options + + + + + Specifies the height of the barcode image + + + + + Specifies the width of the barcode image + + + + + Don't put the content string into the output image. + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + + + + + Specifies whether the data should be encoded to the GS1 standard; + FNC1 character is added in front of the data + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + . + + + + + Specifies what character encoding to use where applicable (type ) + + + + + Explicitly disables ECI segment when generating QR Code + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + + + + + Specifies the exact version of QR code to be encoded. An integer, range 1 to 40. If the data specified + cannot fit within the required version, a WriterException will be thrown. + + + + + Jacob Haynes + qwandor@google.com (Andrew Walbran) + + + + + default white space (margin) around the code + + + + + default error correction level + + + + + default aspect ratio + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The height of a row in the barcode + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Takes encoder, accounts for width/height, and retrieves bit matrix + + + + + This takes an array holding the values of the PDF 417 + + a byte array of information with 0 is black, and 1 is white + border around the barcode + BitMatrix of the input + + + + Takes and rotates the it 90 degrees + + + + + This implementation can detect and decode PDF417 codes in an image. + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Implementation of this interface attempt to read several barcodes from one image. + Sean Owen + + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Locates and decodes a PDF417 code in an image. + + a String representing the content encoded by the PDF417 code + if a PDF417 cannot be decoded + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + **Note** this will return the FIRST barcode discovered if there are many. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Locates and decodes Multiple PDF417 codes in an image. + + an array of Strings representing the content encoded by the PDF417 codes + + + + + Locates and decodes multiple barcodes in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcodes encode + + + + + Decode the specified image, with the hints and optionally multiple barcodes. + Based on Owen's Comments in , this method has been modified to continue silently + if a barcode was not decoded where it was detected instead of throwing a new exception object. + + Image. + Hints. + If set to true multiple. + + + + Gets the maximum width of the barcode + + The max width. + P1. + P2. + + + + Gets the minimum width of the barcode + + The minimum width. + P1. + P2. + + + + Gets the maximum width of the codeword. + + The max codeword width. + P. + + + + Gets the minimum width of the codeword. + + The minimum codeword width. + P. + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + + + Guenther Grau + + + + Decode the specified image, imageTopLeft, imageBottomLeft, imageTopRight, imageBottomRight, minCodewordWidth + and maxCodewordWidth. + TODO: don't pass in minCodewordWidth and maxCodewordWidth, pass in barcode columns for start and stop pattern + columns. That way width can be deducted from the pattern column. + This approach also allows to detect more details about the barcode, e.g. if a bar type (white or black) is wider + than it should be. This can happen if the scanner used a bad blackpoint. + + Image. + Image top left. + Image bottom left. + Image top right. + Image bottom right. + Minimum codeword width. + Max codeword width. + + + + Merge the specified leftRowIndicatorColumn and rightRowIndicatorColumn. + + Left row indicator column. + Right row indicator column. + + + + Adjusts the bounding box. + + The bounding box. + Row indicator column. + + + + Gets the barcode metadata. + + The barcode metadata. + Left row indicator column. + Right row indicator column. + + + + Gets the row indicator column. + + The row indicator column. + Image. + Bounding box. + Start point. + If set to true left to right. + Minimum codeword width. + Max codeword width. + + + + Adjusts the codeword count. + + Detection result. + Barcode matrix. + + + + Creates the decoder result. + + The decoder result. + Detection result. + + + + This method deals with the fact, that the decoding process doesn't always yield a single most likely value. The + current error correction implementation doesn't deal with erasures very well, so it's better to provide a value + for these ambiguous codewords instead of treating it as an erasure. The problem is that we don't know which of + the ambiguous values to choose. We try decode using the first value, and if that fails, we use another of the + ambiguous values and try to decode again. This usually only happens on very hard to read and decode barcodes, + so decoding the normal barcodes is not affected by this. + + The decoder result from ambiguous values. + Ec level. + Codewords. + contains the indexes of erasures. + array with the indexes that have more than one most likely value. + two dimensional array that contains the ambiguous values. The first dimension must + be the same Length as the ambiguousIndexes array. + + + + Creates the barcode matrix. + + The barcode matrix. + Detection result. + + + + Tests to see if the Barcode Column is Valid + + true, if barcode column is valid, false otherwise. + Detection result. + Barcode column. + + + + Gets the start column. + + The start column. + Detection result. + Barcode column. + Image row. + If set to true left to right. + + + + Detects the codeword. + + The codeword. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + Minimum codeword width. + Max codeword width. + + + + Gets the module bit count. + + The module bit count. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + + + + Gets the number of EC code words. + + The number of EC code words. + Barcode EC level. + + + + Adjusts the codeword start column. + + The codeword start column. + Image. + Minimum column. + Max column. + If set to true left to right. + Codeword start column. + Image row. + + + + Checks the codeword for any skew. + + true, if codeword is within the skew, false otherwise. + Codeword size. + Minimum codeword width. + Max codeword width. + + + + Decodes the codewords. + + The codewords. + Codewords. + Ec level. + Erasures. + + + + Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place. + + The errors. + data and error correction codewords. + positions of any known erasures. + number of error correction codewords that are available in codewords. + + + + Verifies that all is well with the the codeword array. + + Codewords. + Number EC codewords. + + + + Gets the bit count for codeword. + + The bit count for codeword. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Module bit count. + + + + Returns a that represents the jagged array. + + A that represents the jagged array. + Barcode matrix as a jagged array. + + + + + + Guenther Grau + creatale GmbH (christoph.schulz@creatale.de) + + + + The ratios table + + + + + Initializes the class & Pre-computes the symbol ratio table. + + + + + Gets the decoded value. + + The decoded value. + Module bit count. + + + + Samples the bit counts. + + The bit counts. + Module bit count. + + + + Gets the decoded codeword value. + + The decoded codeword value. + Module bit count. + + + + Gets the bit value. + + The bit value. + Module bit count. + + + + Gets the closest decoded value. + + The closest decoded value. + Module bit count. + + + +

This class contains the methods for decoding the PDF417 codewords.

+ + SITA Lab (kevin.osullivan@sita.aero) +
+
+ + + Table containing values for the exponent of 900. + This is used in the numeric compaction decode algorithm. + + + + + Text Compaction mode (see 5.4.1.5) permits all printable ASCII characters to be + encoded, i.e. values 32 - 126 inclusive in accordance with ISO/IEC 646 (IRV), as + well as selected control characters. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + The Text Compaction mode includes all the printable ASCII characters + (i.e. values from 32 to 126) and three ASCII control characters: HT or tab + (ASCII value 9), LF or line feed (ASCII value 10), and CR or carriage + return (ASCII value 13). The Text Compaction mode also includes various latch + and shift characters which are used exclusively within the mode. The Text + Compaction mode encodes up to 2 characters per codeword. The compaction rules + for converting data into PDF417 codewords are defined in 5.4.2.2. The sub-mode + switches are defined in 5.4.2.3. + + The text compaction data. + The byte compaction data if there + was a mode shift. + The size of the text compaction and byte compaction data. + The decoded data is appended to the result. + + + + + Byte Compaction mode (see 5.4.3) permits all 256 possible 8-bit byte values to be encoded. + This includes all ASCII characters value 0 to 127 inclusive and provides for international + character set support. + + The byte compaction mode i.e. 901 or 924 + The array of codewords (data + error) + Currently active character encoding + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Numeric Compaction mode (see 5.4.4) permits efficient encoding of numeric data strings. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Convert a list of Numeric Compacted codewords from Base 900 to Base 10. + EXAMPLE + Encode the fifteen digit numeric string 000213298174000 + Prefix the numeric string with a 1 and set the initial value of + t = 1 000 213 298 174 000 + Calculate codeword 0 + d0 = 1 000 213 298 174 000 mod 900 = 200 + + t = 1 000 213 298 174 000 div 900 = 1 111 348 109 082 + Calculate codeword 1 + d1 = 1 111 348 109 082 mod 900 = 282 + + t = 1 111 348 109 082 div 900 = 1 234 831 232 + Calculate codeword 2 + d2 = 1 234 831 232 mod 900 = 632 + + t = 1 234 831 232 div 900 = 1 372 034 + Calculate codeword 3 + d3 = 1 372 034 mod 900 = 434 + + t = 1 372 034 div 900 = 1 524 + Calculate codeword 4 + d4 = 1 524 mod 900 = 624 + + t = 1 524 div 900 = 1 + Calculate codeword 5 + d5 = 1 mod 900 = 1 + t = 1 div 900 = 0 + Codeword sequence is: 1, 624, 434, 632, 282, 200 + + Decode the above codewords involves + 1 x 900 power of 5 + 624 x 900 power of 4 + 434 x 900 power of 3 + + 632 x 900 power of 2 + 282 x 900 power of 1 + 200 x 900 power of 0 = 1000213298174000 + + Remove leading 1 => Result is 000213298174000 + The array of codewords + The number of codewords + The decoded string representing the Numeric data. + + + + + This object renders an UPC-E code as a {@link BitMatrix}. + @author 0979097955s@gmail.com (RX) + + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ aripollak@gmail.com (Ari Pollak) + dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Gets the default margin. + + + + +

Implements decoding of the UPC-E format.

+

Thisis a great reference for + UPC-E information.

+ Sean Owen +
+
+ + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Start/end guard pattern. + + + + + Pattern marking the middle of a UPC/EAN pattern, separating the two halves. + + + + + end guard pattern. + + + + + "Odd", or "L" patterns used to encode UPC/EAN digits. + + + + + As above but also including the "even", or "G" patterns used to encode UPC/EAN digits. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + +

Like , but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ row index into the image + encoding of the row of the barcode image + start/end column where the opening start pattern was found + optional hints that influence decoding + encapsulating the result of decoding a barcode in the row +
+ + + + string of digits to check + see + + + + Computes the UPC/EAN checksum on a string of digits, and reports + whether the checksum is correct or not. + + string of digits to check + true iff string of digits passes the UPC/EAN checksum algorithm + + + + Decodes the end. + + The row. + The end start. + + + + + + row of black/white values to search + position to start search + if true, indicates that the pattern specifies white/black/white/... + pixel counts, otherwise, it is interpreted as black/white/black/... + pattern of counts of number of black and white pixels that are being + searched for as a pattern + array of counters, as long as pattern, to re-use + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a single UPC/EAN-encoded digit. + + row of black/white values to decode + the counts of runs of observed black/white/black/... values + horizontal offset to start decoding from + the set of patterns to use to decode -- sometimes different encodings + for the digits 0-9 are used, and this indicates the encodings for 0 to 9 that should + be used + horizontal offset of first pixel beyond the decoded digit + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + Get the format of this decoder. + + The 1D format. + + + + The pattern that marks the middle, and end, of a UPC-E pattern. + There is no "second half" to a UPC-E barcode. + + + + + See L_AND_G_PATTERNS these values similarly represent patterns of + even-odd parity encodings of digits that imply both the number system (0 or 1) + used, and the check digit. + + + + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Decodes the end. + + The row. + The end start. + + + + + see checkStandardUPCEANChecksum(String) + + + + + + + Determines the num sys and check digit. + + The result string. + The lg pattern found. + + + + + Expands a UPC-E value back into its full, equivalent UPC-A code value. + + UPC-E code as string of digits + equivalent UPC-A code as string of digits + + + + + Get the format of this decoder. + The 1D format. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode the barcode inside a bitmap object + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Symbol Character Placement Program. Adapted from Annex M.1 in ISO/IEC 16022:2000(E). + + + + + Main constructor + + the codewords to place + the number of columns + the number of rows + + + + Places the 8 bits of a utah-shaped symbol character in ECC200. + + The row. + The col. + character position + + +

This provides an easy abstraction to read bits at a time from a sequence of bytes, where the + number of bits read is not often a multiple of 8.

+ +

This class is thread-safe but not reentrant. Unless the caller modifies the bytes array + it passed in, in which case all bets are off.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + bytes from which this will read bits. Bits will be read from the first byte first. + Bits are read within a byte from most-significant to least-significant bit. + + + + number of bits to read + + int representing the bits read. The bits will appear as the least-significant + bits of the int + + if numBits isn't in [1,32] or more than is available + + + number of bits that can be read successfully + + + + + index of next bit in current byte which would be read by the next call to {@link #readBits(int)}. + + + + + index of next byte in input byte array which would be read by the next call to {@link #readBits(int)}. + + + + + This class is the core bitmap class used by ZXing to represent 1 bit data. Reader objects + accept a BinaryBitmap and attempt to decode it. + + dswitkin@google.com (Daniel Switkin) + + + + + + + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + + The row to fetch, which must be in [0, bitmap height). + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if isCropSupported() is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + The width of the bitmap. + + + + + The height of the bitmap. + + + + + Converts a 2D array of luminance data to 1 bit. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + + Whether this bitmap can be cropped. + + + + + Whether this bitmap supports counter-clockwise rotation. + + + + + This produces nearly optimal encodings of text into the first-level of + encoding used by Aztec code. + It uses a dynamic algorithm. For each prefix of the string, it determines + a set of encodings that could lead to this prefix. We repeatedly add a + character and generate a new set of optimal encodings until we have read + through the entire input. + @author Frank Yellin + @author Rustam Abdullaev + + + + + + + + + + + Convert the text represented by this High Level Encoder into a BitArray. + + text represented by this encoder encoded as a + + + Callback which is invoked when a possible result point (significant + point in the barcode image such as a corner) is found. + + + + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+
+ Sean Owen +
+ + + 1 pixel/module times 3 modules/center + + + + + support up to version 20 for mobile clients + + + + +

Creates a finder that will search the image for three finder patterns.

+
+ image to search +
+ + + Initializes a new instance of the class. + + The image. + The result point callback. + + + Given a count of black/white/black/white/black pixels just seen and an end position, + figures the location of the center of this run. + + + + count of black/white/black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/3/1/1 ratios + used by finder patterns to be considered a match + + + + + + count of black/white/black/white/black pixels just read + true if the proportions of the counts is close enough to the 1/1/3/1/1 ratios + by finder patterns to be considered a match + + + + After a vertical and horizontal scan finds a potential finder pattern, this method + "cross-cross-cross-checks" by scanning down diagonally through the center of the possible + finder pattern to see if the same proportion is detected. + @param maxCount maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + @param originalStateCountTotal The original state count total. + + row where a finder pattern was detected + center of the section that appears to cross a finder pattern + true if proportions are withing expected limits + + + +

After a horizontal scan finds a potential finder pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + finder pattern to see if the same proportion is detected.

+
+ row where a finder pattern was detected + center of the section that appears to cross a finder pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of finder pattern, or null if not found + +
+ +

Like {@link #crossCheckVertical(int, int, int, int)}, and in fact is basically identical, + except it reads horizontally instead of vertically. This is used to cross-cross + check a vertical cross check and locate the real center of the alignment pattern.

+
+
+ + + @see #handlePossibleCenter(int[], int, int) + + reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + ignored + true if a finder pattern candidate was found this time + + + +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will, ah, cross-cross-check + with another horizontal scan. This is needed primarily to locate the real horizontal + center of the pattern in cases of extreme skew. + And then we cross-cross-cross check with another diagonal scan.

+ If that succeeds the finder pattern location is added to a list that tracks + the number of times each location has been nearly-matched as a finder pattern. + Each additional find is more evidence that the location is in fact a finder + pattern center +
+ reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + + true if a finder pattern candidate was found this time + +
+ + number of rows we could safely skip during scanning, based on the first + two finder patterns that have been located. In some cases their position will + allow us to infer that the third pattern must lie below a certain point farther + down in the image. + + + + true iff we have found at least 3 finder patterns that have been detected + at least {@link #CENTER_QUORUM} times each, and, the estimated module size of the + candidates is "pretty similar" + + + + the 3 best {@link FinderPattern}s from our list of candidates. The "best" are + those that have been detected at least {@link #CENTER_QUORUM} times, and whose module + size differs from the average among those patterns the least + + + + + Gets the image. + + + + + Gets the possible centers. + + + + + Orders by furthest from average + + + +

Orders by {@link FinderPattern#getCount()}, descending.

+
+ + +

Encapsulates a finder pattern, which are the three square patterns found in + the corners of QR Codes. It also encapsulates a count of similar finder patterns, + as a convenience to the finder's bookkeeping.

+
+ Sean Owen +
+ + + Encapsulates a point of interest in an image containing a barcode. Typically, this + would be the location of a finder pattern or the corner of the barcode, for example. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The x. + The y. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC and + BC is less than AC and the angle between BC and BA is less than 180 degrees. + + array of three to order + + + + calculates the distance between two points + + first pattern + second pattern + + distance between two points + + + + + Returns the z component of the cross product between vectors BC and BA. + + + + + Gets the X. + + + + + Gets the Y. + + + +

Determines if this finder pattern "about equals" a finder pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing a weighted average + based on count. + + The i. + The j. + New size of the module. + + + + + Gets the size of the estimated module. + + + The size of the estimated module. + + + + +

A field based on powers of a generator integer, modulo some modulus.

+ +
+ Sean Owen +
+ + + Interface for a smart class to encode some content into a barcode + + + + + Encodes the specified contents. + + The contents. + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + +

Data Matrix Codes can encode text as bits in one of several modes, and can use multiple modes + in one Data Matrix Code. This class decodes the bits back into text.

+ +

See ISO 16022:2006, 5.2.1 - 5.2.9.2

+ + bbrown@google.com (Brian Brown) + Sean Owen +
+
+ + + See ISO 16022:2006, Annex C Table C.1 + The C40 Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, Annex C Table C.2 + The Text Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, 5.2.3 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.5 and Annex C, Table C.1 + + + + + See ISO 16022:2006, 5.2.6 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.7 + + + + + See ISO 16022:2006, 5.2.8 and Annex C Table C.3 + + + + + See ISO 16022:2006, 5.2.9 and Annex B, B.2 + + + + + See ISO 16022:2006, Annex B, B.2 + + + + + bbrown@google.com (Brian Brown) + + + + + to parse + if dimension is < 8 or > 144 or not 0 mod 2 + + + + +

Creates the version object based on the dimension of the original bit matrix from + the datamatrix code.

+ +

See ISO 16022:2006 Table 7 - ECC 200 symbol attributes

+ + Original including alignment patterns + encapsulating the Data Matrix Code's "version" + if the dimensions of the mapping matrix are not valid + Data Matrix dimensions. +
+
+ + +

Reads the bits in the representing the mapping matrix (No alignment patterns) + in the correct order in order to reconstitute the codewords bytes contained within the + Data Matrix Code.

+ + bytes encoded within the Data Matrix Code + if the exact number of bytes expected is not read +
+
+ + +

Reads a bit of the mapping matrix accounting for boundary wrapping.

+ + Row to read in the mapping matrix + Column to read in the mapping matrix + Number of rows in the mapping matrix + Number of columns in the mapping matrix + value of the given bit in the mapping matrix +
+
+ + +

Reads the 8 bits of the standard Utah-shaped pattern.

+ +

See ISO 16022:2006, 5.8.1 Figure 6

+ + Current row in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Current column in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the utah shape +
+
+ + +

Reads the 8 bits of the special corner condition 1.

+ +

See ISO 16022:2006, Figure F.3

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 1 +
+
+ + +

Reads the 8 bits of the special corner condition 2.

+ +

See ISO 16022:2006, Figure F.4

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 2 +
+
+ + +

Reads the 8 bits of the special corner condition 3.

+ +

See ISO 16022:2006, Figure F.5

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 3 +
+
+ + +

Reads the 8 bits of the special corner condition 4.

+ +

See ISO 16022:2006, Figure F.6

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 4 +
+
+ + +

Extracts the data region from a that contains + alignment patterns.

+ + Original with alignment patterns + BitMatrix that has the alignment patterns removed +
+
+ +

This class implements a perspective transform in two dimensions. Given four source and four + destination points, it will compute the transformation implied between them. The code is based + directly upon section 3.4.2 of George Wolberg's "Digital Image Warping"; see pages 54-56.

+
+ Sean Owen +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Convenience method, not optimized for performance. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Represents a parsed result that encodes a product ISBN number. + + jbreiden@google.com (Jeff Breidenbach) + + + + the ISBN number + + + +

This class attempts to find alignment patterns in a QR Code. Alignment patterns look like finder + patterns but are smaller and appear at regular intervals throughout the image.

+ +

At the moment this only looks for the bottom-right alignment pattern.

+ +

This is mostly a simplified copy of {@link FinderPatternFinder}. It is copied, + pasted and stripped down here for maximum performance but does unfortunately duplicate + some code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Creates a finder that will look in a portion of the whole image.

+ +
+ image to search + + left column from which to start searching + + top row from which to start searching + + width of region to search + + height of region to search + + estimated module size so far + + callback function which is called, when a result point is found +
+ +

This method attempts to find the bottom-right alignment pattern in the image. It is a bit messy since + it's pretty performance-critical and so is written to be fast foremost.

+ +
+ if found +
+ + Given a count of black/white/black pixels just seen and an end position, + figures the location of the center of this black/white/black run. + + + + count of black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/1 ratios + used by alignment patterns to be considered a match + + + + +

After a horizontal scan finds a potential alignment pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + alignment pattern to see if the same proportion is detected.

+
+ row where an alignment pattern was detected + center of the section that appears to cross an alignment pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of alignment pattern, or null if not found + +
+ +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will see if this pattern had been + found on a previous horizontal scan. If so, we consider it confirmed and conclude we have + found the alignment pattern.

+ +
+ reading state module counts from horizontal scan + + row where alignment pattern may be found + + end of possible alignment pattern in row + + {@link AlignmentPattern} if we have found the same pattern twice, or null if not + +
+ + + PDF 417 result meta data. + Guenther Grau + + + + + The Segment ID represents the segment of the whole file distributed over different symbols. + + + + + Is the same for each related PDF417 symbol + + + + + always null + + + + + true if it is the last segment + + + + + count of segments, -1 if not set + + + + + Filename of the encoded file + + + + + filesize in bytes of the encoded file + returns filesize in bytes, -1 if not set + + + + + 16-bit CRC checksum using CCITT-16 + returns crc checksum, -1 if not set + + + + + unix epock timestamp, elapsed seconds since 1970-01-01 + returns elapsed seconds, -1 if not set + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + This object renders a CODE128 code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + +

Decodes Code 128 barcodes.

+ + Sean Owen +
+
+ + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + +

A somewhat generic detector that looks for a barcode-like rectangular region within an image. + It looks within a mostly white region of an image for a region of black and white, but mostly + black. It returns the four corners of the region, as best it can determine.

+ +
+ Sean Owen +
+ + + initializing constructor + + + + + +

Detects a rectangular region of black and white -- mostly black -- with a region of mostly + white, in an image.

+
+ [] describing the corners of the rectangular region. The first and + last points are opposed on the diagonal, as are the second and third. The first point will be + the topmost point and the last, the bottommost. The second point will be leftmost and the + third, the rightmost + +
+ + Attempts to locate a corner of the barcode by scanning up, down, left or right from a center + point which should be within the barcode. + + + center's x component (horizontal) + + same as deltaY but change in x per step instead + + minimum value of x + + maximum value of x + + center's y component (vertical) + + change in y per step. If scanning up this is negative; down, positive; + left or right, 0 + + minimum value of y to search through (meaningless when di == 0) + + maximum value of y + + maximum run of white pixels that can still be considered to be within + the barcode + + a encapsulating the corner that was found + + + + Computes the start and end of a region of pixels, either horizontally or vertically, that could + be part of a Data Matrix barcode. + + + if scanning horizontally, this is the row (the fixed vertical location) + where we are scanning. If scanning vertically it's the column, the fixed horizontal location + + largest run of white pixels that can still be considered part of the + barcode region + + minimum pixel location, horizontally or vertically, to consider + + maximum pixel location, horizontally or vertically, to consider + + if true, we're scanning left-right, instead of up-down + + int[] with start and end of found range, or null if no such range is found + (e.g. only white was found) + + + + + A simple result type encapsulating a URI that has no further interpretation. + + Sean Owen + + + Transforms a string that represents a URI into something more proper, by adding or canonicalizing + the protocol. + + + + true if the URI contains suspicious patterns that may suggest it intends to + mislead the user about its true nature. At the moment this looks for the presence + of user/password syntax in the host/authority portion of a URI which may be used + in attempts to make the URI's host appear to be other than it is. Example: + http://yourbank.com@phisher.com This URI connects to phisher.com but may appear + to connect to yourbank.com at first glance. + + + + + Parses a "tel:" URI result, which specifies a phone number. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link #parseResult(com.google.zxing.Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Attempts to parse the raw {@link Result}'s contents as a particular type + of information (email, URL, etc.) and return a {@link ParsedResult} encapsulating + the result of parsing. + + the raw to parse + encapsulating the parsing result + + + + Parses the result. + + The result. + + + + + A smart class to decode the barcode inside a bitmap object + + + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode the barcode inside a bitmap object + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap which is given by a generic byte array. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + represents the default function which is called to get a instance from a raw byte array + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb array. + If null the RGBLuminanceSource is used. The handler is only called when Decode with a byte[] array is called. + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + raises the ResultFound event + + + + + + raises the ResultFound event + + + + + + calls the explicitResultPointFound action + + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + Gets or sets the options. + + + The options. + + + + + Gets the reader which should be used to find and decode the barcode. + + + The reader. + + + + + Gets or sets a method which is called if an important point is found + + + The result point callback. + + + + + event is executed if a result was found via decode + + + + + Gets or sets a value indicating whether the image should be automatically rotated. + Rotation is supported for 90, 180 and 270 degrees + + + true if image should be rotated; otherwise, false. + + + + + Gets or sets a value indicating whether the image should be automatically inverted + if no result is found in the original image. + ATTENTION: Please be carefully because it slows down the decoding process if it is used + + + true if image should be inverted; otherwise, false. + + + + + Optional: Gets or sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + The function to create a binarizer object. + + + + + Luminance source class which support different formats of images. + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 1 byte per pixel (Gray8). + That means the whole array consists of the luminance values (grayscale). + + The luminance array. + The width. + The height. + if set to true [is8 bit]. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + The bitmap format. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + calculates the luminance values for the given byte array and bitmap format + + + + + + + enumeration of supported bitmap format which the RGBLuminanceSource can process + + + + + format of the byte[] isn't known. RGBLuminanceSource tries to determine the best possible value + + + + + grayscale array, the byte array is a luminance array with 1 byte per pixel + + + + + grayscale array, the byte array is a luminance array with 2 bytes per pixel + + + + + 3 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels alpha, red, green and blue + + + + + 3 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green, red and alpha + + + + + 2 bytes per pixel, 5 bit red, 6 bits green and 5 bits blue + + + + + 4 bytes per pixel with the channels red, green, blue and alpha + + + + + 4 bytes for two pixels, UYVY formatted + + + + + 4 bytes for two pixels, YUYV formatted + + + + + Represents some type of metadata about the result of the decoding that the decoder + wishes to communicate back to the caller. + + Sean Owen + + + + Unspecified, application-specific metadata. Maps to an unspecified {@link Object}. + + + + + Denotes the likely approximate orientation of the barcode in the image. This value + is given as degrees rotated clockwise from the normal, upright orientation. + For example a 1D barcode which was found by reading top-to-bottom would be + said to have orientation "90". This key maps to an {@link Integer} whose + value is in the range [0,360). + + + + +

2D barcode formats typically encode text, but allow for a sort of 'byte mode' + which is sometimes used to encode binary data. While {@link Result} makes available + the complete raw bytes in the barcode for these formats, it does not offer the bytes + from the byte segments alone.

+

This maps to a {@link java.util.List} of byte arrays corresponding to the + raw bytes in the byte segments in the barcode, in order.

+
+
+ + + Error correction level used, if applicable. The value type depends on the + format, but is typically a String. + + + + + For some periodicals, indicates the issue number as an {@link Integer}. + + + + + For some products, indicates the suggested retail price in the barcode as a + formatted {@link String}. + + + + + For some products, the possible country of manufacture as a {@link String} denoting the + ISO country code. Some map to multiple possible countries, like "US/CA". + + + + + For some products, the extension text + + + + + If the code format supports structured append and + the current scanned code is part of one then the + sequence number is given with it. + + + + + If the code format supports structured append and + the current scanned code is part of one then the + parity is given with it. + + + + + PDF417-specific metadata + + + + + Aztec-specific metadata + + + + +

See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels + defined by the QR code standard.

+
+ Sean Owen +
+ + L = ~7% correction + + + M = ~15% correction + + + Q = ~25% correction + + + H = ~30% correction + + + + Ordinals this instance. + + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Fors the bits. + + int containing the two bits encoding a QR Code's error correction level + + representing the encoded error correction level + + + + + Gets the bits. + + + + + Gets the name. + + + + + PDF417 high-level encoder following the algorithm described in ISO/IEC 15438:2001(E) in + annex P. + + + + + code for Text compaction + + + + + code for Byte compaction + + + + + code for Numeric compaction + + + + + Text compaction submode Alpha + + + + + Text compaction submode Lower + + + + + Text compaction submode Mixed + + + + + Text compaction submode Punctuation + + + + + mode latch to Text Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters NOT a multiple of 6) + + + + + mode latch to Numeric Compaction mode + + + + + mode shift to Byte Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters a multiple of 6) + + + + + identifier for a user defined Extended Channel Interpretation (ECI) + + + + + identifier for a general purpose ECO format + + + + + identifier for an ECI of a character set of code page + + + + + Raw code table for text compaction Mixed sub-mode + + + + + Raw code table for text compaction: Punctuation sub-mode + + + + + Performs high-level encoding of a PDF417 message using the algorithm described in annex P + of ISO/IEC 15438:2001(E). If byte compaction has been selected, then only byte compaction + is used. + + the message + compaction mode to use + character encoding used to encode in default or byte compaction + or null for default / not applicable + if true, don't add an ECI segment for different encodings than default + the encoded message (the char values range from 0 to 928) + + + + Encode parts of the message using Text Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.2. + + the message + the start position within the message + the number of characters to encode + receives the encoded codewords + should normally be SUBMODE_ALPHA + the text submode in which this method ends + + + + + Encode parts of the message using Byte Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.3. The Unicode characters will be converted to binary using the cp437 + codepage. + + the message converted to a byte array + the start position within the message + the number of bytes to encode + the mode from which this method starts + receives the encoded codewords + + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using text compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using binary compaction. + + the message + the message converted to a byte array + the start position within the message + + the requested character count + + + + Represents possible PDF417 barcode compaction types. + + + + + + + + + + + + + + + + + + + + + + + + + defines the level of the error correction / count of error correction codewords + + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + The maximum distance to search in the codeword array in both the positive and negative directions + + + + + Initializes a new instance of the class. + + The Bounding Box around the column (in the BitMatrix) + + + + Converts the Image's Row to the index in the Codewords array + + The Codeword Index. + Image row. + + + + Converts the Codeword array index into a Row in the Image (BitMatrix) + + The Image Row. + Codeword index. + + + + Gets the codeword for a given row + + The codeword. + Image row. + + + + Gets the codeword closest to the specified row in the image + + Image row. + + + + Sets the codeword for an image row + + Image row. + Codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + The Bounding Box around the column (in the BitMatrix) + + The box. + + + + The Codewords the Box encodes for, offset by the Box minY. + Remember to Access this ONLY through GetCodeword(imageRow) if you're accessing it in that manner. + + The codewords. + + + + Initializes a new instance of the class. + + Box. + If set to true is left. + + + + Sets the Row Numbers as Inidicator Columns + + + + + TODO implement properly + TODO maybe we should add missing codewords to store the correct row number to make + finding row numbers for other columns easier + use row height count to make detection of invalid row numbers more reliable + + The indicator column row numbers. + Metadata. + + + + Gets the row heights. + + The row heights. + + + + Adjusts the in omplete indicator column row numbers. + + Metadata. + + + + Gets the barcode metadata. + + The barcode metadata. + + + + Prune the codewords which do not match the metadata + TODO Maybe we should keep the incorrect codewords for the start and end positions? + + Codewords. + Metadata. + + + + Returns a that represents the current . + + A that represents the current . + + + + Gets or sets a value indicating whether this instance is the left indicator + + true if this instance is left; otherwise, false. + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + These are a set of hints that you may pass to Writers to specify their behavior. + + dswitkin@google.com (Daniel Switkin) + + + + Specifies the width of the barcode image + type: + + + + + Specifies the height of the barcode image + type: + + + + + Don't put the content string into the output image. + type: + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + + For Aztec it is of type , representing the minimal percentage of error correction words. + In all cases, it can also be a representation of the desired value as well. + Note: an Aztec symbol should have a minimum of 25% EC words. + For PDF417 it is of type or (between 0 and 8), + + + + + Specifies what character encoding to use where applicable. + type: + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + type: , or representation of the integer value + + + + + Specifies the aspect ratio to use. Default is 4. + type: , or 1-4. + + + + + Specifies whether to use compact mode for PDF417 + type: , or "true" or "false" + value + + + + + Specifies what compaction mode to use for PDF417. + type: or value of one of its + enum values + + + + + Specifies the minimum and maximum number of rows and columns for PDF417. + type: + + + + + Don't append ECI segment. + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + type: + + + + + Specifies the matrix shape for Data Matrix (type ) + + + + + Specifies a minimum barcode size (type ). Only applicable to Data Matrix now. + + + + + Specifies a maximum barcode size (type ). Only applicable to Data Matrix now. + + + + + if true, don't switch to codeset C for numbers + + + + + Specifies the default encodation for Data Matrix (type ) + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Specifies the required number of layers for an Aztec code. + A negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + type: , or representation of the integer value + + + + + Specifies the exact version of QR code to be encoded. + (Type , or representation of the integer value). + + + + + Specifies whether the data should be encoded to the GS1 standard + type: , or "true" or "false" + value + + + + + Parses strings of digits that represent a UPC code. + + dswitkin@google.com (Daniel Switkin) + + + + Represents the type of data encoded by a barcode -- from plain text, to a + URI, to an e-mail address, etc. + + Sean Owen + + + This class hierarchy provides a set of methods to convert luminance data to 1 bit data. + It allows the algorithm to vary polymorphically, for example allowing a very expensive + thresholding technique for servers and a fast one for mobile. It also permits the implementation + to vary, e.g. a JNI version for Android and a Java fallback version for other platforms. + + dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The source. + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + For callers which only examine one row of pixels at a time, the same BitArray should be reused + and passed in with each call for performance. However it is legal to keep more than one row + at a time if needed. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + A new concrete Binarizer implementation object. + + + + Gets the luminance source object. + + + + Converts a 2D array of luminance data to 1 bit data. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + + Gets the width of the luminance source object. + + + + + Gets the height of the luminance source object. + + + + + Contains conversion support elements such as classes, interfaces and static methods. + + + + + Copies an array of chars obtained from a String into a specified array of chars + + The String to get the chars from + Position of the String to start getting the chars + Position of the String to end getting the chars + Array to return the chars + Position of the destination array of chars to start storing the chars + An array of chars + + + + Sets the capacity for the specified List + + The List which capacity will be set + The new capacity value + + + + Converts a string-Collection to an array + + The strings. + + + + + Joins all elements to one string. + + + The separator. + The values. + + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The value. + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The start index. + The end index. + The value. + + + + + + + + + + + + + + + + + + Savely gets the value of a decoding hint + if hints is null the default is returned + + + The hints. + Type of the hint. + The @default. + + + + + Attribute is only for compatibility issues + + + + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + Encode "bytes" with the error correction level "ecLevel". The encoding mode will be chosen + internally by chooseMode(). On success, store the result in "qrCode". + We recommend you to use QRCode.EC_LEVEL_L (the lowest level) for + "getECLevel" since our primary use is to show QR code on desktop screens. We don't need very + strong error correction for this purpose. + Note that there is no way to encode bytes in MODE_KANJI. We might want to add EncodeWithMode() + with which clients can specify the encoding mode. For now, we don't need the functionality. + + text to encode + error correction level to use + representing the encoded QR code + + + + Encodes the specified content. + + The content. + The ec level. + The hints. + + + + + Decides the smallest version of QR code that will contain all of the provided data. + + if the data cannot fit in any version + + + + Gets the alphanumeric code. + + The code. + the code point of the table used in alphanumeric mode or + -1 if there is no corresponding code in the table. + + + + Chooses the mode. + + The content. + + + + + Choose the best mode by examining the content. Note that 'encoding' is used as a hint; + if it is Shift_JIS, and the input is only double-byte Kanji, then we return {@link Mode#KANJI}. + + The content. + The encoding. + + + + + true if the number of input bits will fit in a code with the specified version and error correction level. + + + + Terminate bits as described in 8.4.8 and 8.4.9 of JISX0510:2004 (p.24). + + The num data bytes. + The bits. + + + + Get number of data bytes and number of error correction bytes for block id "blockID". Store + the result in "numDataBytesInBlock", and "numECBytesInBlock". See table 12 in 8.5.1 of + JISX0510:2004 (p.30) + + The num total bytes. + The num data bytes. + The num RS blocks. + The block ID. + The num data bytes in block. + The num EC bytes in block. + + + + Interleave "bits" with corresponding error correction bytes. On success, store the result in + "result". The interleave rule is complicated. See 8.6 of JISX0510:2004 (p.37) for details. + + The bits. + The num total bytes. + The num data bytes. + The num RS blocks. + + + + + Append mode info. On success, store the result in "bits". + + The mode. + The bits. + + + + Append length info. On success, store the result in "bits". + + The num letters. + The version. + The mode. + The bits. + + + + Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits". + + The content. + The mode. + The bits. + The encoding. + + +

Encapsulates an alignment pattern, which are the smaller square patterns found in + all but the simplest QR Codes.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Determines if this alignment pattern "about equals" an alignment pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing an average of the two. + + The i. + The j. + New size of the module. + + + + + PDF417 error correction code following the algorithm described in ISO/IEC 15438:2001(E) in + chapter 4.10. + + + + + Tables of coefficients for calculating error correction words + (see annex F, ISO/IEC 15438:2001(E)) + + + + + Determines the number of error correction codewords for a specified error correction + level. + + the error correction level (0-8) + the number of codewords generated for error correction + + + + Determines the error correction level for AUTO + + The error correction level (0-9) + The number of codewords for AUTO errorCorrectionLevel + the number of codewords generated for error correction + + + + Returns the recommended minimum error correction level as described in annex E of + ISO/IEC 15438:2001(E). + + the number of data codewords + the recommended minimum error correction level + + + + Generates the error correction codewords according to 4.10 in ISO/IEC 15438:2001(E). + + the data codewords + the error correction level (0-8) + the String representing the error correction codewords + + + + defines the level of the error correction / count of error correction codewords + + + + + A Bounding Box helper class + + Guenther Grau + + + + Initializes a new instance of the class. + returns null if the corner points don't match up correctly + + The image. + The top left. + The bottom left. + The top right. + The bottom right. + + + + + Creates the specified box. + + The box. + + + + + Initializes a new instance of the class. + Will throw an exception if the corner points don't match up correctly + + Image. + Top left. + Top right. + Bottom left. + Bottom right. + + + + Merge two Bounding Boxes, getting the left corners of left, and the right corners of right + (Images should be the same) + + Left. + Right. + + + + Adds the missing rows. + + The missing rows. + Missing start rows. + Missing end rows. + If set to true is left. + + + + Calculates the minimum and maximum X & Y values based on the corner points. + + + + + If we adjust the width, set a new right corner coordinate and recalculate + + Bottom right. + + + + Adapted from listings in ISO/IEC 24724 Appendix B and Appendix G. + + + + + Gets the RS svalue. + + The widths. + Width of the max. + if set to true [no narrow]. + + + + + Encapsulates a since character value in an RSS barcode, including its checksum information. + + + + + Initializes a new instance of the class. + + The value. + The checksum portion. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Gets the value. + + + + + Gets the checksum portion. + + + + + Decodes MSI barcodes. + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. + + + + + Creates a reader that can be configured to check the last character as a check digit, + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + The matrix. + + + + +

Encapsulates logic that can detect a Data Matrix Code in an image, even if the Data Matrix Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + +

Detects a Data Matrix Code in an image.

+
+ encapsulating results of detecting a Data Matrix Code or null +
+ + + Calculates the position of the white top right module using the output of the rectangle detector + for a rectangular matrix + + + + + Calculates the position of the white top right module using the output of the rectangle detector + for a square matrix + + + + + Increments the Integer associated with a key by one. + + + + + Counts the number of black/white transitions between two points, using something like Bresenham's algorithm. + + + + + Simply encapsulates two points and a number of transitions between them. + + + + + Orders ResultPointsAndTransitions by number of transitions, ascending. + + + + +

This class contains utility methods for performing mathematical operations over + the Galois Fields. Operations use a given primitive polynomial in calculations.

+

Throughout this package, elements of the GF are represented as an {@code int} + for convenience and speed (but at the cost of memory). +

+
+ Sean Owen +
+ + + Create a representation of GF(size) using the given primitive polynomial. + + irreducible polynomial whose coefficients are represented by + * the bits of an int, where the least-significant bit represents the constant + * coefficient + the size of the field + the factor b in the generator polynomial can be 0- or 1-based + * (g(x) = (x+a^b)(x+a^(b+1))...(x+a^(b+2t-1))). + * In most cases it should be 1, but for QR code it is 0. + + + + Builds the monomial. + + The degree. + The coefficient. + the monomial representing coefficient * x^degree + + + + Implements both addition and subtraction -- they are the same in GF(size). + + sum/difference of a and b + + + + Exps the specified a. + + 2 to the power of a in GF(size) + + + + Logs the specified a. + + A. + base 2 log of a in GF(size) + + + + Inverses the specified a. + + multiplicative inverse of a + + + + Multiplies the specified a with b. + + A. + The b. + product of a and b in GF(size) + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Gets the size. + + + + + Gets the generator base. + + + + + Represents a parsed result that encodes wifi network information, like SSID and password. + + Vikram Aggarwal + + + + Represents a parsed result that encodes a geographic coordinate, with latitude, longitude and altitude. + + Sean Owen + + + latitude in degrees + + + + longitude in degrees + + + + altitude in meters. If not specified, in the geo URI, returns 0.0 + + + + query string associated with geo URI or null if none exists + + + + the geo URI + + + + a URI link to Google Maps which display the point on the Earth described + by this instance, and sets the zoom level in a way that roughly reflects the + altitude, if specified + + + + + Enumerates barcode formats known to this package. + + Sean Owen + + + Aztec 2D barcode format. + + + CODABAR 1D format. + + + Code 39 1D format. + + + Code 93 1D format. + + + Code 128 1D format. + + + Data Matrix 2D barcode format. + + + EAN-8 1D format. + + + EAN-13 1D format. + + + ITF (Interleaved Two of Five) 1D format. + + + MaxiCode 2D barcode format. + + + PDF417 format. + + + QR Code 2D barcode format. + + + RSS 14 + + + RSS EXPANDED + + + UPC-A 1D format. + + + UPC-E 1D format. + + + UPC/EAN extension format. Not a stand-alone format. + + + MSI + + + Plessey + + + Intelligent Mail barcode + + + + UPC_A | UPC_E | EAN_13 | EAN_8 | CODABAR | CODE_39 | CODE_93 | CODE_128 | ITF | RSS_14 | RSS_EXPANDED + without MSI (to many false-positives) and IMB (not enough tested, and it looks more like a 2D) + + + + + Renders an Aztec code as a + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + This implementation can detect and decode Aztec codes in an image. + + David Olivier + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + a String representing the content encoded by the Data Matrix code + + + + + Locates and decodes a Data Matrix code in an image. + + image of barcode to decode + passed as a {@link java.util.Hashtable} from {@link com.google.zxing.DecodeHintType} + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + The general exception class throw when something goes wrong during decoding of a barcode. + This includes, but is not limited to, failing checksums / error correction algorithms, being + unable to locate finder timing patterns, and so on. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class. + + The inner exception. + + + + Initializes a new instance of the class. + + The inner exception. + + + + + JAVAPORT: The original code was a 2D array of ints, but since it only ever gets assigned + 0, 1 and 2 I'm going to use less memory and go with bytes. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Sets the specified x. + + The x. + The y. + The value. + + + + Sets the specified x. + + The x. + The y. + if set to true [value]. + + + + Clears the specified value. + + The value. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Gets the height. + + + + + Gets the width. + + + + + Gets or sets the with the specified x. + + + + + an internal representation as bytes, in row-major order. array[y][x] represents point (x,y) + + + + + Jacob Haynes + + + + + Creates a Barcode row of the width + + The width. + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + A boolean which is true if the bar black false if it is white + How many spots wide the bar is. + + + + + This function scales the row + + How much you want the image to be scaled, must be greater than or equal to 1. + the scaled row + + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Superclass of implementations that read barcodes in the RSS family of formats. + + + + + Initializes a new instance of the class. + + + + + Gets the decode finder counters. + + + + + + Gets the data character counters. + + + + + + Gets the odd rounding errors. + + + + + + Gets the even rounding errors. + + + + + + Gets the odd counts. + + + + + + Gets the even counts. + + + + + + Parses the finder value. + + The counters. + The finder patterns. + The value. + + + + + Counts the specified array. + + The array. + + + + + Increments the specified array. + + The array. + The errors. + + + + Decrements the specified array. + + The array. + The errors. + + + + Determines whether [is finder pattern] [the specified counters]. + + The counters. + + true if [is finder pattern] [the specified counters]; otherwise, false. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + This object renders a MSI code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Implements decoding of the EAN-13 format.

+ + dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Initializes a new instance of the class. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + Based on pattern of odd-even ('L' and 'G') patterns used to encoded the explicitly-encoded + digits in a barcode, determines the implicitly encoded first digit and adds it to the + result string. + + string to insert decoded first digit into + int whose bits indicates the pattern of odd/even L/G patterns used to + encode digits + -1 if first digit cannot be determined + + + + Get the format of this decoder. + The 1D format. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Error Correction Code for ECC200. + + + + + Lookup table which factors to use for which number of error correction codewords. + See FACTORS. + + + + + Precomputed polynomial factors for ECC 200. + + + + + Creates the ECC200 error correction for an encoded message. + + The codewords. + information about the symbol to be encoded + the codewords with interleaved error correction. + + + +

Encapsulates a block of data within a Data Matrix Code. Data Matrix Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ + bbrown@google.com (Brian Brown) +
+
+ + +

When Data Matrix Codes use multiple data blocks, they actually interleave the bytes of each of them. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ + bytes as read directly from the Data Matrix Code + version of the Data Matrix Code + DataBlocks containing original bytes, "de-interleaved" from representation in the + Data Matrix Code +
+
+ + + Implements Reed-Solomon encoding, as the name implies. + + Sean Owen + William Rucklidge + + + This Binarizer implementation uses the old ZXing global histogram approach. It is suitable + for low-end mobile devices which don't have enough CPU or memory to use a local thresholding + algorithm. However, because it picks a global black point, it cannot handle difficult shadows + and gradients. + + Faster mobile devices and all desktop applications should probably use HybridBinarizer instead. + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The source. + + + + Applies simple sharpening to the row data to improve performance of the 1D Readers. + + + + + + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + + A new concrete Binarizer implementation object. + + + + + Does not sharpen the data, as this call is intended to only be used by 2D Readers. + + + + +

Encapsulates the result of detecting a barcode in an image. This includes the raw + matrix of black/white pixels corresponding to the barcode, and possibly points of interest + in the image, like the location of finder patterns or corners of the barcode in the image.

+
+ Sean Owen +
+ + + initializing constructor + + + + + + + the detected bits + + + + + the pixel points where the result is found + + + + + The number's sign, where Positive also stands for the number zero. + + + + + A simple result type encapsulating a string that has no further interpretation. + + Sean Owen + + + Parses strings of digits that represent a ISBN. + + + jbreiden@google.com (Jeff Breidenbach) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + See ISBN-13 For Dummies + + The result. + + + + + Represents a parsed result that encodes extended product information as encoded by the RSS format, like weight, price, dates, etc. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + extension for kilogram weight type + + + + + extension for pounds weight type + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the raw text + + + + + the product id + + + + + the sscc + + + + + the lot number + + + + + the production date + + + + + the packaging date + + + + + the best before date + + + + + the expiration date + + + + + the weight + + + + + the weight type + + + + + the weight increment + + + + + the price + + + + + the price increment + + + + + the price currency + + + + + the uncommon AIs + + + + + the display representation (raw text) + + + + + class which represents the luminance values for a bitmap object of a WriteableBitmap class + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + initializing constructor + + + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + A smart class to encode some content to raw pixel data + + + + + A base class for specific barcode writers with specific formats of barcode images. + + The type of the output. + + + + A base class for specific barcode writers with specific formats of barcode images. + + + + + + + + + + + + + + + + Encodes the specified contents and returns a BitMatrix array. + That array has to be rendered manually or with a IBarcodeRenderer. + + The contents. + + + + + Gets or sets the barcode format. + The value is only suitable if the MultiFormatWriter is used. + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents and returns a rendered instance of the barcode. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The matrix. + + + + + Gets or sets the renderer which should be used to render the encoded BitMatrix. + + + + + Initializes a new instance of the class. + + + + + + + Satoru Takabayashi + Daniel Switkin + Sean Owen + + + + Apply mask penalty rule 1 and return the penalty. Find repetitive cells with the same color and + give penalty to them. Example: 00000 or 11111. + + The matrix. + + + + + Apply mask penalty rule 2 and return the penalty. Find 2x2 blocks with the same color and give + penalty to them. This is actually equivalent to the spec's rule, which is to find MxN blocks and give a + penalty proportional to (M-1)x(N-1), because this is the number of 2x2 blocks inside such a block. + + The matrix. + + + + + Apply mask penalty rule 3 and return the penalty. Find consecutive cells of 00001011101 or + 10111010000, and give penalty to them. If we find patterns like 000010111010000, we give + penalties twice (i.e. 40 * 2). + + The matrix. + + + + + Apply mask penalty rule 4 and return the penalty. Calculate the ratio of dark cells and give + penalty if the ratio is far from 50%. It gives 10 penalty for 5% distance. + + The matrix. + + + + + Return the mask bit for "getMaskPattern" at "x" and "y". See 8.8 of JISX0510:2004 for mask + pattern conditions. + + The mask pattern. + The x. + The y. + + + + + Helper function for applyMaskPenaltyRule1. We need this for doing this calculation in both + vertical and horizontal orders respectively. + + The matrix. + if set to true [is horizontal]. + + + +

Encapsulates a QR Code's format information, including the data mask used and + error correction level.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + +
+ + See ISO 18004:2006, Annex C, Table C.1 + + + Offset i holds the number of 1 bits in the binary representation of i + + + + Decodes the format information. + + format info indicator, with mask still applied + The masked format info2. + + information about the format it specifies, or null + if doesn't seem to match any known pattern + + + +

Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations + of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix, + including areas used for finder patterns, timing patterns, etc. These areas should be unused + after the point they are unmasked anyway.

+ +

Note that the diagram in section 6.8.1 is misleading since it indicates that i is column position + and j is row position. In fact, as the text says, i is row position and j is column position.

+ +
+ Sean Owen +
+ + See ISO 18004:2006 6.8.1 + + +

Implementations of this method reverse the data masking process applied to a QR Code and + make its bits ready to read.

+
+ + representation of QR Code bits + dimension of QR Code, represented by bits, being unmasked +
+ + + A Barcode Value for the PDF417 barcode. + The scanner will iterate through the bitmatrix, + and given the different methods or iterations + will increment a given barcode value's confidence. + + When done, this will return the values of highest confidence. + + Guenther Grau + + + + Incremenets the Confidence for a given value. (Adds an occurance of a value) + + + Value. + + + + Determines the maximum occurrence of a set value and returns all values which were set with this occurrence. + + an array of int, containing the values with the highest occurrence, or null, if no value was set. + + + + Returns the confience value for a given barcode value + + Barcode value. + + + @see UPCEANExtension2Support + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + one {@link ResultMetadataType} to appropriate value, or {@code null} if not known + + + + @see UPCEANExtension5Support + + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + + + + One row of an RSS Expanded Stacked symbol, consisting of 1+ expanded pairs. + + + + + Two rows are equal if they contain the same pairs in the same order. + + + + + Did this row of the image have to be reversed (mirrored) to recognize the pairs? + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + This object renders an EAN13 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + This object renders a CODE39 code as a . + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Decodes Code 39 barcodes. Supports "Full ASCII Code 39" if USE_CODE_39_EXTENDED_MODE is set.

+ Sean Owen + @see Code93Reader +
+
+ + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. It will not decoded "extended Code 39" sequences. + + + + + Creates a reader that can be configured to check the last character as a check digit. + It will not decoded "extended Code 39" sequences. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + + Creates a reader that can be configured to check the last character as a check digit, + or optionally attempt to decode "extended Code 39" sequences that are used to encode + the full ASCII character set. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + if true, will attempt to decode extended Code 39 sequences in the text. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + Returns a string with all possible characters + + + + + implements an Intelligent Mail barcode + Rishabh Hatgadkar + + + + + Encapsulates the result of decoding a matrix of bits. This typically + applies to 2D barcode formats. For now it contains the raw bytes obtained, + as well as a String interpretation of those bytes, if applicable. + Sean Owen + + + + + initializing constructor + + + + + + + + + initializing constructor + + + + + + + + + + + initializing constructor + + + + + + + + + + initializing constructor + + + + + + + + + + + + raw bytes representing the result, or null if not applicable + + + + + how many bits of are valid; typically 8 times its length + + + + + text representation of the result + + + + + list of byte segments in the result, or null if not applicable + + + + + name of error correction level used, or null if not applicable + + + + + gets a value which describe if structure append data was found + + + + + number of errors corrected, or null if not applicable + + + + + gives the sequence number of the result if structured append was found + + + + + number of erasures corrected, or null if not applicable + + + + + gives the parity information if structured append was found + + + + + Miscellanseous data value for the various decoders + + The other. + + + + Integer inefficiently represented internally using base-10 digits, in order to allow a + visual representation as a base-10 string. Only for internal use. + + + + + 10 numeration base for string representation, very inefficient for computations. + + + + + Maximum size for numbers is up to 10240 binary digits or approximately (safe to use) 3000 decimal digits. + The maximum size is, in fact, double the previously specified amount, in order to accommodate operations' + overflow. + + + + Integer constants + + + + The array of digits of the number. + + + + + The actual number of digits of the number. + + + + + The number sign. + + + + + Default constructor, intializing the Base10BigInteger with zero. + + + + + Constructor creating a new Base10BigInteger as a conversion of a regular base-10 long. + + The base-10 long to be converted + + + + Constructor creating a new Base10BigInteger as a copy of an existing Base10BigInteger. + + The Base10BigInteger to be copied + + + + Determines whether the specified Base10BigInteger is equal to the current Base10BigInteger. + + The Base10BigInteger to compare with the current Base10BigInteger + True if the specified Base10BigInteger is equal to the current Base10BigInteger, + false otherwise + + + + Determines whether the specified System.Object is equal to the current Base10BigInteger. + + The System.Object to compare with the current Base10BigInteger + True if the specified System.Object is equal to the current Base10BigInteger, + false otherwise + + + + Serves as a hash function for the Base10BigInteger type. + + A hash code for the current Base10BigInteger + + + + String representation of the current Base10BigInteger, converted to its base-10 representation. + + The string representation of the current Base10BigInteger + + + + Base10BigInteger inverse with respect to addition. + + The Base10BigInteger whose opposite is to be computed + The Base10BigInteger inverse with respect to addition + + + + Greater test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a > b, false otherwise + + + + Greater or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a >= b, false otherwise + + + + Smaller test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a < b, false otherwise + + + + Smaller or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a <= b, false otherwise + + + + Computes the absolute value of a Base10BigInteger. + + The Base10BigInteger whose absolute value is to be computed + The absolute value of the given BigInteger + + + + Addition operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the addition + + + + Subtraction operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the subtraction + + + + Multiplication operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the multiplication + + + + Implicit conversion operator from long to Base10BigInteger. + + The long to be converted to a Base10BigInteger + The Base10BigInteger converted from the given long + + + + Equality test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a == b, false otherwise + + + + Inequality test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a != b, false otherwise + + + + Greater test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a > b, false otherwise + + + + Smaller test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a < b, false otherwise + + + + Greater or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a >= b, false otherwise + + + + Smaller or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a <= b, false otherwise + + + + Base10BigInteger inverse with respect to addition. + + The Base10BigInteger whose opposite is to be computed + The Base10BigInteger inverse with respect to addition + + + + Addition operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the addition + + + + Subtraction operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the subtraction + + + + Multiplication operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the multiplication + + + + Incremetation by one operation of a Base10BigInteger. + + The Base10BigInteger to be incremented by one + The Base10BigInteger result of incrementing by one + + + + Decremetation by one operation of a Base10BigInteger. + + The Base10BigInteger to be decremented by one + The Base10BigInteger result of decrementing by one + + + + Adds two BigNumbers a and b, where a >= b, a, b non-negative. + + + + + Subtracts the Base10BigInteger b from the Base10BigInteger a, where a >= b, a, b non-negative. + + + + + Multiplies two Base10BigIntegers. + + + + + Sets the number sign. + + + + + Tries to parse results that are a URI of some kind. + + Sean Owen + + + +

Parses an "smtp:" URI result, whose format is not standardized but appears to be like: + smtp[:subject[:body]]}.

+

See http://code.google.com/p/zxing/issues/detail?id=536

+
+ Sean Owen +
+ + Implements the "MECARD" address book entry format. + + Supported keys: N, SOUND, TEL, EMAIL, NOTE, ADR, BDAY, URL, plus ORG + Unsupported keys: TEL-AV, NICKNAME + + Except for TEL, multiple values for keys are also not supported; + the first one found takes precedence. + + Our understanding of the MECARD format is based on this document: + + http://www.mobicode.org.tw/files/OMIA%20Mobile%20Bar%20Code%20Standard%20v3.2.1.doc + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + +

See + + DoCoMo's documentation about the result types represented by subclasses of this class.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + Implements KDDI AU's address book format. See + + http://www.au.kddi.com/ezfactory/tec/two_dimensions/index.html. + (Thanks to Yuzo for translating!) + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Aztec result meta data. + + + + + + + + + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + This object extends LuminanceSource around an array of YUV data returned from the camera driver, + with the option to crop to a rectangle within the full data. This can be used to exclude + superfluous pixels around the perimeter and speed up decoding. + It works for any pixel format where the Y channel is planar and appears first, including + YCbCr_420_SP and YCbCr_422_SP. + @author dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The yuv data. + Width of the data. + Height of the data. + The left. + The top. + The width. + The height. + if set to true [reverse horiz]. + + + + Initializes a new instance of the class. + + The luminances. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Renders the cropped greyscale bitmap. + + + + + + creates a new instance + + + + + + + + + + + + + + + Whether this subclass supports cropping. + + + + width of image from {@link #renderThumbnail()} + + + + + height of image from {@link #renderThumbnail()} + + + + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Maximum Codewords (Data + Error). + + + + + Gets the bit count sum. + + The bit count sum. + Module bit count. + + + + Converts an ICollection<int> to an int[] + Carry-over from Java. Will likely remove and replace with the Generic .ToArray() method. + + The int array. + List. + + + + Translate the symbol into a codeword + + the codeword corresponding to the symbol. + encoded symbol to translate to a codeword + + + + The sorted table of all possible symbols. Extracted from the PDF417 + specification. The index of a symbol in this table corresponds to the + index into the codeword table. + + + + + This table contains to codewords for all symbols. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + The class holds the available options for the QrCodeWriter + + + + + if true, don't switch to codeset C for numbers + + + + + This class renders CodaBar as []. + + dsbnatut@gmail.com (Kazuki Nishiura) + + + +

Decodes Codabar barcodes.

+ + Bas Vijfwinkel +
+
+ + These represent the encodings of characters, as patterns of wide and narrow bars. The 7 least-significant bits of + each int correspond to the pattern of wide and narrow, with 1s representing "wide" and 0s representing narrow. + + + + Records the size of all runs of white and black pixels, starting with white. + This is just like recordPattern, except it records all the counters, and + uses our builtin "counters" member for storage. + + row to count from + + + + Encapsulates a type of hint that a caller may pass to a barcode reader to help it + more quickly or accurately decode it. It is up to implementations to decide what, + if anything, to do with the information that is supplied. + + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Unspecified, application-specific hint. Maps to an unspecified . + + + + + Image is a pure monochrome image of a barcode. Doesn't matter what it maps to; + use = true. + + + + + Image is known to be of one of a few possible formats. + Maps to a of s. + + + + + Spend more time to try to find a barcode; optimize for accuracy, not speed. + Doesn't matter what it maps to; use = true. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + + + The caller needs to be notified via callback when a possible + is found. Maps to a . + + + + + Assume MSI codes employ a check digit. Maps to . + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + Maps to . + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + 1D readers supporting rotation with TRY_HARDER enabled. + But BarcodeReader class can do auto-rotating for 1D and 2D codes. + Enabling that option prevents 1D readers doing double rotation. + BarcodeReader enables that option automatically if "global" auto-rotation is enabled. + Maps to . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to; + use . + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + The class holds the available options for the DatamatrixWriter + + + + + Specifies the matrix shape for Data Matrix + + + + + Specifies a minimum barcode size + + + + + Specifies a maximum barcode size + + + + + Specifies the default encodation + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + +

Represents a polynomial whose coefficients are elements of a GF. + Instances of this class are immutable.

+

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + the {@link GenericGF} instance representing the field to use + to perform computations + coefficients as ints representing elements of GF(size), arranged + from most significant (highest-power term) coefficient to least significant + if argument is null or empty, + or if leading coefficient is 0 and this is not a + constant polynomial (that is, it is not the monomial "0") + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + + + degree of this polynomial + + + + + Gets a value indicating whether this is zero. + + true iff this polynomial is the monomial "0" + + + +

Represents a 2D matrix of bits. In function arguments below, and throughout the common + module, x is the column position, and y is the row position. The ordering is always x, y. + The origin is at the top-left.

+

Internally the bits are represented in a 1-D array of 32-bit ints. However, each row begins + with a new int. This is done intentionally so that we can copy out a row into a BitArray very + efficiently.

+

The ordering of bits is row-major. Within each int, the least significant bits are used first, + meaning they represent lower x values. This is compatible with BitArray's implementation.

+
+ Sean Owen + dswitkin@google.com (Daniel Switkin) +
+ + + Creates an empty square . + + height and width + + + + Creates an empty square . + + bit matrix width + bit matrix height + + + + Interprets a 2D array of booleans as a , where "true" means an "on" bit. + + bits of the image, as a row-major 2D array. Elements are arrays representing rows + representation of image + + + +

Flips the given bit.

+
+ The horizontal component (i.e. which column) + The vertical component (i.e. which row) +
+ + + flip all of the bits, if shouldBeFlipped is true for the coordinates + + should return true, if the bit at a given coordinate should be flipped + + + + Exclusive-or (XOR): Flip the bit in this {@code BitMatrix} if the corresponding + mask bit is set. + + The mask. + + + Clears all bits (sets to false). + + +

Sets a square region of the bit matrix to true.

+ +
+ The horizontal position to begin at (inclusive) + + The vertical position to begin at (inclusive) + + The width of the region + + The height of the region + +
+ + A fast method to retrieve one row of data from the matrix as a BitArray. + + + The row to retrieve + + An optional caller-allocated BitArray, will be allocated if null or too small + + The resulting BitArray - this reference should always be used even when passing + your own row + + + + + Sets the row. + + row to set + {@link BitArray} to copy from + + + + Modifies this {@code BitMatrix} to represent the same but rotated 180 degrees + + + + + This is useful in detecting the enclosing rectangle of a 'pure' barcode. + + {left,top,width,height} enclosing rectangle of all 1 bits, or null if it is all white + + + + This is useful in detecting a corner of a 'pure' barcode. + + {x,y} coordinate of top-left-most 1 bit, or null if it is all white + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + The line separator. + + A that represents this instance. + + + + + Clones this instance. + + + + + + Converts this ByteMatrix to a black and white bitmap. + + A black and white bitmap converted from this ByteMatrix. + + + The width of the matrix + + + + The height of the matrix + + + + This method is for compatibility with older code. It's only logical to call if the matrix + is square, so I'm throwing if that's not the case. + + + row/column dimension of this matrix + + + + + The rowsize of the matrix + + + +

Gets the requested bit, where true means black.

+ +
+ The horizontal component (i.e. which column) + + The vertical component (i.e. which row) + + value of given bit in matrix + +
+ + + Represents a parsed result that encodes a Vehicle Identification Number (VIN). + + + + + A smart class to decode the barcode inside a bitmap object + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Constructor for additional image formats for one BarcodeReader class + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Optional: Gets or sets the function to create a luminance source object for a bitmap. + If null a platform specific default LuminanceSource is used + + + The function to create a luminance source object. + + + + + A smart class to decode the barcode inside a bitmap object + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + State represents all information about a sequence necessary to generate the current output. + Note that a state is immutable. + + + + + Create a new state representing this state with a latch to a (not + necessary different) mode, and then a code. + + + + + Create a new state representing this state, with a temporary shift + to a different mode to output a single value. + + + + + Create a new state representing this state, but an additional character + output in Binary Shift mode. + + + + + Create the state identical to this one, but we are no longer in + Binary Shift mode. + + + + + Returns true if "this" state is better (or equal) to be in than "that" + state under all possible circumstances. + + + + + Generates Aztec 2D barcodes. + + Rustam Abdullaev + + + + Encodes the given binary content as an Aztec symbol + + input data string + Aztec symbol matrix with metadata + + + + Encodes the given binary content as an Aztec symbol + + input data string + minimal percentage of error check words (According to ISO/IEC 24778:2008, + a minimum of 23% + 3 words is recommended) + if non-zero, a user-specified value for the number of layers + + Aztec symbol matrix with metadata + + + + + Renders a to a + + + + + Interface for a class to convert a BitMatrix to an output image format + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + The options. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + + Gets or sets the font family. + + + The font family. + + + + + Gets or sets the size of the font. + + + The size of the font. + + + + + Gets or sets the font stretch. + + + The font stretch. + + + + + Gets or sets the font style. + + + The font style. + + + + + Gets or sets the font weight. + + + The font weight. + + + + + A Codeword in the PDF417 barcode + + Guenther Grau + + + + Default value for the RowNumber (-1 being an invalid real number) + + + + + Initializes a new instance of the class. + + Start x. + End x. + Bucket. + Value. + + + + Determines whether this instance is valid row number the specified rowNumber. + + true if this instance is valid row number the specified rowNumber; otherwise, false. + Row number. + + + + Sets the row number as the row's indicator column. + + + + + Returns a that represents the current . + + A that represents the current . + + + + Gets the width. + + The width. + + + + Gets a value indicating whether this instance has valid row number. + + true if this instance has valid row number; otherwise, false. + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + This implementation can detect and decode multiple QR Codes in an image. + + + + + This implementation can detect and decode QR Codes in an image. + Sean Owen + + + + + Gets the decoder. + + + + + + Locates and decodes a QR code in an image. + + a String representing the content encoded by the QR code + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Simply encapsulates a width and height. + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + + + + + + the width + + + + + the height + + + + + Enumeration for encodation types + + + + +

The main class which implements Data Matrix Code decoding -- as opposed to locating and extracting + the Data Matrix Code from an image.

+ + bbrown@google.com (Brian Brown) +
+
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a Data Matrix Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+ + booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code + if the Data Matrix Code cannot be decoded +
+
+ + +

Decodes a Data Matrix Code represented as a . A 1 or "true" is taken + to mean a black module.

+
+ booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+ + data and error correction codewords + number of codewords that are data bytes +
+
+ + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. By keeping track of the + last black points it encountered, it determines the corners of the barcode. + + David Olivier + + + + Creates a WhiteRectangleDetector instance + + The image. + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + Creates a WhiteRectangleDetector instance + + barcode image to find a rectangle in + initial size of search area around center + x position of search center + y position of search center + + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + + Initializes a new instance of the class. + + The image. + if image is too small + + + + Initializes a new instance of the class. + + The image. + Size of the init. + The x. + The y. + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. + + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + recenters the points of a constant distance towards the center + + bottom most point + left most point + right most point + top most point + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + Determines whether a segment contains a black point + + min value of the scanned coordinate + max value of the scanned coordinate + value of fixed coordinate + set to true if scan must be horizontal, false if vertical + + true if a black point has been found, else false. + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Parses the "URLTO" result format, which is of the form "URLTO:[title]:[url]". + This seems to be used sometimes, but I am not able to find documentation + on its origin or official format? + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Parses a "geo:" URI result, which specifies a location on the surface of + the Earth as well as an optional altitude above the surface. See + + http://tools.ietf.org/html/draft-mayrhofer-geo-uri-00. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a calendar event at a certain time, optionally with attendees and a location. + + Sean Owen + + + + Determines whether [is start all day]. + + if start time was specified as a whole day + + + + Parses a string as a date. RFC 2445 allows the start and end fields to be of type DATE (e.g. 20081021) + or DATE-TIME (e.g. 20081021T123000 for local time, or 20081021T123000Z for UTC). + + The string to parse + + if not a date formatted string + + + + Gets the start. + + + + + event end , or null if event has no duration + + + + + Gets a value indicating whether this instance is end all day. + + true if end time was specified as a whole day + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Aztec 2D code representation + + Rustam Abdullaev + + + + Compact or full symbol indicator + + + + + Size in pixels (width and height) + + + + + Number of levels + + + + + Number of data codewords + + + + + The symbol image + + + + + Encapsulates logic that can detect an Aztec Code in an image, even if the Aztec Code + is rotated or skewed, or partially obscured. + + David Olivier + + + + Initializes a new instance of the class. + + The image. + + + + Detects an Aztec Code in an image. + + + + + Detects an Aztec Code in an image. + + if true, image is a mirror-image of original. + + encapsulating results of detecting an Aztec Code + + + + + Extracts the number of data layers and data blocks from the layer around the bull's eye + + bullEyeCornerPoints the array of bull's eye corners + + + + + Corrects the parameter bits using Reed-Solomon algorithm + + paremeter bits + compact true if this is a compact Aztec code + + + + + Finds the corners of a bull-eye centered on the passed point + This returns the centers of the diagonal points just outside the bull's eye + Returns [topRight, bottomRight, bottomLeft, topLeft] + + Center point + The corners of the bull-eye + + + + Finds a candidate center point of an Aztec code from an image + + the center point + + + + Gets the Aztec code corners from the bull's eye corners and the parameters. + + the array of bull's eye corners + the array of aztec code corners + + + + Creates a BitMatrix by sampling the provided image. + topLeft, topRight, bottomRight, and bottomLeft are the centers of the squares on the + diagonal just outside the bull's eye. + + The image. + The top left. + The bottom left. + The bottom right. + The top right. + + + + + Samples a line + + start point (inclusive) + end point (exclusive) + number of bits + the array of bits as an int (first bit is high-order bit of result) + + + + Determines whether [is white or black rectangle] [the specified p1]. + + The p1. + The p2. + The p3. + The p4. + true if the border of the rectangle passed in parameter is compound of white points only + or black points only + + + + Gets the color of a segment + + The p1. + The p2. + 1 if segment more than 90% black, -1 if segment is more than 90% white, 0 else + + + + Gets the coordinate of the first point with a different color in the given direction + + The init. + if set to true [color]. + The dx. + The dy. + + + + + Expand the square represented by the corner points by pushing out equally in all directions + + the corners of the square, which has the bull's eye at its center + the original length of the side of the square in the target bit matrix + the new length of the size of the square in the target bit matrix + the corners of the expanded square + + + +

The main class which implements QR Code decoding -- as opposed to locating and extracting + the QR Code from an image.

+
+ + Sean Owen + +
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a QR Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Decodes a QR Code represented as a {@link BitMatrix}. A 1 or "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+
+ data and error correction codewords + number of codewords that are data bytes + +
+ + Sean Owen + + + {@link BitMatrix} to parse + ReaderException if dimension is not >= 21 and 1 mod 4 + + +

Reads format information from one of its two locations within the QR Code.

+ +
+ {@link FormatInformation} encapsulating the QR Code's format info + + ReaderException if both format information locations cannot be parsed as + the valid encoding of format information + +
+ +

Reads version information from one of its two locations within the QR Code.

+ +
+ {@link Version} encapsulating the QR Code's version + + ReaderException if both version information locations cannot be parsed as + the valid encoding of version information + +
+ +

Reads the bits in the {@link BitMatrix} representing the finder pattern in the + correct order in order to reconstruct the codewords bytes contained within the + QR Code.

+ +
+ bytes encoded within the QR Code + + ReaderException if the exact number of bytes expected is not read +
+ + Revert the mask removal done while reading the code words. The bit matrix should revert to its original state. + + + Prepare the parser for a mirrored operation. + This flag has effect only on the {@link #readFormatInformation()} and the + {@link #readVersion()}. Before proceeding with {@link #readCodewords()} the + {@link #mirror()} method should be called. + + @param mirror Whether to read version and format information mirrored. + + + Mirror the bit matrix in order to attempt a second reading. + + + + The class holds the available options for the + + + + + Specifies whether to use compact mode for PDF417 (type ). + + + + + Specifies what compaction mode to use for PDF417 (type + ). + + + + + Specifies the minimum and maximum number of rows and columns for PDF417 (type + ). + + + + + Specifies what degree of error correction to use + + + + + Specifies what degree of error correction to use + + + + + Specifies what character encoding to use where applicable (type {@link String}) + + + + + Explicitly disables ECI segment when generating PDF417 Code + That is against the specification but some + readers have problems if the charset is switched from + CP437 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use different encodings + and the ECI segment is omitted. + + + + + Data object to specify the minimum and maximum number of rows and columns for a PDF417 barcode. + @author qwandor@google.com (Andrew Walbran) + + + + + Initializes a new instance of the class. + + The min cols. + The max cols. + The min rows. + The max rows. + + + + Gets the min cols. + + + + + Gets the max cols. + + + + + Gets the min rows. + + + + + Gets the max rows. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + MultiFormatReader is a convenience class and the main entry point into the library for most uses. + By default it attempts to decode all barcode formats that the library supports. Optionally, you + can provide a hints object to request different behavior, for example only decoding QR codes. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + This version of decode honors the intent of Reader.decode(BinaryBitmap) in that it + passes null as a hint to the decoders. However, that makes it inefficient to call repeatedly. + Use setHints() followed by decodeWithState() for continuous scan applications. + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the hints provided. Does not honor existing state. + + + The pixel data to decode + + The hints to use, clearing the previous state. + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the state set up by calling setHints() previously. Continuous scan + clients will get a large speed increase by using this instead of decode(). + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + + resets all specific readers + + + + This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls + to decodeWithState(image) can reuse the same set of readers without reallocating memory. This + is important for performance in continuous scan clients. + + + + + + A wrapper implementation of {@link LuminanceSource} which inverts the luminances it returns -- black becomes + white and vice versa, and each value becomes (255-value). + + Sean Owen + + + + Initializes a new instance of the class. + + The @delegate. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Inverts this instance. + + original delegate {@link LuminanceSource} since invert undoes itself + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff; + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + + + Whether this subclass supports cropping. + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + This object renders a Data Matrix code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + Guillaume Le Biller Added to zxing lib. + + + + encodes the content to a BitMatrix + + + + + + + + + + encodes the content to a BitMatrix + + + + + + + + + + + Encode the given symbol info to a bit matrix. + + The DataMatrix placement. + The symbol info to encode. + + + The bit matrix generated. + + + + Convert the ByteMatrix to BitMatrix. + + The input matrix. + The requested width of the image (in pixels) with the Datamatrix code + The requested height of the image (in pixels) with the Datamatrix code + The output matrix. + + + + This implementation can detect and decode Data Matrix codes in an image. + + bbrown@google.com (Brian Brown) + + + + + Locates and decodes a Data Matrix code in an image. + + + a String representing the content encoded by the Data Matrix code + + + + Locates and decodes a Data Matrix code in an image. + + + + a String representing the content encoded by the Data Matrix code + + + + does nothing here + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + This class implements a local thresholding algorithm, which while slower than the + GlobalHistogramBinarizer, is fairly efficient for what it does. It is designed for + high frequency images of barcodes with black data on white backgrounds. For this application, + it does a much better job than a global blackpoint with severe shadows and gradients. + However it tends to produce artifacts on lower frequency images and is therefore not + a good general purpose binarizer for uses outside ZXing. + + This class extends GlobalHistogramBinarizer, using the older histogram approach for 1D readers, + and the newer local approach for 2D readers. 1D decoding using a per-row histogram is already + inherently local, and only fails for horizontal gradients. We can revisit that problem later, + but for now it was not a win to use local blocks for 1D. + + This Binarizer is the default for the unit tests and the recommended class for library users. + dswitkin@google.com (Daniel Switkin) + + + + + initializing constructor + + + + + + creates a new instance + + + + + + + Calculates the final BitMatrix once for all requests. This could be called once from the + constructor instead, but there are some advantages to doing it lazily, such as making + profiling easier, and not doing heavy lifting when callers don't expect it. + + + + + For each 8x8 block in the image, calculate the average black point using a 5x5 grid + of the blocks around it. Also handles the corner cases (fractional blocks are computed based + on the last 8 pixels in the row/column which are also used in the previous block). + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + The black points. + The matrix. + + + + Applies a single threshold to an 8x8 block of pixels. + + The luminances. + The xoffset. + The yoffset. + The threshold. + The stride. + The matrix. + + + + Calculates a single black point for each 8x8 block of pixels and saves it away. + See the following thread for a discussion of this algorithm: + http://groups.google.com/group/zxing/browse_thread/thread/d06efa2c35a7ddc0 + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + + + + + gives the black matrix + + + + + Superclass of classes encapsulating types ECIs, according to "Extended Channel Interpretations" + 5.3 of ISO 18004. + + Sean Owen + + + ECI value + representing ECI of given value, or null if it is legal but unsupported + ArgumentException if ECI value is invalid + + + + the ECI value + + + + + A simple, fast array of bits, represented compactly by an array of ints internally. + + Sean Owen + + + + default constructor + + + + + initializing constructor + + desired size of the array + + + + Flips bit i. + + bit to set + + + + + Gets the next set. + + first bit to check + index of first bit that is set, starting from the given index, or size if none are set + at or beyond this given index + + + + see getNextSet(int) + + index to start looking for unset bit + index of next unset bit, or if none are unset until the end + + + Sets a block of 32 bits, starting at bit i. + + + first bit to set + + the new value of the next 32 bits. Note again that the least-significant bit + corresponds to bit i, the next-least-significant to i+1, and so on. + + + + + Sets a range of bits. + + start of range, inclusive. + end of range, exclusive + + + Clears all bits (sets to false). + + + Efficient method to check if a range of bits is set, or not set. + + + start of range, inclusive. + + end of range, exclusive + + if true, checks that bits in range are set, otherwise checks that they are not set + + true iff all bits are set or not set in range, according to value argument + if end is less than start or the range is not contained in the array + + + + Appends the bit. + + The bit. + + + + Appends the least-significant bits, from value, in order from most-significant to + least-significant. For example, appending 6 bits from 0x000001E will append the bits + 0, 1, 1, 1, 1, 0 in that order. + + containing bits to append + bits from value to append + + + + adds the array to the end + + + + + + XOR operation + + + + + + converts to bytes. + + first bit to start writing + array to write into. Bytes are written most-significant byte first. This is the opposite + of the internal representation, which is exposed by BitArray + position in array to start writing + how many bytes to write + + + Reverses all bits in the array. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Erstellt ein neues Objekt, das eine Kopie der aktuellen Instanz darstellt. + + + Ein neues Objekt, das eine Kopie dieser Instanz darstellt. + + + + + size of the array, number of elements + + + + + size of the array in bytes + + + + + index accessor + + + + + + underlying array of ints. The first element holds the first 32 bits, and the least + significant bit is bit 0. + + + +

Parses an "sms:" URI result, which specifies a number to SMS and optional + "via" number. See + the IETF draft on this.

+ +

This actually also parses URIs starting with "mms:", "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + + Parses strings of digits that represent a RSS Extended code. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + tries to parse a text representation to a specific result object + + + + + + + A smart class to encode some content to a barcode image + + + + + Interface for a smart class to encode some content into a barcode + + + Interface for a smart class to encode some content into a barcode + + + + + Encodes the specified contents. + + The contents. + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Initializes a new instance of the class. + + + + + Extends with more information specific to the Aztec format, + like the number of layers and whether it's compact. + + + + + Initializes a new instance of the class. + + The bits. + The points. + if set to true [compact]. + The nb datablocks. + The nb layers. + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + Encapsulates the result of decoding a barcode within an image. + + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + The timestamp. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + The timestamp. + + + + Adds one metadata to the result + + The type. + The value. + + + + Adds a list of metadata to the result + + The metadata. + + + + Adds the result points. + + The new points. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + raw text encoded by the barcode, if applicable, otherwise null + + + raw bytes encoded by the barcode, if applicable, otherwise null + + + + points related to the barcode in the image. These are typically points + identifying finder patterns or the corners of the barcode. The exact meaning is + specific to the type of barcode that was decoded. + + + + {@link BarcodeFormat} representing the format of the barcode that was decoded + + + + {@link Hashtable} mapping {@link ResultMetadataType} keys to values. May be + null. This contains optional metadata about what was detected about the barcode, + like orientation. + + + + + Gets the timestamp. + + + + + how many bits of are valid; typically 8 times its length + + + + + This object renders a QR Code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + PDF 417 Detector Result class. Skipped private backing stores. + Guenther Grau + + + + + Initializes a new instance of the class. + + Bits. + Points. + + + + + + Sean Owen + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + + + Adds another Modulus + + Other. + + + + Subtract another Modulus + + Other. + + + + Multiply by another Modulus + + Other. + + + + Returns a Negative version of this instance + + + + + Multiply by a Scalar. + + Scalar. + + + + Multiplies by a Monomial + + The by monomial. + Degree. + Coefficient. + + + + Returns a that represents the current . + + A that represents the current . + + + + Gets the coefficients. + + The coefficients. + + + + degree of this polynomial + + + + + Gets a value indicating whether this instance is zero. + + true if this polynomial is the monomial "0" + + + + + Metadata about a PDF417 Barcode + + Guenther Grau + + + + Decodes RSS-14, including truncated and stacked variants. See ISO/IEC 24724:2006. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + This object renders a Plessey code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + This object renders an EAN8 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + + + a byte array of horizontal pixels (false = white, true = black) + + + + +

Implements decoding of the EAN-8 format.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Get the format of this decoder. + The 1D format. + + + + This is a factory class which finds the appropriate Writer subclass for the BarcodeFormat + requested and encodes the barcode with the supplied contents. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + encode the given data + + + + + + + + + + encode the given data + + + + + + + + + + + Gets the collection of supported writers. + + + + + This implementation can detect and decode a MaxiCode in an image. + + + + + Locates and decodes a MaxiCode in an image. + + a String representing the content encoded by the MaxiCode + if a MaxiCode cannot be decoded + + + + + Locates and decodes a MaxiCode within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + + Symbol info table for DataMatrix. + + + + Overrides the symbol info set used by this class. Used for testing purposes. + + @param override the symbol info set to use + + + + DataMatrix ECC 200 data encoder following the algorithm described in ISO/IEC 16022:200(E) in + annex S. + + + + + Padding character + + + + + mode latch to C40 encodation mode + + + + + mode latch to Base 256 encodation mode + + + + + FNC1 Codeword + + + + + Structured Append Codeword + + + + + Reader Programming + + + + + Upper Shift + + + + + 05 Macro + + + + + 06 Macro + + + + + mode latch to ANSI X.12 encodation mode + + + + + mode latch to Text encodation mode + + + + + mode latch to EDIFACT encodation mode + + + + + ECI character (Extended Channel Interpretation) + + + + + Unlatch from C40 encodation + + + + + Unlatch from X12 encodation + + + + + 05 Macro header + + + + + 06 Macro header + + + + + Macro trailer + + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + the encoded message (the char values range from 0 to 255) + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + requested shape. May be {@code SymbolShapeHint.FORCE_NONE},{@code SymbolShapeHint.FORCE_SQUARE} or {@code SymbolShapeHint.FORCE_RECTANGLE}. + the minimum symbol size constraint or null for no constraint + the maximum symbol size constraint or null for no constraint + encoding mode to start with + the encoded message (the char values range from 0 to 255) + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + General math-related and numeric utility functions. + + + + + Ends up being a bit faster than {@link Math#round(float)}. This merely rounds its + argument to the nearest int, where x.5 rounds up to x+1. Semantics of this shortcut + differ slightly from {@link Math#round(float)} in that half rounds down for negative + values. -2.5 rounds to -3, not -2. For purposes here it makes no difference. + + real value to round + nearest int + + + + + + + + + + Euclidean distance between points A and B + + + + + + + + + + Euclidean distance between points A and B + + + + + values to sum + sum of values in array + + + Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1 + of ISO 18004. + + + Sean Owen + + + character set ECI value + representing ECI of given value, or null if it is legal but unsupported + + + character set ECI encoding name + representing ECI for character encoding, or null if it is legalbut unsupported + + + + Represents a parsed result that encodes an email message including recipients, subject and body text. + + Sean Owen + + + + the email address + + + + + the TOs + + + + + the CCs + + + + + the BCCs + + + + + the subject + + + + + the body + + + + + the mailto: uri + + + + + A smart class to encode some content to a svg barcode image + + + + + Initializes a new instance of the class. + + + + + A base class which covers the range of exceptions which may occur when encoding a barcode using + the Writer framework. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner exc. + + + + + + + satorux@google.com (Satoru Takabayashi) - creator + + + + + Set all cells to 2. 2 means that the cell is empty (not set yet). + + JAVAPORT: We shouldn't need to do this at all. The code should be rewritten to begin encoding + with the ByteMatrix initialized all to zero. + + The matrix. + + + + Build 2D matrix of QR Code from "dataBits" with "ecLevel", "version" and "getMaskPattern". On + success, store the result in "matrix" and return true. + + The data bits. + The ec level. + The version. + The mask pattern. + The matrix. + + + + Embed basic patterns. On success, modify the matrix and return true. + The basic patterns are: + - Position detection patterns + - Timing patterns + - Dark dot at the left bottom corner + - Position adjustment patterns, if need be + + The version. + The matrix. + + + + Embed type information. On success, modify the matrix. + + The ec level. + The mask pattern. + The matrix. + + + + Embed version information if need be. On success, modify the matrix and return true. + See 8.10 of JISX0510:2004 (p.47) for how to embed version information. + + The version. + The matrix. + + + + Embed "dataBits" using "getMaskPattern". On success, modify the matrix and return true. + For debugging purposes, it skips masking process if "getMaskPattern" is -1. + See 8.7 of JISX0510:2004 (p.38) for how to embed data bits. + + The data bits. + The mask pattern. + The matrix. + + + + Return the position of the most significant bit set (to one) in the "value". The most + significant bit is position 32. If there is no bit set, return 0. Examples: + - findMSBSet(0) => 0 + - findMSBSet(1) => 1 + - findMSBSet(255) => 8 + + The value_ renamed. + + + + + Calculate BCH (Bose-Chaudhuri-Hocquenghem) code for "value" using polynomial "poly". The BCH + code is used for encoding type information and version information. + Example: Calculation of version information of 7. + f(x) is created from 7. + - 7 = 000111 in 6 bits + - f(x) = x^2 + x^2 + x^1 + g(x) is given by the standard (p. 67) + - g(x) = x^12 + x^11 + x^10 + x^9 + x^8 + x^5 + x^2 + 1 + Multiply f(x) by x^(18 - 6) + - f'(x) = f(x) * x^(18 - 6) + - f'(x) = x^14 + x^13 + x^12 + Calculate the remainder of f'(x) / g(x) + x^2 + __________________________________________________ + g(x) )x^14 + x^13 + x^12 + x^14 + x^13 + x^12 + x^11 + x^10 + x^7 + x^4 + x^2 + -------------------------------------------------- + x^11 + x^10 + x^7 + x^4 + x^2 + + The remainder is x^11 + x^10 + x^7 + x^4 + x^2 + Encode it in binary: 110010010100 + The return value is 0xc94 (1100 1001 0100) + + Since all coefficients in the polynomials are 1 or 0, we can do the calculation by bit + operations. We don't care if coefficients are positive or negative. + + The value. + The poly. + + + + + Make bit vector of type information. On success, store the result in "bits" and return true. + Encode error correction level and mask pattern. See 8.9 of + JISX0510:2004 (p.45) for details. + + The ec level. + The mask pattern. + The bits. + + + + Make bit vector of version information. On success, store the result in "bits" and return true. + See 8.10 of JISX0510:2004 (p.45) for details. + + The version. + The bits. + + + + Check if "value" is empty. + + The value. + + true if the specified value is empty; otherwise, false. + + + + + Embed the lonely dark dot at left bottom corner. JISX0510:2004 (p.46) + + The matrix. + + + + + + The x start. + The y start. + The matrix. + + + + Embed position detection patterns and surrounding vertical/horizontal separators. + + The matrix. + + + + Embed position adjustment patterns if need be. + + The version. + The matrix. + + + +

Encapsulates logic that can detect a QR Code in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + +

Detects a QR Code in an image.

+
+ + encapsulating results of detecting a QR Code + +
+ + +

Detects a QR Code in an image.

+
+ optional hints to detector + + encapsulating results of detecting a QR Code + +
+ + + Processes the finder pattern info. + + The info. + + + +

Computes the dimension (number of modules on a size) of the QR Code based on the position + of the finder patterns and estimated module size.

+
+
+ + +

Computes an average estimated module size based on estimated derived from the positions + of the three finder patterns.

+
+ detected top-left finder pattern center + detected top-right finder pattern center + detected bottom-left finder pattern center + estimated module size +
+ +

Estimates module size based on two finder patterns -- it uses + {@link #sizeOfBlackWhiteBlackRunBothWays(int, int, int, int)} to figure the + width of each, measuring along the axis between their centers.

+
+
+ + See {@link #sizeOfBlackWhiteBlackRun(int, int, int, int)}; computes the total width of + a finder pattern by looking for a black-white-black run from the center in the direction + of another point (another finder pattern center), and in the opposite direction too. + + + +

This method traces a line from a point in the image, in the direction towards another point. + It begins in a black region, and keeps going until it finds white, then black, then white again. + It reports the distance from the start to this point.

+ +

This is used when figuring out how wide a finder pattern is, when the finder pattern + may be skewed or rotated.

+
+
+ + +

Attempts to locate an alignment pattern in a limited region of the image, which is + guessed to contain it. This method uses {@link AlignmentPattern}.

+
+ estimated module size so far + x coordinate of center of area probably containing alignment pattern + y coordinate of above + number of pixels in all directions to search from the center + + if found, or null otherwise + +
+ + + Gets the image. + + + + + Gets the result point callback. + + + + + Meta-data container for QR Code decoding. Instances of this class may be used to convey information back to the + decoding caller. Callers are expected to process this. + + + + + Initializes a new instance of the class. + + if set to true [mirrored]. + + + + Apply the result points' order correction due to mirroring. + + Array of points to apply mirror correction to. + + + + true if the QR Code was mirrored. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + This object renders a CODE93 code as a BitMatrix + + + + + + output to append to + start position + pattern to append + unused + 9 + + + +

Decodes Code 93 barcodes.

+ Sean Owen + +
+
+ + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +

In contrast to , this class will return an array of all possible + QR code locations in the image.

+ +

Use the TRY_HARDER hint to ask for a more thorough detection.

+ + Sean Owen + Hannes Erven +
+
+ + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF pixels/module in their + estimated modules sizes. + + + + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF_PERCENT percent in their + estimated modules sizes. + + + + +

Creates a finder that will search the image for three finder patterns.

+ + image to search +
+
+ + + + the 3 best s from our list of candidates. The "best" are + those that have been detected at least CENTER_QUORUM times, and whose module + size differs from the average among those patterns the least + + + + + A comparator that orders FinderPatterns by their estimated module size. + + + + +

MaxiCodes can encode text or structured information as bits in one of several modes, + with multiple character sets in one code. This class decodes the bits back into text.

+ + mike32767 + Manuel Kasten +
+
+ + + Defines an container for encoder options + + + + + Initializes a new instance of the class. + + + + + Gets the data container for all options + + + + + event is raised when a value is changed + + + + + Gets or sets a flag which cause a deeper look into the bitmap + + + true if [try harder]; otherwise, false. + + + + + Image is a pure monochrome image of a barcode. + + + true if monochrome image of a barcode; otherwise, false. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + The character set. + + + + + Image is known to be of one of a few possible formats. + Maps to a {@link java.util.List} of {@link BarcodeFormat}s. + + + The possible formats. + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + true if it should assume a Code 39 check digit; otherwise, false. + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). + + + true if it should assume GS1; otherwise, false. + + + + + Assume MSI codes employ a check digit. Maps to . + + + true if it should assume a MSI check digit; otherwise, false. + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + .NET 2.0 class for handling of very large integers, up to 10240 binary digits or + approximately (safe to use) 3000 decimal digits. + + + + + 2^16 numeration base for internal computations, in order to benefit the most from the + 32 bit (or 64 bit) integer processor registers. + + + + + Maximum size for numbers is up to 10240 binary digits or approximately (safe to use) 3000 decimal digits. + The maximum size is, in fact, double the previously specified amount, in order to accommodate operations's + overflow. + + + + + Ratio for the convertion of a BigInteger's size to a binary digits size. + + + + Integer constants + + + + The array of digits of the number. + + + + + The actual number of digits of the number. + + + + + The number sign. + + + + + Default constructor, intializing the BigInteger with zero. + + + + + Constructor creating a new BigInteger as a conversion of a regular base-10 long. + + The base-10 long to be converted + + + + Constructor creating a new BigInteger as a copy of an existing BigInteger. + + The BigInteger to be copied + + + + Constructor creating a BigInteger instance out of a base-10 formatted string. + + The base-10 formatted string. + Invalid numeric string exception + + + + Constructor creating a positive BigInteger by extracting it's digits from a given byte array. + + The byte array + The byte array's content exceeds the maximum size of a BigInteger + exception + + + + Determines whether the specified BigInteger is equal to the current BigInteger. + + The BigInteger to compare with the current BigInteger + True if the specified BigInteger is equal to the current BigInteger, + false otherwise + + + + Determines whether the specified System.Object is equal to the current BigInteger. + + The System.Object to compare with the current BigInteger + True if the specified System.Object is equal to the current BigInteger, + false otherwise + + + + Serves as a hash function for the BigInteger type. + + A hash code for the current BigInteger + + + + String representation of the current BigInteger, converted to its base-10 representation. + + The string representation of the current BigInteger + + + + Parses the number given by a string + + the number as a string + + + + + Compares this instance to a specified BigInteger. + + The BigInteger to compare this instance with + -1 if the current instance is smaller than the given BigInteger, + 0 if the two are equal, 1 otherwise + + + + Compares this instance to a specified object. + + The object to compare this instance with + -1 if the current instance is smaller than the given object, + 0 if the two are equal, 1 otherwise + obj is not a BigInteger exception + + + + Returns a BigInteger's size in binary digits. + + The BigInteger whose size in binary digits is to be determined + The BigInteger's size in binary digits + + + + BigInteger inverse with respect to addition. + + The BigInteger whose opposite is to be computed + The BigInteger inverse with respect to addition + + + + Greater test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a > b, false otherwise + + + + Greater or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a >= b, false otherwise + + + + Smaller test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a < b, false otherwise + + + + Smaller or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a <= b, false otherwise + + + + Computes the absolute value of a BigInteger. + + The BigInteger whose absolute value is to be computed + The absolute value of the given BigInteger + + + + Addition operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the addition + + + + Subtraction operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the subtraction + + + + Multiplication operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the multiplication + + + + Division operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the division + Cannot divide by zero exception + + + + Modulo operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the modulo + Cannot divide by zero exception + + + + Returns the power of a BigInteger base to a non-negative exponent by using the + fast exponentiation algorithm (right to left binary exponentiation). + + The BigInteger base + The non-negative exponent + The power of the BigInteger base to the non-negative exponent + Cannot raise a BigInteger to a negative power exception. + + + + Integer square root of the given BigInteger using Newton's numeric method. + + The BigInteger whose integer square root is to be computed + The integer square root of the given BigInteger + Cannot compute the integer square root of a negative number exception + + + + Euclidean algorithm for computing the greatest common divisor of two non-negative BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The greatest common divisor of the two given BigIntegers + Cannot compute the Gcd of negative BigIntegers exception + + + + Extended Euclidian Gcd algorithm, returning the greatest common divisor of two non-negative BigIntegers, + while also providing u and v, where: a*u + b*v = gcd(a,b). + + The 1st BigInteger + The 2nd BigInteger + Output BigInteger parameter, where a*u + b*v = gcd(a,b) + Output BigInteger parameter, where a*u + b*v = gcd(a,b) + The greatest common divisor of the two given BigIntegers + Cannot compute the Gcd of negative BigIntegers exception + + + + Computes the modular inverse of a given BigInteger. + + The non-zero BigInteger whose inverse is to be computed + The BigInteger modulus, which must be greater than or equal to 2 + The BigInteger equal to a^(-1) mod n + Invalid number or modulus exception + + + + Returns the power of a BigInteger to a non-negative exponent modulo n, by using the + fast exponentiation algorithm (right to left binary exponentiation) and modulo optimizations. + + The BigInteger base + The non-negative exponent + The modulus, which must be greater than or equal to 2 + The power of the BigInteger to the non-negative exponent + Invalid exponent or modulus exception + + + + Implicit conversion operator from long to BigInteger. + + The long to be converted to a BigInteger + The BigInteger converted from the given long + + + + Implicit conversion operator from int to BigInteger. + + The int to be converted to a BigInteger + The BigInteger converted from the given int + + + + Equality test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a == b, false otherwise + + + + Inequality test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a != b, false otherwise + + + + Greater test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a > b, false otherwise + + + + Smaller test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a < b, false otherwise + + + + Greater or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a >= b, false otherwise + + + + Smaller or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a <= b, false otherwise + + + + BigInteger inverse with respect to addition. + + The BigInteger whose opposite is to be computed + The BigInteger inverse with respect to addition + + + + Addition operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the addition + + + + Subtraction operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the subtraction + + + + Multiplication operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the multiplication + + + + Division operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the division + Cannot divide by zero exception + + + + Modulo operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the modulo + Cannot divide by zero exception + + + + Incremetation by one operation of a BigInteger. + + The BigInteger to be incremented by one + The BigInteger result of incrementing by one + + + + Decremetation by one operation of a BigInteger. + + The BigInteger to be decremented by one + The BigInteger result of decrementing by one + + + + Adds two BigNumbers a and b, where a >= b, a, b non-negative. + + + + + Subtracts the BigInteger b from the BigInteger a, where a >= b, a, b non-negative. + + + + + Multiplies two BigIntegers. + + + + + Divides a BigInteger by a one-digit int. + + + + + Divides a BigInteger by another BigInteger. + + + + + DivideByBigNumber auxiliary method. + + + + + DivideByBigNumber auxilary method. + + + + + DivideByBigNumber auxilary method. + + + + + Detects a result that is likely a vehicle identification number. + @author Sean Owen + + + +

QR Codes can encode text as bits in one of several modes, and can use multiple modes + in one QR Code. This class decodes the bits back into text.

+ +

See ISO 18004:2006, 6.4.3 - 6.4.7

+ Sean Owen +
+
+ + + See ISO 18004:2006, 6.4.4 Table 5 + + + + + See specification GBT 18284-2000 + + The bits. + The result. + The count. + + + +

Encapsulates a block of data within a QR Code. QR Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

When QR Codes use multiple data blocks, they are actually interleaved. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ +
+ bytes as read directly from the QR Code + + version of the QR Code + + error-correction level of the QR Code + + {@link DataBlock}s containing original bytes, "de-interleaved" from representation in the + QR Code + +
+ + + + + Guenther Grau + + + + Returns the DetectionResult Columns. This does a fair bit of calculation, so call it sparingly. + + The detection result columns. + + + + Adjusts the indicator column row numbers. + + Detection result column. + + + + return number of codewords which don't have a valid row number. Note that the count is not accurate as codewords . + will be counted several times. It just serves as an indicator to see when we can stop adjusting row numbers + + The row numbers. + + + + Adjusts the row numbers by row. + + The row numbers by row. + + + + Adjusts the row numbers from both Row Indicators + + zero + + + + Adjusts the row numbers from Right Row Indicator. + + The unadjusted row count. + + + + Adjusts the row numbers from Left Row Indicator. + + Unadjusted row Count. + + + + Adjusts the row number if valid. + + The invalid rows + Row indicator row number. + Invalid row counts. + Codeword. + + + + Adjusts the row numbers. + + Barcode column. + Codewords row. + Codewords. + + + + Adjusts the row number. + + true, if row number was adjusted, false otherwise. + Codeword. + Other codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + +

Attempts to locate multiple barcodes in an image by repeatedly decoding portion of the image. + After one barcode is found, the areas left, above, right and below the barcode's + {@link com.google.zxing.ResultPoint}s are scanned, recursively.

+

A caller may want to also employ {@link ByQuadrantReader} when attempting to find multiple + 2D barcodes, like QR Codes, in an image, where the presence of multiple barcodes might prevent + detecting any one of them.

+

That is, instead of passing a {@link Reader} a caller might pass + new ByQuadrantReader(reader).

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The @delegate. + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Thrown when a barcode was successfully detected, but some aspect of + the content did not conform to the barcode's format rules. This could have + been due to a mis-detection. + Sean Owen + + + + + + + + + + + + + + + + + + + + + + + + +

Parses an "smsto:" URI result, whose format is not standardized but appears to be like: + {@code smsto:number(:body)}.

+

This actually also parses URIs starting with "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+
+ Sean Owen +
+ + + Represents a parsed result that encodes an SMS message, including recipients, subject and body text. + + Sean Owen + + + + The class holds the available options for the + + + + + Representing the minimal percentage of error correction words. + Note: an Aztec symbol should have a minimum of 25% EC words. + + + + + Specifies the required number of layers for an Aztec code: + a negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + a positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + + + + + The main class which implements Aztec Code decoding -- as opposed to locating and extracting + the Aztec Code from an image. + + David Olivier + + + + Decodes the specified detector result. + + The detector result. + + + + + This method is used for testing the high-level encoder + + + + + + + Gets the string encoded in the aztec code bits + + The corrected bits. + the decoded string + + + + gets the table corresponding to the char passed + + The t. + + + + + Gets the character (or string) corresponding to the passed code in the given table + + the table used + the code of the character + + + + + Performs RS error correction on an array of bits. + + The rawbits. + the corrected array + + + + Gets the array of bits from an Aztec Code matrix + + The matrix. + the array of bits + + + + Reads a code of given length and at given index in an array of bits + + The rawbits. + The start index. + The length. + + + + + Reads a code of length 8 in an array of bits, padding with zeros + + + + + + + + Packs a bit array into bytes, most significant bit first + + + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + This class attempts to decode a barcode from an image, not by scanning the whole image, + but by scanning subsets of the image. This is important when there may be multiple barcodes in + an image, and detecting a barcode may find parts of multiple barcode and fail to decode + (e.g. QR Codes). Instead this scans the four quadrants of the image -- and also the center + 'quadrant' to cover the case where a barcode is found in the center. + + + + + + Initializes a new instance of the class. + + The @delegate. + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

The main class which implements MaxiCode decoding -- as opposed to locating and extracting + the MaxiCode from an image.

+ + Manuel Kasten +
+
+ + + Implements the "MATMSG" email message entry format. + + Supported keys: TO, SUB, BODY + + Sean Owen + + + + This implements only the most basic checking for an email address's validity -- that it contains + an '@' and contains no characters disallowed by RFC 2822. This is an overly lenient definition of + validity. We want to generally be lenient here since this class is only intended to encapsulate what's + in a barcode, not "judge" it. + + The email. + + true if it is basically a valid email address; otherwise, false. + + + + + Renders a barcode into a Svg image + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Gets or sets the foreground color. + + The foreground color. + + + + Gets or sets the background color. + + The background color. + + + + Gets or sets the font family name + + The font family name. + + + + Gets or sets the font size in pixel + + The font size in pixel. + + + + Represents a barcode as a Svg image + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The content. + + + + Gives the XML representation of the SVG image + + + + + Gets or sets the content. + + + The content. + + + + + The original height of the bitmatrix for the barcode + + + + + The original width of the bitmatrix for the barcode + + + + + Renders a to an byte array with pixel data (4 byte per pixel, BGRA) + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + +

PDF417 error correction implementation.

+

This example + is quite useful in understanding the algorithm.

+ Sean Owen + +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the specified received. + + received codewords + number of those codewords used for EC + location of erasures + The error locations count. + + + + + Runs the euclidean algorithm (Greatest Common Divisor) until r's degree is less than R/2 + + The euclidean algorithm. + + + + Finds the error locations as a direct application of Chien's search + + The error locations. + Error locator. + + + + Finds the error magnitudes by directly applying Forney's Formula + + The error magnitudes. + Error evaluator. + Error locator. + Error locations. + + + + This object renders a UPC-A code as a . + qwandor@google.com (Andrew Walbran) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + +

Implements decoding of the UPC-A format.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen +
+
+ + +

Like decodeRow(int, BitArray, java.util.Map), but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ + + + + +
+ + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Decodes the specified image. + + The image. + The hints. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + Get the format of this decoder. + The 1D format. + + + + + Enumeration for DataMatrix symbol shape hint. It can be used to force square or rectangular + symbols. + + + + + The Version object encapsulates attributes about a particular + size Data Matrix Code. + + bbrown@google.com (Brian Brown) + + + + + returns the version numer + + + + + + returns the symbol size rows + + + + + + returns the symbols size columns + + + + + + retursn the data region size rows + + + + + + returns the data region size columns + + + + + + returns the total codewords count + + + + + +

Deduces version information from Data Matrix dimensions.

+ + Number of rows in modules + Number of columns in modules + Version for a Data Matrix Code of those dimensions + if dimensions do correspond to a valid Data Matrix size +
+
+ + + returns the version number as string + + + + + + See ISO 16022:2006 5.5.1 Table 7 + + + + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the Data Matrix code version's format.

+
+
+ +

Implements Reed-Solomon decoding, as the name implies.

+ +

The algorithm will not be explained here, but the following references were helpful + in creating this implementation:

+ + + +

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+ +
+ Sean Owen + William Rucklidge + sanfordsquires +
+ + +

Decodes given set of received codewords, which include both data and error-correction + codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place, + in the input.

+
+ data and error-correction codewords + number of error-correction codewords available + false: decoding fails +
+ + + Partially implements the iCalendar format's "VEVENT" format for specifying a + calendar event. See RFC 2445. This supports SUMMARY, DTSTART and DTEND fields. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Parses contact information formatted according to the VCard (2.1) format. This is not a complete + implementation but should parse information as commonly encoded in 2D barcodes. + + Sean Owen + + + Formats name fields of the form "Public;John;Q.;Reverend;III" into a form like + "Reverend John Q. Public III". + + @param names name values to format, in place + + + + Represents a result that encodes an e-mail address, either as a plain address + like "joe@example.org" or a mailto: URL like "mailto:joe@example.org". + + Sean Owen + + + Implements the "BIZCARD" address book entry format, though this has been + largely reverse-engineered from examples observed in the wild -- still + looking for a definitive reference. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Attribute is only for source code compatibility issues + + + + +

Encapsulates information about finder patterns in an image, including the location of + the three finder patterns, and their estimated module size.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The pattern centers. + + + + Gets the bottom left. + + + + + Gets the top left. + + + + + Gets the top right. + + + + + See ISO 18004:2006 Annex D + + Sean Owen + + + See ISO 18004:2006 Annex D. + Element i represents the raw version bits that specify version i + 7 + + + + + Gets the EC blocks for level. + + The ec level. + + + +

Deduces version information purely from QR Code dimensions.

+ +
+ dimension in modules + + for a QR Code of that dimension or null +
+ + + Gets the version for number. + + The version number. + + + + See ISO 18004:2006 Annex E + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + See ISO 18004:2006 6.5.1 Table 9 + + + + Gets the version number. + + + + + Gets the alignment pattern centers. + + + + + Gets the total codewords. + + + + + Gets the dimension for version. + + + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + + Gets the EC blocks. + + + + + + Gets the EC codewords per block. + + + + + Gets the num blocks. + + + + + Gets the total EC codewords. + + + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the QR code version's format.

+
+
+ + + Gets the count. + + + + + Gets the data codewords. + + + + +

See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which + data can be encoded to bits in the QR code standard.

+
+ Sean Owen +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See GBT 18284-2000; "Hanzi" is a transliteration of this mode name. + + + + Fors the bits. + + four bits encoding a QR Code data mode + + encoded by these bits + + if bits do not correspond to a known mode + + + version in question + + number of bits used, in this QR Code symbol {@link Version}, to encode the + count of characters that will follow encoded in this {@link Mode} + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Gets the name. + + + + + Gets the bits. + + + + + enumeration for encoding modes + + + + + + + + + + numeric encoding + + + + + alpha-numeric encoding + + + + + structured append + + + + + byte mode encoding + + + + + ECI segment + + + + + Kanji mode + + + + + FNC1 char, first position + + + + + FNC1 char, second position + + + + + Hanzi mode + + + + + Top-level class for the logic part of the PDF417 implementation. + + + + + The start pattern (17 bits) + + + + + The stop pattern (18 bits) + + + + + The codeword table from the Annex A of ISO/IEC 15438:2001(E). + + + + + Calculates the necessary number of rows as described in annex Q of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol (r) + + + + Calculates the number of pad codewords as described in 4.9.2 of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol + the number of pad codewords + + + + Generates the barcode logic. + + the message to encode + PDF417 error correction level to use + + + + Determine optimal nr of columns and rows for the specified number of + codewords. + + number of code words + number of error correction code words + The longest dimension of the barcode, used for columns + The short dimension of the barcode, used for rows + The height of a row, will alter this parameter if aspectRatio>4 (aspectRatio==AUTO) + dimension object containing cols as width and rows as height + + + + Sets max/min row/col values + + maximum allowed columns + minimum allowed columns + maximum allowed rows + minimum allowed rows + + + + Sets compaction to values stored in enum + + compaction mode to use + + + + Sets compact to be true or false + + if true, enables compaction + + + + Sets output encoding. + + sets character encoding to use + + + + Sets the disable eci. + + if set to true don't add an ECI segment for different encodings than default. + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + +

A reader that can read all available UPC/EAN formats. If a caller wants to try to + read all such formats, it is most efficient to use this implementation rather than invoke + individual readers.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Records EAN prefix to GS1 Member Organization, where the member organization + correlates strongly with a country. This is an imperfect means of identifying + a country of origin by EAN-13 barcode value. See + + http://en.wikipedia.org/wiki/List_of_GS1_country_codes. + + Sean Owen + + + + +

Encapsulates logic that can detect one or more QR Codes in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+ + Sean Owen + Hannes Erven +
+
+ + + Initializes a new instance of the class. + + The image. + + + + Detects the multi. + + The hints. + + + + + BigInteger-related exception class. + + + + + BigIntegerException constructor. + + The exception message + The inner exception + + + + Represents a parsed result that encodes a telephone number. + + Sean Owen + + + + Represents a parsed result that encodes contact information, like that in an address book entry. + + Sean Owen + + + + initializing constructor + + + + + + + + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + the names + + + + + the nicknames + + + + + In Japanese, the name is written in kanji, which can have multiple readings. Therefore a hint + is often provided, called furigana, which spells the name phonetically. + + The pronunciation of the getNames() field, often in hiragana or katakana. + + + + the phone numbers + + + + optional descriptions of the type of each phone number. It could be like "HOME", but, + there is no guaranteed or standard format. + + + + the e-mail addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the instant messenger addresses + + + + + the note field + + + + + the addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the title + + + + + the urls + + + + birthday formatted as yyyyMMdd (e.g. 19780917) + + + a location as a latitude/longitude pair + +
+
diff --git a/packages/ZXing.Net.0.16.4/lib/sl4/zxing.sl4.dll b/packages/ZXing.Net.0.16.4/lib/sl4/zxing.sl4.dll new file mode 100644 index 0000000..4dc5259 Binary files /dev/null and b/packages/ZXing.Net.0.16.4/lib/sl4/zxing.sl4.dll differ diff --git a/packages/ZXing.Net.0.16.4/lib/sl5/zxing.sl5.XML b/packages/ZXing.Net.0.16.4/lib/sl5/zxing.sl5.XML new file mode 100644 index 0000000..71591a3 --- /dev/null +++ b/packages/ZXing.Net.0.16.4/lib/sl5/zxing.sl5.XML @@ -0,0 +1,10980 @@ + + + + zxing.sl5 + + + + + Extends with more information specific to the Aztec format, + like the number of layers and whether it's compact. + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + Initializes a new instance of the class. + + The bits. + The points. + if set to true [compact]. + The nb datablocks. + The nb layers. + + + + The main class which implements Aztec Code decoding -- as opposed to locating and extracting + the Aztec Code from an image. + + David Olivier + + + + Decodes the specified detector result. + + The detector result. + + + + + This method is used for testing the high-level encoder + + + + + + + Gets the string encoded in the aztec code bits + + The corrected bits. + the decoded string + + + + gets the table corresponding to the char passed + + The t. + + + + + Gets the character (or string) corresponding to the passed code in the given table + + the table used + the code of the character + + + + + Performs RS error correction on an array of bits. + + The rawbits. + the corrected array + + + + Gets the array of bits from an Aztec Code matrix + + The matrix. + the array of bits + + + + Reads a code of given length and at given index in an array of bits + + The rawbits. + The start index. + The length. + + + + + Reads a code of length 8 in an array of bits, padding with zeros + + + + + + + + Packs a bit array into bytes, most significant bit first + + + + + + + Encapsulates logic that can detect an Aztec Code in an image, even if the Aztec Code + is rotated or skewed, or partially obscured. + + David Olivier + + + + Initializes a new instance of the class. + + The image. + + + + Detects an Aztec Code in an image. + + + + + Detects an Aztec Code in an image. + + if true, image is a mirror-image of original. + + encapsulating results of detecting an Aztec Code + + + + + Extracts the number of data layers and data blocks from the layer around the bull's eye + + bullEyeCornerPoints the array of bull's eye corners + + + + + Corrects the parameter bits using Reed-Solomon algorithm + + paremeter bits + compact true if this is a compact Aztec code + + + + + Finds the corners of a bull-eye centered on the passed point + This returns the centers of the diagonal points just outside the bull's eye + Returns [topRight, bottomRight, bottomLeft, topLeft] + + Center point + The corners of the bull-eye + + + + Finds a candidate center point of an Aztec code from an image + + the center point + + + + Gets the Aztec code corners from the bull's eye corners and the parameters. + + the array of bull's eye corners + the array of aztec code corners + + + + Creates a BitMatrix by sampling the provided image. + topLeft, topRight, bottomRight, and bottomLeft are the centers of the squares on the + diagonal just outside the bull's eye. + + The image. + The top left. + The bottom left. + The bottom right. + The top right. + + + + + Samples a line + + start point (inclusive) + end point (exclusive) + number of bits + the array of bits as an int (first bit is high-order bit of result) + + + + Determines whether [is white or black rectangle] [the specified p1]. + + The p1. + The p2. + The p3. + The p4. + true if the border of the rectangle passed in parameter is compound of white points only + or black points only + + + + Gets the color of a segment + + The p1. + The p2. + 1 if segment more than 90% black, -1 if segment is more than 90% white, 0 else + + + + Gets the coordinate of the first point with a different color in the given direction + + The init. + if set to true [color]. + The dx. + The dy. + + + + + Expand the square represented by the corner points by pushing out equally in all directions + + the corners of the square, which has the bull's eye at its center + the original length of the side of the square in the target bit matrix + the new length of the size of the square in the target bit matrix + the corners of the expanded square + + + + Aztec 2D code representation + + Rustam Abdullaev + + + + Compact or full symbol indicator + + + + + Size in pixels (width and height) + + + + + Number of levels + + + + + Number of data codewords + + + + + The symbol image + + + + + represents a token for a binary shift + + + + + initializing constructor + + + + + + + + appends the byte array to the BitArray + + + + + + + string representation + + + + + + Generates Aztec 2D barcodes. + + Rustam Abdullaev + + + + Encodes the given binary content as an Aztec symbol + + input data string + Aztec symbol matrix with metadata + + + + Encodes the given binary content as an Aztec symbol + + input data string + minimal percentage of error check words (According to ISO/IEC 24778:2008, + a minimum of 23% + 3 words is recommended) + if non-zero, a user-specified value for the number of layers + + Aztec symbol matrix with metadata + + + + + This produces nearly optimal encodings of text into the first-level of + encoding used by Aztec code. + It uses a dynamic algorithm. For each prefix of the string, it determines + a set of encodings that could lead to this prefix. We repeatedly add a + character and generate a new set of optimal encodings until we have read + through the entire input. + @author Frank Yellin + @author Rustam Abdullaev + + + + + + + + + + + Convert the text represented by this High Level Encoder into a BitArray. + + text represented by this encoder encoded as a + + + + State represents all information about a sequence necessary to generate the current output. + Note that a state is immutable. + + + + + Create a new state representing this state with a latch to a (not + necessary different) mode, and then a code. + + + + + Create a new state representing this state, with a temporary shift + to a different mode to output a single value. + + + + + Create a new state representing this state, but an additional character + output in Binary Shift mode. + + + + + Create the state identical to this one, but we are no longer in + Binary Shift mode. + + + + + Returns true if "this" state is better (or equal) to be in than "that" + state under all possible circumstances. + + + + + This implementation can detect and decode Aztec codes in an image. + + David Olivier + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + a String representing the content encoded by the Data Matrix code + + + + + Locates and decodes a Data Matrix code in an image. + + image of barcode to decode + passed as a {@link java.util.Hashtable} from {@link com.google.zxing.DecodeHintType} + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Aztec result meta data. + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + + + + + + + + + Renders an Aztec code as a + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + The class holds the available options for the + + + + + Representing the minimal percentage of error correction words. + Note: an Aztec symbol should have a minimum of 25% EC words. + + + + + Specifies the required number of layers for an Aztec code: + a negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + a positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + + + + + Enumerates barcode formats known to this package. + + Sean Owen + + + Aztec 2D barcode format. + + + CODABAR 1D format. + + + Code 39 1D format. + + + Code 93 1D format. + + + Code 128 1D format. + + + Data Matrix 2D barcode format. + + + EAN-8 1D format. + + + EAN-13 1D format. + + + ITF (Interleaved Two of Five) 1D format. + + + MaxiCode 2D barcode format. + + + PDF417 format. + + + QR Code 2D barcode format. + + + RSS 14 + + + RSS EXPANDED + + + UPC-A 1D format. + + + UPC-E 1D format. + + + UPC/EAN extension format. Not a stand-alone format. + + + MSI + + + Plessey + + + Intelligent Mail barcode + + + + UPC_A | UPC_E | EAN_13 | EAN_8 | CODABAR | CODE_39 | CODE_93 | CODE_128 | ITF | RSS_14 | RSS_EXPANDED + without MSI (to many false-positives) and IMB (not enough tested, and it looks more like a 2D) + + + + + A smart class to decode the barcode inside a bitmap object + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + A smart class to decode the barcode inside a bitmap object + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Constructor for additional image formats for one BarcodeReader class + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Optional: Gets or sets the function to create a luminance source object for a bitmap. + If null a platform specific default LuminanceSource is used + + + The function to create a luminance source object. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + A smart class to decode the barcode inside a bitmap object + + + + + represents the default function which is called to get a instance from a raw byte array + + + + + Gets or sets the options. + + + The options. + + + + + Gets the reader which should be used to find and decode the barcode. + + + The reader. + + + + + Gets or sets a method which is called if an important point is found + + + The result point callback. + + + + + event is executed if a result was found via decode + + + + + Gets or sets a value indicating whether the image should be automatically rotated. + Rotation is supported for 90, 180 and 270 degrees + + + true if image should be rotated; otherwise, false. + + + + + Gets or sets a value indicating whether the image should be automatically inverted + if no result is found in the original image. + ATTENTION: Please be carefully because it slows down the decoding process if it is used + + + true if image should be inverted; otherwise, false. + + + + + Optional: Gets or sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + The function to create a binarizer object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb array. + If null the RGBLuminanceSource is used. The handler is only called when Decode with a byte[] array is called. + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + raises the ResultFound event + + + + + + raises the ResultFound event + + + + + + calls the explicitResultPointFound action + + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + A smart class to encode some content to raw pixel data + + + + + Initializes a new instance of the class. + + + + + A smart class to encode some content to a svg barcode image + + + + + Initializes a new instance of the class. + + + + + A smart class to encode some content to a barcode image + + + + + Initializes a new instance of the class. + + + + + A base class for specific barcode writers with specific formats of barcode images. + + The type of the output. + + + + Gets or sets the renderer which should be used to render the encoded BitMatrix. + + + + + Encodes the specified contents and returns a rendered instance of the barcode. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The matrix. + + + + + A base class for specific barcode writers with specific formats of barcode images. + + + + + Gets or sets the barcode format. + The value is only suitable if the MultiFormatWriter is used. + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + + + + + + + + + + + + Encodes the specified contents and returns a BitMatrix array. + That array has to be rendered manually or with a IBarcodeRenderer. + + The contents. + + + + + The base class for luminance sources which supports + cropping and rotating based upon the luminance values. + + + + + weight of the red channel for calculating a gray scale image + + + + + weight of the green channel for calculating a gray scale image + + + + + weight of the blue channel for calculating a gray scale image + + + + + numbers of bits which for right shifting + + + + + + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + + The luminance array. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + gets the luminance matrix + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + TODO: not implemented yet + + + A rotated version of this object. + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + + Whether this subclass supports cropping. + + + + + Whether this subclass supports invertion. + + + + Inverts the luminance values (newValue = 255 - oldValue) + + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + This class hierarchy provides a set of methods to convert luminance data to 1 bit data. + It allows the algorithm to vary polymorphically, for example allowing a very expensive + thresholding technique for servers and a fast one for mobile. It also permits the implementation + to vary, e.g. a JNI version for Android and a Java fallback version for other platforms. + + dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The source. + + + + Gets the luminance source object. + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + For callers which only examine one row of pixels at a time, the same BitArray should be reused + and passed in with each call for performance. However it is legal to keep more than one row + at a time if needed. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + Converts a 2D array of luminance data to 1 bit data. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + A new concrete Binarizer implementation object. + + + + Gets the width of the luminance source object. + + + + + Gets the height of the luminance source object. + + + + + This class is the core bitmap class used by ZXing to represent 1 bit data. Reader objects + accept a BinaryBitmap and attempt to decode it. + + dswitkin@google.com (Daniel Switkin) + + + + + + + + + + The width of the bitmap. + + + + + The height of the bitmap. + + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + + The row to fetch, which must be in [0, bitmap height). + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + + Converts a 2D array of luminance data to 1 bit. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + + Whether this bitmap can be cropped. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if isCropSupported() is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + + Whether this bitmap supports counter-clockwise rotation. + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + +

See + + DoCoMo's documentation about the result types represented by subclasses of this class.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + Implements KDDI AU's address book format. See + + http://www.au.kddi.com/ezfactory/tec/two_dimensions/index.html. + (Thanks to Yuzo for translating!) + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Implements the "MECARD" address book entry format. + + Supported keys: N, SOUND, TEL, EMAIL, NOTE, ADR, BDAY, URL, plus ORG + Unsupported keys: TEL-AV, NICKNAME + + Except for TEL, multiple values for keys are also not supported; + the first one found takes precedence. + + Our understanding of the MECARD format is based on this document: + + http://www.mobicode.org.tw/files/OMIA%20Mobile%20Bar%20Code%20Standard%20v3.2.1.doc + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes contact information, like that in an address book entry. + + Sean Owen + + + + initializing constructor + + + + + + + + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + the names + + + + + the nicknames + + + + + In Japanese, the name is written in kanji, which can have multiple readings. Therefore a hint + is often provided, called furigana, which spells the name phonetically. + + The pronunciation of the getNames() field, often in hiragana or katakana. + + + + the phone numbers + + + + optional descriptions of the type of each phone number. It could be like "HOME", but, + there is no guaranteed or standard format. + + + + the e-mail addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the instant messenger addresses + + + + + the note field + + + + + the addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the title + + + + + the urls + + + + birthday formatted as yyyyMMdd (e.g. 19780917) + + + a location as a latitude/longitude pair + + + Implements the "BIZCARD" address book entry format, though this has been + largely reverse-engineered from examples observed in the wild -- still + looking for a definitive reference. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a calendar event at a certain time, optionally with attendees and a location. + + Sean Owen + + + + Gets the start. + + + + + Determines whether [is start all day]. + + if start time was specified as a whole day + + + + event end , or null if event has no duration + + + + + Gets a value indicating whether this instance is end all day. + + true if end time was specified as a whole day + + + + Parses a string as a date. RFC 2445 allows the start and end fields to be of type DATE (e.g. 20081021) + or DATE-TIME (e.g. 20081021T123000 for local time, or 20081021T123000Z for UTC). + + The string to parse + + if not a date formatted string + + + + Represents a parsed result that encodes an email message including recipients, subject and body text. + + Sean Owen + + + + the email address + + + + + the TOs + + + + + the CCs + + + + + the BCCs + + + + + the subject + + + + + the body + + + + + the mailto: uri + + + + + Represents a result that encodes an e-mail address, either as a plain address + like "joe@example.org" or a mailto: URL like "mailto:joe@example.org". + + Sean Owen + + + + Implements the "MATMSG" email message entry format. + + Supported keys: TO, SUB, BODY + + Sean Owen + + + + This implements only the most basic checking for an email address's validity -- that it contains + an '@' and contains no characters disallowed by RFC 2822. This is an overly lenient definition of + validity. We want to generally be lenient here since this class is only intended to encapsulate what's + in a barcode, not "judge" it. + + The email. + + true if it is basically a valid email address; otherwise, false. + + + + + Represents a parsed result that encodes extended product information as encoded by the RSS format, like weight, price, dates, etc. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + extension for kilogram weight type + + + + + extension for pounds weight type + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the raw text + + + + + the product id + + + + + the sscc + + + + + the lot number + + + + + the production date + + + + + the packaging date + + + + + the best before date + + + + + the expiration date + + + + + the weight + + + + + the weight type + + + + + the weight increment + + + + + the price + + + + + the price increment + + + + + the price currency + + + + + the uncommon AIs + + + + + the display representation (raw text) + + + + + Parses strings of digits that represent a RSS Extended code. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + tries to parse a text representation to a specific result object + + + + + + + Represents a parsed result that encodes a geographic coordinate, with latitude, longitude and altitude. + + Sean Owen + + + latitude in degrees + + + + longitude in degrees + + + + altitude in meters. If not specified, in the geo URI, returns 0.0 + + + + query string associated with geo URI or null if none exists + + + + the geo URI + + + + a URI link to Google Maps which display the point on the Earth described + by this instance, and sets the zoom level in a way that roughly reflects the + altitude, if specified + + + + Parses a "geo:" URI result, which specifies a location on the surface of + the Earth as well as an optional altitude above the surface. See + + http://tools.ietf.org/html/draft-mayrhofer-geo-uri-00. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a product ISBN number. + + jbreiden@google.com (Jeff Breidenbach) + + + + the ISBN number + + + + Parses strings of digits that represent a ISBN. + + + jbreiden@google.com (Jeff Breidenbach) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + See ISBN-13 For Dummies + + The result. + + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link ResultParser#parseResult(Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Represents the type of data encoded by a barcode -- from plain text, to a + URI, to an e-mail address, etc. + + Sean Owen + + + + Represents a parsed result that encodes a product by an identifier of some kind. + + dswitkin@google.com (Daniel Switkin) + + + + Parses strings of digits that represent a UPC code. + + dswitkin@google.com (Daniel Switkin) + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link #parseResult(com.google.zxing.Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Attempts to parse the raw {@link Result}'s contents as a particular type + of information (email, URL, etc.) and return a {@link ParsedResult} encapsulating + the result of parsing. + + the raw to parse + encapsulating the parsing result + + + + Parses the result. + + The result. + + + +

Parses an "sms:" URI result, which specifies a number to SMS and optional + "via" number. See + the IETF draft on this.

+ +

This actually also parses URIs starting with "mms:", "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + + Represents a parsed result that encodes an SMS message, including recipients, subject and body text. + + Sean Owen + + + +

Parses an "smsto:" URI result, whose format is not standardized but appears to be like: + {@code smsto:number(:body)}.

+

This actually also parses URIs starting with "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+
+ Sean Owen +
+ + +

Parses an "smtp:" URI result, whose format is not standardized but appears to be like: + smtp[:subject[:body]]}.

+

See http://code.google.com/p/zxing/issues/detail?id=536

+
+ Sean Owen +
+ + + Represents a parsed result that encodes a telephone number. + + Sean Owen + + + + Parses a "tel:" URI result, which specifies a phone number. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + A simple result type encapsulating a string that has no further interpretation. + + Sean Owen + + + + A simple result type encapsulating a URI that has no further interpretation. + + Sean Owen + + + true if the URI contains suspicious patterns that may suggest it intends to + mislead the user about its true nature. At the moment this looks for the presence + of user/password syntax in the host/authority portion of a URI which may be used + in attempts to make the URI's host appear to be other than it is. Example: + http://yourbank.com@phisher.com This URI connects to phisher.com but may appear + to connect to yourbank.com at first glance. + + + + Transforms a string that represents a URI into something more proper, by adding or canonicalizing + the protocol. + + + + + Tries to parse results that are a URI of some kind. + + Sean Owen + + + Parses the "URLTO" result format, which is of the form "URLTO:[title]:[url]". + This seems to be used sometimes, but I am not able to find documentation + on its origin or official format? + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Parses contact information formatted according to the VCard (2.1) format. This is not a complete + implementation but should parse information as commonly encoded in 2D barcodes. + + Sean Owen + + + Formats name fields of the form "Public;John;Q.;Reverend;III" into a form like + "Reverend John Q. Public III". + + @param names name values to format, in place + + + + Partially implements the iCalendar format's "VEVENT" format for specifying a + calendar event. See RFC 2445. This supports SUMMARY, DTSTART and DTEND fields. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a Vehicle Identification Number (VIN). + + + + + Detects a result that is likely a vehicle identification number. + @author Sean Owen + + + + + Represents a parsed result that encodes wifi network information, like SSID and password. + + Vikram Aggarwal + + + + + A simple, fast array of bits, represented compactly by an array of ints internally. + + Sean Owen + + + + size of the array, number of elements + + + + + size of the array in bytes + + + + + index accessor + + + + + + + default constructor + + + + + initializing constructor + + desired size of the array + + + + Flips bit i. + + bit to set + + + + + Gets the next set. + + first bit to check + index of first bit that is set, starting from the given index, or size if none are set + at or beyond this given index + + + + see getNextSet(int) + + index to start looking for unset bit + index of next unset bit, or if none are unset until the end + + + Sets a block of 32 bits, starting at bit i. + + + first bit to set + + the new value of the next 32 bits. Note again that the least-significant bit + corresponds to bit i, the next-least-significant to i+1, and so on. + + + + + Sets a range of bits. + + start of range, inclusive. + end of range, exclusive + + + Clears all bits (sets to false). + + + Efficient method to check if a range of bits is set, or not set. + + + start of range, inclusive. + + end of range, exclusive + + if true, checks that bits in range are set, otherwise checks that they are not set + + true iff all bits are set or not set in range, according to value argument + if end is less than start or the range is not contained in the array + + + + Appends the bit. + + The bit. + + + underlying array of ints. The first element holds the first 32 bits, and the least + significant bit is bit 0. + + + + + Appends the least-significant bits, from value, in order from most-significant to + least-significant. For example, appending 6 bits from 0x000001E will append the bits + 0, 1, 1, 1, 1, 0 in that order. + + containing bits to append + bits from value to append + + + + adds the array to the end + + + + + + XOR operation + + + + + + converts to bytes. + + first bit to start writing + array to write into. Bytes are written most-significant byte first. This is the opposite + of the internal representation, which is exposed by BitArray + position in array to start writing + how many bytes to write + + + Reverses all bits in the array. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Erstellt ein neues Objekt, das eine Kopie der aktuellen Instanz darstellt. + + + Ein neues Objekt, das eine Kopie dieser Instanz darstellt. + + + + +

Represents a 2D matrix of bits. In function arguments below, and throughout the common + module, x is the column position, and y is the row position. The ordering is always x, y. + The origin is at the top-left.

+

Internally the bits are represented in a 1-D array of 32-bit ints. However, each row begins + with a new int. This is done intentionally so that we can copy out a row into a BitArray very + efficiently.

+

The ordering of bits is row-major. Within each int, the least significant bits are used first, + meaning they represent lower x values. This is compatible with BitArray's implementation.

+
+ Sean Owen + dswitkin@google.com (Daniel Switkin) +
+ + The width of the matrix + + + + The height of the matrix + + + + This method is for compatibility with older code. It's only logical to call if the matrix + is square, so I'm throwing if that's not the case. + + + row/column dimension of this matrix + + + + + The rowsize of the matrix + + + + + Creates an empty square . + + height and width + + + + Creates an empty square . + + bit matrix width + bit matrix height + + + + Interprets a 2D array of booleans as a , where "true" means an "on" bit. + + bits of the image, as a row-major 2D array. Elements are arrays representing rows + representation of image + + +

Gets the requested bit, where true means black.

+ +
+ The horizontal component (i.e. which column) + + The vertical component (i.e. which row) + + value of given bit in matrix + +
+ + +

Flips the given bit.

+
+ The horizontal component (i.e. which column) + The vertical component (i.e. which row) +
+ + + flip all of the bits, if shouldBeFlipped is true for the coordinates + + should return true, if the bit at a given coordinate should be flipped + + + + Exclusive-or (XOR): Flip the bit in this {@code BitMatrix} if the corresponding + mask bit is set. + + The mask. + + + Clears all bits (sets to false). + + +

Sets a square region of the bit matrix to true.

+ +
+ The horizontal position to begin at (inclusive) + + The vertical position to begin at (inclusive) + + The width of the region + + The height of the region + +
+ + A fast method to retrieve one row of data from the matrix as a BitArray. + + + The row to retrieve + + An optional caller-allocated BitArray, will be allocated if null or too small + + The resulting BitArray - this reference should always be used even when passing + your own row + + + + + Sets the row. + + row to set + {@link BitArray} to copy from + + + + Modifies this {@code BitMatrix} to represent the same but rotated 180 degrees + + + + + This is useful in detecting the enclosing rectangle of a 'pure' barcode. + + {left,top,width,height} enclosing rectangle of all 1 bits, or null if it is all white + + + + This is useful in detecting a corner of a 'pure' barcode. + + {x,y} coordinate of top-left-most 1 bit, or null if it is all white + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + The line separator. + + A that represents this instance. + + + + + Clones this instance. + + + + + + Converts this ByteMatrix to a black and white bitmap. + + A black and white bitmap converted from this ByteMatrix. + + +

This provides an easy abstraction to read bits at a time from a sequence of bytes, where the + number of bits read is not often a multiple of 8.

+ +

This class is thread-safe but not reentrant. Unless the caller modifies the bytes array + it passed in, in which case all bets are off.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + bytes from which this will read bits. Bits will be read from the first byte first. + Bits are read within a byte from most-significant to least-significant bit. + + + + + index of next bit in current byte which would be read by the next call to {@link #readBits(int)}. + + + + + index of next byte in input byte array which would be read by the next call to {@link #readBits(int)}. + + + + number of bits to read + + int representing the bits read. The bits will appear as the least-significant + bits of the int + + if numBits isn't in [1,32] or more than is available + + + number of bits that can be read successfully + + + + Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1 + of ISO 18004. + + + Sean Owen + + + character set ECI value + representing ECI of given value, or null if it is legal but unsupported + + + character set ECI encoding name + representing ECI for character encoding, or null if it is legalbut unsupported + + + + Encapsulates the result of decoding a matrix of bits. This typically + applies to 2D barcode formats. For now it contains the raw bytes obtained, + as well as a String interpretation of those bytes, if applicable. + Sean Owen + + + + + raw bytes representing the result, or null if not applicable + + + + + how many bits of are valid; typically 8 times its length + + + + + text representation of the result + + + + + list of byte segments in the result, or null if not applicable + + + + + name of error correction level used, or null if not applicable + + + + + gets a value which describe if structure append data was found + + + + + number of errors corrected, or null if not applicable + + + + + gives the sequence number of the result if structured append was found + + + + + number of erasures corrected, or null if not applicable + + + + + gives the parity information if structured append was found + + + + + Miscellanseous data value for the various decoders + + The other. + + + + initializing constructor + + + + + + + + + initializing constructor + + + + + + + + + + + initializing constructor + + + + + + + + + + initializing constructor + + + + + + + + + + + + Defines an container for encoder options + + + + + Gets the data container for all options + + + + + event is raised when a value is changed + + + + + Gets or sets a flag which cause a deeper look into the bitmap + + + true if [try harder]; otherwise, false. + + + + + Image is a pure monochrome image of a barcode. + + + true if monochrome image of a barcode; otherwise, false. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + The character set. + + + + + Image is known to be of one of a few possible formats. + Maps to a {@link java.util.List} of {@link BarcodeFormat}s. + + + The possible formats. + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + true if it should assume a Code 39 check digit; otherwise, false. + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). + + + true if it should assume GS1; otherwise, false. + + + + + Assume MSI codes employ a check digit. Maps to . + + + true if it should assume a MSI check digit; otherwise, false. + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Initializes a new instance of the class. + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Encapsulates the result of detecting a barcode in an image. This includes the raw + matrix of black/white pixels corresponding to the barcode, and possibly points of interest + in the image, like the location of finder patterns or corners of the barcode in the image.

+
+ Sean Owen +
+ + + the detected bits + + + + + the pixel points where the result is found + + + + + initializing constructor + + + + + + + General math-related and numeric utility functions. + + + + + Ends up being a bit faster than {@link Math#round(float)}. This merely rounds its + argument to the nearest int, where x.5 rounds up to x+1. Semantics of this shortcut + differ slightly from {@link Math#round(float)} in that half rounds down for negative + values. -2.5 rounds to -3, not -2. For purposes here it makes no difference. + + real value to round + nearest int + + + + + + + + + + Euclidean distance between points A and B + + + + + + + + + + Euclidean distance between points A and B + + + + + values to sum + sum of values in array + + +

A somewhat generic detector that looks for a barcode-like rectangular region within an image. + It looks within a mostly white region of an image for a region of black and white, but mostly + black. It returns the four corners of the region, as best it can determine.

+ +
+ Sean Owen +
+ + + initializing constructor + + + + + +

Detects a rectangular region of black and white -- mostly black -- with a region of mostly + white, in an image.

+
+ [] describing the corners of the rectangular region. The first and + last points are opposed on the diagonal, as are the second and third. The first point will be + the topmost point and the last, the bottommost. The second point will be leftmost and the + third, the rightmost + +
+ + Attempts to locate a corner of the barcode by scanning up, down, left or right from a center + point which should be within the barcode. + + + center's x component (horizontal) + + same as deltaY but change in x per step instead + + minimum value of x + + maximum value of x + + center's y component (vertical) + + change in y per step. If scanning up this is negative; down, positive; + left or right, 0 + + minimum value of y to search through (meaningless when di == 0) + + maximum value of y + + maximum run of white pixels that can still be considered to be within + the barcode + + a encapsulating the corner that was found + + + + Computes the start and end of a region of pixels, either horizontally or vertically, that could + be part of a Data Matrix barcode. + + + if scanning horizontally, this is the row (the fixed vertical location) + where we are scanning. If scanning vertically it's the column, the fixed horizontal location + + largest run of white pixels that can still be considered part of the + barcode region + + minimum pixel location, horizontally or vertically, to consider + + maximum pixel location, horizontally or vertically, to consider + + if true, we're scanning left-right, instead of up-down + + int[] with start and end of found range, or null if no such range is found + (e.g. only white was found) + + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. By keeping track of the + last black points it encountered, it determines the corners of the barcode. + + David Olivier + + + + Creates a WhiteRectangleDetector instance + + The image. + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + Creates a WhiteRectangleDetector instance + + barcode image to find a rectangle in + initial size of search area around center + x position of search center + y position of search center + + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + + Initializes a new instance of the class. + + The image. + if image is too small + + + + Initializes a new instance of the class. + + The image. + Size of the init. + The x. + The y. + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. + + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + recenters the points of a constant distance towards the center + + bottom most point + left most point + right most point + top most point + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + Determines whether a segment contains a black point + + min value of the scanned coordinate + max value of the scanned coordinate + value of fixed coordinate + set to true if scan must be horizontal, false if vertical + + true if a black point has been found, else false. + + + + + Superclass of classes encapsulating types ECIs, according to "Extended Channel Interpretations" + 5.3 of ISO 18004. + + Sean Owen + + + + the ECI value + + + + ECI value + representing ECI of given value, or null if it is legal but unsupported + ArgumentException if ECI value is invalid + + + + Defines an container for encoder options + + + + + Gets the data container for all options + + + + + Specifies the height of the barcode image + + + + + Specifies the width of the barcode image + + + + + Don't put the content string into the output image. + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + + + + + Specifies whether the data should be encoded to the GS1 standard; + FNC1 character is added in front of the data + + + + + Initializes a new instance of the class. + + + + This Binarizer implementation uses the old ZXing global histogram approach. It is suitable + for low-end mobile devices which don't have enough CPU or memory to use a local thresholding + algorithm. However, because it picks a global black point, it cannot handle difficult shadows + and gradients. + + Faster mobile devices and all desktop applications should probably use HybridBinarizer instead. + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The source. + + + + Applies simple sharpening to the row data to improve performance of the 1D Readers. + + + + + + + + Does not sharpen the data, as this call is intended to only be used by 2D Readers. + + + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + + A new concrete Binarizer implementation object. + + + + Implementations of this class can, given locations of finder patterns for a QR code in an + image, sample the right points in the image to reconstruct the QR code, accounting for + perspective distortion. It is abstracted since it is relatively expensive and should be allowed + to take advantage of platform-specific optimized implementations, like Sun's Java Advanced + Imaging library, but which may not be available in other environments such as J2ME, and vice + versa. + + The implementation used can be controlled by calling {@link #setGridSampler(GridSampler)} + with an instance of a class which implements this interface. + + Sean Owen + + + the current implementation of + + + + Sets the implementation of used by the library. One global + instance is stored, which may sound problematic. But, the implementation provided + ought to be appropriate for the entire platform, and all uses of this library + in the whole lifetime of the JVM. For instance, an Android activity can swap in + an implementation that takes advantage of native platform libraries. + + The platform-specific object to install. + + + +

Samples an image for a square matrix of bits of the given dimension. This is used to extract + the black/white modules of a 2D barcode like a QR Code found in an image. Because this barcode + may be rotated or perspective-distorted, the caller supplies four points in the source image + that define known points in the barcode, so that the image may be sampled appropriately.

+

The last eight "from" parameters are four X/Y coordinate pairs of locations of points in + the image that define some significant points in the image to be sample. For example, + these may be the location of finder pattern in a QR Code.

+

The first eight "to" parameters are four X/Y coordinate pairs measured in the destination + , from the top left, where the known points in the image given by the "from" + parameters map to.

+

These 16 parameters define the transformation needed to sample the image.

+
+ image to sample + The dimension X. + The dimension Y. + The p1 preimage X. + The p1 preimage Y. + The p2 preimage X. + The p2 preimage Y. + The p3 preimage X. + The p3 preimage Y. + The p4 preimage X. + The p4 preimage Y. + The p1 image X. + The p1 image Y. + The p2 image X. + The p2 image Y. + The p3 image X. + The p3 image Y. + The p4 image X. + The p4 image Y. + + representing a grid of points sampled from the image within a region + defined by the "from" parameters + + ReaderException if image can't be sampled, for example, if the transformation defined +
+ + + + + + + + + + + +

Checks a set of points that have been transformed to sample points on an image against + the image's dimensions to see if the point are even within the image.

+ +

This method will actually "nudge" the endpoints back onto the image if they are found to be + barely (less than 1 pixel) off the image. This accounts for imperfect detection of finder + patterns in an image where the QR Code runs all the way to the image border.

+ +

For efficiency, the method will check points from either end of the line until one is found + to be within the image. Because the set of points are assumed to be linear, this is valid.

+ +
+ image into which the points should map + + actual points in x1,y1,...,xn,yn form + +
+ + This class implements a local thresholding algorithm, which while slower than the + GlobalHistogramBinarizer, is fairly efficient for what it does. It is designed for + high frequency images of barcodes with black data on white backgrounds. For this application, + it does a much better job than a global blackpoint with severe shadows and gradients. + However it tends to produce artifacts on lower frequency images and is therefore not + a good general purpose binarizer for uses outside ZXing. + + This class extends GlobalHistogramBinarizer, using the older histogram approach for 1D readers, + and the newer local approach for 2D readers. 1D decoding using a per-row histogram is already + inherently local, and only fails for horizontal gradients. We can revisit that problem later, + but for now it was not a win to use local blocks for 1D. + + This Binarizer is the default for the unit tests and the recommended class for library users. + dswitkin@google.com (Daniel Switkin) + + + + + gives the black matrix + + + + + initializing constructor + + + + + + creates a new instance + + + + + + + Calculates the final BitMatrix once for all requests. This could be called once from the + constructor instead, but there are some advantages to doing it lazily, such as making + profiling easier, and not doing heavy lifting when callers don't expect it. + + + + + For each 8x8 block in the image, calculate the average black point using a 5x5 grid + of the blocks around it. Also handles the corner cases (fractional blocks are computed based + on the last 8 pixels in the row/column which are also used in the previous block). + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + The black points. + The matrix. + + + + Applies a single threshold to an 8x8 block of pixels. + + The luminances. + The xoffset. + The yoffset. + The threshold. + The stride. + The matrix. + + + + Calculates a single black point for each 8x8 block of pixels and saves it away. + See the following thread for a discussion of this algorithm: + http://groups.google.com/group/zxing/browse_thread/thread/d06efa2c35a7ddc0 + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + + + +

This class implements a perspective transform in two dimensions. Given four source and four + destination points, it will compute the transformation implied between them. The code is based + directly upon section 3.4.2 of George Wolberg's "Digital Image Warping"; see pages 54-56.

+
+ Sean Owen +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Convenience method, not optimized for performance. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

This class contains utility methods for performing mathematical operations over + the Galois Fields. Operations use a given primitive polynomial in calculations.

+

Throughout this package, elements of the GF are represented as an {@code int} + for convenience and speed (but at the cost of memory). +

+
+ Sean Owen +
+ + + Create a representation of GF(size) using the given primitive polynomial. + + irreducible polynomial whose coefficients are represented by + * the bits of an int, where the least-significant bit represents the constant + * coefficient + the size of the field + the factor b in the generator polynomial can be 0- or 1-based + * (g(x) = (x+a^b)(x+a^(b+1))...(x+a^(b+2t-1))). + * In most cases it should be 1, but for QR code it is 0. + + + + Builds the monomial. + + The degree. + The coefficient. + the monomial representing coefficient * x^degree + + + + Implements both addition and subtraction -- they are the same in GF(size). + + sum/difference of a and b + + + + Exps the specified a. + + 2 to the power of a in GF(size) + + + + Logs the specified a. + + A. + base 2 log of a in GF(size) + + + + Inverses the specified a. + + multiplicative inverse of a + + + + Multiplies the specified a with b. + + A. + The b. + product of a and b in GF(size) + + + + Gets the size. + + + + + Gets the generator base. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + +

Represents a polynomial whose coefficients are elements of a GF. + Instances of this class are immutable.

+

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + the {@link GenericGF} instance representing the field to use + to perform computations + coefficients as ints representing elements of GF(size), arranged + from most significant (highest-power term) coefficient to least significant + if argument is null or empty, + or if leading coefficient is 0 and this is not a + constant polynomial (that is, it is not the monomial "0") + + + + degree of this polynomial + + + + + Gets a value indicating whether this is zero. + + true iff this polynomial is the monomial "0" + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + +

Implements Reed-Solomon decoding, as the name implies.

+ +

The algorithm will not be explained here, but the following references were helpful + in creating this implementation:

+ + + +

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+ +
+ Sean Owen + William Rucklidge + sanfordsquires +
+ + +

Decodes given set of received codewords, which include both data and error-correction + codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place, + in the input.

+
+ data and error-correction codewords + number of error-correction codewords available + false: decoding fails +
+ + + Implements Reed-Solomon encoding, as the name implies. + + Sean Owen + William Rucklidge + + + + Common string-related functions. + + Sean Owen + Alex Dupre + + + + SJIS + + + + + GB2312 + + + + + Guesses the encoding. + + bytes encoding a string, whose encoding should be guessed + decode hints if applicable + name of guessed encoding; at the moment will only guess one of: + {@link #SHIFT_JIS}, {@link #UTF8}, {@link #ISO88591}, or the platform + default encoding if none of these can possibly be correct + + + + This implementation can detect and decode Data Matrix codes in an image. + + bbrown@google.com (Brian Brown) + + + + + Locates and decodes a Data Matrix code in an image. + + + a String representing the content encoded by the Data Matrix code + + + + Locates and decodes a Data Matrix code in an image. + + + + a String representing the content encoded by the Data Matrix code + + + + does nothing here + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a Data Matrix code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + Guillaume Le Biller Added to zxing lib. + + + + encodes the content to a BitMatrix + + + + + + + + + + encodes the content to a BitMatrix + + + + + + + + + + + Encode the given symbol info to a bit matrix. + + The DataMatrix placement. + The symbol info to encode. + + + The bit matrix generated. + + + + Convert the ByteMatrix to BitMatrix. + + The input matrix. + The requested width of the image (in pixels) with the Datamatrix code + The requested height of the image (in pixels) with the Datamatrix code + The output matrix. + + + + bbrown@google.com (Brian Brown) + + + + + to parse + if dimension is < 8 or > 144 or not 0 mod 2 + + + + +

Creates the version object based on the dimension of the original bit matrix from + the datamatrix code.

+ +

See ISO 16022:2006 Table 7 - ECC 200 symbol attributes

+ + Original including alignment patterns + encapsulating the Data Matrix Code's "version" + if the dimensions of the mapping matrix are not valid + Data Matrix dimensions. +
+
+ + +

Reads the bits in the representing the mapping matrix (No alignment patterns) + in the correct order in order to reconstitute the codewords bytes contained within the + Data Matrix Code.

+ + bytes encoded within the Data Matrix Code + if the exact number of bytes expected is not read +
+
+ + +

Reads a bit of the mapping matrix accounting for boundary wrapping.

+ + Row to read in the mapping matrix + Column to read in the mapping matrix + Number of rows in the mapping matrix + Number of columns in the mapping matrix + value of the given bit in the mapping matrix +
+
+ + +

Reads the 8 bits of the standard Utah-shaped pattern.

+ +

See ISO 16022:2006, 5.8.1 Figure 6

+ + Current row in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Current column in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the utah shape +
+
+ + +

Reads the 8 bits of the special corner condition 1.

+ +

See ISO 16022:2006, Figure F.3

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 1 +
+
+ + +

Reads the 8 bits of the special corner condition 2.

+ +

See ISO 16022:2006, Figure F.4

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 2 +
+
+ + +

Reads the 8 bits of the special corner condition 3.

+ +

See ISO 16022:2006, Figure F.5

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 3 +
+
+ + +

Reads the 8 bits of the special corner condition 4.

+ +

See ISO 16022:2006, Figure F.6

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 4 +
+
+ + +

Extracts the data region from a that contains + alignment patterns.

+ + Original with alignment patterns + BitMatrix that has the alignment patterns removed +
+
+ + +

Encapsulates a block of data within a Data Matrix Code. Data Matrix Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ + bbrown@google.com (Brian Brown) +
+
+ + +

When Data Matrix Codes use multiple data blocks, they actually interleave the bytes of each of them. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ + bytes as read directly from the Data Matrix Code + version of the Data Matrix Code + DataBlocks containing original bytes, "de-interleaved" from representation in the + Data Matrix Code +
+
+ + +

Data Matrix Codes can encode text as bits in one of several modes, and can use multiple modes + in one Data Matrix Code. This class decodes the bits back into text.

+ +

See ISO 16022:2006, 5.2.1 - 5.2.9.2

+ + bbrown@google.com (Brian Brown) + Sean Owen +
+
+ + + See ISO 16022:2006, Annex C Table C.1 + The C40 Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, Annex C Table C.2 + The Text Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, 5.2.3 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.5 and Annex C, Table C.1 + + + + + See ISO 16022:2006, 5.2.6 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.7 + + + + + See ISO 16022:2006, 5.2.8 and Annex C Table C.3 + + + + + See ISO 16022:2006, 5.2.9 and Annex B, B.2 + + + + + See ISO 16022:2006, Annex B, B.2 + + + + +

The main class which implements Data Matrix Code decoding -- as opposed to locating and extracting + the Data Matrix Code from an image.

+ + bbrown@google.com (Brian Brown) +
+
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a Data Matrix Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+ + booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code + if the Data Matrix Code cannot be decoded +
+
+ + +

Decodes a Data Matrix Code represented as a . A 1 or "true" is taken + to mean a black module.

+
+ booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+ + data and error correction codewords + number of codewords that are data bytes +
+
+ + + The Version object encapsulates attributes about a particular + size Data Matrix Code. + + bbrown@google.com (Brian Brown) + + + + + returns the version numer + + + + + + returns the symbol size rows + + + + + + returns the symbols size columns + + + + + + retursn the data region size rows + + + + + + returns the data region size columns + + + + + + returns the total codewords count + + + + + +

Deduces version information from Data Matrix dimensions.

+ + Number of rows in modules + Number of columns in modules + Version for a Data Matrix Code of those dimensions + if dimensions do correspond to a valid Data Matrix size +
+
+ + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the Data Matrix code version's format.

+
+
+ + + returns the version number as string + + + + + + See ISO 16022:2006 5.5.1 Table 7 + + + + +

Encapsulates logic that can detect a Data Matrix Code in an image, even if the Data Matrix Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + +

Detects a Data Matrix Code in an image.

+
+ encapsulating results of detecting a Data Matrix Code or null +
+ + + Calculates the position of the white top right module using the output of the rectangle detector + for a rectangular matrix + + + + + Calculates the position of the white top right module using the output of the rectangle detector + for a square matrix + + + + + Increments the Integer associated with a key by one. + + + + + Counts the number of black/white transitions between two points, using something like Bresenham's algorithm. + + + + + Simply encapsulates two points and a number of transitions between them. + + + + + Orders ResultPointsAndTransitions by number of transitions, ascending. + + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Symbol Character Placement Program. Adapted from Annex M.1 in ISO/IEC 16022:2000(E). + + + + + Main constructor + + the codewords to place + the number of columns + the number of rows + + + + Places the 8 bits of a utah-shaped symbol character in ECC200. + + The row. + The col. + character position + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Enumeration for encodation types + + + + + Error Correction Code for ECC200. + + + + + Lookup table which factors to use for which number of error correction codewords. + See FACTORS. + + + + + Precomputed polynomial factors for ECC 200. + + + + + Creates the ECC200 error correction for an encoded message. + + The codewords. + information about the symbol to be encoded + the codewords with interleaved error correction. + + + + DataMatrix ECC 200 data encoder following the algorithm described in ISO/IEC 16022:200(E) in + annex S. + + + + + Padding character + + + + + mode latch to C40 encodation mode + + + + + mode latch to Base 256 encodation mode + + + + + FNC1 Codeword + + + + + Structured Append Codeword + + + + + Reader Programming + + + + + Upper Shift + + + + + 05 Macro + + + + + 06 Macro + + + + + mode latch to ANSI X.12 encodation mode + + + + + mode latch to Text encodation mode + + + + + mode latch to EDIFACT encodation mode + + + + + ECI character (Extended Channel Interpretation) + + + + + Unlatch from C40 encodation + + + + + Unlatch from X12 encodation + + + + + 05 Macro header + + + + + 06 Macro header + + + + + Macro trailer + + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + the encoded message (the char values range from 0 to 255) + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + requested shape. May be {@code SymbolShapeHint.FORCE_NONE},{@code SymbolShapeHint.FORCE_SQUARE} or {@code SymbolShapeHint.FORCE_RECTANGLE}. + the minimum symbol size constraint or null for no constraint + the maximum symbol size constraint or null for no constraint + encoding mode to start with + the encoded message (the char values range from 0 to 255) + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + Symbol info table for DataMatrix. + + + + Overrides the symbol info set used by this class. Used for testing purposes. + + @param override the symbol info set to use + + + + Enumeration for DataMatrix symbol shape hint. It can be used to force square or rectangular + symbols. + + + + + The class holds the available options for the DatamatrixWriter + + + + + Specifies the matrix shape for Data Matrix + + + + + Specifies a minimum barcode size + + + + + Specifies a maximum barcode size + + + + + Specifies the default encodation + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Encapsulates a type of hint that a caller may pass to a barcode reader to help it + more quickly or accurately decode it. It is up to implementations to decide what, + if anything, to do with the information that is supplied. + + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Unspecified, application-specific hint. Maps to an unspecified . + + + + + Image is a pure monochrome image of a barcode. Doesn't matter what it maps to; + use = true. + + + + + Image is known to be of one of a few possible formats. + Maps to a of s. + + + + + Spend more time to try to find a barcode; optimize for accuracy, not speed. + Doesn't matter what it maps to; use = true. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + + + The caller needs to be notified via callback when a possible + is found. Maps to a . + + + + + Assume MSI codes employ a check digit. Maps to . + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + Maps to . + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + 1D readers supporting rotation with TRY_HARDER enabled. + But BarcodeReader class can do auto-rotating for 1D and 2D codes. + Enabling that option prevents 1D readers doing double rotation. + BarcodeReader enables that option automatically if "global" auto-rotation is enabled. + Maps to . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to; + use . + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Simply encapsulates a width and height. + + + + + initializing constructor + + + + + + + the width + + + + + the height + + + + + + + + + + + + + + + + + + + + + + + + These are a set of hints that you may pass to Writers to specify their behavior. + + dswitkin@google.com (Daniel Switkin) + + + + Specifies the width of the barcode image + type: + + + + + Specifies the height of the barcode image + type: + + + + + Don't put the content string into the output image. + type: + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + + For Aztec it is of type , representing the minimal percentage of error correction words. + In all cases, it can also be a representation of the desired value as well. + Note: an Aztec symbol should have a minimum of 25% EC words. + For PDF417 it is of type or (between 0 and 8), + + + + + Specifies what character encoding to use where applicable. + type: + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + type: , or representation of the integer value + + + + + Specifies the aspect ratio to use. Default is 4. + type: , or 1-4. + + + + + Specifies whether to use compact mode for PDF417 + type: , or "true" or "false" + value + + + + + Specifies what compaction mode to use for PDF417. + type: or value of one of its + enum values + + + + + Specifies the minimum and maximum number of rows and columns for PDF417. + type: + + + + + Don't append ECI segment. + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + type: + + + + + Specifies the matrix shape for Data Matrix (type ) + + + + + Specifies a minimum barcode size (type ). Only applicable to Data Matrix now. + + + + + Specifies a maximum barcode size (type ). Only applicable to Data Matrix now. + + + + + if true, don't switch to codeset C for numbers + + + + + Specifies the default encodation for Data Matrix (type ) + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Specifies the required number of layers for an Aztec code. + A negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + type: , or representation of the integer value + + + + + Specifies the exact version of QR code to be encoded. + (Type , or representation of the integer value). + + + + + Specifies whether the data should be encoded to the GS1 standard + type: , or "true" or "false" + value + + + + + Thrown when a barcode was successfully detected, but some aspect of + the content did not conform to the barcode's format rules. This could have + been due to a mis-detection. + Sean Owen + + + + + + + + + + + + + + + + + + + + + + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode the barcode inside a bitmap object + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Decodes the specified barcode bitmap which is given by a generic byte array. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Interface for a smart class to encode some content into a barcode + + + Interface for a smart class to encode some content into a barcode + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents. + + The contents. + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + The matrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents. + + The contents. + + + + + implements an Intelligent Mail barcode + Rishabh Hatgadkar + + + + + A wrapper implementation of {@link LuminanceSource} which inverts the luminances it returns -- black becomes + white and vice versa, and each value becomes (255-value). + + Sean Owen + + + + Initializes a new instance of the class. + + The @delegate. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff; + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Inverts this instance. + + original delegate {@link LuminanceSource} since invert undoes itself + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + The purpose of this class hierarchy is to abstract different bitmap implementations across + platforms into a standard interface for requesting greyscale luminance values. The interface + only provides immutable methods; therefore crop and rotation create copies. This is to ensure + that one Reader does not modify the original luminance source and leave it in an unknown state + for other Readers in the chain. + + dswitkin@google.com (Daniel Switkin) + + + + initializing constructor + + + + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff + + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + The width of the bitmap. + + + The height of the bitmap. + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + Whether this subclass supports counter-clockwise rotation. + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + + Whether this subclass supports invertion. + + + + inverts the luminance values, not supported here. has to implemented in sub classes + + + + + + + + + + + + mike32767 + Manuel Kasten + + + + + to parse + + + + +

MaxiCodes can encode text or structured information as bits in one of several modes, + with multiple character sets in one code. This class decodes the bits back into text.

+ + mike32767 + Manuel Kasten +
+
+ + +

The main class which implements MaxiCode decoding -- as opposed to locating and extracting + the MaxiCode from an image.

+ + Manuel Kasten +
+
+ + + This implementation can detect and decode a MaxiCode in an image. + + + + + Locates and decodes a MaxiCode in an image. + + a String representing the content encoded by the MaxiCode + if a MaxiCode cannot be decoded + + + + + Locates and decodes a MaxiCode within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + + MultiFormatReader is a convenience class and the main entry point into the library for most uses. + By default it attempts to decode all barcode formats that the library supports. Optionally, you + can provide a hints object to request different behavior, for example only decoding QR codes. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + This version of decode honors the intent of Reader.decode(BinaryBitmap) in that it + passes null as a hint to the decoders. However, that makes it inefficient to call repeatedly. + Use setHints() followed by decodeWithState() for continuous scan applications. + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the hints provided. Does not honor existing state. + + + The pixel data to decode + + The hints to use, clearing the previous state. + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the state set up by calling setHints() previously. Continuous scan + clients will get a large speed increase by using this instead of decode(). + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls + to decodeWithState(image) can reuse the same set of readers without reallocating memory. This + is important for performance in continuous scan clients. + + + + + + resets all specific readers + + + + This is a factory class which finds the appropriate Writer subclass for the BarcodeFormat + requested and encodes the barcode with the supplied contents. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Gets the collection of supported writers. + + + + + encode the given data + + + + + + + + + + encode the given data + + + + + + + + + + + This class attempts to decode a barcode from an image, not by scanning the whole image, + but by scanning subsets of the image. This is important when there may be multiple barcodes in + an image, and detecting a barcode may find parts of multiple barcode and fail to decode + (e.g. QR Codes). Instead this scans the four quadrants of the image -- and also the center + 'quadrant' to cover the case where a barcode is found in the center. + + + + + + Initializes a new instance of the class. + + The @delegate. + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Attempts to locate multiple barcodes in an image by repeatedly decoding portion of the image. + After one barcode is found, the areas left, above, right and below the barcode's + {@link com.google.zxing.ResultPoint}s are scanned, recursively.

+

A caller may want to also employ {@link ByQuadrantReader} when attempting to find multiple + 2D barcodes, like QR Codes, in an image, where the presence of multiple barcodes might prevent + detecting any one of them.

+

That is, instead of passing a {@link Reader} a caller might pass + new ByQuadrantReader(reader).

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The @delegate. + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Implementation of this interface attempt to read several barcodes from one image. + Sean Owen + + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + +

Encapsulates logic that can detect one or more QR Codes in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+ + Sean Owen + Hannes Erven +
+
+ + + Initializes a new instance of the class. + + The image. + + + + Detects the multi. + + The hints. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +

In contrast to , this class will return an array of all possible + QR code locations in the image.

+ +

Use the TRY_HARDER hint to ask for a more thorough detection.

+ + Sean Owen + Hannes Erven +
+
+ + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF_PERCENT percent in their + estimated modules sizes. + + + + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF pixels/module in their + estimated modules sizes. + + + + + A comparator that orders FinderPatterns by their estimated module size. + + + + +

Creates a finder that will search the image for three finder patterns.

+ + image to search +
+
+ + + + the 3 best s from our list of candidates. The "best" are + those that have been detected at least CENTER_QUORUM times, and whose module + size differs from the average among those patterns the least + + + + + This implementation can detect and decode multiple QR Codes in an image. + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + +

Decodes Codabar barcodes.

+ + Bas Vijfwinkel +
+
+ + These represent the encodings of characters, as patterns of wide and narrow bars. The 7 least-significant bits of + each int correspond to the pattern of wide and narrow, with 1s representing "wide" and 0s representing narrow. + + + + Records the size of all runs of white and black pixels, starting with white. + This is just like recordPattern, except it records all the counters, and + uses our builtin "counters" member for storage. + + row to count from + + + + This class renders CodaBar as []. + + dsbnatut@gmail.com (Kazuki Nishiura) + + + + The class holds the available options for the QrCodeWriter + + + + + if true, don't switch to codeset C for numbers + + + + +

Decodes Code 128 barcodes.

+ + Sean Owen +
+
+ + + This object renders a CODE128 code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + +

Decodes Code 39 barcodes. Supports "Full ASCII Code 39" if USE_CODE_39_EXTENDED_MODE is set.

+ Sean Owen + @see Code93Reader +
+
+ + + Returns a string with all possible characters + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. It will not decoded "extended Code 39" sequences. + + + + + Creates a reader that can be configured to check the last character as a check digit. + It will not decoded "extended Code 39" sequences. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + + Creates a reader that can be configured to check the last character as a check digit, + or optionally attempt to decode "extended Code 39" sequences that are used to encode + the full ASCII character set. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + if true, will attempt to decode extended Code 39 sequences in the text. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a CODE39 code as a . + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Decodes Code 93 barcodes.

+ Sean Owen + +
+
+ + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a CODE93 code as a BitMatrix + + + + + + output to append to + start position + pattern to append + unused + 9 + + + +

Implements decoding of the EAN-13 format.

+ + dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Initializes a new instance of the class. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + Get the format of this decoder. + The 1D format. + + + + + Based on pattern of odd-even ('L' and 'G') patterns used to encoded the explicitly-encoded + digits in a barcode, determines the implicitly encoded first digit and adds it to the + result string. + + string to insert decoded first digit into + int whose bits indicates the pattern of odd/even L/G patterns used to + encode digits + -1 if first digit cannot be determined + + + + This object renders an EAN13 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Implements decoding of the EAN-8 format.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Get the format of this decoder. + The 1D format. + + + + + This object renders an EAN8 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + + + a byte array of horizontal pixels (false = white, true = black) + + + + + Records EAN prefix to GS1 Member Organization, where the member organization + correlates strongly with a country. This is an imperfect means of identifying + a country of origin by EAN-13 barcode value. See + + http://en.wikipedia.org/wiki/List_of_GS1_country_codes. + + Sean Owen + + + + +

Implements decoding of the ITF format, or Interleaved Two of Five.

+ +

This Reader will scan ITF barcodes of certain lengths only. + At the moment it reads length 6, 8, 10, 12, 14, 16, 18, 20, 24, 44 and 48 as these have appeared "in the wild". Not all + lengths are scanned, especially shorter ones, to avoid false positives. This in turn is due to a lack of + required checksum function.

+ +

The checksum is optional and is not applied by this Reader. The consumer of the decoded + value will have to apply a checksum if required.

+ +

http://en.wikipedia.org/wiki/Interleaved_2_of_5 + is a great reference for Interleaved 2 of 5 information.

+ + kevin.osullivan@sita.aero, SITA Lab. +
+
+ + + Valid ITF lengths. Anything longer than the largest value is also allowed. + + + + + Start/end guard pattern. + + Note: The end pattern is reversed because the row is reversed before + searching for the END_PATTERN + + + + + Patterns of Wide / Narrow lines to indicate each digit + + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + + row of black/white values to search + offset of start pattern + The payload end. + to append decoded chars to + + false, if decoding could not complete successfully + + + + + Identify where the start of the middle / payload section starts. + + row of black/white values to search + Array, containing index of start of 'start block' and end of 'start block' + + + + The start & end patterns must be pre/post fixed by a quiet zone. This + zone must be at least 10 times the width of a narrow line. Scan back until + we either get to the start of the barcode or match the necessary number of + quiet zone pixels. + + Note: Its assumed the row is reversed when using this method to find + quiet zone after the end pattern. + + ref: http://www.barcode-1.net/i25code.html + + bit array representing the scanned barcode. + index into row of the start or end pattern. + false, if the quiet zone cannot be found + + + + Skip all whitespace until we get to the first black line. + + row of black/white values to search + index of the first black line or -1 if no black lines are found in the row. + + + + Identify where the end of the middle / payload section ends. + + row of black/white values to search + Array, containing index of start of 'end block' and end of 'end + block' or null, if nothing found + + + + + row of black/white values to search + position to start search + pattern of counts of number of black and white pixels that are being searched for as a pattern + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a sequence of ITF black/white lines into single + digit. + + the counts of runs of observed black/white/black/... values + The decoded digit + + false, if digit cannot be decoded + + + + + This object renders a ITF code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code bool[]} of horizontal pixels (false = white, true = black) + + + + + + + Decodes MSI barcodes. + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. + + + + + Creates a reader that can be configured to check the last character as a check digit, + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a MSI code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

A reader that can read all available UPC/EAN formats. If a caller wants to try to + read all such formats, it is most efficient to use this implementation rather than invoke + individual readers.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Encapsulates functionality and implementation that is common to one-dimensional barcodes.

+ dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + a byte array of horizontal pixels (0 = white, 1 = black) + + + + Appends the given pattern to the target array starting at pos. + + encode black/white pattern into this array + position to start encoding at in target + lengths of black/white runs to encode + starting color - false for white, true for black + the number of elements added to target. + + + + Gets the default margin. + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + + barcode contents to encode + a bool[] of horizontal pixels (false = white, true = black) + + + + Calculates the checksum digit modulo10. + + The contents. + + + + + Encapsulates functionality and implementation that is common to all families + of one-dimensional barcodes. + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + + + + + + + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + Note that we don't try rotation without the try harder flag, even if rotation was supported. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + We're going to examine rows from the middle outward, searching alternately above and below the + middle, and farther out each time. rowStep is the number of rows between each successive + attempt above and below the middle. So we'd scan row middle, then middle - rowStep, then + middle + rowStep, then middle - (2 * rowStep), etc. + rowStep is bigger as the image is taller, but is always at least 1. We've somewhat arbitrarily + decided that moving up and down by about 1/16 of the image is pretty good; we try more of the + image if "trying harder". + + The image to decode + Any hints that were requested + The contents of the decoded barcode + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the pattern in reverse. + + The row. + The start. + The counters. + + + + + Determines how closely a set of observed counts of runs of black/white values matches a given + target pattern. This is reported as the ratio of the total variance from the expected pattern + proportions across all pattern elements, to the length of the pattern. + + observed counters + expected pattern + The most any counter can differ before we give up + ratio of total variance between counters and pattern compared to total pattern size, + where the ratio has been multiplied by 256. So, 0 means no variance (perfect match); 256 means + the total variance between counters and patterns equals the pattern length, higher values mean + even more variance + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + This object renders a Plessey code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + Superclass of implementations that read barcodes in the RSS family of formats. + + + + + Initializes a new instance of the class. + + + + + Gets the decode finder counters. + + + + + + Gets the data character counters. + + + + + + Gets the odd rounding errors. + + + + + + Gets the even rounding errors. + + + + + + Gets the odd counts. + + + + + + Gets the even counts. + + + + + + Parses the finder value. + + The counters. + The finder patterns. + The value. + + + + + Counts the specified array. + + The array. + + + + + Increments the specified array. + + The array. + The errors. + + + + Decrements the specified array. + + The array. + The errors. + + + + Determines whether [is finder pattern] [the specified counters]. + + The counters. + + true if [is finder pattern] [the specified counters]; otherwise, false. + + + + + Encapsulates a since character value in an RSS barcode, including its checksum information. + + + + + Gets the value. + + + + + Gets the checksum portion. + + + + + Initializes a new instance of the class. + + The value. + The checksum portion. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Gets the information. + + + + + + Parses the information. + + + + + + Creates the decoder. + + The information. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + One row of an RSS Expanded Stacked symbol, consisting of 1+ expanded pairs. + + + + + Did this row of the image have to be reversed (mirrored) to recognize the pairs? + + + + + Two rows are equal if they contain the same pairs in the same order. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Encapsulates an RSS barcode finder pattern, including its start/end position and row. + + + + + Gets the value. + + + + + Gets the start end. + + + + + Gets the result points. + + + + + Initializes a new instance of the class. + + The value. + The start end. + The start. + The end. + The row number. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Decodes RSS-14, including truncated and stacked variants. See ISO/IEC 24724:2006. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Adapted from listings in ISO/IEC 24724 Appendix B and Appendix G. + + + + + Gets the RS svalue. + + The widths. + Width of the max. + if set to true [no narrow]. + + + + +

Implements decoding of the UPC-A format.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen +
+
+ + +

Like decodeRow(int, BitArray, java.util.Map), but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ + + + + +
+ + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Decodes the specified image. + + The image. + The hints. + + + + + Get the format of this decoder. + The 1D format. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + This object renders a UPC-A code as a . + qwandor@google.com (Andrew Walbran) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + @see UPCEANExtension5Support + + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + + + @see UPCEANExtension2Support + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + one {@link ResultMetadataType} to appropriate value, or {@code null} if not known + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Start/end guard pattern. + + + + + Pattern marking the middle of a UPC/EAN pattern, separating the two halves. + + + + + end guard pattern. + + + + + "Odd", or "L" patterns used to encode UPC/EAN digits. + + + + + As above but also including the "even", or "G" patterns used to encode UPC/EAN digits. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + +

Like , but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ row index into the image + encoding of the row of the barcode image + start/end column where the opening start pattern was found + optional hints that influence decoding + encapsulating the result of decoding a barcode in the row +
+ + + + string of digits to check + see + + + + Computes the UPC/EAN checksum on a string of digits, and reports + whether the checksum is correct or not. + + string of digits to check + true iff string of digits passes the UPC/EAN checksum algorithm + + + + Decodes the end. + + The row. + The end start. + + + + + + row of black/white values to search + position to start search + if true, indicates that the pattern specifies white/black/white/... + pixel counts, otherwise, it is interpreted as black/white/black/... + pattern of counts of number of black and white pixels that are being + searched for as a pattern + array of counters, as long as pattern, to re-use + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a single UPC/EAN-encoded digit. + + row of black/white values to decode + the counts of runs of observed black/white/black/... values + horizontal offset to start decoding from + the set of patterns to use to decode -- sometimes different encodings + for the digits 0-9 are used, and this indicates the encodings for 0 to 9 that should + be used + horizontal offset of first pixel beyond the decoded digit + + + + Get the format of this decoder. + + The 1D format. + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ aripollak@gmail.com (Ari Pollak) + dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Gets the default margin. + + + + +

Implements decoding of the UPC-E format.

+

Thisis a great reference for + UPC-E information.

+ Sean Owen +
+
+ + + The pattern that marks the middle, and end, of a UPC-E pattern. + There is no "second half" to a UPC-E barcode. + + + + + See L_AND_G_PATTERNS these values similarly represent patterns of + even-odd parity encodings of digits that imply both the number system (0 or 1) + used, and the check digit. + + + + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Decodes the end. + + The row. + The end start. + + + + + see checkStandardUPCEANChecksum(String) + + + + + + + Determines the num sys and check digit. + + The result string. + The lg pattern found. + + + + + Get the format of this decoder. + The 1D format. + + + + + Expands a UPC-E value back into its full, equivalent UPC-A code value. + + UPC-E code as string of digits + equivalent UPC-A code as string of digits + + + + + This object renders an UPC-E code as a {@link BitMatrix}. + @author 0979097955s@gmail.com (RX) + + + + + Metadata about a PDF417 Barcode + + Guenther Grau + + + + A Barcode Value for the PDF417 barcode. + The scanner will iterate through the bitmatrix, + and given the different methods or iterations + will increment a given barcode value's confidence. + + When done, this will return the values of highest confidence. + + Guenther Grau + + + + Incremenets the Confidence for a given value. (Adds an occurance of a value) + + + Value. + + + + Determines the maximum occurrence of a set value and returns all values which were set with this occurrence. + + an array of int, containing the values with the highest occurrence, or null, if no value was set. + + + + Returns the confience value for a given barcode value + + Barcode value. + + + + A Bounding Box helper class + + Guenther Grau + + + + Initializes a new instance of the class. + returns null if the corner points don't match up correctly + + The image. + The top left. + The bottom left. + The top right. + The bottom right. + + + + + Creates the specified box. + + The box. + + + + + Initializes a new instance of the class. + Will throw an exception if the corner points don't match up correctly + + Image. + Top left. + Top right. + Bottom left. + Bottom right. + + + + Merge two Bounding Boxes, getting the left corners of left, and the right corners of right + (Images should be the same) + + Left. + Right. + + + + Adds the missing rows. + + The missing rows. + Missing start rows. + Missing end rows. + If set to true is left. + + + + Calculates the minimum and maximum X & Y values based on the corner points. + + + + + If we adjust the width, set a new right corner coordinate and recalculate + + Bottom right. + + + + A Codeword in the PDF417 barcode + + Guenther Grau + + + + Default value for the RowNumber (-1 being an invalid real number) + + + + + Initializes a new instance of the class. + + Start x. + End x. + Bucket. + Value. + + + + Gets the width. + + The width. + + + + Gets a value indicating whether this instance has valid row number. + + true if this instance has valid row number; otherwise, false. + + + + Determines whether this instance is valid row number the specified rowNumber. + + true if this instance is valid row number the specified rowNumber; otherwise, false. + Row number. + + + + Sets the row number as the row's indicator column. + + + + + Returns a that represents the current . + + A that represents the current . + + + +

This class contains the methods for decoding the PDF417 codewords.

+ + SITA Lab (kevin.osullivan@sita.aero) +
+
+ + + Table containing values for the exponent of 900. + This is used in the numeric compaction decode algorithm. + + + + + Text Compaction mode (see 5.4.1.5) permits all printable ASCII characters to be + encoded, i.e. values 32 - 126 inclusive in accordance with ISO/IEC 646 (IRV), as + well as selected control characters. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + The Text Compaction mode includes all the printable ASCII characters + (i.e. values from 32 to 126) and three ASCII control characters: HT or tab + (ASCII value 9), LF or line feed (ASCII value 10), and CR or carriage + return (ASCII value 13). The Text Compaction mode also includes various latch + and shift characters which are used exclusively within the mode. The Text + Compaction mode encodes up to 2 characters per codeword. The compaction rules + for converting data into PDF417 codewords are defined in 5.4.2.2. The sub-mode + switches are defined in 5.4.2.3. + + The text compaction data. + The byte compaction data if there + was a mode shift. + The size of the text compaction and byte compaction data. + The decoded data is appended to the result. + + + + + Byte Compaction mode (see 5.4.3) permits all 256 possible 8-bit byte values to be encoded. + This includes all ASCII characters value 0 to 127 inclusive and provides for international + character set support. + + The byte compaction mode i.e. 901 or 924 + The array of codewords (data + error) + Currently active character encoding + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Numeric Compaction mode (see 5.4.4) permits efficient encoding of numeric data strings. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Convert a list of Numeric Compacted codewords from Base 900 to Base 10. + EXAMPLE + Encode the fifteen digit numeric string 000213298174000 + Prefix the numeric string with a 1 and set the initial value of + t = 1 000 213 298 174 000 + Calculate codeword 0 + d0 = 1 000 213 298 174 000 mod 900 = 200 + + t = 1 000 213 298 174 000 div 900 = 1 111 348 109 082 + Calculate codeword 1 + d1 = 1 111 348 109 082 mod 900 = 282 + + t = 1 111 348 109 082 div 900 = 1 234 831 232 + Calculate codeword 2 + d2 = 1 234 831 232 mod 900 = 632 + + t = 1 234 831 232 div 900 = 1 372 034 + Calculate codeword 3 + d3 = 1 372 034 mod 900 = 434 + + t = 1 372 034 div 900 = 1 524 + Calculate codeword 4 + d4 = 1 524 mod 900 = 624 + + t = 1 524 div 900 = 1 + Calculate codeword 5 + d5 = 1 mod 900 = 1 + t = 1 div 900 = 0 + Codeword sequence is: 1, 624, 434, 632, 282, 200 + + Decode the above codewords involves + 1 x 900 power of 5 + 624 x 900 power of 4 + 434 x 900 power of 3 + + 632 x 900 power of 2 + 282 x 900 power of 1 + 200 x 900 power of 0 = 1000213298174000 + + Remove leading 1 => Result is 000213298174000 + The array of codewords + The number of codewords + The decoded string representing the Numeric data. + + + + + + + Guenther Grau + + + + Returns the DetectionResult Columns. This does a fair bit of calculation, so call it sparingly. + + The detection result columns. + + + + Adjusts the indicator column row numbers. + + Detection result column. + + + + return number of codewords which don't have a valid row number. Note that the count is not accurate as codewords . + will be counted several times. It just serves as an indicator to see when we can stop adjusting row numbers + + The row numbers. + + + + Adjusts the row numbers by row. + + The row numbers by row. + + + + Adjusts the row numbers from both Row Indicators + + zero + + + + Adjusts the row numbers from Right Row Indicator. + + The unadjusted row count. + + + + Adjusts the row numbers from Left Row Indicator. + + Unadjusted row Count. + + + + Adjusts the row number if valid. + + The invalid rows + Row indicator row number. + Invalid row counts. + Codeword. + + + + Adjusts the row numbers. + + Barcode column. + Codewords row. + Codewords. + + + + Adjusts the row number. + + true, if row number was adjusted, false otherwise. + Codeword. + Other codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + The maximum distance to search in the codeword array in both the positive and negative directions + + + + + The Bounding Box around the column (in the BitMatrix) + + The box. + + + + The Codewords the Box encodes for, offset by the Box minY. + Remember to Access this ONLY through GetCodeword(imageRow) if you're accessing it in that manner. + + The codewords. + + + + Initializes a new instance of the class. + + The Bounding Box around the column (in the BitMatrix) + + + + Converts the Image's Row to the index in the Codewords array + + The Codeword Index. + Image row. + + + + Converts the Codeword array index into a Row in the Image (BitMatrix) + + The Image Row. + Codeword index. + + + + Gets the codeword for a given row + + The codeword. + Image row. + + + + Gets the codeword closest to the specified row in the image + + Image row. + + + + Sets the codeword for an image row + + Image row. + Codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + Gets or sets a value indicating whether this instance is the left indicator + + true if this instance is left; otherwise, false. + + + + Initializes a new instance of the class. + + Box. + If set to true is left. + + + + Sets the Row Numbers as Inidicator Columns + + + + + TODO implement properly + TODO maybe we should add missing codewords to store the correct row number to make + finding row numbers for other columns easier + use row height count to make detection of invalid row numbers more reliable + + The indicator column row numbers. + Metadata. + + + + Gets the row heights. + + The row heights. + + + + Adjusts the in omplete indicator column row numbers. + + Metadata. + + + + Gets the barcode metadata. + + The barcode metadata. + + + + Prune the codewords which do not match the metadata + TODO Maybe we should keep the incorrect codewords for the start and end positions? + + Codewords. + Metadata. + + + + Returns a that represents the current . + + A that represents the current . + + + +

PDF417 error correction implementation.

+

This example + is quite useful in understanding the algorithm.

+ Sean Owen + +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the specified received. + + received codewords + number of those codewords used for EC + location of erasures + The error locations count. + + + + + Runs the euclidean algorithm (Greatest Common Divisor) until r's degree is less than R/2 + + The euclidean algorithm. + + + + Finds the error locations as a direct application of Chien's search + + The error locations. + Error locator. + + + + Finds the error magnitudes by directly applying Forney's Formula + + The error magnitudes. + Error evaluator. + Error locator. + Error locations. + + + +

A field based on powers of a generator integer, modulo some modulus.

+ +
+ Sean Owen +
+ + + + + Sean Owen + + + + Gets the coefficients. + + The coefficients. + + + + degree of this polynomial + + + + + Gets a value indicating whether this instance is zero. + + true if this polynomial is the monomial "0" + + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + + + Adds another Modulus + + Other. + + + + Subtract another Modulus + + Other. + + + + Multiply by another Modulus + + Other. + + + + Returns a Negative version of this instance + + + + + Multiply by a Scalar. + + Scalar. + + + + Multiplies by a Monomial + + The by monomial. + Degree. + Coefficient. + + + + Returns a that represents the current . + + A that represents the current . + + + + + + Guenther Grau + creatale GmbH (christoph.schulz@creatale.de) + + + + The ratios table + + + + + Initializes the class & Pre-computes the symbol ratio table. + + + + + Gets the decoded value. + + The decoded value. + Module bit count. + + + + Samples the bit counts. + + The bit counts. + Module bit count. + + + + Gets the decoded codeword value. + + The decoded codeword value. + Module bit count. + + + + Gets the bit value. + + The bit value. + Module bit count. + + + + Gets the closest decoded value. + + The closest decoded value. + Module bit count. + + + + + + Guenther Grau + + + + Decode the specified image, imageTopLeft, imageBottomLeft, imageTopRight, imageBottomRight, minCodewordWidth + and maxCodewordWidth. + TODO: don't pass in minCodewordWidth and maxCodewordWidth, pass in barcode columns for start and stop pattern + columns. That way width can be deducted from the pattern column. + This approach also allows to detect more details about the barcode, e.g. if a bar type (white or black) is wider + than it should be. This can happen if the scanner used a bad blackpoint. + + Image. + Image top left. + Image bottom left. + Image top right. + Image bottom right. + Minimum codeword width. + Max codeword width. + + + + Merge the specified leftRowIndicatorColumn and rightRowIndicatorColumn. + + Left row indicator column. + Right row indicator column. + + + + Adjusts the bounding box. + + The bounding box. + Row indicator column. + + + + Gets the barcode metadata. + + The barcode metadata. + Left row indicator column. + Right row indicator column. + + + + Gets the row indicator column. + + The row indicator column. + Image. + Bounding box. + Start point. + If set to true left to right. + Minimum codeword width. + Max codeword width. + + + + Adjusts the codeword count. + + Detection result. + Barcode matrix. + + + + Creates the decoder result. + + The decoder result. + Detection result. + + + + This method deals with the fact, that the decoding process doesn't always yield a single most likely value. The + current error correction implementation doesn't deal with erasures very well, so it's better to provide a value + for these ambiguous codewords instead of treating it as an erasure. The problem is that we don't know which of + the ambiguous values to choose. We try decode using the first value, and if that fails, we use another of the + ambiguous values and try to decode again. This usually only happens on very hard to read and decode barcodes, + so decoding the normal barcodes is not affected by this. + + The decoder result from ambiguous values. + Ec level. + Codewords. + contains the indexes of erasures. + array with the indexes that have more than one most likely value. + two dimensional array that contains the ambiguous values. The first dimension must + be the same Length as the ambiguousIndexes array. + + + + Creates the barcode matrix. + + The barcode matrix. + Detection result. + + + + Tests to see if the Barcode Column is Valid + + true, if barcode column is valid, false otherwise. + Detection result. + Barcode column. + + + + Gets the start column. + + The start column. + Detection result. + Barcode column. + Image row. + If set to true left to right. + + + + Detects the codeword. + + The codeword. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + Minimum codeword width. + Max codeword width. + + + + Gets the module bit count. + + The module bit count. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + + + + Gets the number of EC code words. + + The number of EC code words. + Barcode EC level. + + + + Adjusts the codeword start column. + + The codeword start column. + Image. + Minimum column. + Max column. + If set to true left to right. + Codeword start column. + Image row. + + + + Checks the codeword for any skew. + + true, if codeword is within the skew, false otherwise. + Codeword size. + Minimum codeword width. + Max codeword width. + + + + Decodes the codewords. + + The codewords. + Codewords. + Ec level. + Erasures. + + + + Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place. + + The errors. + data and error correction codewords. + positions of any known erasures. + number of error correction codewords that are available in codewords. + + + + Verifies that all is well with the the codeword array. + + Codewords. + Number EC codewords. + + + + Gets the bit count for codeword. + + The bit count for codeword. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Module bit count. + + + + Returns a that represents the jagged array. + + A that represents the jagged array. + Barcode matrix as a jagged array. + + + +

Encapsulates logic that can detect a PDF417 Code in an image, even if the + PDF417 Code is rotated or skewed, or partially obscured.

+ + SITA Lab (kevin.osullivan@sita.aero) + dswitkin@google.com (Daniel Switkin) + Guenther Grau +
+
+ + + B S B S B S B S Bar/Space pattern + 11111111 0 1 0 1 0 1 000. + + + + + 1111111 0 1 000 1 0 1 00 1 + + + + + if we set the value too low, then we don't detect the correct height of the bar if the start patterns are damaged. + if we set the value too high, then we might detect the start pattern from a neighbor barcode. + + + + + A PDF471 barcode should have at least 3 rows, with each row being >= 3 times the module width. Therefore it should be at least + 9 pixels tall. To be conservative, we use about half the size to ensure we don't miss it. + + + + +

Detects a PDF417 Code in an image. Only checks 0 and 180 degree rotations.

+
+ barcode image to decode + optional hints to detector + if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned + + encapsulating results of detecting a PDF417 code + +
+ + + Detects PDF417 codes in an image. Only checks 0 degree rotation (so rotate the matrix and check again outside of this method) + + multiple if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned. + bit matrix to detect barcodes in. + List of ResultPoint arrays containing the coordinates of found barcodes + + + + Locate the vertices and the codewords area of a black blob using the Start and Stop patterns as locators. + + Matrix. + Start row. + Start column. + an array containing the vertices: + vertices[0] x, y top left barcode + vertices[1] x, y bottom left barcode + vertices[2] x, y top right barcode + vertices[3] x, y bottom right barcode + vertices[4] x, y top left codeword area + vertices[5] x, y bottom left codeword area + vertices[6] x, y top right codeword area + vertices[7] x, y bottom right codeword area + + + + + Copies the temp data to the final result + + Result. + Temp result. + Destination indexes. + + + + Finds the rows with the given pattern. + + The rows with pattern. + Matrix. + Height. + Width. + Start row. + Start column. + Pattern. + + + + Finds the guard pattern. Uses System.Linq.Enumerable.Repeat to fill in counters. This might be a performance issue? + + start/end horizontal offset of guard pattern, as an array of two ints. + matrix row of black/white values to search + column x position to start search. + row y position to start search. + width the number of pixels to search on this row. + If set to true search the white patterns first. + pattern of counts of number of black and white pixels that are being searched for as a pattern. + counters array of counters, as long as pattern, to re-use . + + + + Determines how closely a set of observed counts of runs of black/white. + values matches a given target pattern. This is reported as the ratio of + the total variance from the expected pattern proportions across all + pattern elements, to the length of the pattern. + + + ratio of total variance between counters and pattern compared to + total pattern size, where the ratio has been multiplied by 256. + So, 0 means no variance (perfect match); 256 means the total + variance between counters and patterns equals the pattern length, + higher values mean even more variance + + observed counters. + expected pattern. + The most any counter can differ before we give up. + + + + PDF 417 Detector Result class. Skipped private backing stores. + Guenther Grau + + + + + Initializes a new instance of the class. + + Bits. + Points. + + + + defines the level of the error correction / count of error correction codewords + + + + + Holds all of the information for a barcode in a format where it can be easily accessible + + Jacob Haynes + + + + + the height of the matrix (Rows) + the width of the matrix (Cols) + + + + + Jacob Haynes + + + + + Creates a Barcode row of the width + + The width. + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + A boolean which is true if the bar black false if it is white + How many spots wide the bar is. + + + + + This function scales the row + + How much you want the image to be scaled, must be greater than or equal to 1. + the scaled row + + + + + Represents possible PDF417 barcode compaction types. + + + + + + + + + + + + + + + + + + + + + + + + + Data object to specify the minimum and maximum number of rows and columns for a PDF417 barcode. + @author qwandor@google.com (Andrew Walbran) + + + + + Initializes a new instance of the class. + + The min cols. + The max cols. + The min rows. + The max rows. + + + + Gets the min cols. + + + + + Gets the max cols. + + + + + Gets the min rows. + + + + + Gets the max rows. + + + + + Top-level class for the logic part of the PDF417 implementation. + + + + + The start pattern (17 bits) + + + + + The stop pattern (18 bits) + + + + + The codeword table from the Annex A of ISO/IEC 15438:2001(E). + + + + + Calculates the necessary number of rows as described in annex Q of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol (r) + + + + Calculates the number of pad codewords as described in 4.9.2 of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol + the number of pad codewords + + + + Generates the barcode logic. + + the message to encode + PDF417 error correction level to use + + + + Determine optimal nr of columns and rows for the specified number of + codewords. + + number of code words + number of error correction code words + The longest dimension of the barcode, used for columns + The short dimension of the barcode, used for rows + The height of a row, will alter this parameter if aspectRatio>4 (aspectRatio==AUTO) + dimension object containing cols as width and rows as height + + + + Sets max/min row/col values + + maximum allowed columns + minimum allowed columns + maximum allowed rows + minimum allowed rows + + + + Sets compaction to values stored in enum + + compaction mode to use + + + + Sets compact to be true or false + + if true, enables compaction + + + + Sets output encoding. + + sets character encoding to use + + + + Sets the disable eci. + + if set to true don't add an ECI segment for different encodings than default. + + + + PDF417 error correction code following the algorithm described in ISO/IEC 15438:2001(E) in + chapter 4.10. + + + + + Tables of coefficients for calculating error correction words + (see annex F, ISO/IEC 15438:2001(E)) + + + + + Determines the number of error correction codewords for a specified error correction + level. + + the error correction level (0-8) + the number of codewords generated for error correction + + + + Determines the error correction level for AUTO + + The error correction level (0-9) + The number of codewords for AUTO errorCorrectionLevel + the number of codewords generated for error correction + + + + Returns the recommended minimum error correction level as described in annex E of + ISO/IEC 15438:2001(E). + + the number of data codewords + the recommended minimum error correction level + + + + Generates the error correction codewords according to 4.10 in ISO/IEC 15438:2001(E). + + the data codewords + the error correction level (0-8) + the String representing the error correction codewords + + + + defines the level of the error correction / count of error correction codewords + + + + + PDF417 high-level encoder following the algorithm described in ISO/IEC 15438:2001(E) in + annex P. + + + + + code for Text compaction + + + + + code for Byte compaction + + + + + code for Numeric compaction + + + + + Text compaction submode Alpha + + + + + Text compaction submode Lower + + + + + Text compaction submode Mixed + + + + + Text compaction submode Punctuation + + + + + mode latch to Text Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters NOT a multiple of 6) + + + + + mode latch to Numeric Compaction mode + + + + + mode shift to Byte Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters a multiple of 6) + + + + + identifier for a user defined Extended Channel Interpretation (ECI) + + + + + identifier for a general purpose ECO format + + + + + identifier for an ECI of a character set of code page + + + + + Raw code table for text compaction Mixed sub-mode + + + + + Raw code table for text compaction: Punctuation sub-mode + + + + + Performs high-level encoding of a PDF417 message using the algorithm described in annex P + of ISO/IEC 15438:2001(E). If byte compaction has been selected, then only byte compaction + is used. + + the message + compaction mode to use + character encoding used to encode in default or byte compaction + or null for default / not applicable + if true, don't add an ECI segment for different encodings than default + the encoded message (the char values range from 0 to 928) + + + + Encode parts of the message using Text Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.2. + + the message + the start position within the message + the number of characters to encode + receives the encoded codewords + should normally be SUBMODE_ALPHA + the text submode in which this method ends + + + + + Encode parts of the message using Byte Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.3. The Unicode characters will be converted to binary using the cp437 + codepage. + + the message converted to a byte array + the start position within the message + the number of bytes to encode + the mode from which this method starts + receives the encoded codewords + + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using text compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using binary compaction. + + the message + the message converted to a byte array + the start position within the message + + the requested character count + + + + The class holds the available options for the + + + + + Specifies whether to use compact mode for PDF417 (type ). + + + + + Specifies what compaction mode to use for PDF417 (type + ). + + + + + Specifies the minimum and maximum number of rows and columns for PDF417 (type + ). + + + + + Specifies what degree of error correction to use + + + + + Specifies what degree of error correction to use + + + + + Specifies what character encoding to use where applicable (type {@link String}) + + + + + Explicitly disables ECI segment when generating PDF417 Code + That is against the specification but some + readers have problems if the charset is switched from + CP437 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use different encodings + and the ECI segment is omitted. + + + + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Maximum Codewords (Data + Error). + + + + + Gets the bit count sum. + + The bit count sum. + Module bit count. + + + + Converts an ICollection<int> to an int[] + Carry-over from Java. Will likely remove and replace with the Generic .ToArray() method. + + The int array. + List. + + + + Translate the symbol into a codeword + + the codeword corresponding to the symbol. + encoded symbol to translate to a codeword + + + + The sorted table of all possible symbols. Extracted from the PDF417 + specification. The index of a symbol in this table corresponds to the + index into the codeword table. + + + + + This table contains to codewords for all symbols. + + + + + This implementation can detect and decode PDF417 codes in an image. + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Locates and decodes a PDF417 code in an image. + + a String representing the content encoded by the PDF417 code + if a PDF417 cannot be decoded + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + **Note** this will return the FIRST barcode discovered if there are many. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Locates and decodes Multiple PDF417 codes in an image. + + an array of Strings representing the content encoded by the PDF417 codes + + + + + Locates and decodes multiple barcodes in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcodes encode + + + + + Decode the specified image, with the hints and optionally multiple barcodes. + Based on Owen's Comments in , this method has been modified to continue silently + if a barcode was not decoded where it was detected instead of throwing a new exception object. + + Image. + Hints. + If set to true multiple. + + + + Gets the maximum width of the barcode + + The max width. + P1. + P2. + + + + Gets the minimum width of the barcode + + The minimum width. + P1. + P2. + + + + Gets the maximum width of the codeword. + + The max codeword width. + P. + + + + Gets the minimum width of the codeword. + + The minimum codeword width. + P. + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + PDF 417 result meta data. + Guenther Grau + + + + + The Segment ID represents the segment of the whole file distributed over different symbols. + + + + + Is the same for each related PDF417 symbol + + + + + always null + + + + + true if it is the last segment + + + + + count of segments, -1 if not set + + + + + Filename of the encoded file + + + + + filesize in bytes of the encoded file + returns filesize in bytes, -1 if not set + + + + + 16-bit CRC checksum using CCITT-16 + returns crc checksum, -1 if not set + + + + + unix epock timestamp, elapsed seconds since 1970-01-01 + returns elapsed seconds, -1 if not set + + + + + Jacob Haynes + qwandor@google.com (Andrew Walbran) + + + + + default white space (margin) around the code + + + + + default error correction level + + + + + default aspect ratio + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The height of a row in the barcode + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Takes encoder, accounts for width/height, and retrieves bit matrix + + + + + This takes an array holding the values of the PDF 417 + + a byte array of information with 0 is black, and 1 is white + border around the barcode + BitMatrix of the input + + + + Takes and rotates the it 90 degrees + + + + + This object extends LuminanceSource around an array of YUV data returned from the camera driver, + with the option to crop to a rectangle within the full data. This can be used to exclude + superfluous pixels around the perimeter and speed up decoding. + It works for any pixel format where the Y channel is planar and appears first, including + YCbCr_420_SP and YCbCr_422_SP. + @author dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The yuv data. + Width of the data. + Height of the data. + The left. + The top. + The width. + The height. + if set to true [reverse horiz]. + + + + Initializes a new instance of the class. + + The luminances. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + + + + + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Renders the cropped greyscale bitmap. + + + + + + width of image from {@link #renderThumbnail()} + + + + + height of image from {@link #renderThumbnail()} + + + + + creates a new instance + + + + + + + + Sean Owen + + + {@link BitMatrix} to parse + ReaderException if dimension is not >= 21 and 1 mod 4 + + +

Reads format information from one of its two locations within the QR Code.

+ +
+ {@link FormatInformation} encapsulating the QR Code's format info + + ReaderException if both format information locations cannot be parsed as + the valid encoding of format information + +
+ +

Reads version information from one of its two locations within the QR Code.

+ +
+ {@link Version} encapsulating the QR Code's version + + ReaderException if both version information locations cannot be parsed as + the valid encoding of version information + +
+ +

Reads the bits in the {@link BitMatrix} representing the finder pattern in the + correct order in order to reconstruct the codewords bytes contained within the + QR Code.

+ +
+ bytes encoded within the QR Code + + ReaderException if the exact number of bytes expected is not read +
+ + Revert the mask removal done while reading the code words. The bit matrix should revert to its original state. + + + Prepare the parser for a mirrored operation. + This flag has effect only on the {@link #readFormatInformation()} and the + {@link #readVersion()}. Before proceeding with {@link #readCodewords()} the + {@link #mirror()} method should be called. + + @param mirror Whether to read version and format information mirrored. + + + Mirror the bit matrix in order to attempt a second reading. + + +

Encapsulates a block of data within a QR Code. QR Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

When QR Codes use multiple data blocks, they are actually interleaved. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ +
+ bytes as read directly from the QR Code + + version of the QR Code + + error-correction level of the QR Code + + {@link DataBlock}s containing original bytes, "de-interleaved" from representation in the + QR Code + +
+ +

Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations + of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix, + including areas used for finder patterns, timing patterns, etc. These areas should be unused + after the point they are unmasked anyway.

+ +

Note that the diagram in section 6.8.1 is misleading since it indicates that i is column position + and j is row position. In fact, as the text says, i is row position and j is column position.

+ +
+ Sean Owen +
+ + See ISO 18004:2006 6.8.1 + + +

Implementations of this method reverse the data masking process applied to a QR Code and + make its bits ready to read.

+
+ + representation of QR Code bits + dimension of QR Code, represented by bits, being unmasked +
+ +

QR Codes can encode text as bits in one of several modes, and can use multiple modes + in one QR Code. This class decodes the bits back into text.

+ +

See ISO 18004:2006, 6.4.3 - 6.4.7

+ Sean Owen +
+
+ + + See ISO 18004:2006, 6.4.4 Table 5 + + + + + See specification GBT 18284-2000 + + The bits. + The result. + The count. + + + + +

The main class which implements QR Code decoding -- as opposed to locating and extracting + the QR Code from an image.

+
+ + Sean Owen + +
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a QR Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Decodes a QR Code represented as a {@link BitMatrix}. A 1 or "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+
+ data and error correction codewords + number of codewords that are data bytes + +
+ + +

See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels + defined by the QR code standard.

+
+ Sean Owen +
+ + L = ~7% correction + + + M = ~15% correction + + + Q = ~25% correction + + + H = ~30% correction + + + + Gets the bits. + + + + + Gets the name. + + + + + Ordinals this instance. + + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Fors the bits. + + int containing the two bits encoding a QR Code's error correction level + + representing the encoded error correction level + + + +

Encapsulates a QR Code's format information, including the data mask used and + error correction level.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + +
+ + See ISO 18004:2006, Annex C, Table C.1 + + + Offset i holds the number of 1 bits in the binary representation of i + + + + Decodes the format information. + + format info indicator, with mask still applied + The masked format info2. + + information about the format it specifies, or null + if doesn't seem to match any known pattern + + + + +

See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which + data can be encoded to bits in the QR code standard.

+
+ Sean Owen +
+ + + Gets the name. + + + + + enumeration for encoding modes + + + + + + + + + + numeric encoding + + + + + alpha-numeric encoding + + + + + structured append + + + + + byte mode encoding + + + + + ECI segment + + + + + Kanji mode + + + + + FNC1 char, first position + + + + + FNC1 char, second position + + + + + Hanzi mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See GBT 18284-2000; "Hanzi" is a transliteration of this mode name. + + + + Fors the bits. + + four bits encoding a QR Code data mode + + encoded by these bits + + if bits do not correspond to a known mode + + + version in question + + number of bits used, in this QR Code symbol {@link Version}, to encode the + count of characters that will follow encoded in this {@link Mode} + + + + + Gets the bits. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Meta-data container for QR Code decoding. Instances of this class may be used to convey information back to the + decoding caller. Callers are expected to process this. + + + + + Initializes a new instance of the class. + + if set to true [mirrored]. + + + + true if the QR Code was mirrored. + + + + + Apply the result points' order correction due to mirroring. + + Array of points to apply mirror correction to. + + + + See ISO 18004:2006 Annex D + + Sean Owen + + + See ISO 18004:2006 Annex D. + Element i represents the raw version bits that specify version i + 7 + + + + + Gets the version number. + + + + + Gets the alignment pattern centers. + + + + + Gets the total codewords. + + + + + Gets the dimension for version. + + + + + Gets the EC blocks for level. + + The ec level. + + + +

Deduces version information purely from QR Code dimensions.

+ +
+ dimension in modules + + for a QR Code of that dimension or null +
+ + + Gets the version for number. + + The version number. + + + + See ISO 18004:2006 Annex E + + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + + Gets the EC codewords per block. + + + + + Gets the num blocks. + + + + + Gets the total EC codewords. + + + + + Gets the EC blocks. + + + + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the QR code version's format.

+
+
+ + + Gets the count. + + + + + Gets the data codewords. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + See ISO 18004:2006 6.5.1 Table 9 + + +

Encapsulates an alignment pattern, which are the smaller square patterns found in + all but the simplest QR Codes.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Determines if this alignment pattern "about equals" an alignment pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing an average of the two. + + The i. + The j. + New size of the module. + + + +

This class attempts to find alignment patterns in a QR Code. Alignment patterns look like finder + patterns but are smaller and appear at regular intervals throughout the image.

+ +

At the moment this only looks for the bottom-right alignment pattern.

+ +

This is mostly a simplified copy of {@link FinderPatternFinder}. It is copied, + pasted and stripped down here for maximum performance but does unfortunately duplicate + some code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Creates a finder that will look in a portion of the whole image.

+ +
+ image to search + + left column from which to start searching + + top row from which to start searching + + width of region to search + + height of region to search + + estimated module size so far + + callback function which is called, when a result point is found +
+ +

This method attempts to find the bottom-right alignment pattern in the image. It is a bit messy since + it's pretty performance-critical and so is written to be fast foremost.

+ +
+ if found +
+ + Given a count of black/white/black pixels just seen and an end position, + figures the location of the center of this black/white/black run. + + + + count of black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/1 ratios + used by alignment patterns to be considered a match + + + + +

After a horizontal scan finds a potential alignment pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + alignment pattern to see if the same proportion is detected.

+
+ row where an alignment pattern was detected + center of the section that appears to cross an alignment pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of alignment pattern, or null if not found + +
+ +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will see if this pattern had been + found on a previous horizontal scan. If so, we consider it confirmed and conclude we have + found the alignment pattern.

+ +
+ reading state module counts from horizontal scan + + row where alignment pattern may be found + + end of possible alignment pattern in row + + {@link AlignmentPattern} if we have found the same pattern twice, or null if not + +
+ + +

Encapsulates logic that can detect a QR Code in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + + Gets the image. + + + + + Gets the result point callback. + + + + +

Detects a QR Code in an image.

+
+ + encapsulating results of detecting a QR Code + +
+ + +

Detects a QR Code in an image.

+
+ optional hints to detector + + encapsulating results of detecting a QR Code + +
+ + + Processes the finder pattern info. + + The info. + + + +

Computes the dimension (number of modules on a size) of the QR Code based on the position + of the finder patterns and estimated module size.

+
+
+ + +

Computes an average estimated module size based on estimated derived from the positions + of the three finder patterns.

+
+ detected top-left finder pattern center + detected top-right finder pattern center + detected bottom-left finder pattern center + estimated module size +
+ +

Estimates module size based on two finder patterns -- it uses + {@link #sizeOfBlackWhiteBlackRunBothWays(int, int, int, int)} to figure the + width of each, measuring along the axis between their centers.

+
+
+ + See {@link #sizeOfBlackWhiteBlackRun(int, int, int, int)}; computes the total width of + a finder pattern by looking for a black-white-black run from the center in the direction + of another point (another finder pattern center), and in the opposite direction too. + + + +

This method traces a line from a point in the image, in the direction towards another point. + It begins in a black region, and keeps going until it finds white, then black, then white again. + It reports the distance from the start to this point.

+ +

This is used when figuring out how wide a finder pattern is, when the finder pattern + may be skewed or rotated.

+
+
+ + +

Attempts to locate an alignment pattern in a limited region of the image, which is + guessed to contain it. This method uses {@link AlignmentPattern}.

+
+ estimated module size so far + x coordinate of center of area probably containing alignment pattern + y coordinate of above + number of pixels in all directions to search from the center + + if found, or null otherwise + +
+ + +

Encapsulates a finder pattern, which are the three square patterns found in + the corners of QR Codes. It also encapsulates a count of similar finder patterns, + as a convenience to the finder's bookkeeping.

+
+ Sean Owen +
+ + + Gets the size of the estimated module. + + + The size of the estimated module. + + + +

Determines if this finder pattern "about equals" a finder pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing a weighted average + based on count. + + The i. + The j. + New size of the module. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+
+ Sean Owen +
+ + + 1 pixel/module times 3 modules/center + + + + + support up to version 20 for mobile clients + + + + +

Creates a finder that will search the image for three finder patterns.

+
+ image to search +
+ + + Initializes a new instance of the class. + + The image. + The result point callback. + + + + Gets the image. + + + + + Gets the possible centers. + + + + Given a count of black/white/black/white/black pixels just seen and an end position, + figures the location of the center of this run. + + + + count of black/white/black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/3/1/1 ratios + used by finder patterns to be considered a match + + + + + + count of black/white/black/white/black pixels just read + true if the proportions of the counts is close enough to the 1/1/3/1/1 ratios + by finder patterns to be considered a match + + + + After a vertical and horizontal scan finds a potential finder pattern, this method + "cross-cross-cross-checks" by scanning down diagonally through the center of the possible + finder pattern to see if the same proportion is detected. + @param maxCount maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + @param originalStateCountTotal The original state count total. + + row where a finder pattern was detected + center of the section that appears to cross a finder pattern + true if proportions are withing expected limits + + + +

After a horizontal scan finds a potential finder pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + finder pattern to see if the same proportion is detected.

+
+ row where a finder pattern was detected + center of the section that appears to cross a finder pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of finder pattern, or null if not found + +
+ +

Like {@link #crossCheckVertical(int, int, int, int)}, and in fact is basically identical, + except it reads horizontally instead of vertically. This is used to cross-cross + check a vertical cross check and locate the real center of the alignment pattern.

+
+
+ + + @see #handlePossibleCenter(int[], int, int) + + reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + ignored + true if a finder pattern candidate was found this time + + + +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will, ah, cross-cross-check + with another horizontal scan. This is needed primarily to locate the real horizontal + center of the pattern in cases of extreme skew. + And then we cross-cross-cross check with another diagonal scan.

+ If that succeeds the finder pattern location is added to a list that tracks + the number of times each location has been nearly-matched as a finder pattern. + Each additional find is more evidence that the location is in fact a finder + pattern center +
+ reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + + true if a finder pattern candidate was found this time + +
+ + number of rows we could safely skip during scanning, based on the first + two finder patterns that have been located. In some cases their position will + allow us to infer that the third pattern must lie below a certain point farther + down in the image. + + + + true iff we have found at least 3 finder patterns that have been detected + at least {@link #CENTER_QUORUM} times each, and, the estimated module size of the + candidates is "pretty similar" + + + + the 3 best {@link FinderPattern}s from our list of candidates. The "best" are + those that have been detected at least {@link #CENTER_QUORUM} times, and whose module + size differs from the average among those patterns the least + + + + + Orders by furthest from average + + + +

Orders by {@link FinderPattern#getCount()}, descending.

+
+ + +

Encapsulates information about finder patterns in an image, including the location of + the three finder patterns, and their estimated module size.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The pattern centers. + + + + Gets the bottom left. + + + + + Gets the top left. + + + + + Gets the top right. + + + + + JAVAPORT: The original code was a 2D array of ints, but since it only ever gets assigned + 0, 1 and 2 I'm going to use less memory and go with bytes. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Gets the height. + + + + + Gets the width. + + + + + Gets or sets the with the specified x. + + + + + an internal representation as bytes, in row-major order. array[y][x] represents point (x,y) + + + + + Sets the specified x. + + The x. + The y. + The value. + + + + Sets the specified x. + + The x. + The y. + if set to true [value]. + + + + Clears the specified value. + + The value. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + Encode "bytes" with the error correction level "ecLevel". The encoding mode will be chosen + internally by chooseMode(). On success, store the result in "qrCode". + We recommend you to use QRCode.EC_LEVEL_L (the lowest level) for + "getECLevel" since our primary use is to show QR code on desktop screens. We don't need very + strong error correction for this purpose. + Note that there is no way to encode bytes in MODE_KANJI. We might want to add EncodeWithMode() + with which clients can specify the encoding mode. For now, we don't need the functionality. + + text to encode + error correction level to use + representing the encoded QR code + + + + Encodes the specified content. + + The content. + The ec level. + The hints. + + + + + Decides the smallest version of QR code that will contain all of the provided data. + + if the data cannot fit in any version + + + + Gets the alphanumeric code. + + The code. + the code point of the table used in alphanumeric mode or + -1 if there is no corresponding code in the table. + + + + Chooses the mode. + + The content. + + + + + Choose the best mode by examining the content. Note that 'encoding' is used as a hint; + if it is Shift_JIS, and the input is only double-byte Kanji, then we return {@link Mode#KANJI}. + + The content. + The encoding. + + + + + true if the number of input bits will fit in a code with the specified version and error correction level. + + + + Terminate bits as described in 8.4.8 and 8.4.9 of JISX0510:2004 (p.24). + + The num data bytes. + The bits. + + + + Get number of data bytes and number of error correction bytes for block id "blockID". Store + the result in "numDataBytesInBlock", and "numECBytesInBlock". See table 12 in 8.5.1 of + JISX0510:2004 (p.30) + + The num total bytes. + The num data bytes. + The num RS blocks. + The block ID. + The num data bytes in block. + The num EC bytes in block. + + + + Interleave "bits" with corresponding error correction bytes. On success, store the result in + "result". The interleave rule is complicated. See 8.6 of JISX0510:2004 (p.37) for details. + + The bits. + The num total bytes. + The num data bytes. + The num RS blocks. + + + + + Append mode info. On success, store the result in "bits". + + The mode. + The bits. + + + + Append length info. On success, store the result in "bits". + + The num letters. + The version. + The mode. + The bits. + + + + Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits". + + The content. + The mode. + The bits. + The encoding. + + + + + + Satoru Takabayashi + Daniel Switkin + Sean Owen + + + + Apply mask penalty rule 1 and return the penalty. Find repetitive cells with the same color and + give penalty to them. Example: 00000 or 11111. + + The matrix. + + + + + Apply mask penalty rule 2 and return the penalty. Find 2x2 blocks with the same color and give + penalty to them. This is actually equivalent to the spec's rule, which is to find MxN blocks and give a + penalty proportional to (M-1)x(N-1), because this is the number of 2x2 blocks inside such a block. + + The matrix. + + + + + Apply mask penalty rule 3 and return the penalty. Find consecutive cells of 00001011101 or + 10111010000, and give penalty to them. If we find patterns like 000010111010000, we give + penalties twice (i.e. 40 * 2). + + The matrix. + + + + + Apply mask penalty rule 4 and return the penalty. Calculate the ratio of dark cells and give + penalty if the ratio is far from 50%. It gives 10 penalty for 5% distance. + + The matrix. + + + + + Return the mask bit for "getMaskPattern" at "x" and "y". See 8.8 of JISX0510:2004 for mask + pattern conditions. + + The mask pattern. + The x. + The y. + + + + + Helper function for applyMaskPenaltyRule1. We need this for doing this calculation in both + vertical and horizontal orders respectively. + + The matrix. + if set to true [is horizontal]. + + + + + + + + satorux@google.com (Satoru Takabayashi) - creator + + + + + Set all cells to 2. 2 means that the cell is empty (not set yet). + + JAVAPORT: We shouldn't need to do this at all. The code should be rewritten to begin encoding + with the ByteMatrix initialized all to zero. + + The matrix. + + + + Build 2D matrix of QR Code from "dataBits" with "ecLevel", "version" and "getMaskPattern". On + success, store the result in "matrix" and return true. + + The data bits. + The ec level. + The version. + The mask pattern. + The matrix. + + + + Embed basic patterns. On success, modify the matrix and return true. + The basic patterns are: + - Position detection patterns + - Timing patterns + - Dark dot at the left bottom corner + - Position adjustment patterns, if need be + + The version. + The matrix. + + + + Embed type information. On success, modify the matrix. + + The ec level. + The mask pattern. + The matrix. + + + + Embed version information if need be. On success, modify the matrix and return true. + See 8.10 of JISX0510:2004 (p.47) for how to embed version information. + + The version. + The matrix. + + + + Embed "dataBits" using "getMaskPattern". On success, modify the matrix and return true. + For debugging purposes, it skips masking process if "getMaskPattern" is -1. + See 8.7 of JISX0510:2004 (p.38) for how to embed data bits. + + The data bits. + The mask pattern. + The matrix. + + + + Return the position of the most significant bit set (to one) in the "value". The most + significant bit is position 32. If there is no bit set, return 0. Examples: + - findMSBSet(0) => 0 + - findMSBSet(1) => 1 + - findMSBSet(255) => 8 + + The value_ renamed. + + + + + Calculate BCH (Bose-Chaudhuri-Hocquenghem) code for "value" using polynomial "poly". The BCH + code is used for encoding type information and version information. + Example: Calculation of version information of 7. + f(x) is created from 7. + - 7 = 000111 in 6 bits + - f(x) = x^2 + x^2 + x^1 + g(x) is given by the standard (p. 67) + - g(x) = x^12 + x^11 + x^10 + x^9 + x^8 + x^5 + x^2 + 1 + Multiply f(x) by x^(18 - 6) + - f'(x) = f(x) * x^(18 - 6) + - f'(x) = x^14 + x^13 + x^12 + Calculate the remainder of f'(x) / g(x) + x^2 + __________________________________________________ + g(x) )x^14 + x^13 + x^12 + x^14 + x^13 + x^12 + x^11 + x^10 + x^7 + x^4 + x^2 + -------------------------------------------------- + x^11 + x^10 + x^7 + x^4 + x^2 + + The remainder is x^11 + x^10 + x^7 + x^4 + x^2 + Encode it in binary: 110010010100 + The return value is 0xc94 (1100 1001 0100) + + Since all coefficients in the polynomials are 1 or 0, we can do the calculation by bit + operations. We don't care if coefficients are positive or negative. + + The value. + The poly. + + + + + Make bit vector of type information. On success, store the result in "bits" and return true. + Encode error correction level and mask pattern. See 8.9 of + JISX0510:2004 (p.45) for details. + + The ec level. + The mask pattern. + The bits. + + + + Make bit vector of version information. On success, store the result in "bits" and return true. + See 8.10 of JISX0510:2004 (p.45) for details. + + The version. + The bits. + + + + Check if "value" is empty. + + The value. + + true if the specified value is empty; otherwise, false. + + + + + Embed the lonely dark dot at left bottom corner. JISX0510:2004 (p.46) + + The matrix. + + + + + + The x start. + The y start. + The matrix. + + + + Embed position detection patterns and surrounding vertical/horizontal separators. + + The matrix. + + + + Embed position adjustment patterns if need be. + + The version. + The matrix. + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + + + + + + Initializes a new instance of the class. + + + + + Gets or sets the mode. + + + The mode. + + + + + Gets or sets the EC level. + + + The EC level. + + + + + Gets or sets the version. + + + The version. + + + + + Gets or sets the mask pattern. + + + The mask pattern. + + + + + Gets or sets the matrix. + + + The matrix. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Check if "mask_pattern" is valid. + + The mask pattern. + + true if [is valid mask pattern] [the specified mask pattern]; otherwise, false. + + + + + The class holds the available options for the QrCodeWriter + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + . + + + + + Specifies what character encoding to use where applicable (type ) + + + + + Explicitly disables ECI segment when generating QR Code + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + + + + + Specifies the exact version of QR code to be encoded. An integer, range 1 to 40. If the data specified + cannot fit within the required version, a WriterException will be thrown. + + + + + This implementation can detect and decode QR Codes in an image. + Sean Owen + + + + + Gets the decoder. + + + + + + Locates and decodes a QR code in an image. + + a String representing the content encoded by the QR code + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a QR Code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Implementations of this interface can decode an image of a barcode in some format into + the String it encodes. For example, can + decode a QR code. The decoder may optionally receive hints from the caller which may help + it decode more quickly or accurately. + + See , which attempts to determine what barcode + format is present within the image as well, and then decodes it accordingly. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + String which the barcode encodes + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + The general exception class throw when something goes wrong during decoding of a barcode. + This includes, but is not limited to, failing checksums / error correction algorithms, being + unable to locate finder timing patterns, and so on. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class. + + The inner exception. + + + + Initializes a new instance of the class. + + The inner exception. + + + + + Interface for a class to convert a BitMatrix to an output image format + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + The options. + + + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + + + the generated code as byte array of BGRA pixels + + + + + the width of the image + + + + + the height of the image + + + + + converts the pixel data to a bitmap object + + + + + + Renders a to an byte array with pixel data (4 byte per pixel, BGRA) + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Renders a barcode into a Svg image + + + + + Gets or sets the foreground color. + + The foreground color. + + + + Gets or sets the background color. + + The background color. + + + + Gets or sets the font family name + + The font family name. + + + + Gets or sets the font size in pixel + + The font size in pixel. + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Represents a barcode as a Svg image + + + + + Gets or sets the content. + + + The content. + + + + + The original height of the bitmatrix for the barcode + + + + + The original width of the bitmatrix for the barcode + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The content. + + + + Gives the XML representation of the SVG image + + + + + Renders a to a + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + + Gets or sets the font family. + + + The font family. + + + + + Gets or sets the size of the font. + + + The size of the font. + + + + + Gets or sets the font stretch. + + + The font stretch. + + + + + Gets or sets the font style. + + + The font style. + + + + + Gets or sets the font weight. + + + The font weight. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Encapsulates the result of decoding a barcode within an image. + + + + raw text encoded by the barcode, if applicable, otherwise null + + + raw bytes encoded by the barcode, if applicable, otherwise null + + + + points related to the barcode in the image. These are typically points + identifying finder patterns or the corners of the barcode. The exact meaning is + specific to the type of barcode that was decoded. + + + + {@link BarcodeFormat} representing the format of the barcode that was decoded + + + + {@link Hashtable} mapping {@link ResultMetadataType} keys to values. May be + null. This contains optional metadata about what was detected about the barcode, + like orientation. + + + + + Gets the timestamp. + + + + + how many bits of are valid; typically 8 times its length + + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + The timestamp. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + The timestamp. + + + + Adds one metadata to the result + + The type. + The value. + + + + Adds a list of metadata to the result + + The metadata. + + + + Adds the result points. + + The new points. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Represents some type of metadata about the result of the decoding that the decoder + wishes to communicate back to the caller. + + Sean Owen + + + + Unspecified, application-specific metadata. Maps to an unspecified {@link Object}. + + + + + Denotes the likely approximate orientation of the barcode in the image. This value + is given as degrees rotated clockwise from the normal, upright orientation. + For example a 1D barcode which was found by reading top-to-bottom would be + said to have orientation "90". This key maps to an {@link Integer} whose + value is in the range [0,360). + + + + +

2D barcode formats typically encode text, but allow for a sort of 'byte mode' + which is sometimes used to encode binary data. While {@link Result} makes available + the complete raw bytes in the barcode for these formats, it does not offer the bytes + from the byte segments alone.

+

This maps to a {@link java.util.List} of byte arrays corresponding to the + raw bytes in the byte segments in the barcode, in order.

+
+
+ + + Error correction level used, if applicable. The value type depends on the + format, but is typically a String. + + + + + For some periodicals, indicates the issue number as an {@link Integer}. + + + + + For some products, indicates the suggested retail price in the barcode as a + formatted {@link String}. + + + + + For some products, the possible country of manufacture as a {@link String} denoting the + ISO country code. Some map to multiple possible countries, like "US/CA". + + + + + For some products, the extension text + + + + + If the code format supports structured append and + the current scanned code is part of one then the + sequence number is given with it. + + + + + If the code format supports structured append and + the current scanned code is part of one then the + parity is given with it. + + + + + PDF417-specific metadata + + + + + Aztec-specific metadata + + + + + Encapsulates a point of interest in an image containing a barcode. Typically, this + would be the location of a finder pattern or the corner of the barcode, for example. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The x. + The y. + + + + Gets the X. + + + + + Gets the Y. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC and + BC is less than AC and the angle between BC and BA is less than 180 degrees. + + array of three to order + + + + calculates the distance between two points + + first pattern + second pattern + + distance between two points + + + + + Returns the z component of the cross product between vectors BC and BA. + + + + Callback which is invoked when a possible result point (significant + point in the barcode image such as a corner) is found. + + + + + + + + Luminance source class which support different formats of images. + + + + + enumeration of supported bitmap format which the RGBLuminanceSource can process + + + + + format of the byte[] isn't known. RGBLuminanceSource tries to determine the best possible value + + + + + grayscale array, the byte array is a luminance array with 1 byte per pixel + + + + + grayscale array, the byte array is a luminance array with 2 bytes per pixel + + + + + 3 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels alpha, red, green and blue + + + + + 3 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green, red and alpha + + + + + 2 bytes per pixel, 5 bit red, 6 bits green and 5 bits blue + + + + + 4 bytes per pixel with the channels red, green, blue and alpha + + + + + 4 bytes for two pixels, UYVY formatted + + + + + 4 bytes for two pixels, YUYV formatted + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 1 byte per pixel (Gray8). + That means the whole array consists of the luminance values (grayscale). + + The luminance array. + The width. + The height. + if set to true [is8 bit]. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + The bitmap format. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + calculates the luminance values for the given byte array and bitmap format + + + + + + + class which represents the luminance values for a bitmap object of a WriteableBitmap class + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + initializing constructor + + + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + Attribute is only for source code compatibility issues + + + + + Attribute is only for compatibility issues + + + + + Contains conversion support elements such as classes, interfaces and static methods. + + + + + Copies an array of chars obtained from a String into a specified array of chars + + The String to get the chars from + Position of the String to start getting the chars + Position of the String to end getting the chars + Array to return the chars + Position of the destination array of chars to start storing the chars + An array of chars + + + + Sets the capacity for the specified List + + The List which capacity will be set + The new capacity value + + + + Converts a string-Collection to an array + + The strings. + + + + + Joins all elements to one string. + + + The separator. + The values. + + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The value. + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The start index. + The end index. + The value. + + + + + + + + + + + + + + + + + + Savely gets the value of a decoding hint + if hints is null the default is returned + + + The hints. + Type of the hint. + The @default. + + + + The base class for all objects which encode/generate a barcode image. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + A base class which covers the range of exceptions which may occur when encoding a barcode using + the Writer framework. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner exc. + +
+
diff --git a/packages/ZXing.Net.0.16.4/lib/sl5/zxing.sl5.dll b/packages/ZXing.Net.0.16.4/lib/sl5/zxing.sl5.dll new file mode 100644 index 0000000..a2398a3 Binary files /dev/null and b/packages/ZXing.Net.0.16.4/lib/sl5/zxing.sl5.dll differ diff --git a/packages/ZXing.Net.0.16.4/lib/uap10/zxing.dll b/packages/ZXing.Net.0.16.4/lib/uap10/zxing.dll new file mode 100644 index 0000000..9acacdc Binary files /dev/null and b/packages/ZXing.Net.0.16.4/lib/uap10/zxing.dll differ diff --git a/packages/ZXing.Net.0.16.4/lib/uap10/zxing.pri b/packages/ZXing.Net.0.16.4/lib/uap10/zxing.pri new file mode 100644 index 0000000..8c78349 Binary files /dev/null and b/packages/ZXing.Net.0.16.4/lib/uap10/zxing.pri differ diff --git a/packages/ZXing.Net.0.16.4/lib/uap10/zxing.xml b/packages/ZXing.Net.0.16.4/lib/uap10/zxing.xml new file mode 100644 index 0000000..44c6e3c --- /dev/null +++ b/packages/ZXing.Net.0.16.4/lib/uap10/zxing.xml @@ -0,0 +1,11137 @@ + + + + zxing + + + + + Extends with more information specific to the Aztec format, + like the number of layers and whether it's compact. + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + Initializes a new instance of the class. + + The bits. + The points. + if set to true [compact]. + The nb datablocks. + The nb layers. + + + + The main class which implements Aztec Code decoding -- as opposed to locating and extracting + the Aztec Code from an image. + + David Olivier + + + + Decodes the specified detector result. + + The detector result. + + + + + This method is used for testing the high-level encoder + + + + + + + Gets the string encoded in the aztec code bits + + The corrected bits. + the decoded string + + + + gets the table corresponding to the char passed + + The t. + + + + + Gets the character (or string) corresponding to the passed code in the given table + + the table used + the code of the character + + + + + Performs RS error correction on an array of bits. + + The rawbits. + the corrected array + + + + Gets the array of bits from an Aztec Code matrix + + The matrix. + the array of bits + + + + Reads a code of given length and at given index in an array of bits + + The rawbits. + The start index. + The length. + + + + + Reads a code of length 8 in an array of bits, padding with zeros + + + + + + + + Packs a bit array into bytes, most significant bit first + + + + + + + Encapsulates logic that can detect an Aztec Code in an image, even if the Aztec Code + is rotated or skewed, or partially obscured. + + David Olivier + + + + Initializes a new instance of the class. + + The image. + + + + Detects an Aztec Code in an image. + + + + + Detects an Aztec Code in an image. + + if true, image is a mirror-image of original. + + encapsulating results of detecting an Aztec Code + + + + + Extracts the number of data layers and data blocks from the layer around the bull's eye + + bullEyeCornerPoints the array of bull's eye corners + + + + + Corrects the parameter bits using Reed-Solomon algorithm + + paremeter bits + compact true if this is a compact Aztec code + + + + + Finds the corners of a bull-eye centered on the passed point + This returns the centers of the diagonal points just outside the bull's eye + Returns [topRight, bottomRight, bottomLeft, topLeft] + + Center point + The corners of the bull-eye + + + + Finds a candidate center point of an Aztec code from an image + + the center point + + + + Gets the Aztec code corners from the bull's eye corners and the parameters. + + the array of bull's eye corners + the array of aztec code corners + + + + Creates a BitMatrix by sampling the provided image. + topLeft, topRight, bottomRight, and bottomLeft are the centers of the squares on the + diagonal just outside the bull's eye. + + The image. + The top left. + The bottom left. + The bottom right. + The top right. + + + + + Samples a line + + start point (inclusive) + end point (exclusive) + number of bits + the array of bits as an int (first bit is high-order bit of result) + + + + Determines whether [is white or black rectangle] [the specified p1]. + + The p1. + The p2. + The p3. + The p4. + true if the border of the rectangle passed in parameter is compound of white points only + or black points only + + + + Gets the color of a segment + + The p1. + The p2. + 1 if segment more than 90% black, -1 if segment is more than 90% white, 0 else + + + + Gets the coordinate of the first point with a different color in the given direction + + The init. + if set to true [color]. + The dx. + The dy. + + + + + Expand the square represented by the corner points by pushing out equally in all directions + + the corners of the square, which has the bull's eye at its center + the original length of the side of the square in the target bit matrix + the new length of the size of the square in the target bit matrix + the corners of the expanded square + + + + Aztec 2D code representation + + Rustam Abdullaev + + + + Compact or full symbol indicator + + + + + Size in pixels (width and height) + + + + + Number of levels + + + + + Number of data codewords + + + + + The symbol image + + + + + represents a token for a binary shift + + + + + initializing constructor + + + + + + + + appends the byte array to the BitArray + + + + + + + string representation + + + + + + Generates Aztec 2D barcodes. + + Rustam Abdullaev + + + + Encodes the given binary content as an Aztec symbol + + input data string + Aztec symbol matrix with metadata + + + + Encodes the given binary content as an Aztec symbol + + input data string + minimal percentage of error check words (According to ISO/IEC 24778:2008, + a minimum of 23% + 3 words is recommended) + if non-zero, a user-specified value for the number of layers + + Aztec symbol matrix with metadata + + + + + This produces nearly optimal encodings of text into the first-level of + encoding used by Aztec code. + It uses a dynamic algorithm. For each prefix of the string, it determines + a set of encodings that could lead to this prefix. We repeatedly add a + character and generate a new set of optimal encodings until we have read + through the entire input. + @author Frank Yellin + @author Rustam Abdullaev + + + + + + + + + + + Convert the text represented by this High Level Encoder into a BitArray. + + text represented by this encoder encoded as a + + + + State represents all information about a sequence necessary to generate the current output. + Note that a state is immutable. + + + + + Create a new state representing this state with a latch to a (not + necessary different) mode, and then a code. + + + + + Create a new state representing this state, with a temporary shift + to a different mode to output a single value. + + + + + Create a new state representing this state, but an additional character + output in Binary Shift mode. + + + + + Create the state identical to this one, but we are no longer in + Binary Shift mode. + + + + + Returns true if "this" state is better (or equal) to be in than "that" + state under all possible circumstances. + + + + + This implementation can detect and decode Aztec codes in an image. + + David Olivier + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + a String representing the content encoded by the Data Matrix code + + + + + Locates and decodes a Data Matrix code in an image. + + image of barcode to decode + passed as a {@link java.util.Hashtable} from {@link com.google.zxing.DecodeHintType} + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Aztec result meta data. + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + + + + + + + + + Renders an Aztec code as a + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + The class holds the available options for the + + + + + Representing the minimal percentage of error correction words. + Note: an Aztec symbol should have a minimum of 25% EC words. + + + + + Specifies the required number of layers for an Aztec code: + a negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + a positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + + + + + Enumerates barcode formats known to this package. + + Sean Owen + + + Aztec 2D barcode format. + + + CODABAR 1D format. + + + Code 39 1D format. + + + Code 93 1D format. + + + Code 128 1D format. + + + Data Matrix 2D barcode format. + + + EAN-8 1D format. + + + EAN-13 1D format. + + + ITF (Interleaved Two of Five) 1D format. + + + MaxiCode 2D barcode format. + + + PDF417 format. + + + QR Code 2D barcode format. + + + RSS 14 + + + RSS EXPANDED + + + UPC-A 1D format. + + + UPC-E 1D format. + + + UPC/EAN extension format. Not a stand-alone format. + + + MSI + + + Plessey + + + Intelligent Mail barcode + + + + UPC_A | UPC_E | EAN_13 | EAN_8 | CODABAR | CODE_39 | CODE_93 | CODE_128 | ITF | RSS_14 | RSS_EXPANDED + without MSI (to many false-positives) and IMB (not enough tested, and it looks more like a 2D) + + + + + A smart class to decode the barcode inside a bitmap object + + + A smart class to decode the barcode inside a bitmap object + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Optional: Gets or sets the function to create a luminance source object for a bitmap. + If null a platform specific default LuminanceSource is used + + + The function to create a luminance source object. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + A smart class to decode the barcode inside a bitmap object + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Constructor for additional image formats for one BarcodeReader class + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Optional: Gets or sets the function to create a luminance source object for a bitmap. + If null a platform specific default LuminanceSource is used + + + The function to create a luminance source object. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + A smart class to decode the barcode inside a bitmap object + + + + + represents the default function which is called to get a instance from a raw byte array + + + + + Gets or sets the options. + + + The options. + + + + + Gets the reader which should be used to find and decode the barcode. + + + The reader. + + + + + Gets or sets a method which is called if an important point is found + + + The result point callback. + + + + + event is executed if a result was found via decode + + + + + Gets or sets a value indicating whether the image should be automatically rotated. + Rotation is supported for 90, 180 and 270 degrees + + + true if image should be rotated; otherwise, false. + + + + + Gets or sets a value indicating whether the image should be automatically inverted + if no result is found in the original image. + ATTENTION: Please be carefully because it slows down the decoding process if it is used + + + true if image should be inverted; otherwise, false. + + + + + Optional: Gets or sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + The function to create a binarizer object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb array. + If null the RGBLuminanceSource is used. The handler is only called when Decode with a byte[] array is called. + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + raises the ResultFound event + + + + + + raises the ResultFound event + + + + + + calls the explicitResultPointFound action + + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + A smart class to encode some content to raw pixel data + + + + + Initializes a new instance of the class. + + + + + A smart class to encode some content to a barcode image + + + + + Initializes a new instance of the class. + + + + + A smart class to encode some content to a svg barcode image + + + + + Initializes a new instance of the class. + + + + + A smart class to encode some content to a barcode image + + + + + Initializes a new instance of the class. + + + + + A base class for specific barcode writers with specific formats of barcode images. + + The type of the output. + + + + Gets or sets the renderer which should be used to render the encoded BitMatrix. + + + + + Encodes the specified contents and returns a rendered instance of the barcode. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The matrix. + + + + + A base class for specific barcode writers with specific formats of barcode images. + + + + + Gets or sets the barcode format. + The value is only suitable if the MultiFormatWriter is used. + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + + + + + + + + + + + + Encodes the specified contents and returns a BitMatrix array. + That array has to be rendered manually or with a IBarcodeRenderer. + + The contents. + + + + + The base class for luminance sources which supports + cropping and rotating based upon the luminance values. + + + + + weight of the red channel for calculating a gray scale image + + + + + weight of the green channel for calculating a gray scale image + + + + + weight of the blue channel for calculating a gray scale image + + + + + numbers of bits which for right shifting + + + + + + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + + The luminance array. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + gets the luminance matrix + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + TODO: not implemented yet + + + A rotated version of this object. + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + + Whether this subclass supports cropping. + + + + + Whether this subclass supports invertion. + + + + Inverts the luminance values (newValue = 255 - oldValue) + + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + This class hierarchy provides a set of methods to convert luminance data to 1 bit data. + It allows the algorithm to vary polymorphically, for example allowing a very expensive + thresholding technique for servers and a fast one for mobile. It also permits the implementation + to vary, e.g. a JNI version for Android and a Java fallback version for other platforms. + + dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The source. + + + + Gets the luminance source object. + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + For callers which only examine one row of pixels at a time, the same BitArray should be reused + and passed in with each call for performance. However it is legal to keep more than one row + at a time if needed. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + Converts a 2D array of luminance data to 1 bit data. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + A new concrete Binarizer implementation object. + + + + Gets the width of the luminance source object. + + + + + Gets the height of the luminance source object. + + + + + This class is the core bitmap class used by ZXing to represent 1 bit data. Reader objects + accept a BinaryBitmap and attempt to decode it. + + dswitkin@google.com (Daniel Switkin) + + + + + + + + + + The width of the bitmap. + + + + + The height of the bitmap. + + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + + The row to fetch, which must be in [0, bitmap height). + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + + Converts a 2D array of luminance data to 1 bit. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + + Whether this bitmap can be cropped. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if isCropSupported() is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + + Whether this bitmap supports counter-clockwise rotation. + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + class which represents the luminance values for a bitmap object of a SoftwareBitmap class + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + initializing constructor + + + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + class which represents the luminance values for a bitmap object of a WriteableBitmap class + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + initializing constructor + + + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + +

See + + DoCoMo's documentation about the result types represented by subclasses of this class.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + Implements KDDI AU's address book format. See + + http://www.au.kddi.com/ezfactory/tec/two_dimensions/index.html. + (Thanks to Yuzo for translating!) + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Implements the "MECARD" address book entry format. + + Supported keys: N, SOUND, TEL, EMAIL, NOTE, ADR, BDAY, URL, plus ORG + Unsupported keys: TEL-AV, NICKNAME + + Except for TEL, multiple values for keys are also not supported; + the first one found takes precedence. + + Our understanding of the MECARD format is based on this document: + + http://www.mobicode.org.tw/files/OMIA%20Mobile%20Bar%20Code%20Standard%20v3.2.1.doc + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes contact information, like that in an address book entry. + + Sean Owen + + + + initializing constructor + + + + + + + + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + the names + + + + + the nicknames + + + + + In Japanese, the name is written in kanji, which can have multiple readings. Therefore a hint + is often provided, called furigana, which spells the name phonetically. + + The pronunciation of the getNames() field, often in hiragana or katakana. + + + + the phone numbers + + + + optional descriptions of the type of each phone number. It could be like "HOME", but, + there is no guaranteed or standard format. + + + + the e-mail addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the instant messenger addresses + + + + + the note field + + + + + the addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the title + + + + + the urls + + + + birthday formatted as yyyyMMdd (e.g. 19780917) + + + a location as a latitude/longitude pair + + + Implements the "BIZCARD" address book entry format, though this has been + largely reverse-engineered from examples observed in the wild -- still + looking for a definitive reference. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a calendar event at a certain time, optionally with attendees and a location. + + Sean Owen + + + + Gets the start. + + + + + Determines whether [is start all day]. + + if start time was specified as a whole day + + + + event end , or null if event has no duration + + + + + Gets a value indicating whether this instance is end all day. + + true if end time was specified as a whole day + + + + Parses a string as a date. RFC 2445 allows the start and end fields to be of type DATE (e.g. 20081021) + or DATE-TIME (e.g. 20081021T123000 for local time, or 20081021T123000Z for UTC). + + The string to parse + + if not a date formatted string + + + + Represents a parsed result that encodes an email message including recipients, subject and body text. + + Sean Owen + + + + the email address + + + + + the TOs + + + + + the CCs + + + + + the BCCs + + + + + the subject + + + + + the body + + + + + the mailto: uri + + + + + Represents a result that encodes an e-mail address, either as a plain address + like "joe@example.org" or a mailto: URL like "mailto:joe@example.org". + + Sean Owen + + + + Implements the "MATMSG" email message entry format. + + Supported keys: TO, SUB, BODY + + Sean Owen + + + + This implements only the most basic checking for an email address's validity -- that it contains + an '@' and contains no characters disallowed by RFC 2822. This is an overly lenient definition of + validity. We want to generally be lenient here since this class is only intended to encapsulate what's + in a barcode, not "judge" it. + + The email. + + true if it is basically a valid email address; otherwise, false. + + + + + Represents a parsed result that encodes extended product information as encoded by the RSS format, like weight, price, dates, etc. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + extension for kilogram weight type + + + + + extension for pounds weight type + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the raw text + + + + + the product id + + + + + the sscc + + + + + the lot number + + + + + the production date + + + + + the packaging date + + + + + the best before date + + + + + the expiration date + + + + + the weight + + + + + the weight type + + + + + the weight increment + + + + + the price + + + + + the price increment + + + + + the price currency + + + + + the uncommon AIs + + + + + the display representation (raw text) + + + + + Parses strings of digits that represent a RSS Extended code. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + tries to parse a text representation to a specific result object + + + + + + + Represents a parsed result that encodes a geographic coordinate, with latitude, longitude and altitude. + + Sean Owen + + + latitude in degrees + + + + longitude in degrees + + + + altitude in meters. If not specified, in the geo URI, returns 0.0 + + + + query string associated with geo URI or null if none exists + + + + the geo URI + + + + a URI link to Google Maps which display the point on the Earth described + by this instance, and sets the zoom level in a way that roughly reflects the + altitude, if specified + + + + Parses a "geo:" URI result, which specifies a location on the surface of + the Earth as well as an optional altitude above the surface. See + + http://tools.ietf.org/html/draft-mayrhofer-geo-uri-00. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a product ISBN number. + + jbreiden@google.com (Jeff Breidenbach) + + + + the ISBN number + + + + Parses strings of digits that represent a ISBN. + + + jbreiden@google.com (Jeff Breidenbach) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + See ISBN-13 For Dummies + + The result. + + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link ResultParser#parseResult(Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Represents the type of data encoded by a barcode -- from plain text, to a + URI, to an e-mail address, etc. + + Sean Owen + + + + Represents a parsed result that encodes a product by an identifier of some kind. + + dswitkin@google.com (Daniel Switkin) + + + + Parses strings of digits that represent a UPC code. + + dswitkin@google.com (Daniel Switkin) + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link #parseResult(com.google.zxing.Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Attempts to parse the raw {@link Result}'s contents as a particular type + of information (email, URL, etc.) and return a {@link ParsedResult} encapsulating + the result of parsing. + + the raw to parse + encapsulating the parsing result + + + + Parses the result. + + The result. + + + +

Parses an "sms:" URI result, which specifies a number to SMS and optional + "via" number. See + the IETF draft on this.

+ +

This actually also parses URIs starting with "mms:", "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + + Represents a parsed result that encodes an SMS message, including recipients, subject and body text. + + Sean Owen + + + +

Parses an "smsto:" URI result, whose format is not standardized but appears to be like: + {@code smsto:number(:body)}.

+

This actually also parses URIs starting with "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+
+ Sean Owen +
+ + +

Parses an "smtp:" URI result, whose format is not standardized but appears to be like: + smtp[:subject[:body]]}.

+

See http://code.google.com/p/zxing/issues/detail?id=536

+
+ Sean Owen +
+ + + Represents a parsed result that encodes a telephone number. + + Sean Owen + + + + Parses a "tel:" URI result, which specifies a phone number. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + A simple result type encapsulating a string that has no further interpretation. + + Sean Owen + + + + A simple result type encapsulating a URI that has no further interpretation. + + Sean Owen + + + true if the URI contains suspicious patterns that may suggest it intends to + mislead the user about its true nature. At the moment this looks for the presence + of user/password syntax in the host/authority portion of a URI which may be used + in attempts to make the URI's host appear to be other than it is. Example: + http://yourbank.com@phisher.com This URI connects to phisher.com but may appear + to connect to yourbank.com at first glance. + + + + Transforms a string that represents a URI into something more proper, by adding or canonicalizing + the protocol. + + + + + Tries to parse results that are a URI of some kind. + + Sean Owen + + + Parses the "URLTO" result format, which is of the form "URLTO:[title]:[url]". + This seems to be used sometimes, but I am not able to find documentation + on its origin or official format? + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Parses contact information formatted according to the VCard (2.1) format. This is not a complete + implementation but should parse information as commonly encoded in 2D barcodes. + + Sean Owen + + + Formats name fields of the form "Public;John;Q.;Reverend;III" into a form like + "Reverend John Q. Public III". + + @param names name values to format, in place + + + + Partially implements the iCalendar format's "VEVENT" format for specifying a + calendar event. See RFC 2445. This supports SUMMARY, DTSTART and DTEND fields. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a Vehicle Identification Number (VIN). + + + + + Detects a result that is likely a vehicle identification number. + @author Sean Owen + + + + + Represents a parsed result that encodes wifi network information, like SSID and password. + + Vikram Aggarwal + + + + + A simple, fast array of bits, represented compactly by an array of ints internally. + + Sean Owen + + + + size of the array, number of elements + + + + + size of the array in bytes + + + + + index accessor + + + + + + + default constructor + + + + + initializing constructor + + desired size of the array + + + + Flips bit i. + + bit to set + + + + + Gets the next set. + + first bit to check + index of first bit that is set, starting from the given index, or size if none are set + at or beyond this given index + + + + see getNextSet(int) + + index to start looking for unset bit + index of next unset bit, or if none are unset until the end + + + Sets a block of 32 bits, starting at bit i. + + + first bit to set + + the new value of the next 32 bits. Note again that the least-significant bit + corresponds to bit i, the next-least-significant to i+1, and so on. + + + + + Sets a range of bits. + + start of range, inclusive. + end of range, exclusive + + + Clears all bits (sets to false). + + + Efficient method to check if a range of bits is set, or not set. + + + start of range, inclusive. + + end of range, exclusive + + if true, checks that bits in range are set, otherwise checks that they are not set + + true iff all bits are set or not set in range, according to value argument + if end is less than start or the range is not contained in the array + + + + Appends the bit. + + The bit. + + + underlying array of ints. The first element holds the first 32 bits, and the least + significant bit is bit 0. + + + + + Appends the least-significant bits, from value, in order from most-significant to + least-significant. For example, appending 6 bits from 0x000001E will append the bits + 0, 1, 1, 1, 1, 0 in that order. + + containing bits to append + bits from value to append + + + + adds the array to the end + + + + + + XOR operation + + + + + + converts to bytes. + + first bit to start writing + array to write into. Bytes are written most-significant byte first. This is the opposite + of the internal representation, which is exposed by BitArray + position in array to start writing + how many bytes to write + + + Reverses all bits in the array. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Erstellt ein neues Objekt, das eine Kopie der aktuellen Instanz darstellt. + + + Ein neues Objekt, das eine Kopie dieser Instanz darstellt. + + + + +

Represents a 2D matrix of bits. In function arguments below, and throughout the common + module, x is the column position, and y is the row position. The ordering is always x, y. + The origin is at the top-left.

+

Internally the bits are represented in a 1-D array of 32-bit ints. However, each row begins + with a new int. This is done intentionally so that we can copy out a row into a BitArray very + efficiently.

+

The ordering of bits is row-major. Within each int, the least significant bits are used first, + meaning they represent lower x values. This is compatible with BitArray's implementation.

+
+ Sean Owen + dswitkin@google.com (Daniel Switkin) +
+ + The width of the matrix + + + + The height of the matrix + + + + This method is for compatibility with older code. It's only logical to call if the matrix + is square, so I'm throwing if that's not the case. + + + row/column dimension of this matrix + + + + + The rowsize of the matrix + + + + + Creates an empty square . + + height and width + + + + Creates an empty square . + + bit matrix width + bit matrix height + + + + Interprets a 2D array of booleans as a , where "true" means an "on" bit. + + bits of the image, as a row-major 2D array. Elements are arrays representing rows + representation of image + + +

Gets the requested bit, where true means black.

+ +
+ The horizontal component (i.e. which column) + + The vertical component (i.e. which row) + + value of given bit in matrix + +
+ + +

Flips the given bit.

+
+ The horizontal component (i.e. which column) + The vertical component (i.e. which row) +
+ + + flip all of the bits, if shouldBeFlipped is true for the coordinates + + should return true, if the bit at a given coordinate should be flipped + + + + Exclusive-or (XOR): Flip the bit in this {@code BitMatrix} if the corresponding + mask bit is set. + + The mask. + + + Clears all bits (sets to false). + + +

Sets a square region of the bit matrix to true.

+ +
+ The horizontal position to begin at (inclusive) + + The vertical position to begin at (inclusive) + + The width of the region + + The height of the region + +
+ + A fast method to retrieve one row of data from the matrix as a BitArray. + + + The row to retrieve + + An optional caller-allocated BitArray, will be allocated if null or too small + + The resulting BitArray - this reference should always be used even when passing + your own row + + + + + Sets the row. + + row to set + {@link BitArray} to copy from + + + + Modifies this {@code BitMatrix} to represent the same but rotated 180 degrees + + + + + This is useful in detecting the enclosing rectangle of a 'pure' barcode. + + {left,top,width,height} enclosing rectangle of all 1 bits, or null if it is all white + + + + This is useful in detecting a corner of a 'pure' barcode. + + {x,y} coordinate of top-left-most 1 bit, or null if it is all white + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + The line separator. + + A that represents this instance. + + + + + Clones this instance. + + + + +

This provides an easy abstraction to read bits at a time from a sequence of bytes, where the + number of bits read is not often a multiple of 8.

+ +

This class is thread-safe but not reentrant. Unless the caller modifies the bytes array + it passed in, in which case all bets are off.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + bytes from which this will read bits. Bits will be read from the first byte first. + Bits are read within a byte from most-significant to least-significant bit. + + + + + index of next bit in current byte which would be read by the next call to {@link #readBits(int)}. + + + + + index of next byte in input byte array which would be read by the next call to {@link #readBits(int)}. + + + + number of bits to read + + int representing the bits read. The bits will appear as the least-significant + bits of the int + + if numBits isn't in [1,32] or more than is available + + + number of bits that can be read successfully + + + + Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1 + of ISO 18004. + + + Sean Owen + + + character set ECI value + representing ECI of given value, or null if it is legal but unsupported + + + character set ECI encoding name + representing ECI for character encoding, or null if it is legalbut unsupported + + + + Encapsulates the result of decoding a matrix of bits. This typically + applies to 2D barcode formats. For now it contains the raw bytes obtained, + as well as a String interpretation of those bytes, if applicable. + Sean Owen + + + + + raw bytes representing the result, or null if not applicable + + + + + how many bits of are valid; typically 8 times its length + + + + + text representation of the result + + + + + list of byte segments in the result, or null if not applicable + + + + + name of error correction level used, or null if not applicable + + + + + gets a value which describe if structure append data was found + + + + + number of errors corrected, or null if not applicable + + + + + gives the sequence number of the result if structured append was found + + + + + number of erasures corrected, or null if not applicable + + + + + gives the parity information if structured append was found + + + + + Miscellanseous data value for the various decoders + + The other. + + + + initializing constructor + + + + + + + + + initializing constructor + + + + + + + + + + + initializing constructor + + + + + + + + + + initializing constructor + + + + + + + + + + + + Defines an container for encoder options + + + + + Gets the data container for all options + + + + + event is raised when a value is changed + + + + + Gets or sets a flag which cause a deeper look into the bitmap + + + true if [try harder]; otherwise, false. + + + + + Image is a pure monochrome image of a barcode. + + + true if monochrome image of a barcode; otherwise, false. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + The character set. + + + + + Image is known to be of one of a few possible formats. + Maps to a {@link java.util.List} of {@link BarcodeFormat}s. + + + The possible formats. + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + true if it should assume a Code 39 check digit; otherwise, false. + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). + + + true if it should assume GS1; otherwise, false. + + + + + Assume MSI codes employ a check digit. Maps to . + + + true if it should assume a MSI check digit; otherwise, false. + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Initializes a new instance of the class. + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Encapsulates the result of detecting a barcode in an image. This includes the raw + matrix of black/white pixels corresponding to the barcode, and possibly points of interest + in the image, like the location of finder patterns or corners of the barcode in the image.

+
+ Sean Owen +
+ + + the detected bits + + + + + the pixel points where the result is found + + + + + initializing constructor + + + + + + + General math-related and numeric utility functions. + + + + + Ends up being a bit faster than {@link Math#round(float)}. This merely rounds its + argument to the nearest int, where x.5 rounds up to x+1. Semantics of this shortcut + differ slightly from {@link Math#round(float)} in that half rounds down for negative + values. -2.5 rounds to -3, not -2. For purposes here it makes no difference. + + real value to round + nearest int + + + + + + + + + + Euclidean distance between points A and B + + + + + + + + + + Euclidean distance between points A and B + + + + + values to sum + sum of values in array + + +

A somewhat generic detector that looks for a barcode-like rectangular region within an image. + It looks within a mostly white region of an image for a region of black and white, but mostly + black. It returns the four corners of the region, as best it can determine.

+ +
+ Sean Owen +
+ + + initializing constructor + + + + + +

Detects a rectangular region of black and white -- mostly black -- with a region of mostly + white, in an image.

+
+ [] describing the corners of the rectangular region. The first and + last points are opposed on the diagonal, as are the second and third. The first point will be + the topmost point and the last, the bottommost. The second point will be leftmost and the + third, the rightmost + +
+ + Attempts to locate a corner of the barcode by scanning up, down, left or right from a center + point which should be within the barcode. + + + center's x component (horizontal) + + same as deltaY but change in x per step instead + + minimum value of x + + maximum value of x + + center's y component (vertical) + + change in y per step. If scanning up this is negative; down, positive; + left or right, 0 + + minimum value of y to search through (meaningless when di == 0) + + maximum value of y + + maximum run of white pixels that can still be considered to be within + the barcode + + a encapsulating the corner that was found + + + + Computes the start and end of a region of pixels, either horizontally or vertically, that could + be part of a Data Matrix barcode. + + + if scanning horizontally, this is the row (the fixed vertical location) + where we are scanning. If scanning vertically it's the column, the fixed horizontal location + + largest run of white pixels that can still be considered part of the + barcode region + + minimum pixel location, horizontally or vertically, to consider + + maximum pixel location, horizontally or vertically, to consider + + if true, we're scanning left-right, instead of up-down + + int[] with start and end of found range, or null if no such range is found + (e.g. only white was found) + + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. By keeping track of the + last black points it encountered, it determines the corners of the barcode. + + David Olivier + + + + Creates a WhiteRectangleDetector instance + + The image. + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + Creates a WhiteRectangleDetector instance + + barcode image to find a rectangle in + initial size of search area around center + x position of search center + y position of search center + + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + + Initializes a new instance of the class. + + The image. + if image is too small + + + + Initializes a new instance of the class. + + The image. + Size of the init. + The x. + The y. + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. + + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + recenters the points of a constant distance towards the center + + bottom most point + left most point + right most point + top most point + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + Determines whether a segment contains a black point + + min value of the scanned coordinate + max value of the scanned coordinate + value of fixed coordinate + set to true if scan must be horizontal, false if vertical + + true if a black point has been found, else false. + + + + + Superclass of classes encapsulating types ECIs, according to "Extended Channel Interpretations" + 5.3 of ISO 18004. + + Sean Owen + + + + the ECI value + + + + ECI value + representing ECI of given value, or null if it is legal but unsupported + ArgumentException if ECI value is invalid + + + + Defines an container for encoder options + + + + + Gets the data container for all options + + + + + Specifies the height of the barcode image + + + + + Specifies the width of the barcode image + + + + + Don't put the content string into the output image. + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + + + + + Specifies whether the data should be encoded to the GS1 standard; + FNC1 character is added in front of the data + + + + + Initializes a new instance of the class. + + + + This Binarizer implementation uses the old ZXing global histogram approach. It is suitable + for low-end mobile devices which don't have enough CPU or memory to use a local thresholding + algorithm. However, because it picks a global black point, it cannot handle difficult shadows + and gradients. + + Faster mobile devices and all desktop applications should probably use HybridBinarizer instead. + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The source. + + + + Applies simple sharpening to the row data to improve performance of the 1D Readers. + + + + + + + + Does not sharpen the data, as this call is intended to only be used by 2D Readers. + + + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + + A new concrete Binarizer implementation object. + + + + Implementations of this class can, given locations of finder patterns for a QR code in an + image, sample the right points in the image to reconstruct the QR code, accounting for + perspective distortion. It is abstracted since it is relatively expensive and should be allowed + to take advantage of platform-specific optimized implementations, like Sun's Java Advanced + Imaging library, but which may not be available in other environments such as J2ME, and vice + versa. + + The implementation used can be controlled by calling {@link #setGridSampler(GridSampler)} + with an instance of a class which implements this interface. + + Sean Owen + + + the current implementation of + + + + Sets the implementation of used by the library. One global + instance is stored, which may sound problematic. But, the implementation provided + ought to be appropriate for the entire platform, and all uses of this library + in the whole lifetime of the JVM. For instance, an Android activity can swap in + an implementation that takes advantage of native platform libraries. + + The platform-specific object to install. + + + +

Samples an image for a square matrix of bits of the given dimension. This is used to extract + the black/white modules of a 2D barcode like a QR Code found in an image. Because this barcode + may be rotated or perspective-distorted, the caller supplies four points in the source image + that define known points in the barcode, so that the image may be sampled appropriately.

+

The last eight "from" parameters are four X/Y coordinate pairs of locations of points in + the image that define some significant points in the image to be sample. For example, + these may be the location of finder pattern in a QR Code.

+

The first eight "to" parameters are four X/Y coordinate pairs measured in the destination + , from the top left, where the known points in the image given by the "from" + parameters map to.

+

These 16 parameters define the transformation needed to sample the image.

+
+ image to sample + The dimension X. + The dimension Y. + The p1 preimage X. + The p1 preimage Y. + The p2 preimage X. + The p2 preimage Y. + The p3 preimage X. + The p3 preimage Y. + The p4 preimage X. + The p4 preimage Y. + The p1 image X. + The p1 image Y. + The p2 image X. + The p2 image Y. + The p3 image X. + The p3 image Y. + The p4 image X. + The p4 image Y. + + representing a grid of points sampled from the image within a region + defined by the "from" parameters + + ReaderException if image can't be sampled, for example, if the transformation defined +
+ + + + + + + + + + + +

Checks a set of points that have been transformed to sample points on an image against + the image's dimensions to see if the point are even within the image.

+ +

This method will actually "nudge" the endpoints back onto the image if they are found to be + barely (less than 1 pixel) off the image. This accounts for imperfect detection of finder + patterns in an image where the QR Code runs all the way to the image border.

+ +

For efficiency, the method will check points from either end of the line until one is found + to be within the image. Because the set of points are assumed to be linear, this is valid.

+ +
+ image into which the points should map + + actual points in x1,y1,...,xn,yn form + +
+ + This class implements a local thresholding algorithm, which while slower than the + GlobalHistogramBinarizer, is fairly efficient for what it does. It is designed for + high frequency images of barcodes with black data on white backgrounds. For this application, + it does a much better job than a global blackpoint with severe shadows and gradients. + However it tends to produce artifacts on lower frequency images and is therefore not + a good general purpose binarizer for uses outside ZXing. + + This class extends GlobalHistogramBinarizer, using the older histogram approach for 1D readers, + and the newer local approach for 2D readers. 1D decoding using a per-row histogram is already + inherently local, and only fails for horizontal gradients. We can revisit that problem later, + but for now it was not a win to use local blocks for 1D. + + This Binarizer is the default for the unit tests and the recommended class for library users. + dswitkin@google.com (Daniel Switkin) + + + + + gives the black matrix + + + + + initializing constructor + + + + + + creates a new instance + + + + + + + Calculates the final BitMatrix once for all requests. This could be called once from the + constructor instead, but there are some advantages to doing it lazily, such as making + profiling easier, and not doing heavy lifting when callers don't expect it. + + + + + For each 8x8 block in the image, calculate the average black point using a 5x5 grid + of the blocks around it. Also handles the corner cases (fractional blocks are computed based + on the last 8 pixels in the row/column which are also used in the previous block). + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + The black points. + The matrix. + + + + Applies a single threshold to an 8x8 block of pixels. + + The luminances. + The xoffset. + The yoffset. + The threshold. + The stride. + The matrix. + + + + Calculates a single black point for each 8x8 block of pixels and saves it away. + See the following thread for a discussion of this algorithm: + http://groups.google.com/group/zxing/browse_thread/thread/d06efa2c35a7ddc0 + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + + + +

This class implements a perspective transform in two dimensions. Given four source and four + destination points, it will compute the transformation implied between them. The code is based + directly upon section 3.4.2 of George Wolberg's "Digital Image Warping"; see pages 54-56.

+
+ Sean Owen +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Convenience method, not optimized for performance. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

This class contains utility methods for performing mathematical operations over + the Galois Fields. Operations use a given primitive polynomial in calculations.

+

Throughout this package, elements of the GF are represented as an {@code int} + for convenience and speed (but at the cost of memory). +

+
+ Sean Owen +
+ + + Create a representation of GF(size) using the given primitive polynomial. + + irreducible polynomial whose coefficients are represented by + * the bits of an int, where the least-significant bit represents the constant + * coefficient + the size of the field + the factor b in the generator polynomial can be 0- or 1-based + * (g(x) = (x+a^b)(x+a^(b+1))...(x+a^(b+2t-1))). + * In most cases it should be 1, but for QR code it is 0. + + + + Builds the monomial. + + The degree. + The coefficient. + the monomial representing coefficient * x^degree + + + + Implements both addition and subtraction -- they are the same in GF(size). + + sum/difference of a and b + + + + Exps the specified a. + + 2 to the power of a in GF(size) + + + + Logs the specified a. + + A. + base 2 log of a in GF(size) + + + + Inverses the specified a. + + multiplicative inverse of a + + + + Multiplies the specified a with b. + + A. + The b. + product of a and b in GF(size) + + + + Gets the size. + + + + + Gets the generator base. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + +

Represents a polynomial whose coefficients are elements of a GF. + Instances of this class are immutable.

+

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + the {@link GenericGF} instance representing the field to use + to perform computations + coefficients as ints representing elements of GF(size), arranged + from most significant (highest-power term) coefficient to least significant + if argument is null or empty, + or if leading coefficient is 0 and this is not a + constant polynomial (that is, it is not the monomial "0") + + + + degree of this polynomial + + + + + Gets a value indicating whether this is zero. + + true iff this polynomial is the monomial "0" + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + +

Implements Reed-Solomon decoding, as the name implies.

+ +

The algorithm will not be explained here, but the following references were helpful + in creating this implementation:

+ + + +

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+ +
+ Sean Owen + William Rucklidge + sanfordsquires +
+ + +

Decodes given set of received codewords, which include both data and error-correction + codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place, + in the input.

+
+ data and error-correction codewords + number of error-correction codewords available + false: decoding fails +
+ + + Implements Reed-Solomon encoding, as the name implies. + + Sean Owen + William Rucklidge + + + + Common string-related functions. + + Sean Owen + Alex Dupre + + + + SJIS + + + + + GB2312 + + + + + Guesses the encoding. + + bytes encoding a string, whose encoding should be guessed + decode hints if applicable + name of guessed encoding; at the moment will only guess one of: + {@link #SHIFT_JIS}, {@link #UTF8}, {@link #ISO88591}, or the platform + default encoding if none of these can possibly be correct + + + + This implementation can detect and decode Data Matrix codes in an image. + + bbrown@google.com (Brian Brown) + + + + + Locates and decodes a Data Matrix code in an image. + + + a String representing the content encoded by the Data Matrix code + + + + Locates and decodes a Data Matrix code in an image. + + + + a String representing the content encoded by the Data Matrix code + + + + does nothing here + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a Data Matrix code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + Guillaume Le Biller Added to zxing lib. + + + + encodes the content to a BitMatrix + + + + + + + + + + encodes the content to a BitMatrix + + + + + + + + + + + Encode the given symbol info to a bit matrix. + + The DataMatrix placement. + The symbol info to encode. + + + The bit matrix generated. + + + + Convert the ByteMatrix to BitMatrix. + + The input matrix. + The requested width of the image (in pixels) with the Datamatrix code + The requested height of the image (in pixels) with the Datamatrix code + The output matrix. + + + + bbrown@google.com (Brian Brown) + + + + + to parse + if dimension is < 8 or > 144 or not 0 mod 2 + + + + +

Creates the version object based on the dimension of the original bit matrix from + the datamatrix code.

+ +

See ISO 16022:2006 Table 7 - ECC 200 symbol attributes

+ + Original including alignment patterns + encapsulating the Data Matrix Code's "version" + if the dimensions of the mapping matrix are not valid + Data Matrix dimensions. +
+
+ + +

Reads the bits in the representing the mapping matrix (No alignment patterns) + in the correct order in order to reconstitute the codewords bytes contained within the + Data Matrix Code.

+ + bytes encoded within the Data Matrix Code + if the exact number of bytes expected is not read +
+
+ + +

Reads a bit of the mapping matrix accounting for boundary wrapping.

+ + Row to read in the mapping matrix + Column to read in the mapping matrix + Number of rows in the mapping matrix + Number of columns in the mapping matrix + value of the given bit in the mapping matrix +
+
+ + +

Reads the 8 bits of the standard Utah-shaped pattern.

+ +

See ISO 16022:2006, 5.8.1 Figure 6

+ + Current row in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Current column in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the utah shape +
+
+ + +

Reads the 8 bits of the special corner condition 1.

+ +

See ISO 16022:2006, Figure F.3

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 1 +
+
+ + +

Reads the 8 bits of the special corner condition 2.

+ +

See ISO 16022:2006, Figure F.4

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 2 +
+
+ + +

Reads the 8 bits of the special corner condition 3.

+ +

See ISO 16022:2006, Figure F.5

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 3 +
+
+ + +

Reads the 8 bits of the special corner condition 4.

+ +

See ISO 16022:2006, Figure F.6

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 4 +
+
+ + +

Extracts the data region from a that contains + alignment patterns.

+ + Original with alignment patterns + BitMatrix that has the alignment patterns removed +
+
+ + +

Encapsulates a block of data within a Data Matrix Code. Data Matrix Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ + bbrown@google.com (Brian Brown) +
+
+ + +

When Data Matrix Codes use multiple data blocks, they actually interleave the bytes of each of them. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ + bytes as read directly from the Data Matrix Code + version of the Data Matrix Code + DataBlocks containing original bytes, "de-interleaved" from representation in the + Data Matrix Code +
+
+ + +

Data Matrix Codes can encode text as bits in one of several modes, and can use multiple modes + in one Data Matrix Code. This class decodes the bits back into text.

+ +

See ISO 16022:2006, 5.2.1 - 5.2.9.2

+ + bbrown@google.com (Brian Brown) + Sean Owen +
+
+ + + See ISO 16022:2006, Annex C Table C.1 + The C40 Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, Annex C Table C.2 + The Text Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, 5.2.3 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.5 and Annex C, Table C.1 + + + + + See ISO 16022:2006, 5.2.6 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.7 + + + + + See ISO 16022:2006, 5.2.8 and Annex C Table C.3 + + + + + See ISO 16022:2006, 5.2.9 and Annex B, B.2 + + + + + See ISO 16022:2006, Annex B, B.2 + + + + +

The main class which implements Data Matrix Code decoding -- as opposed to locating and extracting + the Data Matrix Code from an image.

+ + bbrown@google.com (Brian Brown) +
+
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a Data Matrix Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+ + booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code + if the Data Matrix Code cannot be decoded +
+
+ + +

Decodes a Data Matrix Code represented as a . A 1 or "true" is taken + to mean a black module.

+
+ booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+ + data and error correction codewords + number of codewords that are data bytes +
+
+ + + The Version object encapsulates attributes about a particular + size Data Matrix Code. + + bbrown@google.com (Brian Brown) + + + + + returns the version numer + + + + + + returns the symbol size rows + + + + + + returns the symbols size columns + + + + + + retursn the data region size rows + + + + + + returns the data region size columns + + + + + + returns the total codewords count + + + + + +

Deduces version information from Data Matrix dimensions.

+ + Number of rows in modules + Number of columns in modules + Version for a Data Matrix Code of those dimensions + if dimensions do correspond to a valid Data Matrix size +
+
+ + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the Data Matrix code version's format.

+
+
+ + + returns the version number as string + + + + + + See ISO 16022:2006 5.5.1 Table 7 + + + + +

Encapsulates logic that can detect a Data Matrix Code in an image, even if the Data Matrix Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + +

Detects a Data Matrix Code in an image.

+
+ encapsulating results of detecting a Data Matrix Code or null +
+ + + Calculates the position of the white top right module using the output of the rectangle detector + for a rectangular matrix + + + + + Calculates the position of the white top right module using the output of the rectangle detector + for a square matrix + + + + + Increments the Integer associated with a key by one. + + + + + Counts the number of black/white transitions between two points, using something like Bresenham's algorithm. + + + + + Simply encapsulates two points and a number of transitions between them. + + + + + Orders ResultPointsAndTransitions by number of transitions, ascending. + + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Symbol Character Placement Program. Adapted from Annex M.1 in ISO/IEC 16022:2000(E). + + + + + Main constructor + + the codewords to place + the number of columns + the number of rows + + + + Places the 8 bits of a utah-shaped symbol character in ECC200. + + The row. + The col. + character position + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Enumeration for encodation types + + + + + Error Correction Code for ECC200. + + + + + Lookup table which factors to use for which number of error correction codewords. + See FACTORS. + + + + + Precomputed polynomial factors for ECC 200. + + + + + Creates the ECC200 error correction for an encoded message. + + The codewords. + information about the symbol to be encoded + the codewords with interleaved error correction. + + + + DataMatrix ECC 200 data encoder following the algorithm described in ISO/IEC 16022:200(E) in + annex S. + + + + + Padding character + + + + + mode latch to C40 encodation mode + + + + + mode latch to Base 256 encodation mode + + + + + FNC1 Codeword + + + + + Structured Append Codeword + + + + + Reader Programming + + + + + Upper Shift + + + + + 05 Macro + + + + + 06 Macro + + + + + mode latch to ANSI X.12 encodation mode + + + + + mode latch to Text encodation mode + + + + + mode latch to EDIFACT encodation mode + + + + + ECI character (Extended Channel Interpretation) + + + + + Unlatch from C40 encodation + + + + + Unlatch from X12 encodation + + + + + 05 Macro header + + + + + 06 Macro header + + + + + Macro trailer + + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + the encoded message (the char values range from 0 to 255) + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + requested shape. May be {@code SymbolShapeHint.FORCE_NONE},{@code SymbolShapeHint.FORCE_SQUARE} or {@code SymbolShapeHint.FORCE_RECTANGLE}. + the minimum symbol size constraint or null for no constraint + the maximum symbol size constraint or null for no constraint + encoding mode to start with + the encoded message (the char values range from 0 to 255) + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + Symbol info table for DataMatrix. + + + + Overrides the symbol info set used by this class. Used for testing purposes. + + @param override the symbol info set to use + + + + Enumeration for DataMatrix symbol shape hint. It can be used to force square or rectangular + symbols. + + + + + The class holds the available options for the DatamatrixWriter + + + + + Specifies the matrix shape for Data Matrix + + + + + Specifies a minimum barcode size + + + + + Specifies a maximum barcode size + + + + + Specifies the default encodation + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Encapsulates a type of hint that a caller may pass to a barcode reader to help it + more quickly or accurately decode it. It is up to implementations to decide what, + if anything, to do with the information that is supplied. + + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Unspecified, application-specific hint. Maps to an unspecified . + + + + + Image is a pure monochrome image of a barcode. Doesn't matter what it maps to; + use = true. + + + + + Image is known to be of one of a few possible formats. + Maps to a of s. + + + + + Spend more time to try to find a barcode; optimize for accuracy, not speed. + Doesn't matter what it maps to; use = true. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + + + The caller needs to be notified via callback when a possible + is found. Maps to a . + + + + + Assume MSI codes employ a check digit. Maps to . + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + Maps to . + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + 1D readers supporting rotation with TRY_HARDER enabled. + But BarcodeReader class can do auto-rotating for 1D and 2D codes. + Enabling that option prevents 1D readers doing double rotation. + BarcodeReader enables that option automatically if "global" auto-rotation is enabled. + Maps to . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to; + use . + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Simply encapsulates a width and height. + + + + + initializing constructor + + + + + + + the width + + + + + the height + + + + + + + + + + + + + + + + + + + + + + + + These are a set of hints that you may pass to Writers to specify their behavior. + + dswitkin@google.com (Daniel Switkin) + + + + Specifies the width of the barcode image + type: + + + + + Specifies the height of the barcode image + type: + + + + + Don't put the content string into the output image. + type: + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + + For Aztec it is of type , representing the minimal percentage of error correction words. + In all cases, it can also be a representation of the desired value as well. + Note: an Aztec symbol should have a minimum of 25% EC words. + For PDF417 it is of type or (between 0 and 8), + + + + + Specifies what character encoding to use where applicable. + type: + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + type: , or representation of the integer value + + + + + Specifies the aspect ratio to use. Default is 4. + type: , or 1-4. + + + + + Specifies whether to use compact mode for PDF417 + type: , or "true" or "false" + value + + + + + Specifies what compaction mode to use for PDF417. + type: or value of one of its + enum values + + + + + Specifies the minimum and maximum number of rows and columns for PDF417. + type: + + + + + Don't append ECI segment. + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + type: + + + + + Specifies the matrix shape for Data Matrix (type ) + + + + + Specifies a minimum barcode size (type ). Only applicable to Data Matrix now. + + + + + Specifies a maximum barcode size (type ). Only applicable to Data Matrix now. + + + + + if true, don't switch to codeset C for numbers + + + + + Specifies the default encodation for Data Matrix (type ) + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Specifies the required number of layers for an Aztec code. + A negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + type: , or representation of the integer value + + + + + Specifies the exact version of QR code to be encoded. + (Type , or representation of the integer value). + + + + + Specifies whether the data should be encoded to the GS1 standard + type: , or "true" or "false" + value + + + + + Thrown when a barcode was successfully detected, but some aspect of + the content did not conform to the barcode's format rules. This could have + been due to a mis-detection. + Sean Owen + + + + + + + + + + + + + + + + + + + + + + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode the barcode inside a bitmap object + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Decodes the specified barcode bitmap which is given by a generic byte array. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Interface for a smart class to encode some content into a barcode + + + Interface for a smart class to encode some content into a barcode + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents. + + The contents. + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + The matrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents. + + The contents. + + + + + implements an Intelligent Mail barcode + Rishabh Hatgadkar + + + + + A wrapper implementation of {@link LuminanceSource} which inverts the luminances it returns -- black becomes + white and vice versa, and each value becomes (255-value). + + Sean Owen + + + + Initializes a new instance of the class. + + The @delegate. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff; + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Inverts this instance. + + original delegate {@link LuminanceSource} since invert undoes itself + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + The purpose of this class hierarchy is to abstract different bitmap implementations across + platforms into a standard interface for requesting greyscale luminance values. The interface + only provides immutable methods; therefore crop and rotation create copies. This is to ensure + that one Reader does not modify the original luminance source and leave it in an unknown state + for other Readers in the chain. + + dswitkin@google.com (Daniel Switkin) + + + + initializing constructor + + + + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff + + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + The width of the bitmap. + + + The height of the bitmap. + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + Whether this subclass supports counter-clockwise rotation. + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + + Whether this subclass supports invertion. + + + + inverts the luminance values, not supported here. has to implemented in sub classes + + + + + + + + + + + + mike32767 + Manuel Kasten + + + + + to parse + + + + +

MaxiCodes can encode text or structured information as bits in one of several modes, + with multiple character sets in one code. This class decodes the bits back into text.

+ + mike32767 + Manuel Kasten +
+
+ + +

The main class which implements MaxiCode decoding -- as opposed to locating and extracting + the MaxiCode from an image.

+ + Manuel Kasten +
+
+ + + This implementation can detect and decode a MaxiCode in an image. + + + + + Locates and decodes a MaxiCode in an image. + + a String representing the content encoded by the MaxiCode + if a MaxiCode cannot be decoded + + + + + Locates and decodes a MaxiCode within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + + MultiFormatReader is a convenience class and the main entry point into the library for most uses. + By default it attempts to decode all barcode formats that the library supports. Optionally, you + can provide a hints object to request different behavior, for example only decoding QR codes. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + This version of decode honors the intent of Reader.decode(BinaryBitmap) in that it + passes null as a hint to the decoders. However, that makes it inefficient to call repeatedly. + Use setHints() followed by decodeWithState() for continuous scan applications. + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the hints provided. Does not honor existing state. + + + The pixel data to decode + + The hints to use, clearing the previous state. + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the state set up by calling setHints() previously. Continuous scan + clients will get a large speed increase by using this instead of decode(). + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls + to decodeWithState(image) can reuse the same set of readers without reallocating memory. This + is important for performance in continuous scan clients. + + + + + + resets all specific readers + + + + This is a factory class which finds the appropriate Writer subclass for the BarcodeFormat + requested and encodes the barcode with the supplied contents. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Gets the collection of supported writers. + + + + + encode the given data + + + + + + + + + + encode the given data + + + + + + + + + + + This class attempts to decode a barcode from an image, not by scanning the whole image, + but by scanning subsets of the image. This is important when there may be multiple barcodes in + an image, and detecting a barcode may find parts of multiple barcode and fail to decode + (e.g. QR Codes). Instead this scans the four quadrants of the image -- and also the center + 'quadrant' to cover the case where a barcode is found in the center. + + + + + + Initializes a new instance of the class. + + The @delegate. + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Attempts to locate multiple barcodes in an image by repeatedly decoding portion of the image. + After one barcode is found, the areas left, above, right and below the barcode's + {@link com.google.zxing.ResultPoint}s are scanned, recursively.

+

A caller may want to also employ {@link ByQuadrantReader} when attempting to find multiple + 2D barcodes, like QR Codes, in an image, where the presence of multiple barcodes might prevent + detecting any one of them.

+

That is, instead of passing a {@link Reader} a caller might pass + new ByQuadrantReader(reader).

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The @delegate. + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Implementation of this interface attempt to read several barcodes from one image. + Sean Owen + + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + +

Encapsulates logic that can detect one or more QR Codes in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+ + Sean Owen + Hannes Erven +
+
+ + + Initializes a new instance of the class. + + The image. + + + + Detects the multi. + + The hints. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +

In contrast to , this class will return an array of all possible + QR code locations in the image.

+ +

Use the TRY_HARDER hint to ask for a more thorough detection.

+ + Sean Owen + Hannes Erven +
+
+ + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF_PERCENT percent in their + estimated modules sizes. + + + + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF pixels/module in their + estimated modules sizes. + + + + + A comparator that orders FinderPatterns by their estimated module size. + + + + +

Creates a finder that will search the image for three finder patterns.

+ + image to search +
+
+ + + + the 3 best s from our list of candidates. The "best" are + those that have been detected at least CENTER_QUORUM times, and whose module + size differs from the average among those patterns the least + + + + + This implementation can detect and decode multiple QR Codes in an image. + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + +

Decodes Codabar barcodes.

+ + Bas Vijfwinkel +
+
+ + These represent the encodings of characters, as patterns of wide and narrow bars. The 7 least-significant bits of + each int correspond to the pattern of wide and narrow, with 1s representing "wide" and 0s representing narrow. + + + + Records the size of all runs of white and black pixels, starting with white. + This is just like recordPattern, except it records all the counters, and + uses our builtin "counters" member for storage. + + row to count from + + + + This class renders CodaBar as []. + + dsbnatut@gmail.com (Kazuki Nishiura) + + + + The class holds the available options for the QrCodeWriter + + + + + if true, don't switch to codeset C for numbers + + + + +

Decodes Code 128 barcodes.

+ + Sean Owen +
+
+ + + This object renders a CODE128 code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + +

Decodes Code 39 barcodes. Supports "Full ASCII Code 39" if USE_CODE_39_EXTENDED_MODE is set.

+ Sean Owen + @see Code93Reader +
+
+ + + Returns a string with all possible characters + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. It will not decoded "extended Code 39" sequences. + + + + + Creates a reader that can be configured to check the last character as a check digit. + It will not decoded "extended Code 39" sequences. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + + Creates a reader that can be configured to check the last character as a check digit, + or optionally attempt to decode "extended Code 39" sequences that are used to encode + the full ASCII character set. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + if true, will attempt to decode extended Code 39 sequences in the text. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a CODE39 code as a . + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Decodes Code 93 barcodes.

+ Sean Owen + +
+
+ + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a CODE93 code as a BitMatrix + + + + + + output to append to + start position + pattern to append + unused + 9 + + + +

Implements decoding of the EAN-13 format.

+ + dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Initializes a new instance of the class. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + Get the format of this decoder. + The 1D format. + + + + + Based on pattern of odd-even ('L' and 'G') patterns used to encoded the explicitly-encoded + digits in a barcode, determines the implicitly encoded first digit and adds it to the + result string. + + string to insert decoded first digit into + int whose bits indicates the pattern of odd/even L/G patterns used to + encode digits + -1 if first digit cannot be determined + + + + This object renders an EAN13 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Implements decoding of the EAN-8 format.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Get the format of this decoder. + The 1D format. + + + + + This object renders an EAN8 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + + + a byte array of horizontal pixels (false = white, true = black) + + + + + Records EAN prefix to GS1 Member Organization, where the member organization + correlates strongly with a country. This is an imperfect means of identifying + a country of origin by EAN-13 barcode value. See + + http://en.wikipedia.org/wiki/List_of_GS1_country_codes. + + Sean Owen + + + + +

Implements decoding of the ITF format, or Interleaved Two of Five.

+ +

This Reader will scan ITF barcodes of certain lengths only. + At the moment it reads length 6, 8, 10, 12, 14, 16, 18, 20, 24, 44 and 48 as these have appeared "in the wild". Not all + lengths are scanned, especially shorter ones, to avoid false positives. This in turn is due to a lack of + required checksum function.

+ +

The checksum is optional and is not applied by this Reader. The consumer of the decoded + value will have to apply a checksum if required.

+ +

http://en.wikipedia.org/wiki/Interleaved_2_of_5 + is a great reference for Interleaved 2 of 5 information.

+ + kevin.osullivan@sita.aero, SITA Lab. +
+
+ + + Valid ITF lengths. Anything longer than the largest value is also allowed. + + + + + Start/end guard pattern. + + Note: The end pattern is reversed because the row is reversed before + searching for the END_PATTERN + + + + + Patterns of Wide / Narrow lines to indicate each digit + + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + + row of black/white values to search + offset of start pattern + The payload end. + to append decoded chars to + + false, if decoding could not complete successfully + + + + + Identify where the start of the middle / payload section starts. + + row of black/white values to search + Array, containing index of start of 'start block' and end of 'start block' + + + + The start & end patterns must be pre/post fixed by a quiet zone. This + zone must be at least 10 times the width of a narrow line. Scan back until + we either get to the start of the barcode or match the necessary number of + quiet zone pixels. + + Note: Its assumed the row is reversed when using this method to find + quiet zone after the end pattern. + + ref: http://www.barcode-1.net/i25code.html + + bit array representing the scanned barcode. + index into row of the start or end pattern. + false, if the quiet zone cannot be found + + + + Skip all whitespace until we get to the first black line. + + row of black/white values to search + index of the first black line or -1 if no black lines are found in the row. + + + + Identify where the end of the middle / payload section ends. + + row of black/white values to search + Array, containing index of start of 'end block' and end of 'end + block' or null, if nothing found + + + + + row of black/white values to search + position to start search + pattern of counts of number of black and white pixels that are being searched for as a pattern + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a sequence of ITF black/white lines into single + digit. + + the counts of runs of observed black/white/black/... values + The decoded digit + + false, if digit cannot be decoded + + + + + This object renders a ITF code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code bool[]} of horizontal pixels (false = white, true = black) + + + + + + + Decodes MSI barcodes. + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. + + + + + Creates a reader that can be configured to check the last character as a check digit, + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a MSI code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

A reader that can read all available UPC/EAN formats. If a caller wants to try to + read all such formats, it is most efficient to use this implementation rather than invoke + individual readers.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Encapsulates functionality and implementation that is common to one-dimensional barcodes.

+ dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + a byte array of horizontal pixels (0 = white, 1 = black) + + + + Appends the given pattern to the target array starting at pos. + + encode black/white pattern into this array + position to start encoding at in target + lengths of black/white runs to encode + starting color - false for white, true for black + the number of elements added to target. + + + + Gets the default margin. + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + + barcode contents to encode + a bool[] of horizontal pixels (false = white, true = black) + + + + Calculates the checksum digit modulo10. + + The contents. + + + + + Encapsulates functionality and implementation that is common to all families + of one-dimensional barcodes. + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + + + + + + + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + Note that we don't try rotation without the try harder flag, even if rotation was supported. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + We're going to examine rows from the middle outward, searching alternately above and below the + middle, and farther out each time. rowStep is the number of rows between each successive + attempt above and below the middle. So we'd scan row middle, then middle - rowStep, then + middle + rowStep, then middle - (2 * rowStep), etc. + rowStep is bigger as the image is taller, but is always at least 1. We've somewhat arbitrarily + decided that moving up and down by about 1/16 of the image is pretty good; we try more of the + image if "trying harder". + + The image to decode + Any hints that were requested + The contents of the decoded barcode + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the pattern in reverse. + + The row. + The start. + The counters. + + + + + Determines how closely a set of observed counts of runs of black/white values matches a given + target pattern. This is reported as the ratio of the total variance from the expected pattern + proportions across all pattern elements, to the length of the pattern. + + observed counters + expected pattern + The most any counter can differ before we give up + ratio of total variance between counters and pattern compared to total pattern size, + where the ratio has been multiplied by 256. So, 0 means no variance (perfect match); 256 means + the total variance between counters and patterns equals the pattern length, higher values mean + even more variance + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + This object renders a Plessey code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + Superclass of implementations that read barcodes in the RSS family of formats. + + + + + Initializes a new instance of the class. + + + + + Gets the decode finder counters. + + + + + + Gets the data character counters. + + + + + + Gets the odd rounding errors. + + + + + + Gets the even rounding errors. + + + + + + Gets the odd counts. + + + + + + Gets the even counts. + + + + + + Parses the finder value. + + The counters. + The finder patterns. + The value. + + + + + Counts the specified array. + + The array. + + + + + Increments the specified array. + + The array. + The errors. + + + + Decrements the specified array. + + The array. + The errors. + + + + Determines whether [is finder pattern] [the specified counters]. + + The counters. + + true if [is finder pattern] [the specified counters]; otherwise, false. + + + + + Encapsulates a since character value in an RSS barcode, including its checksum information. + + + + + Gets the value. + + + + + Gets the checksum portion. + + + + + Initializes a new instance of the class. + + The value. + The checksum portion. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Gets the information. + + + + + + Parses the information. + + + + + + Creates the decoder. + + The information. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + One row of an RSS Expanded Stacked symbol, consisting of 1+ expanded pairs. + + + + + Did this row of the image have to be reversed (mirrored) to recognize the pairs? + + + + + Two rows are equal if they contain the same pairs in the same order. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Encapsulates an RSS barcode finder pattern, including its start/end position and row. + + + + + Gets the value. + + + + + Gets the start end. + + + + + Gets the result points. + + + + + Initializes a new instance of the class. + + The value. + The start end. + The start. + The end. + The row number. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Decodes RSS-14, including truncated and stacked variants. See ISO/IEC 24724:2006. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Adapted from listings in ISO/IEC 24724 Appendix B and Appendix G. + + + + + Gets the RS svalue. + + The widths. + Width of the max. + if set to true [no narrow]. + + + + +

Implements decoding of the UPC-A format.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen +
+
+ + +

Like decodeRow(int, BitArray, java.util.Map), but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ + + + + +
+ + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Decodes the specified image. + + The image. + The hints. + + + + + Get the format of this decoder. + The 1D format. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + This object renders a UPC-A code as a . + qwandor@google.com (Andrew Walbran) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + @see UPCEANExtension5Support + + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + + + @see UPCEANExtension2Support + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + one {@link ResultMetadataType} to appropriate value, or {@code null} if not known + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Start/end guard pattern. + + + + + Pattern marking the middle of a UPC/EAN pattern, separating the two halves. + + + + + end guard pattern. + + + + + "Odd", or "L" patterns used to encode UPC/EAN digits. + + + + + As above but also including the "even", or "G" patterns used to encode UPC/EAN digits. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + +

Like , but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ row index into the image + encoding of the row of the barcode image + start/end column where the opening start pattern was found + optional hints that influence decoding + encapsulating the result of decoding a barcode in the row +
+ + + + string of digits to check + see + + + + Computes the UPC/EAN checksum on a string of digits, and reports + whether the checksum is correct or not. + + string of digits to check + true iff string of digits passes the UPC/EAN checksum algorithm + + + + Decodes the end. + + The row. + The end start. + + + + + + row of black/white values to search + position to start search + if true, indicates that the pattern specifies white/black/white/... + pixel counts, otherwise, it is interpreted as black/white/black/... + pattern of counts of number of black and white pixels that are being + searched for as a pattern + array of counters, as long as pattern, to re-use + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a single UPC/EAN-encoded digit. + + row of black/white values to decode + the counts of runs of observed black/white/black/... values + horizontal offset to start decoding from + the set of patterns to use to decode -- sometimes different encodings + for the digits 0-9 are used, and this indicates the encodings for 0 to 9 that should + be used + horizontal offset of first pixel beyond the decoded digit + + + + Get the format of this decoder. + + The 1D format. + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ aripollak@gmail.com (Ari Pollak) + dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Gets the default margin. + + + + +

Implements decoding of the UPC-E format.

+

Thisis a great reference for + UPC-E information.

+ Sean Owen +
+
+ + + The pattern that marks the middle, and end, of a UPC-E pattern. + There is no "second half" to a UPC-E barcode. + + + + + See L_AND_G_PATTERNS these values similarly represent patterns of + even-odd parity encodings of digits that imply both the number system (0 or 1) + used, and the check digit. + + + + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Decodes the end. + + The row. + The end start. + + + + + see checkStandardUPCEANChecksum(String) + + + + + + + Determines the num sys and check digit. + + The result string. + The lg pattern found. + + + + + Get the format of this decoder. + The 1D format. + + + + + Expands a UPC-E value back into its full, equivalent UPC-A code value. + + UPC-E code as string of digits + equivalent UPC-A code as string of digits + + + + + This object renders an UPC-E code as a {@link BitMatrix}. + @author 0979097955s@gmail.com (RX) + + + + + Metadata about a PDF417 Barcode + + Guenther Grau + + + + A Barcode Value for the PDF417 barcode. + The scanner will iterate through the bitmatrix, + and given the different methods or iterations + will increment a given barcode value's confidence. + + When done, this will return the values of highest confidence. + + Guenther Grau + + + + Incremenets the Confidence for a given value. (Adds an occurance of a value) + + + Value. + + + + Determines the maximum occurrence of a set value and returns all values which were set with this occurrence. + + an array of int, containing the values with the highest occurrence, or null, if no value was set. + + + + Returns the confience value for a given barcode value + + Barcode value. + + + + A Bounding Box helper class + + Guenther Grau + + + + Initializes a new instance of the class. + returns null if the corner points don't match up correctly + + The image. + The top left. + The bottom left. + The top right. + The bottom right. + + + + + Creates the specified box. + + The box. + + + + + Initializes a new instance of the class. + Will throw an exception if the corner points don't match up correctly + + Image. + Top left. + Top right. + Bottom left. + Bottom right. + + + + Merge two Bounding Boxes, getting the left corners of left, and the right corners of right + (Images should be the same) + + Left. + Right. + + + + Adds the missing rows. + + The missing rows. + Missing start rows. + Missing end rows. + If set to true is left. + + + + Calculates the minimum and maximum X & Y values based on the corner points. + + + + + If we adjust the width, set a new right corner coordinate and recalculate + + Bottom right. + + + + A Codeword in the PDF417 barcode + + Guenther Grau + + + + Default value for the RowNumber (-1 being an invalid real number) + + + + + Initializes a new instance of the class. + + Start x. + End x. + Bucket. + Value. + + + + Gets the width. + + The width. + + + + Gets a value indicating whether this instance has valid row number. + + true if this instance has valid row number; otherwise, false. + + + + Determines whether this instance is valid row number the specified rowNumber. + + true if this instance is valid row number the specified rowNumber; otherwise, false. + Row number. + + + + Sets the row number as the row's indicator column. + + + + + Returns a that represents the current . + + A that represents the current . + + + +

This class contains the methods for decoding the PDF417 codewords.

+ + SITA Lab (kevin.osullivan@sita.aero) +
+
+ + + Table containing values for the exponent of 900. + This is used in the numeric compaction decode algorithm. + + + + + Text Compaction mode (see 5.4.1.5) permits all printable ASCII characters to be + encoded, i.e. values 32 - 126 inclusive in accordance with ISO/IEC 646 (IRV), as + well as selected control characters. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + The Text Compaction mode includes all the printable ASCII characters + (i.e. values from 32 to 126) and three ASCII control characters: HT or tab + (ASCII value 9), LF or line feed (ASCII value 10), and CR or carriage + return (ASCII value 13). The Text Compaction mode also includes various latch + and shift characters which are used exclusively within the mode. The Text + Compaction mode encodes up to 2 characters per codeword. The compaction rules + for converting data into PDF417 codewords are defined in 5.4.2.2. The sub-mode + switches are defined in 5.4.2.3. + + The text compaction data. + The byte compaction data if there + was a mode shift. + The size of the text compaction and byte compaction data. + The decoded data is appended to the result. + + + + + Byte Compaction mode (see 5.4.3) permits all 256 possible 8-bit byte values to be encoded. + This includes all ASCII characters value 0 to 127 inclusive and provides for international + character set support. + + The byte compaction mode i.e. 901 or 924 + The array of codewords (data + error) + Currently active character encoding + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Numeric Compaction mode (see 5.4.4) permits efficient encoding of numeric data strings. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Convert a list of Numeric Compacted codewords from Base 900 to Base 10. + EXAMPLE + Encode the fifteen digit numeric string 000213298174000 + Prefix the numeric string with a 1 and set the initial value of + t = 1 000 213 298 174 000 + Calculate codeword 0 + d0 = 1 000 213 298 174 000 mod 900 = 200 + + t = 1 000 213 298 174 000 div 900 = 1 111 348 109 082 + Calculate codeword 1 + d1 = 1 111 348 109 082 mod 900 = 282 + + t = 1 111 348 109 082 div 900 = 1 234 831 232 + Calculate codeword 2 + d2 = 1 234 831 232 mod 900 = 632 + + t = 1 234 831 232 div 900 = 1 372 034 + Calculate codeword 3 + d3 = 1 372 034 mod 900 = 434 + + t = 1 372 034 div 900 = 1 524 + Calculate codeword 4 + d4 = 1 524 mod 900 = 624 + + t = 1 524 div 900 = 1 + Calculate codeword 5 + d5 = 1 mod 900 = 1 + t = 1 div 900 = 0 + Codeword sequence is: 1, 624, 434, 632, 282, 200 + + Decode the above codewords involves + 1 x 900 power of 5 + 624 x 900 power of 4 + 434 x 900 power of 3 + + 632 x 900 power of 2 + 282 x 900 power of 1 + 200 x 900 power of 0 = 1000213298174000 + + Remove leading 1 => Result is 000213298174000 + The array of codewords + The number of codewords + The decoded string representing the Numeric data. + + + + + + + Guenther Grau + + + + Returns the DetectionResult Columns. This does a fair bit of calculation, so call it sparingly. + + The detection result columns. + + + + Adjusts the indicator column row numbers. + + Detection result column. + + + + return number of codewords which don't have a valid row number. Note that the count is not accurate as codewords . + will be counted several times. It just serves as an indicator to see when we can stop adjusting row numbers + + The row numbers. + + + + Adjusts the row numbers by row. + + The row numbers by row. + + + + Adjusts the row numbers from both Row Indicators + + zero + + + + Adjusts the row numbers from Right Row Indicator. + + The unadjusted row count. + + + + Adjusts the row numbers from Left Row Indicator. + + Unadjusted row Count. + + + + Adjusts the row number if valid. + + The invalid rows + Row indicator row number. + Invalid row counts. + Codeword. + + + + Adjusts the row numbers. + + Barcode column. + Codewords row. + Codewords. + + + + Adjusts the row number. + + true, if row number was adjusted, false otherwise. + Codeword. + Other codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + The maximum distance to search in the codeword array in both the positive and negative directions + + + + + The Bounding Box around the column (in the BitMatrix) + + The box. + + + + The Codewords the Box encodes for, offset by the Box minY. + Remember to Access this ONLY through GetCodeword(imageRow) if you're accessing it in that manner. + + The codewords. + + + + Initializes a new instance of the class. + + The Bounding Box around the column (in the BitMatrix) + + + + Converts the Image's Row to the index in the Codewords array + + The Codeword Index. + Image row. + + + + Converts the Codeword array index into a Row in the Image (BitMatrix) + + The Image Row. + Codeword index. + + + + Gets the codeword for a given row + + The codeword. + Image row. + + + + Gets the codeword closest to the specified row in the image + + Image row. + + + + Sets the codeword for an image row + + Image row. + Codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + Gets or sets a value indicating whether this instance is the left indicator + + true if this instance is left; otherwise, false. + + + + Initializes a new instance of the class. + + Box. + If set to true is left. + + + + Sets the Row Numbers as Inidicator Columns + + + + + TODO implement properly + TODO maybe we should add missing codewords to store the correct row number to make + finding row numbers for other columns easier + use row height count to make detection of invalid row numbers more reliable + + The indicator column row numbers. + Metadata. + + + + Gets the row heights. + + The row heights. + + + + Adjusts the in omplete indicator column row numbers. + + Metadata. + + + + Gets the barcode metadata. + + The barcode metadata. + + + + Prune the codewords which do not match the metadata + TODO Maybe we should keep the incorrect codewords for the start and end positions? + + Codewords. + Metadata. + + + + Returns a that represents the current . + + A that represents the current . + + + +

PDF417 error correction implementation.

+

This example + is quite useful in understanding the algorithm.

+ Sean Owen + +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the specified received. + + received codewords + number of those codewords used for EC + location of erasures + The error locations count. + + + + + Runs the euclidean algorithm (Greatest Common Divisor) until r's degree is less than R/2 + + The euclidean algorithm. + + + + Finds the error locations as a direct application of Chien's search + + The error locations. + Error locator. + + + + Finds the error magnitudes by directly applying Forney's Formula + + The error magnitudes. + Error evaluator. + Error locator. + Error locations. + + + +

A field based on powers of a generator integer, modulo some modulus.

+ +
+ Sean Owen +
+ + + + + Sean Owen + + + + Gets the coefficients. + + The coefficients. + + + + degree of this polynomial + + + + + Gets a value indicating whether this instance is zero. + + true if this polynomial is the monomial "0" + + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + + + Adds another Modulus + + Other. + + + + Subtract another Modulus + + Other. + + + + Multiply by another Modulus + + Other. + + + + Returns a Negative version of this instance + + + + + Multiply by a Scalar. + + Scalar. + + + + Multiplies by a Monomial + + The by monomial. + Degree. + Coefficient. + + + + Returns a that represents the current . + + A that represents the current . + + + + + + Guenther Grau + creatale GmbH (christoph.schulz@creatale.de) + + + + The ratios table + + + + + Initializes the class & Pre-computes the symbol ratio table. + + + + + Gets the decoded value. + + The decoded value. + Module bit count. + + + + Samples the bit counts. + + The bit counts. + Module bit count. + + + + Gets the decoded codeword value. + + The decoded codeword value. + Module bit count. + + + + Gets the bit value. + + The bit value. + Module bit count. + + + + Gets the closest decoded value. + + The closest decoded value. + Module bit count. + + + + + + Guenther Grau + + + + Decode the specified image, imageTopLeft, imageBottomLeft, imageTopRight, imageBottomRight, minCodewordWidth + and maxCodewordWidth. + TODO: don't pass in minCodewordWidth and maxCodewordWidth, pass in barcode columns for start and stop pattern + columns. That way width can be deducted from the pattern column. + This approach also allows to detect more details about the barcode, e.g. if a bar type (white or black) is wider + than it should be. This can happen if the scanner used a bad blackpoint. + + Image. + Image top left. + Image bottom left. + Image top right. + Image bottom right. + Minimum codeword width. + Max codeword width. + + + + Merge the specified leftRowIndicatorColumn and rightRowIndicatorColumn. + + Left row indicator column. + Right row indicator column. + + + + Adjusts the bounding box. + + The bounding box. + Row indicator column. + + + + Gets the barcode metadata. + + The barcode metadata. + Left row indicator column. + Right row indicator column. + + + + Gets the row indicator column. + + The row indicator column. + Image. + Bounding box. + Start point. + If set to true left to right. + Minimum codeword width. + Max codeword width. + + + + Adjusts the codeword count. + + Detection result. + Barcode matrix. + + + + Creates the decoder result. + + The decoder result. + Detection result. + + + + This method deals with the fact, that the decoding process doesn't always yield a single most likely value. The + current error correction implementation doesn't deal with erasures very well, so it's better to provide a value + for these ambiguous codewords instead of treating it as an erasure. The problem is that we don't know which of + the ambiguous values to choose. We try decode using the first value, and if that fails, we use another of the + ambiguous values and try to decode again. This usually only happens on very hard to read and decode barcodes, + so decoding the normal barcodes is not affected by this. + + The decoder result from ambiguous values. + Ec level. + Codewords. + contains the indexes of erasures. + array with the indexes that have more than one most likely value. + two dimensional array that contains the ambiguous values. The first dimension must + be the same Length as the ambiguousIndexes array. + + + + Creates the barcode matrix. + + The barcode matrix. + Detection result. + + + + Tests to see if the Barcode Column is Valid + + true, if barcode column is valid, false otherwise. + Detection result. + Barcode column. + + + + Gets the start column. + + The start column. + Detection result. + Barcode column. + Image row. + If set to true left to right. + + + + Detects the codeword. + + The codeword. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + Minimum codeword width. + Max codeword width. + + + + Gets the module bit count. + + The module bit count. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + + + + Gets the number of EC code words. + + The number of EC code words. + Barcode EC level. + + + + Adjusts the codeword start column. + + The codeword start column. + Image. + Minimum column. + Max column. + If set to true left to right. + Codeword start column. + Image row. + + + + Checks the codeword for any skew. + + true, if codeword is within the skew, false otherwise. + Codeword size. + Minimum codeword width. + Max codeword width. + + + + Decodes the codewords. + + The codewords. + Codewords. + Ec level. + Erasures. + + + + Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place. + + The errors. + data and error correction codewords. + positions of any known erasures. + number of error correction codewords that are available in codewords. + + + + Verifies that all is well with the the codeword array. + + Codewords. + Number EC codewords. + + + + Gets the bit count for codeword. + + The bit count for codeword. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Module bit count. + + + + Returns a that represents the jagged array. + + A that represents the jagged array. + Barcode matrix as a jagged array. + + + +

Encapsulates logic that can detect a PDF417 Code in an image, even if the + PDF417 Code is rotated or skewed, or partially obscured.

+ + SITA Lab (kevin.osullivan@sita.aero) + dswitkin@google.com (Daniel Switkin) + Guenther Grau +
+
+ + + B S B S B S B S Bar/Space pattern + 11111111 0 1 0 1 0 1 000. + + + + + 1111111 0 1 000 1 0 1 00 1 + + + + + if we set the value too low, then we don't detect the correct height of the bar if the start patterns are damaged. + if we set the value too high, then we might detect the start pattern from a neighbor barcode. + + + + + A PDF471 barcode should have at least 3 rows, with each row being >= 3 times the module width. Therefore it should be at least + 9 pixels tall. To be conservative, we use about half the size to ensure we don't miss it. + + + + +

Detects a PDF417 Code in an image. Only checks 0 and 180 degree rotations.

+
+ barcode image to decode + optional hints to detector + if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned + + encapsulating results of detecting a PDF417 code + +
+ + + Detects PDF417 codes in an image. Only checks 0 degree rotation (so rotate the matrix and check again outside of this method) + + multiple if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned. + bit matrix to detect barcodes in. + List of ResultPoint arrays containing the coordinates of found barcodes + + + + Locate the vertices and the codewords area of a black blob using the Start and Stop patterns as locators. + + Matrix. + Start row. + Start column. + an array containing the vertices: + vertices[0] x, y top left barcode + vertices[1] x, y bottom left barcode + vertices[2] x, y top right barcode + vertices[3] x, y bottom right barcode + vertices[4] x, y top left codeword area + vertices[5] x, y bottom left codeword area + vertices[6] x, y top right codeword area + vertices[7] x, y bottom right codeword area + + + + + Copies the temp data to the final result + + Result. + Temp result. + Destination indexes. + + + + Finds the rows with the given pattern. + + The rows with pattern. + Matrix. + Height. + Width. + Start row. + Start column. + Pattern. + + + + Finds the guard pattern. Uses System.Linq.Enumerable.Repeat to fill in counters. This might be a performance issue? + + start/end horizontal offset of guard pattern, as an array of two ints. + matrix row of black/white values to search + column x position to start search. + row y position to start search. + width the number of pixels to search on this row. + If set to true search the white patterns first. + pattern of counts of number of black and white pixels that are being searched for as a pattern. + counters array of counters, as long as pattern, to re-use . + + + + Determines how closely a set of observed counts of runs of black/white. + values matches a given target pattern. This is reported as the ratio of + the total variance from the expected pattern proportions across all + pattern elements, to the length of the pattern. + + + ratio of total variance between counters and pattern compared to + total pattern size, where the ratio has been multiplied by 256. + So, 0 means no variance (perfect match); 256 means the total + variance between counters and patterns equals the pattern length, + higher values mean even more variance + + observed counters. + expected pattern. + The most any counter can differ before we give up. + + + + PDF 417 Detector Result class. Skipped private backing stores. + Guenther Grau + + + + + Initializes a new instance of the class. + + Bits. + Points. + + + + defines the level of the error correction / count of error correction codewords + + + + + Holds all of the information for a barcode in a format where it can be easily accessible + + Jacob Haynes + + + + + the height of the matrix (Rows) + the width of the matrix (Cols) + + + + + Jacob Haynes + + + + + Creates a Barcode row of the width + + The width. + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + A boolean which is true if the bar black false if it is white + How many spots wide the bar is. + + + + + This function scales the row + + How much you want the image to be scaled, must be greater than or equal to 1. + the scaled row + + + + + Represents possible PDF417 barcode compaction types. + + + + + + + + + + + + + + + + + + + + + + + + + Data object to specify the minimum and maximum number of rows and columns for a PDF417 barcode. + @author qwandor@google.com (Andrew Walbran) + + + + + Initializes a new instance of the class. + + The min cols. + The max cols. + The min rows. + The max rows. + + + + Gets the min cols. + + + + + Gets the max cols. + + + + + Gets the min rows. + + + + + Gets the max rows. + + + + + Top-level class for the logic part of the PDF417 implementation. + + + + + The start pattern (17 bits) + + + + + The stop pattern (18 bits) + + + + + The codeword table from the Annex A of ISO/IEC 15438:2001(E). + + + + + Calculates the necessary number of rows as described in annex Q of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol (r) + + + + Calculates the number of pad codewords as described in 4.9.2 of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol + the number of pad codewords + + + + Generates the barcode logic. + + the message to encode + PDF417 error correction level to use + + + + Determine optimal nr of columns and rows for the specified number of + codewords. + + number of code words + number of error correction code words + The longest dimension of the barcode, used for columns + The short dimension of the barcode, used for rows + The height of a row, will alter this parameter if aspectRatio>4 (aspectRatio==AUTO) + dimension object containing cols as width and rows as height + + + + Sets max/min row/col values + + maximum allowed columns + minimum allowed columns + maximum allowed rows + minimum allowed rows + + + + Sets compaction to values stored in enum + + compaction mode to use + + + + Sets compact to be true or false + + if true, enables compaction + + + + Sets output encoding. + + sets character encoding to use + + + + Sets the disable eci. + + if set to true don't add an ECI segment for different encodings than default. + + + + PDF417 error correction code following the algorithm described in ISO/IEC 15438:2001(E) in + chapter 4.10. + + + + + Tables of coefficients for calculating error correction words + (see annex F, ISO/IEC 15438:2001(E)) + + + + + Determines the number of error correction codewords for a specified error correction + level. + + the error correction level (0-8) + the number of codewords generated for error correction + + + + Determines the error correction level for AUTO + + The error correction level (0-9) + The number of codewords for AUTO errorCorrectionLevel + the number of codewords generated for error correction + + + + Returns the recommended minimum error correction level as described in annex E of + ISO/IEC 15438:2001(E). + + the number of data codewords + the recommended minimum error correction level + + + + Generates the error correction codewords according to 4.10 in ISO/IEC 15438:2001(E). + + the data codewords + the error correction level (0-8) + the String representing the error correction codewords + + + + defines the level of the error correction / count of error correction codewords + + + + + PDF417 high-level encoder following the algorithm described in ISO/IEC 15438:2001(E) in + annex P. + + + + + code for Text compaction + + + + + code for Byte compaction + + + + + code for Numeric compaction + + + + + Text compaction submode Alpha + + + + + Text compaction submode Lower + + + + + Text compaction submode Mixed + + + + + Text compaction submode Punctuation + + + + + mode latch to Text Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters NOT a multiple of 6) + + + + + mode latch to Numeric Compaction mode + + + + + mode shift to Byte Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters a multiple of 6) + + + + + identifier for a user defined Extended Channel Interpretation (ECI) + + + + + identifier for a general purpose ECO format + + + + + identifier for an ECI of a character set of code page + + + + + Raw code table for text compaction Mixed sub-mode + + + + + Raw code table for text compaction: Punctuation sub-mode + + + + + Performs high-level encoding of a PDF417 message using the algorithm described in annex P + of ISO/IEC 15438:2001(E). If byte compaction has been selected, then only byte compaction + is used. + + the message + compaction mode to use + character encoding used to encode in default or byte compaction + or null for default / not applicable + if true, don't add an ECI segment for different encodings than default + the encoded message (the char values range from 0 to 928) + + + + Encode parts of the message using Text Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.2. + + the message + the start position within the message + the number of characters to encode + receives the encoded codewords + should normally be SUBMODE_ALPHA + the text submode in which this method ends + + + + + Encode parts of the message using Byte Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.3. The Unicode characters will be converted to binary using the cp437 + codepage. + + the message converted to a byte array + the start position within the message + the number of bytes to encode + the mode from which this method starts + receives the encoded codewords + + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using text compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using binary compaction. + + the message + the message converted to a byte array + the start position within the message + + the requested character count + + + + The class holds the available options for the + + + + + Specifies whether to use compact mode for PDF417 (type ). + + + + + Specifies what compaction mode to use for PDF417 (type + ). + + + + + Specifies the minimum and maximum number of rows and columns for PDF417 (type + ). + + + + + Specifies what degree of error correction to use + + + + + Specifies what degree of error correction to use + + + + + Specifies what character encoding to use where applicable (type {@link String}) + + + + + Explicitly disables ECI segment when generating PDF417 Code + That is against the specification but some + readers have problems if the charset is switched from + CP437 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use different encodings + and the ECI segment is omitted. + + + + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Maximum Codewords (Data + Error). + + + + + Gets the bit count sum. + + The bit count sum. + Module bit count. + + + + Converts an ICollection<int> to an int[] + Carry-over from Java. Will likely remove and replace with the Generic .ToArray() method. + + The int array. + List. + + + + Translate the symbol into a codeword + + the codeword corresponding to the symbol. + encoded symbol to translate to a codeword + + + + The sorted table of all possible symbols. Extracted from the PDF417 + specification. The index of a symbol in this table corresponds to the + index into the codeword table. + + + + + This table contains to codewords for all symbols. + + + + + This implementation can detect and decode PDF417 codes in an image. + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Locates and decodes a PDF417 code in an image. + + a String representing the content encoded by the PDF417 code + if a PDF417 cannot be decoded + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + **Note** this will return the FIRST barcode discovered if there are many. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Locates and decodes Multiple PDF417 codes in an image. + + an array of Strings representing the content encoded by the PDF417 codes + + + + + Locates and decodes multiple barcodes in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcodes encode + + + + + Decode the specified image, with the hints and optionally multiple barcodes. + Based on Owen's Comments in , this method has been modified to continue silently + if a barcode was not decoded where it was detected instead of throwing a new exception object. + + Image. + Hints. + If set to true multiple. + + + + Gets the maximum width of the barcode + + The max width. + P1. + P2. + + + + Gets the minimum width of the barcode + + The minimum width. + P1. + P2. + + + + Gets the maximum width of the codeword. + + The max codeword width. + P. + + + + Gets the minimum width of the codeword. + + The minimum codeword width. + P. + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + PDF 417 result meta data. + Guenther Grau + + + + + The Segment ID represents the segment of the whole file distributed over different symbols. + + + + + Is the same for each related PDF417 symbol + + + + + always null + + + + + true if it is the last segment + + + + + count of segments, -1 if not set + + + + + Filename of the encoded file + + + + + filesize in bytes of the encoded file + returns filesize in bytes, -1 if not set + + + + + 16-bit CRC checksum using CCITT-16 + returns crc checksum, -1 if not set + + + + + unix epock timestamp, elapsed seconds since 1970-01-01 + returns elapsed seconds, -1 if not set + + + + + Jacob Haynes + qwandor@google.com (Andrew Walbran) + + + + + default white space (margin) around the code + + + + + default error correction level + + + + + default aspect ratio + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The height of a row in the barcode + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Takes encoder, accounts for width/height, and retrieves bit matrix + + + + + This takes an array holding the values of the PDF 417 + + a byte array of information with 0 is black, and 1 is white + border around the barcode + BitMatrix of the input + + + + Takes and rotates the it 90 degrees + + + + + This object extends LuminanceSource around an array of YUV data returned from the camera driver, + with the option to crop to a rectangle within the full data. This can be used to exclude + superfluous pixels around the perimeter and speed up decoding. + It works for any pixel format where the Y channel is planar and appears first, including + YCbCr_420_SP and YCbCr_422_SP. + @author dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The yuv data. + Width of the data. + Height of the data. + The left. + The top. + The width. + The height. + if set to true [reverse horiz]. + + + + Initializes a new instance of the class. + + The luminances. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + + + + + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Renders the cropped greyscale bitmap. + + + + + + width of image from {@link #renderThumbnail()} + + + + + height of image from {@link #renderThumbnail()} + + + + + creates a new instance + + + + + + + + Sean Owen + + + {@link BitMatrix} to parse + ReaderException if dimension is not >= 21 and 1 mod 4 + + +

Reads format information from one of its two locations within the QR Code.

+ +
+ {@link FormatInformation} encapsulating the QR Code's format info + + ReaderException if both format information locations cannot be parsed as + the valid encoding of format information + +
+ +

Reads version information from one of its two locations within the QR Code.

+ +
+ {@link Version} encapsulating the QR Code's version + + ReaderException if both version information locations cannot be parsed as + the valid encoding of version information + +
+ +

Reads the bits in the {@link BitMatrix} representing the finder pattern in the + correct order in order to reconstruct the codewords bytes contained within the + QR Code.

+ +
+ bytes encoded within the QR Code + + ReaderException if the exact number of bytes expected is not read +
+ + Revert the mask removal done while reading the code words. The bit matrix should revert to its original state. + + + Prepare the parser for a mirrored operation. + This flag has effect only on the {@link #readFormatInformation()} and the + {@link #readVersion()}. Before proceeding with {@link #readCodewords()} the + {@link #mirror()} method should be called. + + @param mirror Whether to read version and format information mirrored. + + + Mirror the bit matrix in order to attempt a second reading. + + +

Encapsulates a block of data within a QR Code. QR Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

When QR Codes use multiple data blocks, they are actually interleaved. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ +
+ bytes as read directly from the QR Code + + version of the QR Code + + error-correction level of the QR Code + + {@link DataBlock}s containing original bytes, "de-interleaved" from representation in the + QR Code + +
+ +

Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations + of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix, + including areas used for finder patterns, timing patterns, etc. These areas should be unused + after the point they are unmasked anyway.

+ +

Note that the diagram in section 6.8.1 is misleading since it indicates that i is column position + and j is row position. In fact, as the text says, i is row position and j is column position.

+ +
+ Sean Owen +
+ + See ISO 18004:2006 6.8.1 + + +

Implementations of this method reverse the data masking process applied to a QR Code and + make its bits ready to read.

+
+ + representation of QR Code bits + dimension of QR Code, represented by bits, being unmasked +
+ +

QR Codes can encode text as bits in one of several modes, and can use multiple modes + in one QR Code. This class decodes the bits back into text.

+ +

See ISO 18004:2006, 6.4.3 - 6.4.7

+ Sean Owen +
+
+ + + See ISO 18004:2006, 6.4.4 Table 5 + + + + + See specification GBT 18284-2000 + + The bits. + The result. + The count. + + + + +

The main class which implements QR Code decoding -- as opposed to locating and extracting + the QR Code from an image.

+
+ + Sean Owen + +
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a QR Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Decodes a QR Code represented as a {@link BitMatrix}. A 1 or "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+
+ data and error correction codewords + number of codewords that are data bytes + +
+ + +

See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels + defined by the QR code standard.

+
+ Sean Owen +
+ + L = ~7% correction + + + M = ~15% correction + + + Q = ~25% correction + + + H = ~30% correction + + + + Gets the bits. + + + + + Gets the name. + + + + + Ordinals this instance. + + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Fors the bits. + + int containing the two bits encoding a QR Code's error correction level + + representing the encoded error correction level + + + +

Encapsulates a QR Code's format information, including the data mask used and + error correction level.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + +
+ + See ISO 18004:2006, Annex C, Table C.1 + + + Offset i holds the number of 1 bits in the binary representation of i + + + + Decodes the format information. + + format info indicator, with mask still applied + The masked format info2. + + information about the format it specifies, or null + if doesn't seem to match any known pattern + + + + +

See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which + data can be encoded to bits in the QR code standard.

+
+ Sean Owen +
+ + + Gets the name. + + + + + enumeration for encoding modes + + + + + + + + + + numeric encoding + + + + + alpha-numeric encoding + + + + + structured append + + + + + byte mode encoding + + + + + ECI segment + + + + + Kanji mode + + + + + FNC1 char, first position + + + + + FNC1 char, second position + + + + + Hanzi mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See GBT 18284-2000; "Hanzi" is a transliteration of this mode name. + + + + Fors the bits. + + four bits encoding a QR Code data mode + + encoded by these bits + + if bits do not correspond to a known mode + + + version in question + + number of bits used, in this QR Code symbol {@link Version}, to encode the + count of characters that will follow encoded in this {@link Mode} + + + + + Gets the bits. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Meta-data container for QR Code decoding. Instances of this class may be used to convey information back to the + decoding caller. Callers are expected to process this. + + + + + Initializes a new instance of the class. + + if set to true [mirrored]. + + + + true if the QR Code was mirrored. + + + + + Apply the result points' order correction due to mirroring. + + Array of points to apply mirror correction to. + + + + See ISO 18004:2006 Annex D + + Sean Owen + + + See ISO 18004:2006 Annex D. + Element i represents the raw version bits that specify version i + 7 + + + + + Gets the version number. + + + + + Gets the alignment pattern centers. + + + + + Gets the total codewords. + + + + + Gets the dimension for version. + + + + + Gets the EC blocks for level. + + The ec level. + + + +

Deduces version information purely from QR Code dimensions.

+ +
+ dimension in modules + + for a QR Code of that dimension or null +
+ + + Gets the version for number. + + The version number. + + + + See ISO 18004:2006 Annex E + + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + + Gets the EC codewords per block. + + + + + Gets the num blocks. + + + + + Gets the total EC codewords. + + + + + Gets the EC blocks. + + + + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the QR code version's format.

+
+
+ + + Gets the count. + + + + + Gets the data codewords. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + See ISO 18004:2006 6.5.1 Table 9 + + +

Encapsulates an alignment pattern, which are the smaller square patterns found in + all but the simplest QR Codes.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Determines if this alignment pattern "about equals" an alignment pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing an average of the two. + + The i. + The j. + New size of the module. + + + +

This class attempts to find alignment patterns in a QR Code. Alignment patterns look like finder + patterns but are smaller and appear at regular intervals throughout the image.

+ +

At the moment this only looks for the bottom-right alignment pattern.

+ +

This is mostly a simplified copy of {@link FinderPatternFinder}. It is copied, + pasted and stripped down here for maximum performance but does unfortunately duplicate + some code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Creates a finder that will look in a portion of the whole image.

+ +
+ image to search + + left column from which to start searching + + top row from which to start searching + + width of region to search + + height of region to search + + estimated module size so far + + callback function which is called, when a result point is found +
+ +

This method attempts to find the bottom-right alignment pattern in the image. It is a bit messy since + it's pretty performance-critical and so is written to be fast foremost.

+ +
+ if found +
+ + Given a count of black/white/black pixels just seen and an end position, + figures the location of the center of this black/white/black run. + + + + count of black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/1 ratios + used by alignment patterns to be considered a match + + + + +

After a horizontal scan finds a potential alignment pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + alignment pattern to see if the same proportion is detected.

+
+ row where an alignment pattern was detected + center of the section that appears to cross an alignment pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of alignment pattern, or null if not found + +
+ +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will see if this pattern had been + found on a previous horizontal scan. If so, we consider it confirmed and conclude we have + found the alignment pattern.

+ +
+ reading state module counts from horizontal scan + + row where alignment pattern may be found + + end of possible alignment pattern in row + + {@link AlignmentPattern} if we have found the same pattern twice, or null if not + +
+ + +

Encapsulates logic that can detect a QR Code in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + + Gets the image. + + + + + Gets the result point callback. + + + + +

Detects a QR Code in an image.

+
+ + encapsulating results of detecting a QR Code + +
+ + +

Detects a QR Code in an image.

+
+ optional hints to detector + + encapsulating results of detecting a QR Code + +
+ + + Processes the finder pattern info. + + The info. + + + +

Computes the dimension (number of modules on a size) of the QR Code based on the position + of the finder patterns and estimated module size.

+
+
+ + +

Computes an average estimated module size based on estimated derived from the positions + of the three finder patterns.

+
+ detected top-left finder pattern center + detected top-right finder pattern center + detected bottom-left finder pattern center + estimated module size +
+ +

Estimates module size based on two finder patterns -- it uses + {@link #sizeOfBlackWhiteBlackRunBothWays(int, int, int, int)} to figure the + width of each, measuring along the axis between their centers.

+
+
+ + See {@link #sizeOfBlackWhiteBlackRun(int, int, int, int)}; computes the total width of + a finder pattern by looking for a black-white-black run from the center in the direction + of another point (another finder pattern center), and in the opposite direction too. + + + +

This method traces a line from a point in the image, in the direction towards another point. + It begins in a black region, and keeps going until it finds white, then black, then white again. + It reports the distance from the start to this point.

+ +

This is used when figuring out how wide a finder pattern is, when the finder pattern + may be skewed or rotated.

+
+
+ + +

Attempts to locate an alignment pattern in a limited region of the image, which is + guessed to contain it. This method uses {@link AlignmentPattern}.

+
+ estimated module size so far + x coordinate of center of area probably containing alignment pattern + y coordinate of above + number of pixels in all directions to search from the center + + if found, or null otherwise + +
+ + +

Encapsulates a finder pattern, which are the three square patterns found in + the corners of QR Codes. It also encapsulates a count of similar finder patterns, + as a convenience to the finder's bookkeeping.

+
+ Sean Owen +
+ + + Gets the size of the estimated module. + + + The size of the estimated module. + + + +

Determines if this finder pattern "about equals" a finder pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing a weighted average + based on count. + + The i. + The j. + New size of the module. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+
+ Sean Owen +
+ + + 1 pixel/module times 3 modules/center + + + + + support up to version 20 for mobile clients + + + + +

Creates a finder that will search the image for three finder patterns.

+
+ image to search +
+ + + Initializes a new instance of the class. + + The image. + The result point callback. + + + + Gets the image. + + + + + Gets the possible centers. + + + + Given a count of black/white/black/white/black pixels just seen and an end position, + figures the location of the center of this run. + + + + count of black/white/black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/3/1/1 ratios + used by finder patterns to be considered a match + + + + + + count of black/white/black/white/black pixels just read + true if the proportions of the counts is close enough to the 1/1/3/1/1 ratios + by finder patterns to be considered a match + + + + After a vertical and horizontal scan finds a potential finder pattern, this method + "cross-cross-cross-checks" by scanning down diagonally through the center of the possible + finder pattern to see if the same proportion is detected. + @param maxCount maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + @param originalStateCountTotal The original state count total. + + row where a finder pattern was detected + center of the section that appears to cross a finder pattern + true if proportions are withing expected limits + + + +

After a horizontal scan finds a potential finder pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + finder pattern to see if the same proportion is detected.

+
+ row where a finder pattern was detected + center of the section that appears to cross a finder pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of finder pattern, or null if not found + +
+ +

Like {@link #crossCheckVertical(int, int, int, int)}, and in fact is basically identical, + except it reads horizontally instead of vertically. This is used to cross-cross + check a vertical cross check and locate the real center of the alignment pattern.

+
+
+ + + @see #handlePossibleCenter(int[], int, int) + + reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + ignored + true if a finder pattern candidate was found this time + + + +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will, ah, cross-cross-check + with another horizontal scan. This is needed primarily to locate the real horizontal + center of the pattern in cases of extreme skew. + And then we cross-cross-cross check with another diagonal scan.

+ If that succeeds the finder pattern location is added to a list that tracks + the number of times each location has been nearly-matched as a finder pattern. + Each additional find is more evidence that the location is in fact a finder + pattern center +
+ reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + + true if a finder pattern candidate was found this time + +
+ + number of rows we could safely skip during scanning, based on the first + two finder patterns that have been located. In some cases their position will + allow us to infer that the third pattern must lie below a certain point farther + down in the image. + + + + true iff we have found at least 3 finder patterns that have been detected + at least {@link #CENTER_QUORUM} times each, and, the estimated module size of the + candidates is "pretty similar" + + + + the 3 best {@link FinderPattern}s from our list of candidates. The "best" are + those that have been detected at least {@link #CENTER_QUORUM} times, and whose module + size differs from the average among those patterns the least + + + + + Orders by furthest from average + + + +

Orders by {@link FinderPattern#getCount()}, descending.

+
+ + +

Encapsulates information about finder patterns in an image, including the location of + the three finder patterns, and their estimated module size.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The pattern centers. + + + + Gets the bottom left. + + + + + Gets the top left. + + + + + Gets the top right. + + + + + JAVAPORT: The original code was a 2D array of ints, but since it only ever gets assigned + 0, 1 and 2 I'm going to use less memory and go with bytes. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Gets the height. + + + + + Gets the width. + + + + + Gets or sets the with the specified x. + + + + + an internal representation as bytes, in row-major order. array[y][x] represents point (x,y) + + + + + Sets the specified x. + + The x. + The y. + The value. + + + + Sets the specified x. + + The x. + The y. + if set to true [value]. + + + + Clears the specified value. + + The value. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + Encode "bytes" with the error correction level "ecLevel". The encoding mode will be chosen + internally by chooseMode(). On success, store the result in "qrCode". + We recommend you to use QRCode.EC_LEVEL_L (the lowest level) for + "getECLevel" since our primary use is to show QR code on desktop screens. We don't need very + strong error correction for this purpose. + Note that there is no way to encode bytes in MODE_KANJI. We might want to add EncodeWithMode() + with which clients can specify the encoding mode. For now, we don't need the functionality. + + text to encode + error correction level to use + representing the encoded QR code + + + + Encodes the specified content. + + The content. + The ec level. + The hints. + + + + + Decides the smallest version of QR code that will contain all of the provided data. + + if the data cannot fit in any version + + + + Gets the alphanumeric code. + + The code. + the code point of the table used in alphanumeric mode or + -1 if there is no corresponding code in the table. + + + + Chooses the mode. + + The content. + + + + + Choose the best mode by examining the content. Note that 'encoding' is used as a hint; + if it is Shift_JIS, and the input is only double-byte Kanji, then we return {@link Mode#KANJI}. + + The content. + The encoding. + + + + + true if the number of input bits will fit in a code with the specified version and error correction level. + + + + Terminate bits as described in 8.4.8 and 8.4.9 of JISX0510:2004 (p.24). + + The num data bytes. + The bits. + + + + Get number of data bytes and number of error correction bytes for block id "blockID". Store + the result in "numDataBytesInBlock", and "numECBytesInBlock". See table 12 in 8.5.1 of + JISX0510:2004 (p.30) + + The num total bytes. + The num data bytes. + The num RS blocks. + The block ID. + The num data bytes in block. + The num EC bytes in block. + + + + Interleave "bits" with corresponding error correction bytes. On success, store the result in + "result". The interleave rule is complicated. See 8.6 of JISX0510:2004 (p.37) for details. + + The bits. + The num total bytes. + The num data bytes. + The num RS blocks. + + + + + Append mode info. On success, store the result in "bits". + + The mode. + The bits. + + + + Append length info. On success, store the result in "bits". + + The num letters. + The version. + The mode. + The bits. + + + + Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits". + + The content. + The mode. + The bits. + The encoding. + + + + + + Satoru Takabayashi + Daniel Switkin + Sean Owen + + + + Apply mask penalty rule 1 and return the penalty. Find repetitive cells with the same color and + give penalty to them. Example: 00000 or 11111. + + The matrix. + + + + + Apply mask penalty rule 2 and return the penalty. Find 2x2 blocks with the same color and give + penalty to them. This is actually equivalent to the spec's rule, which is to find MxN blocks and give a + penalty proportional to (M-1)x(N-1), because this is the number of 2x2 blocks inside such a block. + + The matrix. + + + + + Apply mask penalty rule 3 and return the penalty. Find consecutive cells of 00001011101 or + 10111010000, and give penalty to them. If we find patterns like 000010111010000, we give + penalties twice (i.e. 40 * 2). + + The matrix. + + + + + Apply mask penalty rule 4 and return the penalty. Calculate the ratio of dark cells and give + penalty if the ratio is far from 50%. It gives 10 penalty for 5% distance. + + The matrix. + + + + + Return the mask bit for "getMaskPattern" at "x" and "y". See 8.8 of JISX0510:2004 for mask + pattern conditions. + + The mask pattern. + The x. + The y. + + + + + Helper function for applyMaskPenaltyRule1. We need this for doing this calculation in both + vertical and horizontal orders respectively. + + The matrix. + if set to true [is horizontal]. + + + + + + + + satorux@google.com (Satoru Takabayashi) - creator + + + + + Set all cells to 2. 2 means that the cell is empty (not set yet). + + JAVAPORT: We shouldn't need to do this at all. The code should be rewritten to begin encoding + with the ByteMatrix initialized all to zero. + + The matrix. + + + + Build 2D matrix of QR Code from "dataBits" with "ecLevel", "version" and "getMaskPattern". On + success, store the result in "matrix" and return true. + + The data bits. + The ec level. + The version. + The mask pattern. + The matrix. + + + + Embed basic patterns. On success, modify the matrix and return true. + The basic patterns are: + - Position detection patterns + - Timing patterns + - Dark dot at the left bottom corner + - Position adjustment patterns, if need be + + The version. + The matrix. + + + + Embed type information. On success, modify the matrix. + + The ec level. + The mask pattern. + The matrix. + + + + Embed version information if need be. On success, modify the matrix and return true. + See 8.10 of JISX0510:2004 (p.47) for how to embed version information. + + The version. + The matrix. + + + + Embed "dataBits" using "getMaskPattern". On success, modify the matrix and return true. + For debugging purposes, it skips masking process if "getMaskPattern" is -1. + See 8.7 of JISX0510:2004 (p.38) for how to embed data bits. + + The data bits. + The mask pattern. + The matrix. + + + + Return the position of the most significant bit set (to one) in the "value". The most + significant bit is position 32. If there is no bit set, return 0. Examples: + - findMSBSet(0) => 0 + - findMSBSet(1) => 1 + - findMSBSet(255) => 8 + + The value_ renamed. + + + + + Calculate BCH (Bose-Chaudhuri-Hocquenghem) code for "value" using polynomial "poly". The BCH + code is used for encoding type information and version information. + Example: Calculation of version information of 7. + f(x) is created from 7. + - 7 = 000111 in 6 bits + - f(x) = x^2 + x^2 + x^1 + g(x) is given by the standard (p. 67) + - g(x) = x^12 + x^11 + x^10 + x^9 + x^8 + x^5 + x^2 + 1 + Multiply f(x) by x^(18 - 6) + - f'(x) = f(x) * x^(18 - 6) + - f'(x) = x^14 + x^13 + x^12 + Calculate the remainder of f'(x) / g(x) + x^2 + __________________________________________________ + g(x) )x^14 + x^13 + x^12 + x^14 + x^13 + x^12 + x^11 + x^10 + x^7 + x^4 + x^2 + -------------------------------------------------- + x^11 + x^10 + x^7 + x^4 + x^2 + + The remainder is x^11 + x^10 + x^7 + x^4 + x^2 + Encode it in binary: 110010010100 + The return value is 0xc94 (1100 1001 0100) + + Since all coefficients in the polynomials are 1 or 0, we can do the calculation by bit + operations. We don't care if coefficients are positive or negative. + + The value. + The poly. + + + + + Make bit vector of type information. On success, store the result in "bits" and return true. + Encode error correction level and mask pattern. See 8.9 of + JISX0510:2004 (p.45) for details. + + The ec level. + The mask pattern. + The bits. + + + + Make bit vector of version information. On success, store the result in "bits" and return true. + See 8.10 of JISX0510:2004 (p.45) for details. + + The version. + The bits. + + + + Check if "value" is empty. + + The value. + + true if the specified value is empty; otherwise, false. + + + + + Embed the lonely dark dot at left bottom corner. JISX0510:2004 (p.46) + + The matrix. + + + + + + The x start. + The y start. + The matrix. + + + + Embed position detection patterns and surrounding vertical/horizontal separators. + + The matrix. + + + + Embed position adjustment patterns if need be. + + The version. + The matrix. + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + + + + + + Initializes a new instance of the class. + + + + + Gets or sets the mode. + + + The mode. + + + + + Gets or sets the EC level. + + + The EC level. + + + + + Gets or sets the version. + + + The version. + + + + + Gets or sets the mask pattern. + + + The mask pattern. + + + + + Gets or sets the matrix. + + + The matrix. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Check if "mask_pattern" is valid. + + The mask pattern. + + true if [is valid mask pattern] [the specified mask pattern]; otherwise, false. + + + + + The class holds the available options for the QrCodeWriter + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + . + + + + + Specifies what character encoding to use where applicable (type ) + + + + + Explicitly disables ECI segment when generating QR Code + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + + + + + Specifies the exact version of QR code to be encoded. An integer, range 1 to 40. If the data specified + cannot fit within the required version, a WriterException will be thrown. + + + + + This implementation can detect and decode QR Codes in an image. + Sean Owen + + + + + Gets the decoder. + + + + + + Locates and decodes a QR code in an image. + + a String representing the content encoded by the QR code + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a QR Code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Implementations of this interface can decode an image of a barcode in some format into + the String it encodes. For example, can + decode a QR code. The decoder may optionally receive hints from the caller which may help + it decode more quickly or accurately. + + See , which attempts to determine what barcode + format is present within the image as well, and then decodes it accordingly. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + String which the barcode encodes + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + The general exception class throw when something goes wrong during decoding of a barcode. + This includes, but is not limited to, failing checksums / error correction algorithms, being + unable to locate finder timing patterns, and so on. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class. + + The inner exception. + + + + Initializes a new instance of the class. + + The inner exception. + + + + + Interface for a class to convert a BitMatrix to an output image format + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + The options. + + + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + + + the generated code as byte array of BGRA pixels + + + + + the width of the image + + + + + the height of the image + + + + + converts the pixel data to a bitmap object + + + + + + converts the pixel data to a bitmap object + + + + + + Renders a to an byte array with pixel data (4 byte per pixel, BGRA) + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Renders a to a + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + + Gets or sets the font family. + + + The font family. + + + + + Gets or sets the size of the font. + + + The size of the font. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Renders a barcode into a Svg image + + + + + Gets or sets the foreground color. + + The foreground color. + + + + Gets or sets the background color. + + The background color. + + + + Gets or sets the font family name + + The font family name. + + + + Gets or sets the font size in pixel + + The font size in pixel. + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Represents a barcode as a Svg image + + + + + Gets or sets the content. + + + The content. + + + + + The original height of the bitmatrix for the barcode + + + + + The original width of the bitmatrix for the barcode + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The content. + + + + Gives the XML representation of the SVG image + + + + + Renders a to a + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + + Gets or sets the font family. + + + The font family. + + + + + Gets or sets the size of the font. + + + The size of the font. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Encapsulates the result of decoding a barcode within an image. + + + + raw text encoded by the barcode, if applicable, otherwise null + + + raw bytes encoded by the barcode, if applicable, otherwise null + + + + points related to the barcode in the image. These are typically points + identifying finder patterns or the corners of the barcode. The exact meaning is + specific to the type of barcode that was decoded. + + + + {@link BarcodeFormat} representing the format of the barcode that was decoded + + + + {@link Hashtable} mapping {@link ResultMetadataType} keys to values. May be + null. This contains optional metadata about what was detected about the barcode, + like orientation. + + + + + Gets the timestamp. + + + + + how many bits of are valid; typically 8 times its length + + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + The timestamp. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + The timestamp. + + + + Adds one metadata to the result + + The type. + The value. + + + + Adds a list of metadata to the result + + The metadata. + + + + Adds the result points. + + The new points. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Represents some type of metadata about the result of the decoding that the decoder + wishes to communicate back to the caller. + + Sean Owen + + + + Unspecified, application-specific metadata. Maps to an unspecified {@link Object}. + + + + + Denotes the likely approximate orientation of the barcode in the image. This value + is given as degrees rotated clockwise from the normal, upright orientation. + For example a 1D barcode which was found by reading top-to-bottom would be + said to have orientation "90". This key maps to an {@link Integer} whose + value is in the range [0,360). + + + + +

2D barcode formats typically encode text, but allow for a sort of 'byte mode' + which is sometimes used to encode binary data. While {@link Result} makes available + the complete raw bytes in the barcode for these formats, it does not offer the bytes + from the byte segments alone.

+

This maps to a {@link java.util.List} of byte arrays corresponding to the + raw bytes in the byte segments in the barcode, in order.

+
+
+ + + Error correction level used, if applicable. The value type depends on the + format, but is typically a String. + + + + + For some periodicals, indicates the issue number as an {@link Integer}. + + + + + For some products, indicates the suggested retail price in the barcode as a + formatted {@link String}. + + + + + For some products, the possible country of manufacture as a {@link String} denoting the + ISO country code. Some map to multiple possible countries, like "US/CA". + + + + + For some products, the extension text + + + + + If the code format supports structured append and + the current scanned code is part of one then the + sequence number is given with it. + + + + + If the code format supports structured append and + the current scanned code is part of one then the + parity is given with it. + + + + + PDF417-specific metadata + + + + + Aztec-specific metadata + + + + + Encapsulates a point of interest in an image containing a barcode. Typically, this + would be the location of a finder pattern or the corner of the barcode, for example. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The x. + The y. + + + + Gets the X. + + + + + Gets the Y. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC and + BC is less than AC and the angle between BC and BA is less than 180 degrees. + + array of three to order + + + + calculates the distance between two points + + first pattern + second pattern + + distance between two points + + + + + Returns the z component of the cross product between vectors BC and BA. + + + + Callback which is invoked when a possible result point (significant + point in the barcode image such as a corner) is found. + + + + + + + + Luminance source class which support different formats of images. + + + + + enumeration of supported bitmap format which the RGBLuminanceSource can process + + + + + format of the byte[] isn't known. RGBLuminanceSource tries to determine the best possible value + + + + + grayscale array, the byte array is a luminance array with 1 byte per pixel + + + + + grayscale array, the byte array is a luminance array with 2 bytes per pixel + + + + + 3 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels alpha, red, green and blue + + + + + 3 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green, red and alpha + + + + + 2 bytes per pixel, 5 bit red, 6 bits green and 5 bits blue + + + + + 4 bytes per pixel with the channels red, green, blue and alpha + + + + + 4 bytes for two pixels, UYVY formatted + + + + + 4 bytes for two pixels, YUYV formatted + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 1 byte per pixel (Gray8). + That means the whole array consists of the luminance values (grayscale). + + The luminance array. + The width. + The height. + if set to true [is8 bit]. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + The bitmap format. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + calculates the luminance values for the given byte array and bitmap format + + + + + + + Attribute is only for source code compatibility issues + + + + + Attribute is only for compatibility issues + + + + + Contains conversion support elements such as classes, interfaces and static methods. + + + + + Copies an array of chars obtained from a String into a specified array of chars + + The String to get the chars from + Position of the String to start getting the chars + Position of the String to end getting the chars + Array to return the chars + Position of the destination array of chars to start storing the chars + An array of chars + + + + Sets the capacity for the specified List + + The List which capacity will be set + The new capacity value + + + + Converts a string-Collection to an array + + The strings. + + + + + Joins all elements to one string. + + + The separator. + The values. + + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The value. + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The start index. + The end index. + The value. + + + + + + + + + + + + + + + + + + Savely gets the value of a decoding hint + if hints is null the default is returned + + + The hints. + Type of the hint. + The @default. + + + + The base class for all objects which encode/generate a barcode image. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + A base class which covers the range of exceptions which may occur when encoding a barcode using + the Writer framework. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner exc. + + + + Attribute is only for compatibility issues + + +
+
diff --git a/packages/ZXing.Net.0.16.4/lib/windows8-managed/zxing.winrt.XML b/packages/ZXing.Net.0.16.4/lib/windows8-managed/zxing.winrt.XML new file mode 100644 index 0000000..82d763d --- /dev/null +++ b/packages/ZXing.Net.0.16.4/lib/windows8-managed/zxing.winrt.XML @@ -0,0 +1,10961 @@ + + + + zxing.winrt + + + + + Extends with more information specific to the Aztec format, + like the number of layers and whether it's compact. + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + Initializes a new instance of the class. + + The bits. + The points. + if set to true [compact]. + The nb datablocks. + The nb layers. + + + + The main class which implements Aztec Code decoding -- as opposed to locating and extracting + the Aztec Code from an image. + + David Olivier + + + + Decodes the specified detector result. + + The detector result. + + + + + This method is used for testing the high-level encoder + + + + + + + Gets the string encoded in the aztec code bits + + The corrected bits. + the decoded string + + + + gets the table corresponding to the char passed + + The t. + + + + + Gets the character (or string) corresponding to the passed code in the given table + + the table used + the code of the character + + + + + Performs RS error correction on an array of bits. + + The rawbits. + the corrected array + + + + Gets the array of bits from an Aztec Code matrix + + The matrix. + the array of bits + + + + Reads a code of given length and at given index in an array of bits + + The rawbits. + The start index. + The length. + + + + + Reads a code of length 8 in an array of bits, padding with zeros + + + + + + + + Packs a bit array into bytes, most significant bit first + + + + + + + Encapsulates logic that can detect an Aztec Code in an image, even if the Aztec Code + is rotated or skewed, or partially obscured. + + David Olivier + + + + Initializes a new instance of the class. + + The image. + + + + Detects an Aztec Code in an image. + + + + + Detects an Aztec Code in an image. + + if true, image is a mirror-image of original. + + encapsulating results of detecting an Aztec Code + + + + + Extracts the number of data layers and data blocks from the layer around the bull's eye + + bullEyeCornerPoints the array of bull's eye corners + + + + + Corrects the parameter bits using Reed-Solomon algorithm + + paremeter bits + compact true if this is a compact Aztec code + + + + + Finds the corners of a bull-eye centered on the passed point + This returns the centers of the diagonal points just outside the bull's eye + Returns [topRight, bottomRight, bottomLeft, topLeft] + + Center point + The corners of the bull-eye + + + + Finds a candidate center point of an Aztec code from an image + + the center point + + + + Gets the Aztec code corners from the bull's eye corners and the parameters. + + the array of bull's eye corners + the array of aztec code corners + + + + Creates a BitMatrix by sampling the provided image. + topLeft, topRight, bottomRight, and bottomLeft are the centers of the squares on the + diagonal just outside the bull's eye. + + The image. + The top left. + The bottom left. + The bottom right. + The top right. + + + + + Samples a line + + start point (inclusive) + end point (exclusive) + number of bits + the array of bits as an int (first bit is high-order bit of result) + + + + Determines whether [is white or black rectangle] [the specified p1]. + + The p1. + The p2. + The p3. + The p4. + true if the border of the rectangle passed in parameter is compound of white points only + or black points only + + + + Gets the color of a segment + + The p1. + The p2. + 1 if segment more than 90% black, -1 if segment is more than 90% white, 0 else + + + + Gets the coordinate of the first point with a different color in the given direction + + The init. + if set to true [color]. + The dx. + The dy. + + + + + Expand the square represented by the corner points by pushing out equally in all directions + + the corners of the square, which has the bull's eye at its center + the original length of the side of the square in the target bit matrix + the new length of the size of the square in the target bit matrix + the corners of the expanded square + + + + Aztec 2D code representation + + Rustam Abdullaev + + + + Compact or full symbol indicator + + + + + Size in pixels (width and height) + + + + + Number of levels + + + + + Number of data codewords + + + + + The symbol image + + + + + represents a token for a binary shift + + + + + initializing constructor + + + + + + + + appends the byte array to the BitArray + + + + + + + string representation + + + + + + Generates Aztec 2D barcodes. + + Rustam Abdullaev + + + + Encodes the given binary content as an Aztec symbol + + input data string + Aztec symbol matrix with metadata + + + + Encodes the given binary content as an Aztec symbol + + input data string + minimal percentage of error check words (According to ISO/IEC 24778:2008, + a minimum of 23% + 3 words is recommended) + if non-zero, a user-specified value for the number of layers + + Aztec symbol matrix with metadata + + + + + This produces nearly optimal encodings of text into the first-level of + encoding used by Aztec code. + It uses a dynamic algorithm. For each prefix of the string, it determines + a set of encodings that could lead to this prefix. We repeatedly add a + character and generate a new set of optimal encodings until we have read + through the entire input. + @author Frank Yellin + @author Rustam Abdullaev + + + + + + + + + + + Convert the text represented by this High Level Encoder into a BitArray. + + text represented by this encoder encoded as a + + + + State represents all information about a sequence necessary to generate the current output. + Note that a state is immutable. + + + + + Create a new state representing this state with a latch to a (not + necessary different) mode, and then a code. + + + + + Create a new state representing this state, with a temporary shift + to a different mode to output a single value. + + + + + Create a new state representing this state, but an additional character + output in Binary Shift mode. + + + + + Create the state identical to this one, but we are no longer in + Binary Shift mode. + + + + + Returns true if "this" state is better (or equal) to be in than "that" + state under all possible circumstances. + + + + + This implementation can detect and decode Aztec codes in an image. + + David Olivier + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + a String representing the content encoded by the Data Matrix code + + + + + Locates and decodes a Data Matrix code in an image. + + image of barcode to decode + passed as a {@link java.util.Hashtable} from {@link com.google.zxing.DecodeHintType} + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Aztec result meta data. + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + + + + + + + + + Renders an Aztec code as a + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + The class holds the available options for the + + + + + Representing the minimal percentage of error correction words. + Note: an Aztec symbol should have a minimum of 25% EC words. + + + + + Specifies the required number of layers for an Aztec code: + a negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + a positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + + + + + Enumerates barcode formats known to this package. + + Sean Owen + + + Aztec 2D barcode format. + + + CODABAR 1D format. + + + Code 39 1D format. + + + Code 93 1D format. + + + Code 128 1D format. + + + Data Matrix 2D barcode format. + + + EAN-8 1D format. + + + EAN-13 1D format. + + + ITF (Interleaved Two of Five) 1D format. + + + MaxiCode 2D barcode format. + + + PDF417 format. + + + QR Code 2D barcode format. + + + RSS 14 + + + RSS EXPANDED + + + UPC-A 1D format. + + + UPC-E 1D format. + + + UPC/EAN extension format. Not a stand-alone format. + + + MSI + + + Plessey + + + Intelligent Mail barcode + + + + UPC_A | UPC_E | EAN_13 | EAN_8 | CODABAR | CODE_39 | CODE_93 | CODE_128 | ITF | RSS_14 | RSS_EXPANDED + without MSI (to many false-positives) and IMB (not enough tested, and it looks more like a 2D) + + + + + A smart class to decode the barcode inside a bitmap object + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + A smart class to decode the barcode inside a bitmap object + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Constructor for additional image formats for one BarcodeReader class + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Optional: Gets or sets the function to create a luminance source object for a bitmap. + If null a platform specific default LuminanceSource is used + + + The function to create a luminance source object. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + A smart class to decode the barcode inside a bitmap object + + + + + represents the default function which is called to get a instance from a raw byte array + + + + + Gets or sets the options. + + + The options. + + + + + Gets the reader which should be used to find and decode the barcode. + + + The reader. + + + + + Gets or sets a method which is called if an important point is found + + + The result point callback. + + + + + event is executed if a result was found via decode + + + + + Gets or sets a value indicating whether the image should be automatically rotated. + Rotation is supported for 90, 180 and 270 degrees + + + true if image should be rotated; otherwise, false. + + + + + Gets or sets a value indicating whether the image should be automatically inverted + if no result is found in the original image. + ATTENTION: Please be carefully because it slows down the decoding process if it is used + + + true if image should be inverted; otherwise, false. + + + + + Optional: Gets or sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + The function to create a binarizer object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb array. + If null the RGBLuminanceSource is used. The handler is only called when Decode with a byte[] array is called. + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + raises the ResultFound event + + + + + + raises the ResultFound event + + + + + + calls the explicitResultPointFound action + + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + A smart class to encode some content to raw pixel data + + + + + Initializes a new instance of the class. + + + + + A smart class to encode some content to a svg barcode image + + + + + Initializes a new instance of the class. + + + + + A smart class to encode some content to a barcode image + + + + + Initializes a new instance of the class. + + + + + A base class for specific barcode writers with specific formats of barcode images. + + The type of the output. + + + + Gets or sets the renderer which should be used to render the encoded BitMatrix. + + + + + Encodes the specified contents and returns a rendered instance of the barcode. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The matrix. + + + + + A base class for specific barcode writers with specific formats of barcode images. + + + + + Gets or sets the barcode format. + The value is only suitable if the MultiFormatWriter is used. + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + + + + + + + + + + + + Encodes the specified contents and returns a BitMatrix array. + That array has to be rendered manually or with a IBarcodeRenderer. + + The contents. + + + + + The base class for luminance sources which supports + cropping and rotating based upon the luminance values. + + + + + weight of the red channel for calculating a gray scale image + + + + + weight of the green channel for calculating a gray scale image + + + + + weight of the blue channel for calculating a gray scale image + + + + + numbers of bits which for right shifting + + + + + + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + + The luminance array. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + gets the luminance matrix + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + TODO: not implemented yet + + + A rotated version of this object. + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + + Whether this subclass supports cropping. + + + + + Whether this subclass supports invertion. + + + + Inverts the luminance values (newValue = 255 - oldValue) + + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + This class hierarchy provides a set of methods to convert luminance data to 1 bit data. + It allows the algorithm to vary polymorphically, for example allowing a very expensive + thresholding technique for servers and a fast one for mobile. It also permits the implementation + to vary, e.g. a JNI version for Android and a Java fallback version for other platforms. + + dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The source. + + + + Gets the luminance source object. + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + For callers which only examine one row of pixels at a time, the same BitArray should be reused + and passed in with each call for performance. However it is legal to keep more than one row + at a time if needed. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + Converts a 2D array of luminance data to 1 bit data. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + A new concrete Binarizer implementation object. + + + + Gets the width of the luminance source object. + + + + + Gets the height of the luminance source object. + + + + + This class is the core bitmap class used by ZXing to represent 1 bit data. Reader objects + accept a BinaryBitmap and attempt to decode it. + + dswitkin@google.com (Daniel Switkin) + + + + + + + + + + The width of the bitmap. + + + + + The height of the bitmap. + + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + + The row to fetch, which must be in [0, bitmap height). + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + + Converts a 2D array of luminance data to 1 bit. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + + Whether this bitmap can be cropped. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if isCropSupported() is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + + Whether this bitmap supports counter-clockwise rotation. + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + class which represents the luminance values for a bitmap object of a WriteableBitmap class + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + initializing constructor + + + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + +

See + + DoCoMo's documentation about the result types represented by subclasses of this class.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + Implements KDDI AU's address book format. See + + http://www.au.kddi.com/ezfactory/tec/two_dimensions/index.html. + (Thanks to Yuzo for translating!) + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Implements the "MECARD" address book entry format. + + Supported keys: N, SOUND, TEL, EMAIL, NOTE, ADR, BDAY, URL, plus ORG + Unsupported keys: TEL-AV, NICKNAME + + Except for TEL, multiple values for keys are also not supported; + the first one found takes precedence. + + Our understanding of the MECARD format is based on this document: + + http://www.mobicode.org.tw/files/OMIA%20Mobile%20Bar%20Code%20Standard%20v3.2.1.doc + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes contact information, like that in an address book entry. + + Sean Owen + + + + initializing constructor + + + + + + + + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + the names + + + + + the nicknames + + + + + In Japanese, the name is written in kanji, which can have multiple readings. Therefore a hint + is often provided, called furigana, which spells the name phonetically. + + The pronunciation of the getNames() field, often in hiragana or katakana. + + + + the phone numbers + + + + optional descriptions of the type of each phone number. It could be like "HOME", but, + there is no guaranteed or standard format. + + + + the e-mail addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the instant messenger addresses + + + + + the note field + + + + + the addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the title + + + + + the urls + + + + birthday formatted as yyyyMMdd (e.g. 19780917) + + + a location as a latitude/longitude pair + + + Implements the "BIZCARD" address book entry format, though this has been + largely reverse-engineered from examples observed in the wild -- still + looking for a definitive reference. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a calendar event at a certain time, optionally with attendees and a location. + + Sean Owen + + + + Gets the start. + + + + + Determines whether [is start all day]. + + if start time was specified as a whole day + + + + event end , or null if event has no duration + + + + + Gets a value indicating whether this instance is end all day. + + true if end time was specified as a whole day + + + + Parses a string as a date. RFC 2445 allows the start and end fields to be of type DATE (e.g. 20081021) + or DATE-TIME (e.g. 20081021T123000 for local time, or 20081021T123000Z for UTC). + + The string to parse + + if not a date formatted string + + + + Represents a parsed result that encodes an email message including recipients, subject and body text. + + Sean Owen + + + + the email address + + + + + the TOs + + + + + the CCs + + + + + the BCCs + + + + + the subject + + + + + the body + + + + + the mailto: uri + + + + + Represents a result that encodes an e-mail address, either as a plain address + like "joe@example.org" or a mailto: URL like "mailto:joe@example.org". + + Sean Owen + + + + Implements the "MATMSG" email message entry format. + + Supported keys: TO, SUB, BODY + + Sean Owen + + + + This implements only the most basic checking for an email address's validity -- that it contains + an '@' and contains no characters disallowed by RFC 2822. This is an overly lenient definition of + validity. We want to generally be lenient here since this class is only intended to encapsulate what's + in a barcode, not "judge" it. + + The email. + + true if it is basically a valid email address; otherwise, false. + + + + + Represents a parsed result that encodes extended product information as encoded by the RSS format, like weight, price, dates, etc. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + extension for kilogram weight type + + + + + extension for pounds weight type + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the raw text + + + + + the product id + + + + + the sscc + + + + + the lot number + + + + + the production date + + + + + the packaging date + + + + + the best before date + + + + + the expiration date + + + + + the weight + + + + + the weight type + + + + + the weight increment + + + + + the price + + + + + the price increment + + + + + the price currency + + + + + the uncommon AIs + + + + + the display representation (raw text) + + + + + Parses strings of digits that represent a RSS Extended code. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + tries to parse a text representation to a specific result object + + + + + + + Represents a parsed result that encodes a geographic coordinate, with latitude, longitude and altitude. + + Sean Owen + + + latitude in degrees + + + + longitude in degrees + + + + altitude in meters. If not specified, in the geo URI, returns 0.0 + + + + query string associated with geo URI or null if none exists + + + + the geo URI + + + + a URI link to Google Maps which display the point on the Earth described + by this instance, and sets the zoom level in a way that roughly reflects the + altitude, if specified + + + + Parses a "geo:" URI result, which specifies a location on the surface of + the Earth as well as an optional altitude above the surface. See + + http://tools.ietf.org/html/draft-mayrhofer-geo-uri-00. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a product ISBN number. + + jbreiden@google.com (Jeff Breidenbach) + + + + the ISBN number + + + + Parses strings of digits that represent a ISBN. + + + jbreiden@google.com (Jeff Breidenbach) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + See ISBN-13 For Dummies + + The result. + + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link ResultParser#parseResult(Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Represents the type of data encoded by a barcode -- from plain text, to a + URI, to an e-mail address, etc. + + Sean Owen + + + + Represents a parsed result that encodes a product by an identifier of some kind. + + dswitkin@google.com (Daniel Switkin) + + + + Parses strings of digits that represent a UPC code. + + dswitkin@google.com (Daniel Switkin) + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link #parseResult(com.google.zxing.Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Attempts to parse the raw {@link Result}'s contents as a particular type + of information (email, URL, etc.) and return a {@link ParsedResult} encapsulating + the result of parsing. + + the raw to parse + encapsulating the parsing result + + + + Parses the result. + + The result. + + + +

Parses an "sms:" URI result, which specifies a number to SMS and optional + "via" number. See + the IETF draft on this.

+ +

This actually also parses URIs starting with "mms:", "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + + Represents a parsed result that encodes an SMS message, including recipients, subject and body text. + + Sean Owen + + + +

Parses an "smsto:" URI result, whose format is not standardized but appears to be like: + {@code smsto:number(:body)}.

+

This actually also parses URIs starting with "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+
+ Sean Owen +
+ + +

Parses an "smtp:" URI result, whose format is not standardized but appears to be like: + smtp[:subject[:body]]}.

+

See http://code.google.com/p/zxing/issues/detail?id=536

+
+ Sean Owen +
+ + + Represents a parsed result that encodes a telephone number. + + Sean Owen + + + + Parses a "tel:" URI result, which specifies a phone number. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + A simple result type encapsulating a string that has no further interpretation. + + Sean Owen + + + + A simple result type encapsulating a URI that has no further interpretation. + + Sean Owen + + + true if the URI contains suspicious patterns that may suggest it intends to + mislead the user about its true nature. At the moment this looks for the presence + of user/password syntax in the host/authority portion of a URI which may be used + in attempts to make the URI's host appear to be other than it is. Example: + http://yourbank.com@phisher.com This URI connects to phisher.com but may appear + to connect to yourbank.com at first glance. + + + + Transforms a string that represents a URI into something more proper, by adding or canonicalizing + the protocol. + + + + + Tries to parse results that are a URI of some kind. + + Sean Owen + + + Parses the "URLTO" result format, which is of the form "URLTO:[title]:[url]". + This seems to be used sometimes, but I am not able to find documentation + on its origin or official format? + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Parses contact information formatted according to the VCard (2.1) format. This is not a complete + implementation but should parse information as commonly encoded in 2D barcodes. + + Sean Owen + + + Formats name fields of the form "Public;John;Q.;Reverend;III" into a form like + "Reverend John Q. Public III". + + @param names name values to format, in place + + + + Partially implements the iCalendar format's "VEVENT" format for specifying a + calendar event. See RFC 2445. This supports SUMMARY, DTSTART and DTEND fields. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a Vehicle Identification Number (VIN). + + + + + Detects a result that is likely a vehicle identification number. + @author Sean Owen + + + + + Represents a parsed result that encodes wifi network information, like SSID and password. + + Vikram Aggarwal + + + + + A simple, fast array of bits, represented compactly by an array of ints internally. + + Sean Owen + + + + size of the array, number of elements + + + + + size of the array in bytes + + + + + index accessor + + + + + + + default constructor + + + + + initializing constructor + + desired size of the array + + + + Flips bit i. + + bit to set + + + + + Gets the next set. + + first bit to check + index of first bit that is set, starting from the given index, or size if none are set + at or beyond this given index + + + + see getNextSet(int) + + index to start looking for unset bit + index of next unset bit, or if none are unset until the end + + + Sets a block of 32 bits, starting at bit i. + + + first bit to set + + the new value of the next 32 bits. Note again that the least-significant bit + corresponds to bit i, the next-least-significant to i+1, and so on. + + + + + Sets a range of bits. + + start of range, inclusive. + end of range, exclusive + + + Clears all bits (sets to false). + + + Efficient method to check if a range of bits is set, or not set. + + + start of range, inclusive. + + end of range, exclusive + + if true, checks that bits in range are set, otherwise checks that they are not set + + true iff all bits are set or not set in range, according to value argument + if end is less than start or the range is not contained in the array + + + + Appends the bit. + + The bit. + + + underlying array of ints. The first element holds the first 32 bits, and the least + significant bit is bit 0. + + + + + Appends the least-significant bits, from value, in order from most-significant to + least-significant. For example, appending 6 bits from 0x000001E will append the bits + 0, 1, 1, 1, 1, 0 in that order. + + containing bits to append + bits from value to append + + + + adds the array to the end + + + + + + XOR operation + + + + + + converts to bytes. + + first bit to start writing + array to write into. Bytes are written most-significant byte first. This is the opposite + of the internal representation, which is exposed by BitArray + position in array to start writing + how many bytes to write + + + Reverses all bits in the array. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Erstellt ein neues Objekt, das eine Kopie der aktuellen Instanz darstellt. + + + Ein neues Objekt, das eine Kopie dieser Instanz darstellt. + + + + +

Represents a 2D matrix of bits. In function arguments below, and throughout the common + module, x is the column position, and y is the row position. The ordering is always x, y. + The origin is at the top-left.

+

Internally the bits are represented in a 1-D array of 32-bit ints. However, each row begins + with a new int. This is done intentionally so that we can copy out a row into a BitArray very + efficiently.

+

The ordering of bits is row-major. Within each int, the least significant bits are used first, + meaning they represent lower x values. This is compatible with BitArray's implementation.

+
+ Sean Owen + dswitkin@google.com (Daniel Switkin) +
+ + The width of the matrix + + + + The height of the matrix + + + + This method is for compatibility with older code. It's only logical to call if the matrix + is square, so I'm throwing if that's not the case. + + + row/column dimension of this matrix + + + + + The rowsize of the matrix + + + + + Creates an empty square . + + height and width + + + + Creates an empty square . + + bit matrix width + bit matrix height + + + + Interprets a 2D array of booleans as a , where "true" means an "on" bit. + + bits of the image, as a row-major 2D array. Elements are arrays representing rows + representation of image + + +

Gets the requested bit, where true means black.

+ +
+ The horizontal component (i.e. which column) + + The vertical component (i.e. which row) + + value of given bit in matrix + +
+ + +

Flips the given bit.

+
+ The horizontal component (i.e. which column) + The vertical component (i.e. which row) +
+ + + flip all of the bits, if shouldBeFlipped is true for the coordinates + + should return true, if the bit at a given coordinate should be flipped + + + + Exclusive-or (XOR): Flip the bit in this {@code BitMatrix} if the corresponding + mask bit is set. + + The mask. + + + Clears all bits (sets to false). + + +

Sets a square region of the bit matrix to true.

+ +
+ The horizontal position to begin at (inclusive) + + The vertical position to begin at (inclusive) + + The width of the region + + The height of the region + +
+ + A fast method to retrieve one row of data from the matrix as a BitArray. + + + The row to retrieve + + An optional caller-allocated BitArray, will be allocated if null or too small + + The resulting BitArray - this reference should always be used even when passing + your own row + + + + + Sets the row. + + row to set + {@link BitArray} to copy from + + + + Modifies this {@code BitMatrix} to represent the same but rotated 180 degrees + + + + + This is useful in detecting the enclosing rectangle of a 'pure' barcode. + + {left,top,width,height} enclosing rectangle of all 1 bits, or null if it is all white + + + + This is useful in detecting a corner of a 'pure' barcode. + + {x,y} coordinate of top-left-most 1 bit, or null if it is all white + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + The line separator. + + A that represents this instance. + + + + + Clones this instance. + + + + + + Converts this ByteMatrix to a black and white bitmap. + + A black and white bitmap converted from this ByteMatrix. + + +

This provides an easy abstraction to read bits at a time from a sequence of bytes, where the + number of bits read is not often a multiple of 8.

+ +

This class is thread-safe but not reentrant. Unless the caller modifies the bytes array + it passed in, in which case all bets are off.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + bytes from which this will read bits. Bits will be read from the first byte first. + Bits are read within a byte from most-significant to least-significant bit. + + + + + index of next bit in current byte which would be read by the next call to {@link #readBits(int)}. + + + + + index of next byte in input byte array which would be read by the next call to {@link #readBits(int)}. + + + + number of bits to read + + int representing the bits read. The bits will appear as the least-significant + bits of the int + + if numBits isn't in [1,32] or more than is available + + + number of bits that can be read successfully + + + + Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1 + of ISO 18004. + + + Sean Owen + + + character set ECI value + representing ECI of given value, or null if it is legal but unsupported + + + character set ECI encoding name + representing ECI for character encoding, or null if it is legalbut unsupported + + + + Encapsulates the result of decoding a matrix of bits. This typically + applies to 2D barcode formats. For now it contains the raw bytes obtained, + as well as a String interpretation of those bytes, if applicable. + Sean Owen + + + + + raw bytes representing the result, or null if not applicable + + + + + how many bits of are valid; typically 8 times its length + + + + + text representation of the result + + + + + list of byte segments in the result, or null if not applicable + + + + + name of error correction level used, or null if not applicable + + + + + gets a value which describe if structure append data was found + + + + + number of errors corrected, or null if not applicable + + + + + gives the sequence number of the result if structured append was found + + + + + number of erasures corrected, or null if not applicable + + + + + gives the parity information if structured append was found + + + + + Miscellanseous data value for the various decoders + + The other. + + + + initializing constructor + + + + + + + + + initializing constructor + + + + + + + + + + + initializing constructor + + + + + + + + + + initializing constructor + + + + + + + + + + + + Defines an container for encoder options + + + + + Gets the data container for all options + + + + + event is raised when a value is changed + + + + + Gets or sets a flag which cause a deeper look into the bitmap + + + true if [try harder]; otherwise, false. + + + + + Image is a pure monochrome image of a barcode. + + + true if monochrome image of a barcode; otherwise, false. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + The character set. + + + + + Image is known to be of one of a few possible formats. + Maps to a {@link java.util.List} of {@link BarcodeFormat}s. + + + The possible formats. + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + true if it should assume a Code 39 check digit; otherwise, false. + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). + + + true if it should assume GS1; otherwise, false. + + + + + Assume MSI codes employ a check digit. Maps to . + + + true if it should assume a MSI check digit; otherwise, false. + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Initializes a new instance of the class. + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Encapsulates the result of detecting a barcode in an image. This includes the raw + matrix of black/white pixels corresponding to the barcode, and possibly points of interest + in the image, like the location of finder patterns or corners of the barcode in the image.

+
+ Sean Owen +
+ + + the detected bits + + + + + the pixel points where the result is found + + + + + initializing constructor + + + + + + + General math-related and numeric utility functions. + + + + + Ends up being a bit faster than {@link Math#round(float)}. This merely rounds its + argument to the nearest int, where x.5 rounds up to x+1. Semantics of this shortcut + differ slightly from {@link Math#round(float)} in that half rounds down for negative + values. -2.5 rounds to -3, not -2. For purposes here it makes no difference. + + real value to round + nearest int + + + + + + + + + + Euclidean distance between points A and B + + + + + + + + + + Euclidean distance between points A and B + + + + + values to sum + sum of values in array + + +

A somewhat generic detector that looks for a barcode-like rectangular region within an image. + It looks within a mostly white region of an image for a region of black and white, but mostly + black. It returns the four corners of the region, as best it can determine.

+ +
+ Sean Owen +
+ + + initializing constructor + + + + + +

Detects a rectangular region of black and white -- mostly black -- with a region of mostly + white, in an image.

+
+ [] describing the corners of the rectangular region. The first and + last points are opposed on the diagonal, as are the second and third. The first point will be + the topmost point and the last, the bottommost. The second point will be leftmost and the + third, the rightmost + +
+ + Attempts to locate a corner of the barcode by scanning up, down, left or right from a center + point which should be within the barcode. + + + center's x component (horizontal) + + same as deltaY but change in x per step instead + + minimum value of x + + maximum value of x + + center's y component (vertical) + + change in y per step. If scanning up this is negative; down, positive; + left or right, 0 + + minimum value of y to search through (meaningless when di == 0) + + maximum value of y + + maximum run of white pixels that can still be considered to be within + the barcode + + a encapsulating the corner that was found + + + + Computes the start and end of a region of pixels, either horizontally or vertically, that could + be part of a Data Matrix barcode. + + + if scanning horizontally, this is the row (the fixed vertical location) + where we are scanning. If scanning vertically it's the column, the fixed horizontal location + + largest run of white pixels that can still be considered part of the + barcode region + + minimum pixel location, horizontally or vertically, to consider + + maximum pixel location, horizontally or vertically, to consider + + if true, we're scanning left-right, instead of up-down + + int[] with start and end of found range, or null if no such range is found + (e.g. only white was found) + + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. By keeping track of the + last black points it encountered, it determines the corners of the barcode. + + David Olivier + + + + Creates a WhiteRectangleDetector instance + + The image. + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + Creates a WhiteRectangleDetector instance + + barcode image to find a rectangle in + initial size of search area around center + x position of search center + y position of search center + + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + + Initializes a new instance of the class. + + The image. + if image is too small + + + + Initializes a new instance of the class. + + The image. + Size of the init. + The x. + The y. + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. + + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + recenters the points of a constant distance towards the center + + bottom most point + left most point + right most point + top most point + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + Determines whether a segment contains a black point + + min value of the scanned coordinate + max value of the scanned coordinate + value of fixed coordinate + set to true if scan must be horizontal, false if vertical + + true if a black point has been found, else false. + + + + + Superclass of classes encapsulating types ECIs, according to "Extended Channel Interpretations" + 5.3 of ISO 18004. + + Sean Owen + + + + the ECI value + + + + ECI value + representing ECI of given value, or null if it is legal but unsupported + ArgumentException if ECI value is invalid + + + + Defines an container for encoder options + + + + + Gets the data container for all options + + + + + Specifies the height of the barcode image + + + + + Specifies the width of the barcode image + + + + + Don't put the content string into the output image. + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + + + + + Specifies whether the data should be encoded to the GS1 standard; + FNC1 character is added in front of the data + + + + + Initializes a new instance of the class. + + + + This Binarizer implementation uses the old ZXing global histogram approach. It is suitable + for low-end mobile devices which don't have enough CPU or memory to use a local thresholding + algorithm. However, because it picks a global black point, it cannot handle difficult shadows + and gradients. + + Faster mobile devices and all desktop applications should probably use HybridBinarizer instead. + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The source. + + + + Applies simple sharpening to the row data to improve performance of the 1D Readers. + + + + + + + + Does not sharpen the data, as this call is intended to only be used by 2D Readers. + + + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + + A new concrete Binarizer implementation object. + + + + Implementations of this class can, given locations of finder patterns for a QR code in an + image, sample the right points in the image to reconstruct the QR code, accounting for + perspective distortion. It is abstracted since it is relatively expensive and should be allowed + to take advantage of platform-specific optimized implementations, like Sun's Java Advanced + Imaging library, but which may not be available in other environments such as J2ME, and vice + versa. + + The implementation used can be controlled by calling {@link #setGridSampler(GridSampler)} + with an instance of a class which implements this interface. + + Sean Owen + + + the current implementation of + + + + Sets the implementation of used by the library. One global + instance is stored, which may sound problematic. But, the implementation provided + ought to be appropriate for the entire platform, and all uses of this library + in the whole lifetime of the JVM. For instance, an Android activity can swap in + an implementation that takes advantage of native platform libraries. + + The platform-specific object to install. + + + +

Samples an image for a square matrix of bits of the given dimension. This is used to extract + the black/white modules of a 2D barcode like a QR Code found in an image. Because this barcode + may be rotated or perspective-distorted, the caller supplies four points in the source image + that define known points in the barcode, so that the image may be sampled appropriately.

+

The last eight "from" parameters are four X/Y coordinate pairs of locations of points in + the image that define some significant points in the image to be sample. For example, + these may be the location of finder pattern in a QR Code.

+

The first eight "to" parameters are four X/Y coordinate pairs measured in the destination + , from the top left, where the known points in the image given by the "from" + parameters map to.

+

These 16 parameters define the transformation needed to sample the image.

+
+ image to sample + The dimension X. + The dimension Y. + The p1 preimage X. + The p1 preimage Y. + The p2 preimage X. + The p2 preimage Y. + The p3 preimage X. + The p3 preimage Y. + The p4 preimage X. + The p4 preimage Y. + The p1 image X. + The p1 image Y. + The p2 image X. + The p2 image Y. + The p3 image X. + The p3 image Y. + The p4 image X. + The p4 image Y. + + representing a grid of points sampled from the image within a region + defined by the "from" parameters + + ReaderException if image can't be sampled, for example, if the transformation defined +
+ + + + + + + + + + + +

Checks a set of points that have been transformed to sample points on an image against + the image's dimensions to see if the point are even within the image.

+ +

This method will actually "nudge" the endpoints back onto the image if they are found to be + barely (less than 1 pixel) off the image. This accounts for imperfect detection of finder + patterns in an image where the QR Code runs all the way to the image border.

+ +

For efficiency, the method will check points from either end of the line until one is found + to be within the image. Because the set of points are assumed to be linear, this is valid.

+ +
+ image into which the points should map + + actual points in x1,y1,...,xn,yn form + +
+ + This class implements a local thresholding algorithm, which while slower than the + GlobalHistogramBinarizer, is fairly efficient for what it does. It is designed for + high frequency images of barcodes with black data on white backgrounds. For this application, + it does a much better job than a global blackpoint with severe shadows and gradients. + However it tends to produce artifacts on lower frequency images and is therefore not + a good general purpose binarizer for uses outside ZXing. + + This class extends GlobalHistogramBinarizer, using the older histogram approach for 1D readers, + and the newer local approach for 2D readers. 1D decoding using a per-row histogram is already + inherently local, and only fails for horizontal gradients. We can revisit that problem later, + but for now it was not a win to use local blocks for 1D. + + This Binarizer is the default for the unit tests and the recommended class for library users. + dswitkin@google.com (Daniel Switkin) + + + + + gives the black matrix + + + + + initializing constructor + + + + + + creates a new instance + + + + + + + Calculates the final BitMatrix once for all requests. This could be called once from the + constructor instead, but there are some advantages to doing it lazily, such as making + profiling easier, and not doing heavy lifting when callers don't expect it. + + + + + For each 8x8 block in the image, calculate the average black point using a 5x5 grid + of the blocks around it. Also handles the corner cases (fractional blocks are computed based + on the last 8 pixels in the row/column which are also used in the previous block). + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + The black points. + The matrix. + + + + Applies a single threshold to an 8x8 block of pixels. + + The luminances. + The xoffset. + The yoffset. + The threshold. + The stride. + The matrix. + + + + Calculates a single black point for each 8x8 block of pixels and saves it away. + See the following thread for a discussion of this algorithm: + http://groups.google.com/group/zxing/browse_thread/thread/d06efa2c35a7ddc0 + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + + + +

This class implements a perspective transform in two dimensions. Given four source and four + destination points, it will compute the transformation implied between them. The code is based + directly upon section 3.4.2 of George Wolberg's "Digital Image Warping"; see pages 54-56.

+
+ Sean Owen +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Convenience method, not optimized for performance. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

This class contains utility methods for performing mathematical operations over + the Galois Fields. Operations use a given primitive polynomial in calculations.

+

Throughout this package, elements of the GF are represented as an {@code int} + for convenience and speed (but at the cost of memory). +

+
+ Sean Owen +
+ + + Create a representation of GF(size) using the given primitive polynomial. + + irreducible polynomial whose coefficients are represented by + * the bits of an int, where the least-significant bit represents the constant + * coefficient + the size of the field + the factor b in the generator polynomial can be 0- or 1-based + * (g(x) = (x+a^b)(x+a^(b+1))...(x+a^(b+2t-1))). + * In most cases it should be 1, but for QR code it is 0. + + + + Builds the monomial. + + The degree. + The coefficient. + the monomial representing coefficient * x^degree + + + + Implements both addition and subtraction -- they are the same in GF(size). + + sum/difference of a and b + + + + Exps the specified a. + + 2 to the power of a in GF(size) + + + + Logs the specified a. + + A. + base 2 log of a in GF(size) + + + + Inverses the specified a. + + multiplicative inverse of a + + + + Multiplies the specified a with b. + + A. + The b. + product of a and b in GF(size) + + + + Gets the size. + + + + + Gets the generator base. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + +

Represents a polynomial whose coefficients are elements of a GF. + Instances of this class are immutable.

+

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + the {@link GenericGF} instance representing the field to use + to perform computations + coefficients as ints representing elements of GF(size), arranged + from most significant (highest-power term) coefficient to least significant + if argument is null or empty, + or if leading coefficient is 0 and this is not a + constant polynomial (that is, it is not the monomial "0") + + + + degree of this polynomial + + + + + Gets a value indicating whether this is zero. + + true iff this polynomial is the monomial "0" + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + +

Implements Reed-Solomon decoding, as the name implies.

+ +

The algorithm will not be explained here, but the following references were helpful + in creating this implementation:

+ + + +

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+ +
+ Sean Owen + William Rucklidge + sanfordsquires +
+ + +

Decodes given set of received codewords, which include both data and error-correction + codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place, + in the input.

+
+ data and error-correction codewords + number of error-correction codewords available + false: decoding fails +
+ + + Implements Reed-Solomon encoding, as the name implies. + + Sean Owen + William Rucklidge + + + + Common string-related functions. + + Sean Owen + Alex Dupre + + + + SJIS + + + + + GB2312 + + + + + Guesses the encoding. + + bytes encoding a string, whose encoding should be guessed + decode hints if applicable + name of guessed encoding; at the moment will only guess one of: + {@link #SHIFT_JIS}, {@link #UTF8}, {@link #ISO88591}, or the platform + default encoding if none of these can possibly be correct + + + + This implementation can detect and decode Data Matrix codes in an image. + + bbrown@google.com (Brian Brown) + + + + + Locates and decodes a Data Matrix code in an image. + + + a String representing the content encoded by the Data Matrix code + + + + Locates and decodes a Data Matrix code in an image. + + + + a String representing the content encoded by the Data Matrix code + + + + does nothing here + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a Data Matrix code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + Guillaume Le Biller Added to zxing lib. + + + + encodes the content to a BitMatrix + + + + + + + + + + encodes the content to a BitMatrix + + + + + + + + + + + Encode the given symbol info to a bit matrix. + + The DataMatrix placement. + The symbol info to encode. + + + The bit matrix generated. + + + + Convert the ByteMatrix to BitMatrix. + + The input matrix. + The requested width of the image (in pixels) with the Datamatrix code + The requested height of the image (in pixels) with the Datamatrix code + The output matrix. + + + + bbrown@google.com (Brian Brown) + + + + + to parse + if dimension is < 8 or > 144 or not 0 mod 2 + + + + +

Creates the version object based on the dimension of the original bit matrix from + the datamatrix code.

+ +

See ISO 16022:2006 Table 7 - ECC 200 symbol attributes

+ + Original including alignment patterns + encapsulating the Data Matrix Code's "version" + if the dimensions of the mapping matrix are not valid + Data Matrix dimensions. +
+
+ + +

Reads the bits in the representing the mapping matrix (No alignment patterns) + in the correct order in order to reconstitute the codewords bytes contained within the + Data Matrix Code.

+ + bytes encoded within the Data Matrix Code + if the exact number of bytes expected is not read +
+
+ + +

Reads a bit of the mapping matrix accounting for boundary wrapping.

+ + Row to read in the mapping matrix + Column to read in the mapping matrix + Number of rows in the mapping matrix + Number of columns in the mapping matrix + value of the given bit in the mapping matrix +
+
+ + +

Reads the 8 bits of the standard Utah-shaped pattern.

+ +

See ISO 16022:2006, 5.8.1 Figure 6

+ + Current row in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Current column in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the utah shape +
+
+ + +

Reads the 8 bits of the special corner condition 1.

+ +

See ISO 16022:2006, Figure F.3

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 1 +
+
+ + +

Reads the 8 bits of the special corner condition 2.

+ +

See ISO 16022:2006, Figure F.4

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 2 +
+
+ + +

Reads the 8 bits of the special corner condition 3.

+ +

See ISO 16022:2006, Figure F.5

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 3 +
+
+ + +

Reads the 8 bits of the special corner condition 4.

+ +

See ISO 16022:2006, Figure F.6

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 4 +
+
+ + +

Extracts the data region from a that contains + alignment patterns.

+ + Original with alignment patterns + BitMatrix that has the alignment patterns removed +
+
+ + +

Encapsulates a block of data within a Data Matrix Code. Data Matrix Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ + bbrown@google.com (Brian Brown) +
+
+ + +

When Data Matrix Codes use multiple data blocks, they actually interleave the bytes of each of them. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ + bytes as read directly from the Data Matrix Code + version of the Data Matrix Code + DataBlocks containing original bytes, "de-interleaved" from representation in the + Data Matrix Code +
+
+ + +

Data Matrix Codes can encode text as bits in one of several modes, and can use multiple modes + in one Data Matrix Code. This class decodes the bits back into text.

+ +

See ISO 16022:2006, 5.2.1 - 5.2.9.2

+ + bbrown@google.com (Brian Brown) + Sean Owen +
+
+ + + See ISO 16022:2006, Annex C Table C.1 + The C40 Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, Annex C Table C.2 + The Text Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, 5.2.3 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.5 and Annex C, Table C.1 + + + + + See ISO 16022:2006, 5.2.6 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.7 + + + + + See ISO 16022:2006, 5.2.8 and Annex C Table C.3 + + + + + See ISO 16022:2006, 5.2.9 and Annex B, B.2 + + + + + See ISO 16022:2006, Annex B, B.2 + + + + +

The main class which implements Data Matrix Code decoding -- as opposed to locating and extracting + the Data Matrix Code from an image.

+ + bbrown@google.com (Brian Brown) +
+
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a Data Matrix Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+ + booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code + if the Data Matrix Code cannot be decoded +
+
+ + +

Decodes a Data Matrix Code represented as a . A 1 or "true" is taken + to mean a black module.

+
+ booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+ + data and error correction codewords + number of codewords that are data bytes +
+
+ + + The Version object encapsulates attributes about a particular + size Data Matrix Code. + + bbrown@google.com (Brian Brown) + + + + + returns the version numer + + + + + + returns the symbol size rows + + + + + + returns the symbols size columns + + + + + + retursn the data region size rows + + + + + + returns the data region size columns + + + + + + returns the total codewords count + + + + + +

Deduces version information from Data Matrix dimensions.

+ + Number of rows in modules + Number of columns in modules + Version for a Data Matrix Code of those dimensions + if dimensions do correspond to a valid Data Matrix size +
+
+ + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the Data Matrix code version's format.

+
+
+ + + returns the version number as string + + + + + + See ISO 16022:2006 5.5.1 Table 7 + + + + +

Encapsulates logic that can detect a Data Matrix Code in an image, even if the Data Matrix Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + +

Detects a Data Matrix Code in an image.

+
+ encapsulating results of detecting a Data Matrix Code or null +
+ + + Calculates the position of the white top right module using the output of the rectangle detector + for a rectangular matrix + + + + + Calculates the position of the white top right module using the output of the rectangle detector + for a square matrix + + + + + Increments the Integer associated with a key by one. + + + + + Counts the number of black/white transitions between two points, using something like Bresenham's algorithm. + + + + + Simply encapsulates two points and a number of transitions between them. + + + + + Orders ResultPointsAndTransitions by number of transitions, ascending. + + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Symbol Character Placement Program. Adapted from Annex M.1 in ISO/IEC 16022:2000(E). + + + + + Main constructor + + the codewords to place + the number of columns + the number of rows + + + + Places the 8 bits of a utah-shaped symbol character in ECC200. + + The row. + The col. + character position + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Enumeration for encodation types + + + + + Error Correction Code for ECC200. + + + + + Lookup table which factors to use for which number of error correction codewords. + See FACTORS. + + + + + Precomputed polynomial factors for ECC 200. + + + + + Creates the ECC200 error correction for an encoded message. + + The codewords. + information about the symbol to be encoded + the codewords with interleaved error correction. + + + + DataMatrix ECC 200 data encoder following the algorithm described in ISO/IEC 16022:200(E) in + annex S. + + + + + Padding character + + + + + mode latch to C40 encodation mode + + + + + mode latch to Base 256 encodation mode + + + + + FNC1 Codeword + + + + + Structured Append Codeword + + + + + Reader Programming + + + + + Upper Shift + + + + + 05 Macro + + + + + 06 Macro + + + + + mode latch to ANSI X.12 encodation mode + + + + + mode latch to Text encodation mode + + + + + mode latch to EDIFACT encodation mode + + + + + ECI character (Extended Channel Interpretation) + + + + + Unlatch from C40 encodation + + + + + Unlatch from X12 encodation + + + + + 05 Macro header + + + + + 06 Macro header + + + + + Macro trailer + + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + the encoded message (the char values range from 0 to 255) + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + requested shape. May be {@code SymbolShapeHint.FORCE_NONE},{@code SymbolShapeHint.FORCE_SQUARE} or {@code SymbolShapeHint.FORCE_RECTANGLE}. + the minimum symbol size constraint or null for no constraint + the maximum symbol size constraint or null for no constraint + encoding mode to start with + the encoded message (the char values range from 0 to 255) + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + Symbol info table for DataMatrix. + + + + Overrides the symbol info set used by this class. Used for testing purposes. + + @param override the symbol info set to use + + + + Enumeration for DataMatrix symbol shape hint. It can be used to force square or rectangular + symbols. + + + + + The class holds the available options for the DatamatrixWriter + + + + + Specifies the matrix shape for Data Matrix + + + + + Specifies a minimum barcode size + + + + + Specifies a maximum barcode size + + + + + Specifies the default encodation + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Encapsulates a type of hint that a caller may pass to a barcode reader to help it + more quickly or accurately decode it. It is up to implementations to decide what, + if anything, to do with the information that is supplied. + + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Unspecified, application-specific hint. Maps to an unspecified . + + + + + Image is a pure monochrome image of a barcode. Doesn't matter what it maps to; + use = true. + + + + + Image is known to be of one of a few possible formats. + Maps to a of s. + + + + + Spend more time to try to find a barcode; optimize for accuracy, not speed. + Doesn't matter what it maps to; use = true. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + + + The caller needs to be notified via callback when a possible + is found. Maps to a . + + + + + Assume MSI codes employ a check digit. Maps to . + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + Maps to . + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + 1D readers supporting rotation with TRY_HARDER enabled. + But BarcodeReader class can do auto-rotating for 1D and 2D codes. + Enabling that option prevents 1D readers doing double rotation. + BarcodeReader enables that option automatically if "global" auto-rotation is enabled. + Maps to . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to; + use . + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Simply encapsulates a width and height. + + + + + initializing constructor + + + + + + + the width + + + + + the height + + + + + + + + + + + + + + + + + + + + + + + + These are a set of hints that you may pass to Writers to specify their behavior. + + dswitkin@google.com (Daniel Switkin) + + + + Specifies the width of the barcode image + type: + + + + + Specifies the height of the barcode image + type: + + + + + Don't put the content string into the output image. + type: + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + + For Aztec it is of type , representing the minimal percentage of error correction words. + In all cases, it can also be a representation of the desired value as well. + Note: an Aztec symbol should have a minimum of 25% EC words. + For PDF417 it is of type or (between 0 and 8), + + + + + Specifies what character encoding to use where applicable. + type: + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + type: , or representation of the integer value + + + + + Specifies the aspect ratio to use. Default is 4. + type: , or 1-4. + + + + + Specifies whether to use compact mode for PDF417 + type: , or "true" or "false" + value + + + + + Specifies what compaction mode to use for PDF417. + type: or value of one of its + enum values + + + + + Specifies the minimum and maximum number of rows and columns for PDF417. + type: + + + + + Don't append ECI segment. + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + type: + + + + + Specifies the matrix shape for Data Matrix (type ) + + + + + Specifies a minimum barcode size (type ). Only applicable to Data Matrix now. + + + + + Specifies a maximum barcode size (type ). Only applicable to Data Matrix now. + + + + + if true, don't switch to codeset C for numbers + + + + + Specifies the default encodation for Data Matrix (type ) + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Specifies the required number of layers for an Aztec code. + A negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + type: , or representation of the integer value + + + + + Specifies the exact version of QR code to be encoded. + (Type , or representation of the integer value). + + + + + Specifies whether the data should be encoded to the GS1 standard + type: , or "true" or "false" + value + + + + + Thrown when a barcode was successfully detected, but some aspect of + the content did not conform to the barcode's format rules. This could have + been due to a mis-detection. + Sean Owen + + + + + + + + + + + + + + + + + + + + + + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode the barcode inside a bitmap object + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Decodes the specified barcode bitmap which is given by a generic byte array. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Interface for a smart class to encode some content into a barcode + + + Interface for a smart class to encode some content into a barcode + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents. + + The contents. + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + The matrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents. + + The contents. + + + + + implements an Intelligent Mail barcode + Rishabh Hatgadkar + + + + + A wrapper implementation of {@link LuminanceSource} which inverts the luminances it returns -- black becomes + white and vice versa, and each value becomes (255-value). + + Sean Owen + + + + Initializes a new instance of the class. + + The @delegate. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff; + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Inverts this instance. + + original delegate {@link LuminanceSource} since invert undoes itself + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + The purpose of this class hierarchy is to abstract different bitmap implementations across + platforms into a standard interface for requesting greyscale luminance values. The interface + only provides immutable methods; therefore crop and rotation create copies. This is to ensure + that one Reader does not modify the original luminance source and leave it in an unknown state + for other Readers in the chain. + + dswitkin@google.com (Daniel Switkin) + + + + initializing constructor + + + + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff + + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + The width of the bitmap. + + + The height of the bitmap. + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + Whether this subclass supports counter-clockwise rotation. + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + + Whether this subclass supports invertion. + + + + inverts the luminance values, not supported here. has to implemented in sub classes + + + + + + + + + + + + mike32767 + Manuel Kasten + + + + + to parse + + + + +

MaxiCodes can encode text or structured information as bits in one of several modes, + with multiple character sets in one code. This class decodes the bits back into text.

+ + mike32767 + Manuel Kasten +
+
+ + +

The main class which implements MaxiCode decoding -- as opposed to locating and extracting + the MaxiCode from an image.

+ + Manuel Kasten +
+
+ + + This implementation can detect and decode a MaxiCode in an image. + + + + + Locates and decodes a MaxiCode in an image. + + a String representing the content encoded by the MaxiCode + if a MaxiCode cannot be decoded + + + + + Locates and decodes a MaxiCode within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + + MultiFormatReader is a convenience class and the main entry point into the library for most uses. + By default it attempts to decode all barcode formats that the library supports. Optionally, you + can provide a hints object to request different behavior, for example only decoding QR codes. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + This version of decode honors the intent of Reader.decode(BinaryBitmap) in that it + passes null as a hint to the decoders. However, that makes it inefficient to call repeatedly. + Use setHints() followed by decodeWithState() for continuous scan applications. + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the hints provided. Does not honor existing state. + + + The pixel data to decode + + The hints to use, clearing the previous state. + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the state set up by calling setHints() previously. Continuous scan + clients will get a large speed increase by using this instead of decode(). + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls + to decodeWithState(image) can reuse the same set of readers without reallocating memory. This + is important for performance in continuous scan clients. + + + + + + resets all specific readers + + + + This is a factory class which finds the appropriate Writer subclass for the BarcodeFormat + requested and encodes the barcode with the supplied contents. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Gets the collection of supported writers. + + + + + encode the given data + + + + + + + + + + encode the given data + + + + + + + + + + + This class attempts to decode a barcode from an image, not by scanning the whole image, + but by scanning subsets of the image. This is important when there may be multiple barcodes in + an image, and detecting a barcode may find parts of multiple barcode and fail to decode + (e.g. QR Codes). Instead this scans the four quadrants of the image -- and also the center + 'quadrant' to cover the case where a barcode is found in the center. + + + + + + Initializes a new instance of the class. + + The @delegate. + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Attempts to locate multiple barcodes in an image by repeatedly decoding portion of the image. + After one barcode is found, the areas left, above, right and below the barcode's + {@link com.google.zxing.ResultPoint}s are scanned, recursively.

+

A caller may want to also employ {@link ByQuadrantReader} when attempting to find multiple + 2D barcodes, like QR Codes, in an image, where the presence of multiple barcodes might prevent + detecting any one of them.

+

That is, instead of passing a {@link Reader} a caller might pass + new ByQuadrantReader(reader).

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The @delegate. + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Implementation of this interface attempt to read several barcodes from one image. + Sean Owen + + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + +

Encapsulates logic that can detect one or more QR Codes in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+ + Sean Owen + Hannes Erven +
+
+ + + Initializes a new instance of the class. + + The image. + + + + Detects the multi. + + The hints. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +

In contrast to , this class will return an array of all possible + QR code locations in the image.

+ +

Use the TRY_HARDER hint to ask for a more thorough detection.

+ + Sean Owen + Hannes Erven +
+
+ + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF_PERCENT percent in their + estimated modules sizes. + + + + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF pixels/module in their + estimated modules sizes. + + + + + A comparator that orders FinderPatterns by their estimated module size. + + + + +

Creates a finder that will search the image for three finder patterns.

+ + image to search +
+
+ + + + the 3 best s from our list of candidates. The "best" are + those that have been detected at least CENTER_QUORUM times, and whose module + size differs from the average among those patterns the least + + + + + This implementation can detect and decode multiple QR Codes in an image. + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + +

Decodes Codabar barcodes.

+ + Bas Vijfwinkel +
+
+ + These represent the encodings of characters, as patterns of wide and narrow bars. The 7 least-significant bits of + each int correspond to the pattern of wide and narrow, with 1s representing "wide" and 0s representing narrow. + + + + Records the size of all runs of white and black pixels, starting with white. + This is just like recordPattern, except it records all the counters, and + uses our builtin "counters" member for storage. + + row to count from + + + + This class renders CodaBar as []. + + dsbnatut@gmail.com (Kazuki Nishiura) + + + + The class holds the available options for the QrCodeWriter + + + + + if true, don't switch to codeset C for numbers + + + + +

Decodes Code 128 barcodes.

+ + Sean Owen +
+
+ + + This object renders a CODE128 code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + +

Decodes Code 39 barcodes. Supports "Full ASCII Code 39" if USE_CODE_39_EXTENDED_MODE is set.

+ Sean Owen + @see Code93Reader +
+
+ + + Returns a string with all possible characters + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. It will not decoded "extended Code 39" sequences. + + + + + Creates a reader that can be configured to check the last character as a check digit. + It will not decoded "extended Code 39" sequences. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + + Creates a reader that can be configured to check the last character as a check digit, + or optionally attempt to decode "extended Code 39" sequences that are used to encode + the full ASCII character set. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + if true, will attempt to decode extended Code 39 sequences in the text. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a CODE39 code as a . + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Decodes Code 93 barcodes.

+ Sean Owen + +
+
+ + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a CODE93 code as a BitMatrix + + + + + + output to append to + start position + pattern to append + unused + 9 + + + +

Implements decoding of the EAN-13 format.

+ + dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Initializes a new instance of the class. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + Get the format of this decoder. + The 1D format. + + + + + Based on pattern of odd-even ('L' and 'G') patterns used to encoded the explicitly-encoded + digits in a barcode, determines the implicitly encoded first digit and adds it to the + result string. + + string to insert decoded first digit into + int whose bits indicates the pattern of odd/even L/G patterns used to + encode digits + -1 if first digit cannot be determined + + + + This object renders an EAN13 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Implements decoding of the EAN-8 format.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Get the format of this decoder. + The 1D format. + + + + + This object renders an EAN8 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + + + a byte array of horizontal pixels (false = white, true = black) + + + + + Records EAN prefix to GS1 Member Organization, where the member organization + correlates strongly with a country. This is an imperfect means of identifying + a country of origin by EAN-13 barcode value. See + + http://en.wikipedia.org/wiki/List_of_GS1_country_codes. + + Sean Owen + + + + +

Implements decoding of the ITF format, or Interleaved Two of Five.

+ +

This Reader will scan ITF barcodes of certain lengths only. + At the moment it reads length 6, 8, 10, 12, 14, 16, 18, 20, 24, 44 and 48 as these have appeared "in the wild". Not all + lengths are scanned, especially shorter ones, to avoid false positives. This in turn is due to a lack of + required checksum function.

+ +

The checksum is optional and is not applied by this Reader. The consumer of the decoded + value will have to apply a checksum if required.

+ +

http://en.wikipedia.org/wiki/Interleaved_2_of_5 + is a great reference for Interleaved 2 of 5 information.

+ + kevin.osullivan@sita.aero, SITA Lab. +
+
+ + + Valid ITF lengths. Anything longer than the largest value is also allowed. + + + + + Start/end guard pattern. + + Note: The end pattern is reversed because the row is reversed before + searching for the END_PATTERN + + + + + Patterns of Wide / Narrow lines to indicate each digit + + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + + row of black/white values to search + offset of start pattern + The payload end. + to append decoded chars to + + false, if decoding could not complete successfully + + + + + Identify where the start of the middle / payload section starts. + + row of black/white values to search + Array, containing index of start of 'start block' and end of 'start block' + + + + The start & end patterns must be pre/post fixed by a quiet zone. This + zone must be at least 10 times the width of a narrow line. Scan back until + we either get to the start of the barcode or match the necessary number of + quiet zone pixels. + + Note: Its assumed the row is reversed when using this method to find + quiet zone after the end pattern. + + ref: http://www.barcode-1.net/i25code.html + + bit array representing the scanned barcode. + index into row of the start or end pattern. + false, if the quiet zone cannot be found + + + + Skip all whitespace until we get to the first black line. + + row of black/white values to search + index of the first black line or -1 if no black lines are found in the row. + + + + Identify where the end of the middle / payload section ends. + + row of black/white values to search + Array, containing index of start of 'end block' and end of 'end + block' or null, if nothing found + + + + + row of black/white values to search + position to start search + pattern of counts of number of black and white pixels that are being searched for as a pattern + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a sequence of ITF black/white lines into single + digit. + + the counts of runs of observed black/white/black/... values + The decoded digit + + false, if digit cannot be decoded + + + + + This object renders a ITF code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code bool[]} of horizontal pixels (false = white, true = black) + + + + + + + Decodes MSI barcodes. + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. + + + + + Creates a reader that can be configured to check the last character as a check digit, + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a MSI code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + This object renders a Plessey code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

A reader that can read all available UPC/EAN formats. If a caller wants to try to + read all such formats, it is most efficient to use this implementation rather than invoke + individual readers.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Encapsulates functionality and implementation that is common to one-dimensional barcodes.

+ dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + a byte array of horizontal pixels (0 = white, 1 = black) + + + + Appends the given pattern to the target array starting at pos. + + encode black/white pattern into this array + position to start encoding at in target + lengths of black/white runs to encode + starting color - false for white, true for black + the number of elements added to target. + + + + Gets the default margin. + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + + barcode contents to encode + a bool[] of horizontal pixels (false = white, true = black) + + + + Calculates the checksum digit modulo10. + + The contents. + + + + + Encapsulates functionality and implementation that is common to all families + of one-dimensional barcodes. + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + + + + + + + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + Note that we don't try rotation without the try harder flag, even if rotation was supported. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + We're going to examine rows from the middle outward, searching alternately above and below the + middle, and farther out each time. rowStep is the number of rows between each successive + attempt above and below the middle. So we'd scan row middle, then middle - rowStep, then + middle + rowStep, then middle - (2 * rowStep), etc. + rowStep is bigger as the image is taller, but is always at least 1. We've somewhat arbitrarily + decided that moving up and down by about 1/16 of the image is pretty good; we try more of the + image if "trying harder". + + The image to decode + Any hints that were requested + The contents of the decoded barcode + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the pattern in reverse. + + The row. + The start. + The counters. + + + + + Determines how closely a set of observed counts of runs of black/white values matches a given + target pattern. This is reported as the ratio of the total variance from the expected pattern + proportions across all pattern elements, to the length of the pattern. + + observed counters + expected pattern + The most any counter can differ before we give up + ratio of total variance between counters and pattern compared to total pattern size, + where the ratio has been multiplied by 256. So, 0 means no variance (perfect match); 256 means + the total variance between counters and patterns equals the pattern length, higher values mean + even more variance + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + Superclass of implementations that read barcodes in the RSS family of formats. + + + + + Initializes a new instance of the class. + + + + + Gets the decode finder counters. + + + + + + Gets the data character counters. + + + + + + Gets the odd rounding errors. + + + + + + Gets the even rounding errors. + + + + + + Gets the odd counts. + + + + + + Gets the even counts. + + + + + + Parses the finder value. + + The counters. + The finder patterns. + The value. + + + + + Counts the specified array. + + The array. + + + + + Increments the specified array. + + The array. + The errors. + + + + Decrements the specified array. + + The array. + The errors. + + + + Determines whether [is finder pattern] [the specified counters]. + + The counters. + + true if [is finder pattern] [the specified counters]; otherwise, false. + + + + + Encapsulates a since character value in an RSS barcode, including its checksum information. + + + + + Gets the value. + + + + + Gets the checksum portion. + + + + + Initializes a new instance of the class. + + The value. + The checksum portion. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Gets the information. + + + + + + Parses the information. + + + + + + Creates the decoder. + + The information. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + One row of an RSS Expanded Stacked symbol, consisting of 1+ expanded pairs. + + + + + Did this row of the image have to be reversed (mirrored) to recognize the pairs? + + + + + Two rows are equal if they contain the same pairs in the same order. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Encapsulates an RSS barcode finder pattern, including its start/end position and row. + + + + + Gets the value. + + + + + Gets the start end. + + + + + Gets the result points. + + + + + Initializes a new instance of the class. + + The value. + The start end. + The start. + The end. + The row number. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Decodes RSS-14, including truncated and stacked variants. See ISO/IEC 24724:2006. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Adapted from listings in ISO/IEC 24724 Appendix B and Appendix G. + + + + + Gets the RS svalue. + + The widths. + Width of the max. + if set to true [no narrow]. + + + + +

Implements decoding of the UPC-A format.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen +
+
+ + +

Like decodeRow(int, BitArray, java.util.Map), but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ + + + + +
+ + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Decodes the specified image. + + The image. + The hints. + + + + + Get the format of this decoder. + The 1D format. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + This object renders a UPC-A code as a . + qwandor@google.com (Andrew Walbran) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + @see UPCEANExtension5Support + + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + + + @see UPCEANExtension2Support + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + one {@link ResultMetadataType} to appropriate value, or {@code null} if not known + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Start/end guard pattern. + + + + + Pattern marking the middle of a UPC/EAN pattern, separating the two halves. + + + + + end guard pattern. + + + + + "Odd", or "L" patterns used to encode UPC/EAN digits. + + + + + As above but also including the "even", or "G" patterns used to encode UPC/EAN digits. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + +

Like , but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ row index into the image + encoding of the row of the barcode image + start/end column where the opening start pattern was found + optional hints that influence decoding + encapsulating the result of decoding a barcode in the row +
+ + + + string of digits to check + see + + + + Computes the UPC/EAN checksum on a string of digits, and reports + whether the checksum is correct or not. + + string of digits to check + true iff string of digits passes the UPC/EAN checksum algorithm + + + + Decodes the end. + + The row. + The end start. + + + + + + row of black/white values to search + position to start search + if true, indicates that the pattern specifies white/black/white/... + pixel counts, otherwise, it is interpreted as black/white/black/... + pattern of counts of number of black and white pixels that are being + searched for as a pattern + array of counters, as long as pattern, to re-use + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a single UPC/EAN-encoded digit. + + row of black/white values to decode + the counts of runs of observed black/white/black/... values + horizontal offset to start decoding from + the set of patterns to use to decode -- sometimes different encodings + for the digits 0-9 are used, and this indicates the encodings for 0 to 9 that should + be used + horizontal offset of first pixel beyond the decoded digit + + + + Get the format of this decoder. + + The 1D format. + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ aripollak@gmail.com (Ari Pollak) + dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Gets the default margin. + + + + +

Implements decoding of the UPC-E format.

+

Thisis a great reference for + UPC-E information.

+ Sean Owen +
+
+ + + The pattern that marks the middle, and end, of a UPC-E pattern. + There is no "second half" to a UPC-E barcode. + + + + + See L_AND_G_PATTERNS these values similarly represent patterns of + even-odd parity encodings of digits that imply both the number system (0 or 1) + used, and the check digit. + + + + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Decodes the end. + + The row. + The end start. + + + + + see checkStandardUPCEANChecksum(String) + + + + + + + Determines the num sys and check digit. + + The result string. + The lg pattern found. + + + + + Get the format of this decoder. + The 1D format. + + + + + Expands a UPC-E value back into its full, equivalent UPC-A code value. + + UPC-E code as string of digits + equivalent UPC-A code as string of digits + + + + + This object renders an UPC-E code as a {@link BitMatrix}. + @author 0979097955s@gmail.com (RX) + + + + + Metadata about a PDF417 Barcode + + Guenther Grau + + + + A Barcode Value for the PDF417 barcode. + The scanner will iterate through the bitmatrix, + and given the different methods or iterations + will increment a given barcode value's confidence. + + When done, this will return the values of highest confidence. + + Guenther Grau + + + + Incremenets the Confidence for a given value. (Adds an occurance of a value) + + + Value. + + + + Determines the maximum occurrence of a set value and returns all values which were set with this occurrence. + + an array of int, containing the values with the highest occurrence, or null, if no value was set. + + + + Returns the confience value for a given barcode value + + Barcode value. + + + + A Bounding Box helper class + + Guenther Grau + + + + Initializes a new instance of the class. + returns null if the corner points don't match up correctly + + The image. + The top left. + The bottom left. + The top right. + The bottom right. + + + + + Creates the specified box. + + The box. + + + + + Initializes a new instance of the class. + Will throw an exception if the corner points don't match up correctly + + Image. + Top left. + Top right. + Bottom left. + Bottom right. + + + + Merge two Bounding Boxes, getting the left corners of left, and the right corners of right + (Images should be the same) + + Left. + Right. + + + + Adds the missing rows. + + The missing rows. + Missing start rows. + Missing end rows. + If set to true is left. + + + + Calculates the minimum and maximum X & Y values based on the corner points. + + + + + If we adjust the width, set a new right corner coordinate and recalculate + + Bottom right. + + + + A Codeword in the PDF417 barcode + + Guenther Grau + + + + Default value for the RowNumber (-1 being an invalid real number) + + + + + Initializes a new instance of the class. + + Start x. + End x. + Bucket. + Value. + + + + Gets the width. + + The width. + + + + Gets a value indicating whether this instance has valid row number. + + true if this instance has valid row number; otherwise, false. + + + + Determines whether this instance is valid row number the specified rowNumber. + + true if this instance is valid row number the specified rowNumber; otherwise, false. + Row number. + + + + Sets the row number as the row's indicator column. + + + + + Returns a that represents the current . + + A that represents the current . + + + +

This class contains the methods for decoding the PDF417 codewords.

+ + SITA Lab (kevin.osullivan@sita.aero) +
+
+ + + Table containing values for the exponent of 900. + This is used in the numeric compaction decode algorithm. + + + + + Text Compaction mode (see 5.4.1.5) permits all printable ASCII characters to be + encoded, i.e. values 32 - 126 inclusive in accordance with ISO/IEC 646 (IRV), as + well as selected control characters. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + The Text Compaction mode includes all the printable ASCII characters + (i.e. values from 32 to 126) and three ASCII control characters: HT or tab + (ASCII value 9), LF or line feed (ASCII value 10), and CR or carriage + return (ASCII value 13). The Text Compaction mode also includes various latch + and shift characters which are used exclusively within the mode. The Text + Compaction mode encodes up to 2 characters per codeword. The compaction rules + for converting data into PDF417 codewords are defined in 5.4.2.2. The sub-mode + switches are defined in 5.4.2.3. + + The text compaction data. + The byte compaction data if there + was a mode shift. + The size of the text compaction and byte compaction data. + The decoded data is appended to the result. + + + + + Byte Compaction mode (see 5.4.3) permits all 256 possible 8-bit byte values to be encoded. + This includes all ASCII characters value 0 to 127 inclusive and provides for international + character set support. + + The byte compaction mode i.e. 901 or 924 + The array of codewords (data + error) + Currently active character encoding + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Numeric Compaction mode (see 5.4.4) permits efficient encoding of numeric data strings. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Convert a list of Numeric Compacted codewords from Base 900 to Base 10. + EXAMPLE + Encode the fifteen digit numeric string 000213298174000 + Prefix the numeric string with a 1 and set the initial value of + t = 1 000 213 298 174 000 + Calculate codeword 0 + d0 = 1 000 213 298 174 000 mod 900 = 200 + + t = 1 000 213 298 174 000 div 900 = 1 111 348 109 082 + Calculate codeword 1 + d1 = 1 111 348 109 082 mod 900 = 282 + + t = 1 111 348 109 082 div 900 = 1 234 831 232 + Calculate codeword 2 + d2 = 1 234 831 232 mod 900 = 632 + + t = 1 234 831 232 div 900 = 1 372 034 + Calculate codeword 3 + d3 = 1 372 034 mod 900 = 434 + + t = 1 372 034 div 900 = 1 524 + Calculate codeword 4 + d4 = 1 524 mod 900 = 624 + + t = 1 524 div 900 = 1 + Calculate codeword 5 + d5 = 1 mod 900 = 1 + t = 1 div 900 = 0 + Codeword sequence is: 1, 624, 434, 632, 282, 200 + + Decode the above codewords involves + 1 x 900 power of 5 + 624 x 900 power of 4 + 434 x 900 power of 3 + + 632 x 900 power of 2 + 282 x 900 power of 1 + 200 x 900 power of 0 = 1000213298174000 + + Remove leading 1 => Result is 000213298174000 + The array of codewords + The number of codewords + The decoded string representing the Numeric data. + + + + + + + Guenther Grau + + + + Returns the DetectionResult Columns. This does a fair bit of calculation, so call it sparingly. + + The detection result columns. + + + + Adjusts the indicator column row numbers. + + Detection result column. + + + + return number of codewords which don't have a valid row number. Note that the count is not accurate as codewords . + will be counted several times. It just serves as an indicator to see when we can stop adjusting row numbers + + The row numbers. + + + + Adjusts the row numbers by row. + + The row numbers by row. + + + + Adjusts the row numbers from both Row Indicators + + zero + + + + Adjusts the row numbers from Right Row Indicator. + + The unadjusted row count. + + + + Adjusts the row numbers from Left Row Indicator. + + Unadjusted row Count. + + + + Adjusts the row number if valid. + + The invalid rows + Row indicator row number. + Invalid row counts. + Codeword. + + + + Adjusts the row numbers. + + Barcode column. + Codewords row. + Codewords. + + + + Adjusts the row number. + + true, if row number was adjusted, false otherwise. + Codeword. + Other codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + The maximum distance to search in the codeword array in both the positive and negative directions + + + + + The Bounding Box around the column (in the BitMatrix) + + The box. + + + + The Codewords the Box encodes for, offset by the Box minY. + Remember to Access this ONLY through GetCodeword(imageRow) if you're accessing it in that manner. + + The codewords. + + + + Initializes a new instance of the class. + + The Bounding Box around the column (in the BitMatrix) + + + + Converts the Image's Row to the index in the Codewords array + + The Codeword Index. + Image row. + + + + Converts the Codeword array index into a Row in the Image (BitMatrix) + + The Image Row. + Codeword index. + + + + Gets the codeword for a given row + + The codeword. + Image row. + + + + Gets the codeword closest to the specified row in the image + + Image row. + + + + Sets the codeword for an image row + + Image row. + Codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + Gets or sets a value indicating whether this instance is the left indicator + + true if this instance is left; otherwise, false. + + + + Initializes a new instance of the class. + + Box. + If set to true is left. + + + + Sets the Row Numbers as Inidicator Columns + + + + + TODO implement properly + TODO maybe we should add missing codewords to store the correct row number to make + finding row numbers for other columns easier + use row height count to make detection of invalid row numbers more reliable + + The indicator column row numbers. + Metadata. + + + + Gets the row heights. + + The row heights. + + + + Adjusts the in omplete indicator column row numbers. + + Metadata. + + + + Gets the barcode metadata. + + The barcode metadata. + + + + Prune the codewords which do not match the metadata + TODO Maybe we should keep the incorrect codewords for the start and end positions? + + Codewords. + Metadata. + + + + Returns a that represents the current . + + A that represents the current . + + + +

PDF417 error correction implementation.

+

This example + is quite useful in understanding the algorithm.

+ Sean Owen + +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the specified received. + + received codewords + number of those codewords used for EC + location of erasures + The error locations count. + + + + + Runs the euclidean algorithm (Greatest Common Divisor) until r's degree is less than R/2 + + The euclidean algorithm. + + + + Finds the error locations as a direct application of Chien's search + + The error locations. + Error locator. + + + + Finds the error magnitudes by directly applying Forney's Formula + + The error magnitudes. + Error evaluator. + Error locator. + Error locations. + + + +

A field based on powers of a generator integer, modulo some modulus.

+ +
+ Sean Owen +
+ + + + + Sean Owen + + + + Gets the coefficients. + + The coefficients. + + + + degree of this polynomial + + + + + Gets a value indicating whether this instance is zero. + + true if this polynomial is the monomial "0" + + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + + + Adds another Modulus + + Other. + + + + Subtract another Modulus + + Other. + + + + Multiply by another Modulus + + Other. + + + + Returns a Negative version of this instance + + + + + Multiply by a Scalar. + + Scalar. + + + + Multiplies by a Monomial + + The by monomial. + Degree. + Coefficient. + + + + Returns a that represents the current . + + A that represents the current . + + + + + + Guenther Grau + creatale GmbH (christoph.schulz@creatale.de) + + + + The ratios table + + + + + Initializes the class & Pre-computes the symbol ratio table. + + + + + Gets the decoded value. + + The decoded value. + Module bit count. + + + + Samples the bit counts. + + The bit counts. + Module bit count. + + + + Gets the decoded codeword value. + + The decoded codeword value. + Module bit count. + + + + Gets the bit value. + + The bit value. + Module bit count. + + + + Gets the closest decoded value. + + The closest decoded value. + Module bit count. + + + + + + Guenther Grau + + + + Decode the specified image, imageTopLeft, imageBottomLeft, imageTopRight, imageBottomRight, minCodewordWidth + and maxCodewordWidth. + TODO: don't pass in minCodewordWidth and maxCodewordWidth, pass in barcode columns for start and stop pattern + columns. That way width can be deducted from the pattern column. + This approach also allows to detect more details about the barcode, e.g. if a bar type (white or black) is wider + than it should be. This can happen if the scanner used a bad blackpoint. + + Image. + Image top left. + Image bottom left. + Image top right. + Image bottom right. + Minimum codeword width. + Max codeword width. + + + + Merge the specified leftRowIndicatorColumn and rightRowIndicatorColumn. + + Left row indicator column. + Right row indicator column. + + + + Adjusts the bounding box. + + The bounding box. + Row indicator column. + + + + Gets the barcode metadata. + + The barcode metadata. + Left row indicator column. + Right row indicator column. + + + + Gets the row indicator column. + + The row indicator column. + Image. + Bounding box. + Start point. + If set to true left to right. + Minimum codeword width. + Max codeword width. + + + + Adjusts the codeword count. + + Detection result. + Barcode matrix. + + + + Creates the decoder result. + + The decoder result. + Detection result. + + + + This method deals with the fact, that the decoding process doesn't always yield a single most likely value. The + current error correction implementation doesn't deal with erasures very well, so it's better to provide a value + for these ambiguous codewords instead of treating it as an erasure. The problem is that we don't know which of + the ambiguous values to choose. We try decode using the first value, and if that fails, we use another of the + ambiguous values and try to decode again. This usually only happens on very hard to read and decode barcodes, + so decoding the normal barcodes is not affected by this. + + The decoder result from ambiguous values. + Ec level. + Codewords. + contains the indexes of erasures. + array with the indexes that have more than one most likely value. + two dimensional array that contains the ambiguous values. The first dimension must + be the same Length as the ambiguousIndexes array. + + + + Creates the barcode matrix. + + The barcode matrix. + Detection result. + + + + Tests to see if the Barcode Column is Valid + + true, if barcode column is valid, false otherwise. + Detection result. + Barcode column. + + + + Gets the start column. + + The start column. + Detection result. + Barcode column. + Image row. + If set to true left to right. + + + + Detects the codeword. + + The codeword. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + Minimum codeword width. + Max codeword width. + + + + Gets the module bit count. + + The module bit count. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + + + + Gets the number of EC code words. + + The number of EC code words. + Barcode EC level. + + + + Adjusts the codeword start column. + + The codeword start column. + Image. + Minimum column. + Max column. + If set to true left to right. + Codeword start column. + Image row. + + + + Checks the codeword for any skew. + + true, if codeword is within the skew, false otherwise. + Codeword size. + Minimum codeword width. + Max codeword width. + + + + Decodes the codewords. + + The codewords. + Codewords. + Ec level. + Erasures. + + + + Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place. + + The errors. + data and error correction codewords. + positions of any known erasures. + number of error correction codewords that are available in codewords. + + + + Verifies that all is well with the the codeword array. + + Codewords. + Number EC codewords. + + + + Gets the bit count for codeword. + + The bit count for codeword. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Module bit count. + + + + Returns a that represents the jagged array. + + A that represents the jagged array. + Barcode matrix as a jagged array. + + + +

Encapsulates logic that can detect a PDF417 Code in an image, even if the + PDF417 Code is rotated or skewed, or partially obscured.

+ + SITA Lab (kevin.osullivan@sita.aero) + dswitkin@google.com (Daniel Switkin) + Guenther Grau +
+
+ + + B S B S B S B S Bar/Space pattern + 11111111 0 1 0 1 0 1 000. + + + + + 1111111 0 1 000 1 0 1 00 1 + + + + + if we set the value too low, then we don't detect the correct height of the bar if the start patterns are damaged. + if we set the value too high, then we might detect the start pattern from a neighbor barcode. + + + + + A PDF471 barcode should have at least 3 rows, with each row being >= 3 times the module width. Therefore it should be at least + 9 pixels tall. To be conservative, we use about half the size to ensure we don't miss it. + + + + +

Detects a PDF417 Code in an image. Only checks 0 and 180 degree rotations.

+
+ barcode image to decode + optional hints to detector + if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned + + encapsulating results of detecting a PDF417 code + +
+ + + Detects PDF417 codes in an image. Only checks 0 degree rotation (so rotate the matrix and check again outside of this method) + + multiple if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned. + bit matrix to detect barcodes in. + List of ResultPoint arrays containing the coordinates of found barcodes + + + + Locate the vertices and the codewords area of a black blob using the Start and Stop patterns as locators. + + Matrix. + Start row. + Start column. + an array containing the vertices: + vertices[0] x, y top left barcode + vertices[1] x, y bottom left barcode + vertices[2] x, y top right barcode + vertices[3] x, y bottom right barcode + vertices[4] x, y top left codeword area + vertices[5] x, y bottom left codeword area + vertices[6] x, y top right codeword area + vertices[7] x, y bottom right codeword area + + + + + Copies the temp data to the final result + + Result. + Temp result. + Destination indexes. + + + + Finds the rows with the given pattern. + + The rows with pattern. + Matrix. + Height. + Width. + Start row. + Start column. + Pattern. + + + + Finds the guard pattern. Uses System.Linq.Enumerable.Repeat to fill in counters. This might be a performance issue? + + start/end horizontal offset of guard pattern, as an array of two ints. + matrix row of black/white values to search + column x position to start search. + row y position to start search. + width the number of pixels to search on this row. + If set to true search the white patterns first. + pattern of counts of number of black and white pixels that are being searched for as a pattern. + counters array of counters, as long as pattern, to re-use . + + + + Determines how closely a set of observed counts of runs of black/white. + values matches a given target pattern. This is reported as the ratio of + the total variance from the expected pattern proportions across all + pattern elements, to the length of the pattern. + + + ratio of total variance between counters and pattern compared to + total pattern size, where the ratio has been multiplied by 256. + So, 0 means no variance (perfect match); 256 means the total + variance between counters and patterns equals the pattern length, + higher values mean even more variance + + observed counters. + expected pattern. + The most any counter can differ before we give up. + + + + PDF 417 Detector Result class. Skipped private backing stores. + Guenther Grau + + + + + Initializes a new instance of the class. + + Bits. + Points. + + + + defines the level of the error correction / count of error correction codewords + + + + + Holds all of the information for a barcode in a format where it can be easily accessible + + Jacob Haynes + + + + + the height of the matrix (Rows) + the width of the matrix (Cols) + + + + + Jacob Haynes + + + + + Creates a Barcode row of the width + + The width. + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + A boolean which is true if the bar black false if it is white + How many spots wide the bar is. + + + + + This function scales the row + + How much you want the image to be scaled, must be greater than or equal to 1. + the scaled row + + + + + Represents possible PDF417 barcode compaction types. + + + + + + + + + + + + + + + + + + + + + + + + + Data object to specify the minimum and maximum number of rows and columns for a PDF417 barcode. + @author qwandor@google.com (Andrew Walbran) + + + + + Initializes a new instance of the class. + + The min cols. + The max cols. + The min rows. + The max rows. + + + + Gets the min cols. + + + + + Gets the max cols. + + + + + Gets the min rows. + + + + + Gets the max rows. + + + + + Top-level class for the logic part of the PDF417 implementation. + + + + + The start pattern (17 bits) + + + + + The stop pattern (18 bits) + + + + + The codeword table from the Annex A of ISO/IEC 15438:2001(E). + + + + + Calculates the necessary number of rows as described in annex Q of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol (r) + + + + Calculates the number of pad codewords as described in 4.9.2 of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol + the number of pad codewords + + + + Generates the barcode logic. + + the message to encode + PDF417 error correction level to use + + + + Determine optimal nr of columns and rows for the specified number of + codewords. + + number of code words + number of error correction code words + The longest dimension of the barcode, used for columns + The short dimension of the barcode, used for rows + The height of a row, will alter this parameter if aspectRatio>4 (aspectRatio==AUTO) + dimension object containing cols as width and rows as height + + + + Sets max/min row/col values + + maximum allowed columns + minimum allowed columns + maximum allowed rows + minimum allowed rows + + + + Sets compaction to values stored in enum + + compaction mode to use + + + + Sets compact to be true or false + + if true, enables compaction + + + + Sets output encoding. + + sets character encoding to use + + + + Sets the disable eci. + + if set to true don't add an ECI segment for different encodings than default. + + + + PDF417 error correction code following the algorithm described in ISO/IEC 15438:2001(E) in + chapter 4.10. + + + + + Tables of coefficients for calculating error correction words + (see annex F, ISO/IEC 15438:2001(E)) + + + + + Determines the number of error correction codewords for a specified error correction + level. + + the error correction level (0-8) + the number of codewords generated for error correction + + + + Determines the error correction level for AUTO + + The error correction level (0-9) + The number of codewords for AUTO errorCorrectionLevel + the number of codewords generated for error correction + + + + Returns the recommended minimum error correction level as described in annex E of + ISO/IEC 15438:2001(E). + + the number of data codewords + the recommended minimum error correction level + + + + Generates the error correction codewords according to 4.10 in ISO/IEC 15438:2001(E). + + the data codewords + the error correction level (0-8) + the String representing the error correction codewords + + + + defines the level of the error correction / count of error correction codewords + + + + + PDF417 high-level encoder following the algorithm described in ISO/IEC 15438:2001(E) in + annex P. + + + + + code for Text compaction + + + + + code for Byte compaction + + + + + code for Numeric compaction + + + + + Text compaction submode Alpha + + + + + Text compaction submode Lower + + + + + Text compaction submode Mixed + + + + + Text compaction submode Punctuation + + + + + mode latch to Text Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters NOT a multiple of 6) + + + + + mode latch to Numeric Compaction mode + + + + + mode shift to Byte Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters a multiple of 6) + + + + + identifier for a user defined Extended Channel Interpretation (ECI) + + + + + identifier for a general purpose ECO format + + + + + identifier for an ECI of a character set of code page + + + + + Raw code table for text compaction Mixed sub-mode + + + + + Raw code table for text compaction: Punctuation sub-mode + + + + + Performs high-level encoding of a PDF417 message using the algorithm described in annex P + of ISO/IEC 15438:2001(E). If byte compaction has been selected, then only byte compaction + is used. + + the message + compaction mode to use + character encoding used to encode in default or byte compaction + or null for default / not applicable + if true, don't add an ECI segment for different encodings than default + the encoded message (the char values range from 0 to 928) + + + + Encode parts of the message using Text Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.2. + + the message + the start position within the message + the number of characters to encode + receives the encoded codewords + should normally be SUBMODE_ALPHA + the text submode in which this method ends + + + + + Encode parts of the message using Byte Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.3. The Unicode characters will be converted to binary using the cp437 + codepage. + + the message converted to a byte array + the start position within the message + the number of bytes to encode + the mode from which this method starts + receives the encoded codewords + + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using text compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using binary compaction. + + the message + the message converted to a byte array + the start position within the message + + the requested character count + + + + The class holds the available options for the + + + + + Specifies whether to use compact mode for PDF417 (type ). + + + + + Specifies what compaction mode to use for PDF417 (type + ). + + + + + Specifies the minimum and maximum number of rows and columns for PDF417 (type + ). + + + + + Specifies what degree of error correction to use + + + + + Specifies what degree of error correction to use + + + + + Specifies what character encoding to use where applicable (type {@link String}) + + + + + Explicitly disables ECI segment when generating PDF417 Code + That is against the specification but some + readers have problems if the charset is switched from + CP437 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use different encodings + and the ECI segment is omitted. + + + + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Maximum Codewords (Data + Error). + + + + + Gets the bit count sum. + + The bit count sum. + Module bit count. + + + + Converts an ICollection<int> to an int[] + Carry-over from Java. Will likely remove and replace with the Generic .ToArray() method. + + The int array. + List. + + + + Translate the symbol into a codeword + + the codeword corresponding to the symbol. + encoded symbol to translate to a codeword + + + + The sorted table of all possible symbols. Extracted from the PDF417 + specification. The index of a symbol in this table corresponds to the + index into the codeword table. + + + + + This table contains to codewords for all symbols. + + + + + This implementation can detect and decode PDF417 codes in an image. + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Locates and decodes a PDF417 code in an image. + + a String representing the content encoded by the PDF417 code + if a PDF417 cannot be decoded + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + **Note** this will return the FIRST barcode discovered if there are many. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Locates and decodes Multiple PDF417 codes in an image. + + an array of Strings representing the content encoded by the PDF417 codes + + + + + Locates and decodes multiple barcodes in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcodes encode + + + + + Decode the specified image, with the hints and optionally multiple barcodes. + Based on Owen's Comments in , this method has been modified to continue silently + if a barcode was not decoded where it was detected instead of throwing a new exception object. + + Image. + Hints. + If set to true multiple. + + + + Gets the maximum width of the barcode + + The max width. + P1. + P2. + + + + Gets the minimum width of the barcode + + The minimum width. + P1. + P2. + + + + Gets the maximum width of the codeword. + + The max codeword width. + P. + + + + Gets the minimum width of the codeword. + + The minimum codeword width. + P. + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + PDF 417 result meta data. + Guenther Grau + + + + + The Segment ID represents the segment of the whole file distributed over different symbols. + + + + + Is the same for each related PDF417 symbol + + + + + always null + + + + + true if it is the last segment + + + + + count of segments, -1 if not set + + + + + Filename of the encoded file + + + + + filesize in bytes of the encoded file + returns filesize in bytes, -1 if not set + + + + + 16-bit CRC checksum using CCITT-16 + returns crc checksum, -1 if not set + + + + + unix epock timestamp, elapsed seconds since 1970-01-01 + returns elapsed seconds, -1 if not set + + + + + Jacob Haynes + qwandor@google.com (Andrew Walbran) + + + + + default white space (margin) around the code + + + + + default error correction level + + + + + default aspect ratio + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The height of a row in the barcode + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Takes encoder, accounts for width/height, and retrieves bit matrix + + + + + This takes an array holding the values of the PDF 417 + + a byte array of information with 0 is black, and 1 is white + border around the barcode + BitMatrix of the input + + + + Takes and rotates the it 90 degrees + + + + + This object extends LuminanceSource around an array of YUV data returned from the camera driver, + with the option to crop to a rectangle within the full data. This can be used to exclude + superfluous pixels around the perimeter and speed up decoding. + It works for any pixel format where the Y channel is planar and appears first, including + YCbCr_420_SP and YCbCr_422_SP. + @author dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The yuv data. + Width of the data. + Height of the data. + The left. + The top. + The width. + The height. + if set to true [reverse horiz]. + + + + Initializes a new instance of the class. + + The luminances. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + + + + + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Renders the cropped greyscale bitmap. + + + + + + width of image from {@link #renderThumbnail()} + + + + + height of image from {@link #renderThumbnail()} + + + + + creates a new instance + + + + + + + + Sean Owen + + + {@link BitMatrix} to parse + ReaderException if dimension is not >= 21 and 1 mod 4 + + +

Reads format information from one of its two locations within the QR Code.

+ +
+ {@link FormatInformation} encapsulating the QR Code's format info + + ReaderException if both format information locations cannot be parsed as + the valid encoding of format information + +
+ +

Reads version information from one of its two locations within the QR Code.

+ +
+ {@link Version} encapsulating the QR Code's version + + ReaderException if both version information locations cannot be parsed as + the valid encoding of version information + +
+ +

Reads the bits in the {@link BitMatrix} representing the finder pattern in the + correct order in order to reconstruct the codewords bytes contained within the + QR Code.

+ +
+ bytes encoded within the QR Code + + ReaderException if the exact number of bytes expected is not read +
+ + Revert the mask removal done while reading the code words. The bit matrix should revert to its original state. + + + Prepare the parser for a mirrored operation. + This flag has effect only on the {@link #readFormatInformation()} and the + {@link #readVersion()}. Before proceeding with {@link #readCodewords()} the + {@link #mirror()} method should be called. + + @param mirror Whether to read version and format information mirrored. + + + Mirror the bit matrix in order to attempt a second reading. + + +

Encapsulates a block of data within a QR Code. QR Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

When QR Codes use multiple data blocks, they are actually interleaved. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ +
+ bytes as read directly from the QR Code + + version of the QR Code + + error-correction level of the QR Code + + {@link DataBlock}s containing original bytes, "de-interleaved" from representation in the + QR Code + +
+ +

Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations + of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix, + including areas used for finder patterns, timing patterns, etc. These areas should be unused + after the point they are unmasked anyway.

+ +

Note that the diagram in section 6.8.1 is misleading since it indicates that i is column position + and j is row position. In fact, as the text says, i is row position and j is column position.

+ +
+ Sean Owen +
+ + See ISO 18004:2006 6.8.1 + + +

Implementations of this method reverse the data masking process applied to a QR Code and + make its bits ready to read.

+
+ + representation of QR Code bits + dimension of QR Code, represented by bits, being unmasked +
+ +

QR Codes can encode text as bits in one of several modes, and can use multiple modes + in one QR Code. This class decodes the bits back into text.

+ +

See ISO 18004:2006, 6.4.3 - 6.4.7

+ Sean Owen +
+
+ + + See ISO 18004:2006, 6.4.4 Table 5 + + + + + See specification GBT 18284-2000 + + The bits. + The result. + The count. + + + + +

The main class which implements QR Code decoding -- as opposed to locating and extracting + the QR Code from an image.

+
+ + Sean Owen + +
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a QR Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Decodes a QR Code represented as a {@link BitMatrix}. A 1 or "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+
+ data and error correction codewords + number of codewords that are data bytes + +
+ + +

See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels + defined by the QR code standard.

+
+ Sean Owen +
+ + L = ~7% correction + + + M = ~15% correction + + + Q = ~25% correction + + + H = ~30% correction + + + + Gets the bits. + + + + + Gets the name. + + + + + Ordinals this instance. + + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Fors the bits. + + int containing the two bits encoding a QR Code's error correction level + + representing the encoded error correction level + + + +

Encapsulates a QR Code's format information, including the data mask used and + error correction level.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + +
+ + See ISO 18004:2006, Annex C, Table C.1 + + + Offset i holds the number of 1 bits in the binary representation of i + + + + Decodes the format information. + + format info indicator, with mask still applied + The masked format info2. + + information about the format it specifies, or null + if doesn't seem to match any known pattern + + + + +

See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which + data can be encoded to bits in the QR code standard.

+
+ Sean Owen +
+ + + Gets the name. + + + + + enumeration for encoding modes + + + + + + + + + + numeric encoding + + + + + alpha-numeric encoding + + + + + structured append + + + + + byte mode encoding + + + + + ECI segment + + + + + Kanji mode + + + + + FNC1 char, first position + + + + + FNC1 char, second position + + + + + Hanzi mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See GBT 18284-2000; "Hanzi" is a transliteration of this mode name. + + + + Fors the bits. + + four bits encoding a QR Code data mode + + encoded by these bits + + if bits do not correspond to a known mode + + + version in question + + number of bits used, in this QR Code symbol {@link Version}, to encode the + count of characters that will follow encoded in this {@link Mode} + + + + + Gets the bits. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Meta-data container for QR Code decoding. Instances of this class may be used to convey information back to the + decoding caller. Callers are expected to process this. + + + + + Initializes a new instance of the class. + + if set to true [mirrored]. + + + + true if the QR Code was mirrored. + + + + + Apply the result points' order correction due to mirroring. + + Array of points to apply mirror correction to. + + + + See ISO 18004:2006 Annex D + + Sean Owen + + + See ISO 18004:2006 Annex D. + Element i represents the raw version bits that specify version i + 7 + + + + + Gets the version number. + + + + + Gets the alignment pattern centers. + + + + + Gets the total codewords. + + + + + Gets the dimension for version. + + + + + Gets the EC blocks for level. + + The ec level. + + + +

Deduces version information purely from QR Code dimensions.

+ +
+ dimension in modules + + for a QR Code of that dimension or null +
+ + + Gets the version for number. + + The version number. + + + + See ISO 18004:2006 Annex E + + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + + Gets the EC codewords per block. + + + + + Gets the num blocks. + + + + + Gets the total EC codewords. + + + + + Gets the EC blocks. + + + + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the QR code version's format.

+
+
+ + + Gets the count. + + + + + Gets the data codewords. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + See ISO 18004:2006 6.5.1 Table 9 + + +

Encapsulates an alignment pattern, which are the smaller square patterns found in + all but the simplest QR Codes.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Determines if this alignment pattern "about equals" an alignment pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing an average of the two. + + The i. + The j. + New size of the module. + + + +

This class attempts to find alignment patterns in a QR Code. Alignment patterns look like finder + patterns but are smaller and appear at regular intervals throughout the image.

+ +

At the moment this only looks for the bottom-right alignment pattern.

+ +

This is mostly a simplified copy of {@link FinderPatternFinder}. It is copied, + pasted and stripped down here for maximum performance but does unfortunately duplicate + some code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Creates a finder that will look in a portion of the whole image.

+ +
+ image to search + + left column from which to start searching + + top row from which to start searching + + width of region to search + + height of region to search + + estimated module size so far + + callback function which is called, when a result point is found +
+ +

This method attempts to find the bottom-right alignment pattern in the image. It is a bit messy since + it's pretty performance-critical and so is written to be fast foremost.

+ +
+ if found +
+ + Given a count of black/white/black pixels just seen and an end position, + figures the location of the center of this black/white/black run. + + + + count of black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/1 ratios + used by alignment patterns to be considered a match + + + + +

After a horizontal scan finds a potential alignment pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + alignment pattern to see if the same proportion is detected.

+
+ row where an alignment pattern was detected + center of the section that appears to cross an alignment pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of alignment pattern, or null if not found + +
+ +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will see if this pattern had been + found on a previous horizontal scan. If so, we consider it confirmed and conclude we have + found the alignment pattern.

+ +
+ reading state module counts from horizontal scan + + row where alignment pattern may be found + + end of possible alignment pattern in row + + {@link AlignmentPattern} if we have found the same pattern twice, or null if not + +
+ + +

Encapsulates logic that can detect a QR Code in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + + Gets the image. + + + + + Gets the result point callback. + + + + +

Detects a QR Code in an image.

+
+ + encapsulating results of detecting a QR Code + +
+ + +

Detects a QR Code in an image.

+
+ optional hints to detector + + encapsulating results of detecting a QR Code + +
+ + + Processes the finder pattern info. + + The info. + + + +

Computes the dimension (number of modules on a size) of the QR Code based on the position + of the finder patterns and estimated module size.

+
+
+ + +

Computes an average estimated module size based on estimated derived from the positions + of the three finder patterns.

+
+ detected top-left finder pattern center + detected top-right finder pattern center + detected bottom-left finder pattern center + estimated module size +
+ +

Estimates module size based on two finder patterns -- it uses + {@link #sizeOfBlackWhiteBlackRunBothWays(int, int, int, int)} to figure the + width of each, measuring along the axis between their centers.

+
+
+ + See {@link #sizeOfBlackWhiteBlackRun(int, int, int, int)}; computes the total width of + a finder pattern by looking for a black-white-black run from the center in the direction + of another point (another finder pattern center), and in the opposite direction too. + + + +

This method traces a line from a point in the image, in the direction towards another point. + It begins in a black region, and keeps going until it finds white, then black, then white again. + It reports the distance from the start to this point.

+ +

This is used when figuring out how wide a finder pattern is, when the finder pattern + may be skewed or rotated.

+
+
+ + +

Attempts to locate an alignment pattern in a limited region of the image, which is + guessed to contain it. This method uses {@link AlignmentPattern}.

+
+ estimated module size so far + x coordinate of center of area probably containing alignment pattern + y coordinate of above + number of pixels in all directions to search from the center + + if found, or null otherwise + +
+ + +

Encapsulates a finder pattern, which are the three square patterns found in + the corners of QR Codes. It also encapsulates a count of similar finder patterns, + as a convenience to the finder's bookkeeping.

+
+ Sean Owen +
+ + + Gets the size of the estimated module. + + + The size of the estimated module. + + + +

Determines if this finder pattern "about equals" a finder pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing a weighted average + based on count. + + The i. + The j. + New size of the module. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+
+ Sean Owen +
+ + + 1 pixel/module times 3 modules/center + + + + + support up to version 20 for mobile clients + + + + +

Creates a finder that will search the image for three finder patterns.

+
+ image to search +
+ + + Initializes a new instance of the class. + + The image. + The result point callback. + + + + Gets the image. + + + + + Gets the possible centers. + + + + Given a count of black/white/black/white/black pixels just seen and an end position, + figures the location of the center of this run. + + + + count of black/white/black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/3/1/1 ratios + used by finder patterns to be considered a match + + + + + + count of black/white/black/white/black pixels just read + true if the proportions of the counts is close enough to the 1/1/3/1/1 ratios + by finder patterns to be considered a match + + + + After a vertical and horizontal scan finds a potential finder pattern, this method + "cross-cross-cross-checks" by scanning down diagonally through the center of the possible + finder pattern to see if the same proportion is detected. + @param maxCount maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + @param originalStateCountTotal The original state count total. + + row where a finder pattern was detected + center of the section that appears to cross a finder pattern + true if proportions are withing expected limits + + + +

After a horizontal scan finds a potential finder pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + finder pattern to see if the same proportion is detected.

+
+ row where a finder pattern was detected + center of the section that appears to cross a finder pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of finder pattern, or null if not found + +
+ +

Like {@link #crossCheckVertical(int, int, int, int)}, and in fact is basically identical, + except it reads horizontally instead of vertically. This is used to cross-cross + check a vertical cross check and locate the real center of the alignment pattern.

+
+
+ + + @see #handlePossibleCenter(int[], int, int) + + reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + ignored + true if a finder pattern candidate was found this time + + + +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will, ah, cross-cross-check + with another horizontal scan. This is needed primarily to locate the real horizontal + center of the pattern in cases of extreme skew. + And then we cross-cross-cross check with another diagonal scan.

+ If that succeeds the finder pattern location is added to a list that tracks + the number of times each location has been nearly-matched as a finder pattern. + Each additional find is more evidence that the location is in fact a finder + pattern center +
+ reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + + true if a finder pattern candidate was found this time + +
+ + number of rows we could safely skip during scanning, based on the first + two finder patterns that have been located. In some cases their position will + allow us to infer that the third pattern must lie below a certain point farther + down in the image. + + + + true iff we have found at least 3 finder patterns that have been detected + at least {@link #CENTER_QUORUM} times each, and, the estimated module size of the + candidates is "pretty similar" + + + + the 3 best {@link FinderPattern}s from our list of candidates. The "best" are + those that have been detected at least {@link #CENTER_QUORUM} times, and whose module + size differs from the average among those patterns the least + + + + + Orders by furthest from average + + + +

Orders by {@link FinderPattern#getCount()}, descending.

+
+ + +

Encapsulates information about finder patterns in an image, including the location of + the three finder patterns, and their estimated module size.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The pattern centers. + + + + Gets the bottom left. + + + + + Gets the top left. + + + + + Gets the top right. + + + + + JAVAPORT: The original code was a 2D array of ints, but since it only ever gets assigned + 0, 1 and 2 I'm going to use less memory and go with bytes. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Gets the height. + + + + + Gets the width. + + + + + Gets or sets the with the specified x. + + + + + an internal representation as bytes, in row-major order. array[y][x] represents point (x,y) + + + + + Sets the specified x. + + The x. + The y. + The value. + + + + Sets the specified x. + + The x. + The y. + if set to true [value]. + + + + Clears the specified value. + + The value. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + Encode "bytes" with the error correction level "ecLevel". The encoding mode will be chosen + internally by chooseMode(). On success, store the result in "qrCode". + We recommend you to use QRCode.EC_LEVEL_L (the lowest level) for + "getECLevel" since our primary use is to show QR code on desktop screens. We don't need very + strong error correction for this purpose. + Note that there is no way to encode bytes in MODE_KANJI. We might want to add EncodeWithMode() + with which clients can specify the encoding mode. For now, we don't need the functionality. + + text to encode + error correction level to use + representing the encoded QR code + + + + Encodes the specified content. + + The content. + The ec level. + The hints. + + + + + Decides the smallest version of QR code that will contain all of the provided data. + + if the data cannot fit in any version + + + + Gets the alphanumeric code. + + The code. + the code point of the table used in alphanumeric mode or + -1 if there is no corresponding code in the table. + + + + Chooses the mode. + + The content. + + + + + Choose the best mode by examining the content. Note that 'encoding' is used as a hint; + if it is Shift_JIS, and the input is only double-byte Kanji, then we return {@link Mode#KANJI}. + + The content. + The encoding. + + + + + true if the number of input bits will fit in a code with the specified version and error correction level. + + + + Terminate bits as described in 8.4.8 and 8.4.9 of JISX0510:2004 (p.24). + + The num data bytes. + The bits. + + + + Get number of data bytes and number of error correction bytes for block id "blockID". Store + the result in "numDataBytesInBlock", and "numECBytesInBlock". See table 12 in 8.5.1 of + JISX0510:2004 (p.30) + + The num total bytes. + The num data bytes. + The num RS blocks. + The block ID. + The num data bytes in block. + The num EC bytes in block. + + + + Interleave "bits" with corresponding error correction bytes. On success, store the result in + "result". The interleave rule is complicated. See 8.6 of JISX0510:2004 (p.37) for details. + + The bits. + The num total bytes. + The num data bytes. + The num RS blocks. + + + + + Append mode info. On success, store the result in "bits". + + The mode. + The bits. + + + + Append length info. On success, store the result in "bits". + + The num letters. + The version. + The mode. + The bits. + + + + Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits". + + The content. + The mode. + The bits. + The encoding. + + + + + + Satoru Takabayashi + Daniel Switkin + Sean Owen + + + + Apply mask penalty rule 1 and return the penalty. Find repetitive cells with the same color and + give penalty to them. Example: 00000 or 11111. + + The matrix. + + + + + Apply mask penalty rule 2 and return the penalty. Find 2x2 blocks with the same color and give + penalty to them. This is actually equivalent to the spec's rule, which is to find MxN blocks and give a + penalty proportional to (M-1)x(N-1), because this is the number of 2x2 blocks inside such a block. + + The matrix. + + + + + Apply mask penalty rule 3 and return the penalty. Find consecutive cells of 00001011101 or + 10111010000, and give penalty to them. If we find patterns like 000010111010000, we give + penalties twice (i.e. 40 * 2). + + The matrix. + + + + + Apply mask penalty rule 4 and return the penalty. Calculate the ratio of dark cells and give + penalty if the ratio is far from 50%. It gives 10 penalty for 5% distance. + + The matrix. + + + + + Return the mask bit for "getMaskPattern" at "x" and "y". See 8.8 of JISX0510:2004 for mask + pattern conditions. + + The mask pattern. + The x. + The y. + + + + + Helper function for applyMaskPenaltyRule1. We need this for doing this calculation in both + vertical and horizontal orders respectively. + + The matrix. + if set to true [is horizontal]. + + + + + + + + satorux@google.com (Satoru Takabayashi) - creator + + + + + Set all cells to 2. 2 means that the cell is empty (not set yet). + + JAVAPORT: We shouldn't need to do this at all. The code should be rewritten to begin encoding + with the ByteMatrix initialized all to zero. + + The matrix. + + + + Build 2D matrix of QR Code from "dataBits" with "ecLevel", "version" and "getMaskPattern". On + success, store the result in "matrix" and return true. + + The data bits. + The ec level. + The version. + The mask pattern. + The matrix. + + + + Embed basic patterns. On success, modify the matrix and return true. + The basic patterns are: + - Position detection patterns + - Timing patterns + - Dark dot at the left bottom corner + - Position adjustment patterns, if need be + + The version. + The matrix. + + + + Embed type information. On success, modify the matrix. + + The ec level. + The mask pattern. + The matrix. + + + + Embed version information if need be. On success, modify the matrix and return true. + See 8.10 of JISX0510:2004 (p.47) for how to embed version information. + + The version. + The matrix. + + + + Embed "dataBits" using "getMaskPattern". On success, modify the matrix and return true. + For debugging purposes, it skips masking process if "getMaskPattern" is -1. + See 8.7 of JISX0510:2004 (p.38) for how to embed data bits. + + The data bits. + The mask pattern. + The matrix. + + + + Return the position of the most significant bit set (to one) in the "value". The most + significant bit is position 32. If there is no bit set, return 0. Examples: + - findMSBSet(0) => 0 + - findMSBSet(1) => 1 + - findMSBSet(255) => 8 + + The value_ renamed. + + + + + Calculate BCH (Bose-Chaudhuri-Hocquenghem) code for "value" using polynomial "poly". The BCH + code is used for encoding type information and version information. + Example: Calculation of version information of 7. + f(x) is created from 7. + - 7 = 000111 in 6 bits + - f(x) = x^2 + x^2 + x^1 + g(x) is given by the standard (p. 67) + - g(x) = x^12 + x^11 + x^10 + x^9 + x^8 + x^5 + x^2 + 1 + Multiply f(x) by x^(18 - 6) + - f'(x) = f(x) * x^(18 - 6) + - f'(x) = x^14 + x^13 + x^12 + Calculate the remainder of f'(x) / g(x) + x^2 + __________________________________________________ + g(x) )x^14 + x^13 + x^12 + x^14 + x^13 + x^12 + x^11 + x^10 + x^7 + x^4 + x^2 + -------------------------------------------------- + x^11 + x^10 + x^7 + x^4 + x^2 + + The remainder is x^11 + x^10 + x^7 + x^4 + x^2 + Encode it in binary: 110010010100 + The return value is 0xc94 (1100 1001 0100) + + Since all coefficients in the polynomials are 1 or 0, we can do the calculation by bit + operations. We don't care if coefficients are positive or negative. + + The value. + The poly. + + + + + Make bit vector of type information. On success, store the result in "bits" and return true. + Encode error correction level and mask pattern. See 8.9 of + JISX0510:2004 (p.45) for details. + + The ec level. + The mask pattern. + The bits. + + + + Make bit vector of version information. On success, store the result in "bits" and return true. + See 8.10 of JISX0510:2004 (p.45) for details. + + The version. + The bits. + + + + Check if "value" is empty. + + The value. + + true if the specified value is empty; otherwise, false. + + + + + Embed the lonely dark dot at left bottom corner. JISX0510:2004 (p.46) + + The matrix. + + + + + + The x start. + The y start. + The matrix. + + + + Embed position detection patterns and surrounding vertical/horizontal separators. + + The matrix. + + + + Embed position adjustment patterns if need be. + + The version. + The matrix. + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + + + + + + Initializes a new instance of the class. + + + + + Gets or sets the mode. + + + The mode. + + + + + Gets or sets the EC level. + + + The EC level. + + + + + Gets or sets the version. + + + The version. + + + + + Gets or sets the mask pattern. + + + The mask pattern. + + + + + Gets or sets the matrix. + + + The matrix. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Check if "mask_pattern" is valid. + + The mask pattern. + + true if [is valid mask pattern] [the specified mask pattern]; otherwise, false. + + + + + The class holds the available options for the QrCodeWriter + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + . + + + + + Specifies what character encoding to use where applicable (type ) + + + + + Explicitly disables ECI segment when generating QR Code + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + + + + + Specifies the exact version of QR code to be encoded. An integer, range 1 to 40. If the data specified + cannot fit within the required version, a WriterException will be thrown. + + + + + This implementation can detect and decode QR Codes in an image. + Sean Owen + + + + + Gets the decoder. + + + + + + Locates and decodes a QR code in an image. + + a String representing the content encoded by the QR code + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a QR Code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Implementations of this interface can decode an image of a barcode in some format into + the String it encodes. For example, can + decode a QR code. The decoder may optionally receive hints from the caller which may help + it decode more quickly or accurately. + + See , which attempts to determine what barcode + format is present within the image as well, and then decodes it accordingly. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + String which the barcode encodes + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + The general exception class throw when something goes wrong during decoding of a barcode. + This includes, but is not limited to, failing checksums / error correction algorithms, being + unable to locate finder timing patterns, and so on. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class. + + The inner exception. + + + + Initializes a new instance of the class. + + The inner exception. + + + + + Interface for a class to convert a BitMatrix to an output image format + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + The options. + + + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + + + the generated code as byte array of BGRA pixels + + + + + the width of the image + + + + + the height of the image + + + + + converts the pixel data to a bitmap object + + + + + + Renders a to an byte array with pixel data (4 byte per pixel, BGRA) + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Renders a barcode into a Svg image + + + + + Gets or sets the foreground color. + + The foreground color. + + + + Gets or sets the background color. + + The background color. + + + + Gets or sets the font family name + + The font family name. + + + + Gets or sets the font size in pixel + + The font size in pixel. + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Represents a barcode as a Svg image + + + + + Gets or sets the content. + + + The content. + + + + + The original height of the bitmatrix for the barcode + + + + + The original width of the bitmatrix for the barcode + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The content. + + + + Gives the XML representation of the SVG image + + + + + Renders a to a + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + + Gets or sets the font family. + + + The font family. + + + + + Gets or sets the size of the font. + + + The size of the font. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Encapsulates the result of decoding a barcode within an image. + + + + raw text encoded by the barcode, if applicable, otherwise null + + + raw bytes encoded by the barcode, if applicable, otherwise null + + + + points related to the barcode in the image. These are typically points + identifying finder patterns or the corners of the barcode. The exact meaning is + specific to the type of barcode that was decoded. + + + + {@link BarcodeFormat} representing the format of the barcode that was decoded + + + + {@link Hashtable} mapping {@link ResultMetadataType} keys to values. May be + null. This contains optional metadata about what was detected about the barcode, + like orientation. + + + + + Gets the timestamp. + + + + + how many bits of are valid; typically 8 times its length + + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + The timestamp. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + The timestamp. + + + + Adds one metadata to the result + + The type. + The value. + + + + Adds a list of metadata to the result + + The metadata. + + + + Adds the result points. + + The new points. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Represents some type of metadata about the result of the decoding that the decoder + wishes to communicate back to the caller. + + Sean Owen + + + + Unspecified, application-specific metadata. Maps to an unspecified {@link Object}. + + + + + Denotes the likely approximate orientation of the barcode in the image. This value + is given as degrees rotated clockwise from the normal, upright orientation. + For example a 1D barcode which was found by reading top-to-bottom would be + said to have orientation "90". This key maps to an {@link Integer} whose + value is in the range [0,360). + + + + +

2D barcode formats typically encode text, but allow for a sort of 'byte mode' + which is sometimes used to encode binary data. While {@link Result} makes available + the complete raw bytes in the barcode for these formats, it does not offer the bytes + from the byte segments alone.

+

This maps to a {@link java.util.List} of byte arrays corresponding to the + raw bytes in the byte segments in the barcode, in order.

+
+
+ + + Error correction level used, if applicable. The value type depends on the + format, but is typically a String. + + + + + For some periodicals, indicates the issue number as an {@link Integer}. + + + + + For some products, indicates the suggested retail price in the barcode as a + formatted {@link String}. + + + + + For some products, the possible country of manufacture as a {@link String} denoting the + ISO country code. Some map to multiple possible countries, like "US/CA". + + + + + For some products, the extension text + + + + + If the code format supports structured append and + the current scanned code is part of one then the + sequence number is given with it. + + + + + If the code format supports structured append and + the current scanned code is part of one then the + parity is given with it. + + + + + PDF417-specific metadata + + + + + Aztec-specific metadata + + + + + Encapsulates a point of interest in an image containing a barcode. Typically, this + would be the location of a finder pattern or the corner of the barcode, for example. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The x. + The y. + + + + Gets the X. + + + + + Gets the Y. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC and + BC is less than AC and the angle between BC and BA is less than 180 degrees. + + array of three to order + + + + calculates the distance between two points + + first pattern + second pattern + + distance between two points + + + + + Returns the z component of the cross product between vectors BC and BA. + + + + Callback which is invoked when a possible result point (significant + point in the barcode image such as a corner) is found. + + + + + + + + Luminance source class which support different formats of images. + + + + + enumeration of supported bitmap format which the RGBLuminanceSource can process + + + + + format of the byte[] isn't known. RGBLuminanceSource tries to determine the best possible value + + + + + grayscale array, the byte array is a luminance array with 1 byte per pixel + + + + + grayscale array, the byte array is a luminance array with 2 bytes per pixel + + + + + 3 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels alpha, red, green and blue + + + + + 3 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green, red and alpha + + + + + 2 bytes per pixel, 5 bit red, 6 bits green and 5 bits blue + + + + + 4 bytes per pixel with the channels red, green, blue and alpha + + + + + 4 bytes for two pixels, UYVY formatted + + + + + 4 bytes for two pixels, YUYV formatted + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 1 byte per pixel (Gray8). + That means the whole array consists of the luminance values (grayscale). + + The luminance array. + The width. + The height. + if set to true [is8 bit]. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + The bitmap format. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + calculates the luminance values for the given byte array and bitmap format + + + + + + + Attribute is only for source code compatibility issues + + + + + Attribute is only for compatibility issues + + + + + Contains conversion support elements such as classes, interfaces and static methods. + + + + + Copies an array of chars obtained from a String into a specified array of chars + + The String to get the chars from + Position of the String to start getting the chars + Position of the String to end getting the chars + Array to return the chars + Position of the destination array of chars to start storing the chars + An array of chars + + + + Sets the capacity for the specified List + + The List which capacity will be set + The new capacity value + + + + Converts a string-Collection to an array + + The strings. + + + + + Joins all elements to one string. + + + The separator. + The values. + + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The value. + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The start index. + The end index. + The value. + + + + + + + + + + + + + + + + + + Savely gets the value of a decoding hint + if hints is null the default is returned + + + The hints. + Type of the hint. + The @default. + + + + The base class for all objects which encode/generate a barcode image. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + A base class which covers the range of exceptions which may occur when encoding a barcode using + the Writer framework. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner exc. + + + + Attribute is only for compatibility issues + + +
+
diff --git a/packages/ZXing.Net.0.16.4/lib/windows8-managed/zxing.winrt.dll b/packages/ZXing.Net.0.16.4/lib/windows8-managed/zxing.winrt.dll new file mode 100644 index 0000000..b7f411f Binary files /dev/null and b/packages/ZXing.Net.0.16.4/lib/windows8-managed/zxing.winrt.dll differ diff --git a/packages/ZXing.Net.0.16.4/lib/windows8/zxing.XML b/packages/ZXing.Net.0.16.4/lib/windows8/zxing.XML new file mode 100644 index 0000000..f6ecc41 --- /dev/null +++ b/packages/ZXing.Net.0.16.4/lib/windows8/zxing.XML @@ -0,0 +1,11098 @@ + + + + ZXing + + + + + Extends with more information specific to the Aztec format, + like the number of layers and whether it's compact. + + + + +

Encapsulates the result of detecting a barcode in an image. This includes the raw + matrix of black/white pixels corresponding to the barcode, and possibly points of interest + in the image, like the location of finder patterns or corners of the barcode in the image.

+
+ Sean Owen +
+ + + initializing constructor + + + + + + + the detected bits + + + + + the pixel points where the result is found + + + + + Initializes a new instance of the class. + + The bits. + The points. + if set to true [compact]. + The nb datablocks. + The nb layers. + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + This implementation can detect and decode Aztec codes in an image. + + David Olivier + + + + Implementations of this interface can decode an image of a barcode in some format into + the String it encodes. For example, can + decode a QR code. The decoder may optionally receive hints from the caller which may help + it decode more quickly or accurately. + + See , which attempts to determine what barcode + format is present within the image as well, and then decodes it accordingly. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + String which the barcode encodes + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + a String representing the content encoded by the Data Matrix code + + + + + Locates and decodes a Data Matrix code in an image. + + image of barcode to decode + passed as a {@link java.util.Hashtable} from {@link com.google.zxing.DecodeHintType} + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Aztec result meta data. + + + + + + + + + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + Renders an Aztec code as a + + + + The base class for all objects which encode/generate a barcode image. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + The main class which implements Aztec Code decoding -- as opposed to locating and extracting + the Aztec Code from an image. + + David Olivier + + + + Decodes the specified detector result. + + The detector result. + + + + + This method is used for testing the high-level encoder + + + + + + + Gets the string encoded in the aztec code bits + + The corrected bits. + the decoded string + + + + gets the table corresponding to the char passed + + The t. + + + + + Gets the character (or string) corresponding to the passed code in the given table + + the table used + the code of the character + + + + + Performs RS error correction on an array of bits. + + The rawbits. + the corrected array + + + + Gets the array of bits from an Aztec Code matrix + + The matrix. + the array of bits + + + + Reads a code of given length and at given index in an array of bits + + The rawbits. + The start index. + The length. + + + + + Reads a code of length 8 in an array of bits, padding with zeros + + + + + + + + Packs a bit array into bytes, most significant bit first + + + + + + + Encapsulates logic that can detect an Aztec Code in an image, even if the Aztec Code + is rotated or skewed, or partially obscured. + + David Olivier + + + + Initializes a new instance of the class. + + The image. + + + + Detects an Aztec Code in an image. + + + + + Detects an Aztec Code in an image. + + if true, image is a mirror-image of original. + + encapsulating results of detecting an Aztec Code + + + + + Extracts the number of data layers and data blocks from the layer around the bull's eye + + bullEyeCornerPoints the array of bull's eye corners + + + + + Corrects the parameter bits using Reed-Solomon algorithm + + paremeter bits + compact true if this is a compact Aztec code + + + + + Finds the corners of a bull-eye centered on the passed point + This returns the centers of the diagonal points just outside the bull's eye + Returns [topRight, bottomRight, bottomLeft, topLeft] + + Center point + The corners of the bull-eye + + + + Finds a candidate center point of an Aztec code from an image + + the center point + + + + Gets the Aztec code corners from the bull's eye corners and the parameters. + + the array of bull's eye corners + the array of aztec code corners + + + + Creates a BitMatrix by sampling the provided image. + topLeft, topRight, bottomRight, and bottomLeft are the centers of the squares on the + diagonal just outside the bull's eye. + + The image. + The top left. + The bottom left. + The bottom right. + The top right. + + + + + Samples a line + + start point (inclusive) + end point (exclusive) + number of bits + the array of bits as an int (first bit is high-order bit of result) + + + + Determines whether [is white or black rectangle] [the specified p1]. + + The p1. + The p2. + The p3. + The p4. + true if the border of the rectangle passed in parameter is compound of white points only + or black points only + + + + Gets the color of a segment + + The p1. + The p2. + 1 if segment more than 90% black, -1 if segment is more than 90% white, 0 else + + + + Gets the coordinate of the first point with a different color in the given direction + + The init. + if set to true [color]. + The dx. + The dy. + + + + + Expand the square represented by the corner points by pushing out equally in all directions + + the corners of the square, which has the bull's eye at its center + the original length of the side of the square in the target bit matrix + the new length of the size of the square in the target bit matrix + the corners of the expanded square + + + + Aztec 2D code representation + + Rustam Abdullaev + + + + Compact or full symbol indicator + + + + + Size in pixels (width and height) + + + + + Number of levels + + + + + Number of data codewords + + + + + The symbol image + + + + + The class holds the available options for the + + + + + Initializes a new instance of the class. + + + + + Representing the minimal percentage of error correction words. + Note: an Aztec symbol should have a minimum of 25% EC words. + + + + + Specifies the required number of layers for an Aztec code: + a negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + a positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + + + + + Gets the data container for all options + + + + + Specifies the height of the barcode image + + + + + Specifies the width of the barcode image + + + + + Don't put the content string into the output image. + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + + + + + represents a token for a binary shift + + + + + initializing constructor + + + + + + + + appends the byte array to the BitArray + + + + + + + string representation + + + + + + Generates Aztec 2D barcodes. + + Rustam Abdullaev + + + + Encodes the given binary content as an Aztec symbol + + input data string + Aztec symbol matrix with metadata + + + + Encodes the given binary content as an Aztec symbol + + input data string + minimal percentage of error check words (According to ISO/IEC 24778:2008, + a minimum of 23% + 3 words is recommended) + if non-zero, a user-specified value for the number of layers + + Aztec symbol matrix with metadata + + + + + This produces nearly optimal encodings of text into the first-level of + encoding used by Aztec code. + It uses a dynamic algorithm. For each prefix of the string, it determines + a set of encodings that could lead to this prefix. We repeatedly add a + character and generate a new set of optimal encodings until we have read + through the entire input. + @author Frank Yellin + @author Rustam Abdullaev + + + + + + + + + + + Convert the text represented by this High Level Encoder into a BitArray. + + text represented by this encoder encoded as a + + + + State represents all information about a sequence necessary to generate the current output. + Note that a state is immutable. + + + + + Create a new state representing this state with a latch to a (not + necessary different) mode, and then a code. + + + + + Create a new state representing this state, with a temporary shift + to a different mode to output a single value. + + + + + Create a new state representing this state, but an additional character + output in Binary Shift mode. + + + + + Create the state identical to this one, but we are no longer in + Binary Shift mode. + + + + + Returns true if "this" state is better (or equal) to be in than "that" + state under all possible circumstances. + + + + + Enumerates barcode formats known to this package. + + Sean Owen + + + Aztec 2D barcode format. + + + CODABAR 1D format. + + + Code 39 1D format. + + + Code 93 1D format. + + + Code 128 1D format. + + + Data Matrix 2D barcode format. + + + EAN-8 1D format. + + + EAN-13 1D format. + + + ITF (Interleaved Two of Five) 1D format. + + + MaxiCode 2D barcode format. + + + PDF417 format. + + + QR Code 2D barcode format. + + + RSS 14 + + + RSS EXPANDED + + + UPC-A 1D format. + + + UPC-E 1D format. + + + UPC/EAN extension format. Not a stand-alone format. + + + MSI + + + Plessey + + + Intelligent Mail barcode + + + + UPC_A | UPC_E | EAN_13 | EAN_8 | CODABAR | CODE_39 | CODE_93 | CODE_128 | ITF | RSS_14 | RSS_EXPANDED + without MSI (to many false-positives) and IMB (not enough tested, and it looks more like a 2D) + + + + + A smart class to decode the barcode inside a bitmap object + + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode the barcode inside a bitmap object + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + represents the default function which is called to get a instance from a raw byte array + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb array. + If null the RGBLuminanceSource is used. The handler is only called when Decode with a byte[] array is called. + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + raises the ResultFound event + + + + + + raises the ResultFound event + + + + + + calls the explicitResultPointFound action + + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + Gets or sets the options. + + + The options. + + + + + Gets the reader which should be used to find and decode the barcode. + + + The reader. + + + + + Gets or sets a method which is called if an important point is found + + + The result point callback. + + + + + event is executed if a result was found via decode + + + + + Gets or sets a value indicating whether the image should be automatically rotated. + Rotation is supported for 90, 180 and 270 degrees + + + true if image should be rotated; otherwise, false. + + + + + Gets or sets a value indicating whether the image should be automatically inverted + if no result is found in the original image. + ATTENTION: Please be carefully because it slows down the decoding process if it is used + + + true if image should be inverted; otherwise, false. + + + + + Optional: Gets or sets the function to create a luminance source object for a bitmap. + If null a platform specific default LuminanceSource is used + + + The function to create a luminance source object. + + + + + Optional: Gets or sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + The function to create a binarizer object. + + + + + A base class for specific barcode writers with specific formats of barcode images. + The result is a byte[] array with 4 bytes per pixel, BGRA + + + + + Interface for a smart class to encode some content into a barcode + + + Interface for a smart class to encode some content into a barcode + + + + + Encodes the specified contents. + + The contents. + + + + + Creates a visual representation of the contents + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Initializes a new instance of the class. + + + + + Encodes the specified contents and returns a BitMatrix array. + That array has to be rendered manually or with a IBarcodeRenderer. + + The contents. + + + + + Encodes the specified contents and returns a rendered instance of the barcode. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The matrix. + + + + + Gets or sets the barcode format. + The value is only suitable if the MultiFormatWriter is used. + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Gets or sets the renderer which should be used to render the encoded BitMatrix. + + + + + A base class for specific barcode writers with specific formats of barcode images. + The result is a WriteableBitmap Image object + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Initializes a new instance of the class. + + + + + Encodes the specified contents and returns a BitMatrix array. + That array has to be rendered manually or with a IBarcodeRenderer. + + The contents. + + + + + Encodes the specified contents and returns a rendered instance of the barcode. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The matrix. + + + + + Gets or sets the barcode format. + The value is only suitable if the MultiFormatWriter is used. + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Gets or sets the renderer which should be used to render the encoded BitMatrix. + + + + + The base class for luminance sources which supports + cropping and rotating based upon the luminance values. + + + + + The purpose of this class hierarchy is to abstract different bitmap implementations across + platforms into a standard interface for requesting greyscale luminance values. The interface + only provides immutable methods; therefore crop and rotation create copies. This is to ensure + that one Reader does not modify the original luminance source and leave it in an unknown state + for other Readers in the chain. + + dswitkin@google.com (Daniel Switkin) + + + + initializing constructor + + + + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + inverts the luminance values, not supported here. has to implemented in sub classes + + + + + + + + + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff + + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + The width of the bitmap. + + + The height of the bitmap. + + + Whether this subclass supports cropping. + + + Whether this subclass supports counter-clockwise rotation. + + + + + Whether this subclass supports invertion. + + + + weight of the red channel for calculating a gray scale image + + + + + weight of the green channel for calculating a gray scale image + + + + + weight of the blue channel for calculating a gray scale image + + + + + numbers of bits which for right shifting + + + + + + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + + The luminance array. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + TODO: not implemented yet + + + A rotated version of this object. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Inverts the luminance values (newValue = 255 - oldValue) + + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + gets the luminance matrix + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + + Whether this subclass supports cropping. + + + + + Whether this subclass supports invertion. + + + This class hierarchy provides a set of methods to convert luminance data to 1 bit data. + It allows the algorithm to vary polymorphically, for example allowing a very expensive + thresholding technique for servers and a fast one for mobile. It also permits the implementation + to vary, e.g. a JNI version for Android and a Java fallback version for other platforms. + + dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The source. + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + For callers which only examine one row of pixels at a time, the same BitArray should be reused + and passed in with each call for performance. However it is legal to keep more than one row + at a time if needed. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + A new concrete Binarizer implementation object. + + + + Gets the luminance source object. + + + + Converts a 2D array of luminance data to 1 bit data. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + + Gets the width of the luminance source object. + + + + + Gets the height of the luminance source object. + + + + + This class is the core bitmap class used by ZXing to represent 1 bit data. Reader objects + accept a BinaryBitmap and attempt to decode it. + + dswitkin@google.com (Daniel Switkin) + + + + + + + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + + The row to fetch, which must be in [0, bitmap height). + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if isCropSupported() is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + The width of the bitmap. + + + + + The height of the bitmap. + + + + + Converts a 2D array of luminance data to 1 bit. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + + Whether this bitmap can be cropped. + + + + + Whether this bitmap supports counter-clockwise rotation. + + + + + class which represents the luminance values for a bitmap object of a WriteableBitmap class + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + initializing constructor + + + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + +

See + + DoCoMo's documentation about the result types represented by subclasses of this class.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link #parseResult(com.google.zxing.Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Attempts to parse the raw {@link Result}'s contents as a particular type + of information (email, URL, etc.) and return a {@link ParsedResult} encapsulating + the result of parsing. + + the raw to parse + encapsulating the parsing result + + + + Parses the result. + + The result. + + + + Implements KDDI AU's address book format. See + + http://www.au.kddi.com/ezfactory/tec/two_dimensions/index.html. + (Thanks to Yuzo for translating!) + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Implements the "MECARD" address book entry format. + + Supported keys: N, SOUND, TEL, EMAIL, NOTE, ADR, BDAY, URL, plus ORG + Unsupported keys: TEL-AV, NICKNAME + + Except for TEL, multiple values for keys are also not supported; + the first one found takes precedence. + + Our understanding of the MECARD format is based on this document: + + http://www.mobicode.org.tw/files/OMIA%20Mobile%20Bar%20Code%20Standard%20v3.2.1.doc + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes contact information, like that in an address book entry. + + Sean Owen + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link ResultParser#parseResult(Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + initializing constructor + + + + + + + + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + the names + + + + + the nicknames + + + + + In Japanese, the name is written in kanji, which can have multiple readings. Therefore a hint + is often provided, called furigana, which spells the name phonetically. + + The pronunciation of the getNames() field, often in hiragana or katakana. + + + + the phone numbers + + + + optional descriptions of the type of each phone number. It could be like "HOME", but, + there is no guaranteed or standard format. + + + + the e-mail addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the instant messenger addresses + + + + + the note field + + + + + the addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the title + + + + + the urls + + + + birthday formatted as yyyyMMdd (e.g. 19780917) + + + a location as a latitude/longitude pair + + + Implements the "BIZCARD" address book entry format, though this has been + largely reverse-engineered from examples observed in the wild -- still + looking for a definitive reference. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a calendar event at a certain time, optionally with attendees and a location. + + Sean Owen + + + + Determines whether [is start all day]. + + if start time was specified as a whole day + + + + Parses a string as a date. RFC 2445 allows the start and end fields to be of type DATE (e.g. 20081021) + or DATE-TIME (e.g. 20081021T123000 for local time, or 20081021T123000Z for UTC). + + The string to parse + + if not a date formatted string + + + + Gets the start. + + + + + event end , or null if event has no duration + + + + + Gets a value indicating whether this instance is end all day. + + true if end time was specified as a whole day + + + + Represents a parsed result that encodes an email message including recipients, subject and body text. + + Sean Owen + + + + the email address + + + + + the TOs + + + + + the CCs + + + + + the BCCs + + + + + the subject + + + + + the body + + + + + the mailto: uri + + + + + Represents a result that encodes an e-mail address, either as a plain address + like "joe@example.org" or a mailto: URL like "mailto:joe@example.org". + + Sean Owen + + + + Implements the "MATMSG" email message entry format. + + Supported keys: TO, SUB, BODY + + Sean Owen + + + + This implements only the most basic checking for an email address's validity -- that it contains + an '@' and contains no characters disallowed by RFC 2822. This is an overly lenient definition of + validity. We want to generally be lenient here since this class is only intended to encapsulate what's + in a barcode, not "judge" it. + + The email. + + true if it is basically a valid email address; otherwise, false. + + + + + Represents a parsed result that encodes extended product information as encoded by the RSS format, like weight, price, dates, etc. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + extension for kilogram weight type + + + + + extension for pounds weight type + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the raw text + + + + + the product id + + + + + the sscc + + + + + the lot number + + + + + the production date + + + + + the packaging date + + + + + the best before date + + + + + the expiration date + + + + + the weight + + + + + the weight type + + + + + the weight increment + + + + + the price + + + + + the price increment + + + + + the price currency + + + + + the uncommon AIs + + + + + the display representation (raw text) + + + + + Parses strings of digits that represent a RSS Extended code. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + tries to parse a text representation to a specific result object + + + + + + + Represents a parsed result that encodes a geographic coordinate, with latitude, longitude and altitude. + + Sean Owen + + + latitude in degrees + + + + longitude in degrees + + + + altitude in meters. If not specified, in the geo URI, returns 0.0 + + + + query string associated with geo URI or null if none exists + + + + the geo URI + + + + a URI link to Google Maps which display the point on the Earth described + by this instance, and sets the zoom level in a way that roughly reflects the + altitude, if specified + + + + Parses a "geo:" URI result, which specifies a location on the surface of + the Earth as well as an optional altitude above the surface. See + + http://tools.ietf.org/html/draft-mayrhofer-geo-uri-00. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a product ISBN number. + + jbreiden@google.com (Jeff Breidenbach) + + + + the ISBN number + + + + Parses strings of digits that represent a ISBN. + + + jbreiden@google.com (Jeff Breidenbach) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + See ISBN-13 For Dummies + + The result. + + + + + Represents the type of data encoded by a barcode -- from plain text, to a + URI, to an e-mail address, etc. + + Sean Owen + + + + Represents a parsed result that encodes a product by an identifier of some kind. + + dswitkin@google.com (Daniel Switkin) + + + + Parses strings of digits that represent a UPC code. + + dswitkin@google.com (Daniel Switkin) + + +

Parses an "sms:" URI result, which specifies a number to SMS and optional + "via" number. See + the IETF draft on this.

+ +

This actually also parses URIs starting with "mms:", "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + + Represents a parsed result that encodes an SMS message, including recipients, subject and body text. + + Sean Owen + + + +

Parses an "smsto:" URI result, whose format is not standardized but appears to be like: + {@code smsto:number(:body)}.

+

This actually also parses URIs starting with "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+
+ Sean Owen +
+ + +

Parses an "smtp:" URI result, whose format is not standardized but appears to be like: + smtp[:subject[:body]]}.

+

See http://code.google.com/p/zxing/issues/detail?id=536

+
+ Sean Owen +
+ + + Represents a parsed result that encodes a telephone number. + + Sean Owen + + + + Parses a "tel:" URI result, which specifies a phone number. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + A simple result type encapsulating a string that has no further interpretation. + + Sean Owen + + + + A simple result type encapsulating a URI that has no further interpretation. + + Sean Owen + + + Transforms a string that represents a URI into something more proper, by adding or canonicalizing + the protocol. + + + + true if the URI contains suspicious patterns that may suggest it intends to + mislead the user about its true nature. At the moment this looks for the presence + of user/password syntax in the host/authority portion of a URI which may be used + in attempts to make the URI's host appear to be other than it is. Example: + http://yourbank.com@phisher.com This URI connects to phisher.com but may appear + to connect to yourbank.com at first glance. + + + + + Tries to parse results that are a URI of some kind. + + Sean Owen + + + Parses the "URLTO" result format, which is of the form "URLTO:[title]:[url]". + This seems to be used sometimes, but I am not able to find documentation + on its origin or official format? + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Parses contact information formatted according to the VCard (2.1) format. This is not a complete + implementation but should parse information as commonly encoded in 2D barcodes. + + Sean Owen + + + Formats name fields of the form "Public;John;Q.;Reverend;III" into a form like + "Reverend John Q. Public III". + + @param names name values to format, in place + + + + Partially implements the iCalendar format's "VEVENT" format for specifying a + calendar event. See RFC 2445. This supports SUMMARY, DTSTART and DTEND fields. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a Vehicle Identification Number (VIN). + + + + + Detects a result that is likely a vehicle identification number. + @author Sean Owen + + + + + Represents a parsed result that encodes wifi network information, like SSID and password. + + Vikram Aggarwal + + + + + A simple, fast array of bits, represented compactly by an array of ints internally. + + Sean Owen + + + + default constructor + + + + + initializing constructor + + desired size of the array + + + + Flips bit i. + + bit to set + + + + + Gets the next set. + + first bit to check + index of first bit that is set, starting from the given index, or size if none are set + at or beyond this given index + + + + see getNextSet(int) + + index to start looking for unset bit + index of next unset bit, or if none are unset until the end + + + Sets a block of 32 bits, starting at bit i. + + + first bit to set + + the new value of the next 32 bits. Note again that the least-significant bit + corresponds to bit i, the next-least-significant to i+1, and so on. + + + + + Sets a range of bits. + + start of range, inclusive. + end of range, exclusive + + + Clears all bits (sets to false). + + + Efficient method to check if a range of bits is set, or not set. + + + start of range, inclusive. + + end of range, exclusive + + if true, checks that bits in range are set, otherwise checks that they are not set + + true iff all bits are set or not set in range, according to value argument + if end is less than start or the range is not contained in the array + + + + Appends the bit. + + The bit. + + + + Appends the least-significant bits, from value, in order from most-significant to + least-significant. For example, appending 6 bits from 0x000001E will append the bits + 0, 1, 1, 1, 1, 0 in that order. + + containing bits to append + bits from value to append + + + + adds the array to the end + + + + + + XOR operation + + + + + + converts to bytes. + + first bit to start writing + array to write into. Bytes are written most-significant byte first. This is the opposite + of the internal representation, which is exposed by BitArray + position in array to start writing + how many bytes to write + + + Reverses all bits in the array. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Erstellt ein neues Objekt, das eine Kopie der aktuellen Instanz darstellt. + + + Ein neues Objekt, das eine Kopie dieser Instanz darstellt. + + + + + index accessor + + + + + + + size of the array, number of elements + + + + + size of the array in bytes + + + + + index accessor + + + + + + underlying array of ints. The first element holds the first 32 bits, and the least + significant bit is bit 0. + + + + +

Represents a 2D matrix of bits. In function arguments below, and throughout the common + module, x is the column position, and y is the row position. The ordering is always x, y. + The origin is at the top-left.

+

Internally the bits are represented in a 1-D array of 32-bit ints. However, each row begins + with a new int. This is done intentionally so that we can copy out a row into a BitArray very + efficiently.

+

The ordering of bits is row-major. Within each int, the least significant bits are used first, + meaning they represent lower x values. This is compatible with BitArray's implementation.

+
+ Sean Owen + dswitkin@google.com (Daniel Switkin) +
+ + + Creates an empty square . + + height and width + + + + Creates an empty square . + + bit matrix width + bit matrix height + + + + Interprets a 2D array of booleans as a , where "true" means an "on" bit. + + bits of the image, as a row-major 2D array. Elements are arrays representing rows + representation of image + + + +

Flips the given bit.

+
+ The horizontal component (i.e. which column) + The vertical component (i.e. which row) +
+ + + flip all of the bits, if shouldBeFlipped is true for the coordinates + + should return true, if the bit at a given coordinate should be flipped + + + + Exclusive-or (XOR): Flip the bit in this {@code BitMatrix} if the corresponding + mask bit is set. + + The mask. + + + Clears all bits (sets to false). + + +

Sets a square region of the bit matrix to true.

+ +
+ The horizontal position to begin at (inclusive) + + The vertical position to begin at (inclusive) + + The width of the region + + The height of the region + +
+ + A fast method to retrieve one row of data from the matrix as a BitArray. + + + The row to retrieve + + An optional caller-allocated BitArray, will be allocated if null or too small + + The resulting BitArray - this reference should always be used even when passing + your own row + + + + + Sets the row. + + row to set + {@link BitArray} to copy from + + + + Modifies this {@code BitMatrix} to represent the same but rotated 180 degrees + + + + + This is useful in detecting the enclosing rectangle of a 'pure' barcode. + + {left,top,width,height} enclosing rectangle of all 1 bits, or null if it is all white + + + + This is useful in detecting a corner of a 'pure' barcode. + + {x,y} coordinate of top-left-most 1 bit, or null if it is all white + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + The line separator. + + A that represents this instance. + + + + + Clones this instance. + + + + + + Converts this ByteMatrix to a black and white bitmap. + + A black and white bitmap converted from this ByteMatrix. + + + The width of the matrix + + + + The height of the matrix + + + + This method is for compatibility with older code. It's only logical to call if the matrix + is square, so I'm throwing if that's not the case. + + + row/column dimension of this matrix + + + + + The rowsize of the matrix + + + +

Gets the requested bit, where true means black.

+ +
+ The horizontal component (i.e. which column) + + The vertical component (i.e. which row) + + value of given bit in matrix + +
+ +

This provides an easy abstraction to read bits at a time from a sequence of bytes, where the + number of bits read is not often a multiple of 8.

+ +

This class is thread-safe but not reentrant. Unless the caller modifies the bytes array + it passed in, in which case all bets are off.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + bytes from which this will read bits. Bits will be read from the first byte first. + Bits are read within a byte from most-significant to least-significant bit. + + + + number of bits to read + + int representing the bits read. The bits will appear as the least-significant + bits of the int + + if numBits isn't in [1,32] or more than is available + + + number of bits that can be read successfully + + + + + index of next bit in current byte which would be read by the next call to {@link #readBits(int)}. + + + + + index of next byte in input byte array which would be read by the next call to {@link #readBits(int)}. + + + + Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1 + of ISO 18004. + + + Sean Owen + + + + Superclass of classes encapsulating types ECIs, according to "Extended Channel Interpretations" + 5.3 of ISO 18004. + + Sean Owen + + + ECI value + representing ECI of given value, or null if it is legal but unsupported + ArgumentException if ECI value is invalid + + + + the ECI value + + + + character set ECI value + representing ECI of given value, or null if it is legal but unsupported + + + character set ECI encoding name + representing ECI for character encoding, or null if it is legalbut unsupported + + + + Encapsulates the result of decoding a matrix of bits. This typically + applies to 2D barcode formats. For now it contains the raw bytes obtained, + as well as a String interpretation of those bytes, if applicable. + Sean Owen + + + + + initializing constructor + + + + + + + + + initializing constructor + + + + + + + + + + + initializing constructor + + + + + + + + + + initializing constructor + + + + + + + + + + + + raw bytes representing the result, or null if not applicable + + + + + how many bits of are valid; typically 8 times its length + + + + + text representation of the result + + + + + list of byte segments in the result, or null if not applicable + + + + + name of error correction level used, or null if not applicable + + + + + gets a value which describe if structure append data was found + + + + + number of errors corrected, or null if not applicable + + + + + gives the sequence number of the result if structured append was found + + + + + number of erasures corrected, or null if not applicable + + + + + gives the parity information if structured append was found + + + + + Miscellanseous data value for the various decoders + + The other. + + + + Defines an container for encoder options + + + + + Initializes a new instance of the class. + + + + + Gets the data container for all options + + + + + event is raised when a value is changed + + + + + Gets or sets a flag which cause a deeper look into the bitmap + + + true if [try harder]; otherwise, false. + + + + + Image is a pure monochrome image of a barcode. + + + true if monochrome image of a barcode; otherwise, false. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + The character set. + + + + + Image is known to be of one of a few possible formats. + Maps to a {@link java.util.List} of {@link BarcodeFormat}s. + + + The possible formats. + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + true if it should assume a Code 39 check digit; otherwise, false. + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). + + + true if it should assume GS1; otherwise, false. + + + + + Assume MSI codes employ a check digit. Maps to . + + + true if it should assume a MSI check digit; otherwise, false. + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Implementations of this class can, given locations of finder patterns for a QR code in an + image, sample the right points in the image to reconstruct the QR code, accounting for + perspective distortion. It is abstracted since it is relatively expensive and should be allowed + to take advantage of platform-specific optimized implementations, like Sun's Java Advanced + Imaging library, but which may not be available in other environments such as J2ME, and vice + versa. + + The implementation used can be controlled by calling {@link #setGridSampler(GridSampler)} + with an instance of a class which implements this interface. + + Sean Owen + + + Sets the implementation of used by the library. One global + instance is stored, which may sound problematic. But, the implementation provided + ought to be appropriate for the entire platform, and all uses of this library + in the whole lifetime of the JVM. For instance, an Android activity can swap in + an implementation that takes advantage of native platform libraries. + + The platform-specific object to install. + + + +

Samples an image for a square matrix of bits of the given dimension. This is used to extract + the black/white modules of a 2D barcode like a QR Code found in an image. Because this barcode + may be rotated or perspective-distorted, the caller supplies four points in the source image + that define known points in the barcode, so that the image may be sampled appropriately.

+

The last eight "from" parameters are four X/Y coordinate pairs of locations of points in + the image that define some significant points in the image to be sample. For example, + these may be the location of finder pattern in a QR Code.

+

The first eight "to" parameters are four X/Y coordinate pairs measured in the destination + , from the top left, where the known points in the image given by the "from" + parameters map to.

+

These 16 parameters define the transformation needed to sample the image.

+
+ image to sample + The dimension X. + The dimension Y. + The p1 preimage X. + The p1 preimage Y. + The p2 preimage X. + The p2 preimage Y. + The p3 preimage X. + The p3 preimage Y. + The p4 preimage X. + The p4 preimage Y. + The p1 image X. + The p1 image Y. + The p2 image X. + The p2 image Y. + The p3 image X. + The p3 image Y. + The p4 image X. + The p4 image Y. + + representing a grid of points sampled from the image within a region + defined by the "from" parameters + + ReaderException if image can't be sampled, for example, if the transformation defined +
+ + + + + + + + + + + +

Checks a set of points that have been transformed to sample points on an image against + the image's dimensions to see if the point are even within the image.

+ +

This method will actually "nudge" the endpoints back onto the image if they are found to be + barely (less than 1 pixel) off the image. This accounts for imperfect detection of finder + patterns in an image where the QR Code runs all the way to the image border.

+ +

For efficiency, the method will check points from either end of the line until one is found + to be within the image. Because the set of points are assumed to be linear, this is valid.

+ +
+ image into which the points should map + + actual points in x1,y1,...,xn,yn form + +
+ + the current implementation of + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + General math-related and numeric utility functions. + + + + + Ends up being a bit faster than {@link Math#round(float)}. This merely rounds its + argument to the nearest int, where x.5 rounds up to x+1. Semantics of this shortcut + differ slightly from {@link Math#round(float)} in that half rounds down for negative + values. -2.5 rounds to -3, not -2. For purposes here it makes no difference. + + real value to round + nearest int + + + + + + + + + + Euclidean distance between points A and B + + + + + + + + + + Euclidean distance between points A and B + + + + + values to sum + sum of values in array + + +

A somewhat generic detector that looks for a barcode-like rectangular region within an image. + It looks within a mostly white region of an image for a region of black and white, but mostly + black. It returns the four corners of the region, as best it can determine.

+ +
+ Sean Owen +
+ + + initializing constructor + + + + + +

Detects a rectangular region of black and white -- mostly black -- with a region of mostly + white, in an image.

+
+ [] describing the corners of the rectangular region. The first and + last points are opposed on the diagonal, as are the second and third. The first point will be + the topmost point and the last, the bottommost. The second point will be leftmost and the + third, the rightmost + +
+ + Attempts to locate a corner of the barcode by scanning up, down, left or right from a center + point which should be within the barcode. + + + center's x component (horizontal) + + same as deltaY but change in x per step instead + + minimum value of x + + maximum value of x + + center's y component (vertical) + + change in y per step. If scanning up this is negative; down, positive; + left or right, 0 + + minimum value of y to search through (meaningless when di == 0) + + maximum value of y + + maximum run of white pixels that can still be considered to be within + the barcode + + a encapsulating the corner that was found + + + + Computes the start and end of a region of pixels, either horizontally or vertically, that could + be part of a Data Matrix barcode. + + + if scanning horizontally, this is the row (the fixed vertical location) + where we are scanning. If scanning vertically it's the column, the fixed horizontal location + + largest run of white pixels that can still be considered part of the + barcode region + + minimum pixel location, horizontally or vertically, to consider + + maximum pixel location, horizontally or vertically, to consider + + if true, we're scanning left-right, instead of up-down + + int[] with start and end of found range, or null if no such range is found + (e.g. only white was found) + + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. By keeping track of the + last black points it encountered, it determines the corners of the barcode. + + David Olivier + + + + Creates a WhiteRectangleDetector instance + + The image. + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + Creates a WhiteRectangleDetector instance + + barcode image to find a rectangle in + initial size of search area around center + x position of search center + y position of search center + + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + + Initializes a new instance of the class. + + The image. + if image is too small + + + + Initializes a new instance of the class. + + The image. + Size of the init. + The x. + The y. + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. + + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + recenters the points of a constant distance towards the center + + bottom most point + left most point + right most point + top most point + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + Determines whether a segment contains a black point + + min value of the scanned coordinate + max value of the scanned coordinate + value of fixed coordinate + set to true if scan must be horizontal, false if vertical + + true if a black point has been found, else false. + + + + + Defines an container for encoder options + + + + + Initializes a new instance of the class. + + + + + Gets the data container for all options + + + + + Specifies the height of the barcode image + + + + + Specifies the width of the barcode image + + + + + Don't put the content string into the output image. + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + + + + + Specifies whether the data should be encoded to the GS1 standard; + FNC1 character is added in front of the data + + + + This Binarizer implementation uses the old ZXing global histogram approach. It is suitable + for low-end mobile devices which don't have enough CPU or memory to use a local thresholding + algorithm. However, because it picks a global black point, it cannot handle difficult shadows + and gradients. + + Faster mobile devices and all desktop applications should probably use HybridBinarizer instead. + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The source. + + + + Applies simple sharpening to the row data to improve performance of the 1D Readers. + + + + + + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + + A new concrete Binarizer implementation object. + + + + + Does not sharpen the data, as this call is intended to only be used by 2D Readers. + + + + This class implements a local thresholding algorithm, which while slower than the + GlobalHistogramBinarizer, is fairly efficient for what it does. It is designed for + high frequency images of barcodes with black data on white backgrounds. For this application, + it does a much better job than a global blackpoint with severe shadows and gradients. + However it tends to produce artifacts on lower frequency images and is therefore not + a good general purpose binarizer for uses outside ZXing. + + This class extends GlobalHistogramBinarizer, using the older histogram approach for 1D readers, + and the newer local approach for 2D readers. 1D decoding using a per-row histogram is already + inherently local, and only fails for horizontal gradients. We can revisit that problem later, + but for now it was not a win to use local blocks for 1D. + + This Binarizer is the default for the unit tests and the recommended class for library users. + dswitkin@google.com (Daniel Switkin) + + + + + initializing constructor + + + + + + creates a new instance + + + + + + + Calculates the final BitMatrix once for all requests. This could be called once from the + constructor instead, but there are some advantages to doing it lazily, such as making + profiling easier, and not doing heavy lifting when callers don't expect it. + + + + + For each 8x8 block in the image, calculate the average black point using a 5x5 grid + of the blocks around it. Also handles the corner cases (fractional blocks are computed based + on the last 8 pixels in the row/column which are also used in the previous block). + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + The black points. + The matrix. + + + + Applies a single threshold to an 8x8 block of pixels. + + The luminances. + The xoffset. + The yoffset. + The threshold. + The stride. + The matrix. + + + + Calculates a single black point for each 8x8 block of pixels and saves it away. + See the following thread for a discussion of this algorithm: + http://groups.google.com/group/zxing/browse_thread/thread/d06efa2c35a7ddc0 + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + + + + + gives the black matrix + + + +

This class implements a perspective transform in two dimensions. Given four source and four + destination points, it will compute the transformation implied between them. The code is based + directly upon section 3.4.2 of George Wolberg's "Digital Image Warping"; see pages 54-56.

+
+ Sean Owen +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Convenience method, not optimized for performance. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

This class contains utility methods for performing mathematical operations over + the Galois Fields. Operations use a given primitive polynomial in calculations.

+

Throughout this package, elements of the GF are represented as an {@code int} + for convenience and speed (but at the cost of memory). +

+
+ Sean Owen +
+ + + Create a representation of GF(size) using the given primitive polynomial. + + irreducible polynomial whose coefficients are represented by + * the bits of an int, where the least-significant bit represents the constant + * coefficient + the size of the field + the factor b in the generator polynomial can be 0- or 1-based + * (g(x) = (x+a^b)(x+a^(b+1))...(x+a^(b+2t-1))). + * In most cases it should be 1, but for QR code it is 0. + + + + Builds the monomial. + + The degree. + The coefficient. + the monomial representing coefficient * x^degree + + + + Implements both addition and subtraction -- they are the same in GF(size). + + sum/difference of a and b + + + + Exps the specified a. + + 2 to the power of a in GF(size) + + + + Logs the specified a. + + A. + base 2 log of a in GF(size) + + + + Inverses the specified a. + + multiplicative inverse of a + + + + Multiplies the specified a with b. + + A. + The b. + product of a and b in GF(size) + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Gets the size. + + + + + Gets the generator base. + + + + +

Represents a polynomial whose coefficients are elements of a GF. + Instances of this class are immutable.

+

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + the {@link GenericGF} instance representing the field to use + to perform computations + coefficients as ints representing elements of GF(size), arranged + from most significant (highest-power term) coefficient to least significant + if argument is null or empty, + or if leading coefficient is 0 and this is not a + constant polynomial (that is, it is not the monomial "0") + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + + + degree of this polynomial + + + + + Gets a value indicating whether this is zero. + + true iff this polynomial is the monomial "0" + + +

Implements Reed-Solomon decoding, as the name implies.

+ +

The algorithm will not be explained here, but the following references were helpful + in creating this implementation:

+ + + +

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+ +
+ Sean Owen + William Rucklidge + sanfordsquires +
+ + +

Decodes given set of received codewords, which include both data and error-correction + codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place, + in the input.

+
+ data and error-correction codewords + number of error-correction codewords available + false: decoding fails +
+ + + Implements Reed-Solomon encoding, as the name implies. + + Sean Owen + William Rucklidge + + + + Common string-related functions. + + Sean Owen + Alex Dupre + + + + SJIS + + + + + GB2312 + + + + + Guesses the encoding. + + bytes encoding a string, whose encoding should be guessed + decode hints if applicable + name of guessed encoding; at the moment will only guess one of: + {@link #SHIFT_JIS}, {@link #UTF8}, {@link #ISO88591}, or the platform + default encoding if none of these can possibly be correct + + + + This implementation can detect and decode Data Matrix codes in an image. + + bbrown@google.com (Brian Brown) + + + + + Locates and decodes a Data Matrix code in an image. + + + a String representing the content encoded by the Data Matrix code + + + + Locates and decodes a Data Matrix code in an image. + + + + a String representing the content encoded by the Data Matrix code + + + + does nothing here + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a Data Matrix code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + Guillaume Le Biller Added to zxing lib. + + + + encodes the content to a BitMatrix + + + + + + + + + + encodes the content to a BitMatrix + + + + + + + + + + + Encode the given symbol info to a bit matrix. + + The DataMatrix placement. + The symbol info to encode. + + + The bit matrix generated. + + + + Convert the ByteMatrix to BitMatrix. + + The input matrix. + The requested width of the image (in pixels) with the Datamatrix code + The requested height of the image (in pixels) with the Datamatrix code + The output matrix. + + + + bbrown@google.com (Brian Brown) + + + + + to parse + if dimension is < 8 or > 144 or not 0 mod 2 + + + + +

Creates the version object based on the dimension of the original bit matrix from + the datamatrix code.

+ +

See ISO 16022:2006 Table 7 - ECC 200 symbol attributes

+ + Original including alignment patterns + encapsulating the Data Matrix Code's "version" + if the dimensions of the mapping matrix are not valid + Data Matrix dimensions. +
+
+ + +

Reads the bits in the representing the mapping matrix (No alignment patterns) + in the correct order in order to reconstitute the codewords bytes contained within the + Data Matrix Code.

+ + bytes encoded within the Data Matrix Code + if the exact number of bytes expected is not read +
+
+ + +

Reads a bit of the mapping matrix accounting for boundary wrapping.

+ + Row to read in the mapping matrix + Column to read in the mapping matrix + Number of rows in the mapping matrix + Number of columns in the mapping matrix + value of the given bit in the mapping matrix +
+
+ + +

Reads the 8 bits of the standard Utah-shaped pattern.

+ +

See ISO 16022:2006, 5.8.1 Figure 6

+ + Current row in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Current column in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the utah shape +
+
+ + +

Reads the 8 bits of the special corner condition 1.

+ +

See ISO 16022:2006, Figure F.3

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 1 +
+
+ + +

Reads the 8 bits of the special corner condition 2.

+ +

See ISO 16022:2006, Figure F.4

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 2 +
+
+ + +

Reads the 8 bits of the special corner condition 3.

+ +

See ISO 16022:2006, Figure F.5

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 3 +
+
+ + +

Reads the 8 bits of the special corner condition 4.

+ +

See ISO 16022:2006, Figure F.6

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 4 +
+
+ + +

Extracts the data region from a that contains + alignment patterns.

+ + Original with alignment patterns + BitMatrix that has the alignment patterns removed +
+
+ + +

Encapsulates a block of data within a Data Matrix Code. Data Matrix Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ + bbrown@google.com (Brian Brown) +
+
+ + +

When Data Matrix Codes use multiple data blocks, they actually interleave the bytes of each of them. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ + bytes as read directly from the Data Matrix Code + version of the Data Matrix Code + DataBlocks containing original bytes, "de-interleaved" from representation in the + Data Matrix Code +
+
+ + +

Data Matrix Codes can encode text as bits in one of several modes, and can use multiple modes + in one Data Matrix Code. This class decodes the bits back into text.

+ +

See ISO 16022:2006, 5.2.1 - 5.2.9.2

+ + bbrown@google.com (Brian Brown) + Sean Owen +
+
+ + + See ISO 16022:2006, Annex C Table C.1 + The C40 Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, Annex C Table C.2 + The Text Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, 5.2.3 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.5 and Annex C, Table C.1 + + + + + See ISO 16022:2006, 5.2.6 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.7 + + + + + See ISO 16022:2006, 5.2.8 and Annex C Table C.3 + + + + + See ISO 16022:2006, 5.2.9 and Annex B, B.2 + + + + + See ISO 16022:2006, Annex B, B.2 + + + + +

The main class which implements Data Matrix Code decoding -- as opposed to locating and extracting + the Data Matrix Code from an image.

+ + bbrown@google.com (Brian Brown) +
+
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a Data Matrix Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+ + booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code + if the Data Matrix Code cannot be decoded +
+
+ + +

Decodes a Data Matrix Code represented as a . A 1 or "true" is taken + to mean a black module.

+
+ booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+ + data and error correction codewords + number of codewords that are data bytes +
+
+ + + The Version object encapsulates attributes about a particular + size Data Matrix Code. + + bbrown@google.com (Brian Brown) + + + + + returns the version numer + + + + + + returns the symbol size rows + + + + + + returns the symbols size columns + + + + + + retursn the data region size rows + + + + + + returns the data region size columns + + + + + + returns the total codewords count + + + + + +

Deduces version information from Data Matrix dimensions.

+ + Number of rows in modules + Number of columns in modules + Version for a Data Matrix Code of those dimensions + if dimensions do correspond to a valid Data Matrix size +
+
+ + + returns the version number as string + + + + + + See ISO 16022:2006 5.5.1 Table 7 + + + + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the Data Matrix code version's format.

+
+
+ + +

Encapsulates logic that can detect a Data Matrix Code in an image, even if the Data Matrix Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + +

Detects a Data Matrix Code in an image.

+
+ encapsulating results of detecting a Data Matrix Code or null +
+ + + Calculates the position of the white top right module using the output of the rectangle detector + for a rectangular matrix + + + + + Calculates the position of the white top right module using the output of the rectangle detector + for a square matrix + + + + + Increments the Integer associated with a key by one. + + + + + Counts the number of black/white transitions between two points, using something like Bresenham's algorithm. + + + + + Simply encapsulates two points and a number of transitions between them. + + + + + Orders ResultPointsAndTransitions by number of transitions, ascending. + + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + The class holds the available options for the DatamatrixWriter + + + + + Initializes a new instance of the class. + + + + + Specifies the matrix shape for Data Matrix + + + + + Specifies a minimum barcode size + + + + + Specifies a maximum barcode size + + + + + Specifies the default encodation + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Gets the data container for all options + + + + + Specifies the height of the barcode image + + + + + Specifies the width of the barcode image + + + + + Don't put the content string into the output image. + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + + + + + Symbol info table for DataMatrix. + + + + Overrides the symbol info set used by this class. Used for testing purposes. + + @param override the symbol info set to use + + + + Symbol Character Placement Program. Adapted from Annex M.1 in ISO/IEC 16022:2000(E). + + + + + Main constructor + + the codewords to place + the number of columns + the number of rows + + + + Places the 8 bits of a utah-shaped symbol character in ECC200. + + The row. + The col. + character position + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Enumeration for encodation types + + + + + Error Correction Code for ECC200. + + + + + Lookup table which factors to use for which number of error correction codewords. + See FACTORS. + + + + + Precomputed polynomial factors for ECC 200. + + + + + Creates the ECC200 error correction for an encoded message. + + The codewords. + information about the symbol to be encoded + the codewords with interleaved error correction. + + + + DataMatrix ECC 200 data encoder following the algorithm described in ISO/IEC 16022:200(E) in + annex S. + + + + + Padding character + + + + + mode latch to C40 encodation mode + + + + + mode latch to Base 256 encodation mode + + + + + FNC1 Codeword + + + + + Structured Append Codeword + + + + + Reader Programming + + + + + Upper Shift + + + + + 05 Macro + + + + + 06 Macro + + + + + mode latch to ANSI X.12 encodation mode + + + + + mode latch to Text encodation mode + + + + + mode latch to EDIFACT encodation mode + + + + + ECI character (Extended Channel Interpretation) + + + + + Unlatch from C40 encodation + + + + + Unlatch from X12 encodation + + + + + 05 Macro header + + + + + 06 Macro header + + + + + Macro trailer + + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + the encoded message (the char values range from 0 to 255) + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + requested shape. May be {@code SymbolShapeHint.FORCE_NONE},{@code SymbolShapeHint.FORCE_SQUARE} or {@code SymbolShapeHint.FORCE_RECTANGLE}. + the minimum symbol size constraint or null for no constraint + the maximum symbol size constraint or null for no constraint + encoding mode to start with + the encoded message (the char values range from 0 to 255) + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + Enumeration for DataMatrix symbol shape hint. It can be used to force square or rectangular + symbols. + + + + + Encapsulates a type of hint that a caller may pass to a barcode reader to help it + more quickly or accurately decode it. It is up to implementations to decide what, + if anything, to do with the information that is supplied. + + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Unspecified, application-specific hint. Maps to an unspecified . + + + + + Image is a pure monochrome image of a barcode. Doesn't matter what it maps to; + use = true. + + + + + Image is known to be of one of a few possible formats. + Maps to a of s. + + + + + Spend more time to try to find a barcode; optimize for accuracy, not speed. + Doesn't matter what it maps to; use = true. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + + + The caller needs to be notified via callback when a possible + is found. Maps to a . + + + + + Assume MSI codes employ a check digit. Maps to . + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + Maps to . + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + 1D readers supporting rotation with TRY_HARDER enabled. + But BarcodeReader class can do auto-rotating for 1D and 2D codes. + Enabling that option prevents 1D readers doing double rotation. + BarcodeReader enables that option automatically if "global" auto-rotation is enabled. + Maps to . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to; + use . + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Simply encapsulates a width and height. + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + + + + + + the width + + + + + the height + + + + + These are a set of hints that you may pass to Writers to specify their behavior. + + dswitkin@google.com (Daniel Switkin) + + + + Specifies the width of the barcode image + type: + + + + + Specifies the height of the barcode image + type: + + + + + Don't put the content string into the output image. + type: + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + + For Aztec it is of type , representing the minimal percentage of error correction words. + In all cases, it can also be a representation of the desired value as well. + Note: an Aztec symbol should have a minimum of 25% EC words. + For PDF417 it is of type or (between 0 and 8), + + + + + Specifies what character encoding to use where applicable. + type: + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + type: , or representation of the integer value + + + + + Specifies the aspect ratio to use. Default is 4. + type: , or 1-4. + + + + + Specifies whether to use compact mode for PDF417 + type: , or "true" or "false" + value + + + + + Specifies what compaction mode to use for PDF417. + type: or value of one of its + enum values + + + + + Specifies the minimum and maximum number of rows and columns for PDF417. + type: + + + + + Don't append ECI segment. + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + type: + + + + + Specifies the matrix shape for Data Matrix (type ) + + + + + Specifies a minimum barcode size (type ). Only applicable to Data Matrix now. + + + + + Specifies a maximum barcode size (type ). Only applicable to Data Matrix now. + + + + + if true, don't switch to codeset C for numbers + + + + + Specifies the default encodation for Data Matrix (type ) + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Specifies the required number of layers for an Aztec code. + A negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + type: , or representation of the integer value + + + + + Specifies the exact version of QR code to be encoded. + (Type , or representation of the integer value). + + + + + Specifies whether the data should be encoded to the GS1 standard + type: , or "true" or "false" + value + + + + + Thrown when a barcode was successfully detected, but some aspect of + the content did not conform to the barcode's format rules. This could have + been due to a mis-detection. + Sean Owen + + + + + The general exception class throw when something goes wrong during decoding of a barcode. + This includes, but is not limited to, failing checksums / error correction algorithms, being + unable to locate finder timing patterns, and so on. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class. + + The inner exception. + + + + Initializes a new instance of the class. + + The inner exception. + + + + + + + + + + + + + + + + + + + + + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + implements an Intelligent Mail barcode + Rishabh Hatgadkar + + + + + Encapsulates functionality and implementation that is common to all families + of one-dimensional barcodes. + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + + + + + + + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + Note that we don't try rotation without the try harder flag, even if rotation was supported. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + We're going to examine rows from the middle outward, searching alternately above and below the + middle, and farther out each time. rowStep is the number of rows between each successive + attempt above and below the middle. So we'd scan row middle, then middle - rowStep, then + middle + rowStep, then middle - (2 * rowStep), etc. + rowStep is bigger as the image is taller, but is always at least 1. We've somewhat arbitrarily + decided that moving up and down by about 1/16 of the image is pretty good; we try more of the + image if "trying harder". + + The image to decode + Any hints that were requested + The contents of the decoded barcode + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the pattern in reverse. + + The row. + The start. + The counters. + + + + + Determines how closely a set of observed counts of runs of black/white values matches a given + target pattern. This is reported as the ratio of the total variance from the expected pattern + proportions across all pattern elements, to the length of the pattern. + + observed counters + expected pattern + The most any counter can differ before we give up + ratio of total variance between counters and pattern compared to total pattern size, + where the ratio has been multiplied by 256. So, 0 means no variance (perfect match); 256 means + the total variance between counters and patterns equals the pattern length, higher values mean + even more variance + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + A wrapper implementation of {@link LuminanceSource} which inverts the luminances it returns -- black becomes + white and vice versa, and each value becomes (255-value). + + Sean Owen + + + + Initializes a new instance of the class. + + The @delegate. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Inverts this instance. + + original delegate {@link LuminanceSource} since invert undoes itself + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff; + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + + + Whether this subclass supports cropping. + + + + + Whether this subclass supports counter-clockwise rotation. + + + + A base class for specific barcode writers with specific formats of barcode images. + The result is a Svg Image object + + + + + Initializes a new instance of the class. + + + + + Encodes the specified contents and returns a BitMatrix array. + That array has to be rendered manually or with a IBarcodeRenderer. + + The contents. + + + + + Encodes the specified contents and returns a rendered instance of the barcode. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The matrix. + + + + + Gets or sets the barcode format. + The value is only suitable if the MultiFormatWriter is used. + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Gets or sets the renderer which should be used to render the encoded BitMatrix. + + + + + mike32767 + Manuel Kasten + + + + + to parse + + + + +

MaxiCodes can encode text or structured information as bits in one of several modes, + with multiple character sets in one code. This class decodes the bits back into text.

+ + mike32767 + Manuel Kasten +
+
+ + +

The main class which implements MaxiCode decoding -- as opposed to locating and extracting + the MaxiCode from an image.

+ + Manuel Kasten +
+
+ + + This implementation can detect and decode a MaxiCode in an image. + + + + + Locates and decodes a MaxiCode in an image. + + a String representing the content encoded by the MaxiCode + if a MaxiCode cannot be decoded + + + + + Locates and decodes a MaxiCode within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + + MultiFormatReader is a convenience class and the main entry point into the library for most uses. + By default it attempts to decode all barcode formats that the library supports. Optionally, you + can provide a hints object to request different behavior, for example only decoding QR codes. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + This version of decode honors the intent of Reader.decode(BinaryBitmap) in that it + passes null as a hint to the decoders. However, that makes it inefficient to call repeatedly. + Use setHints() followed by decodeWithState() for continuous scan applications. + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the hints provided. Does not honor existing state. + + + The pixel data to decode + + The hints to use, clearing the previous state. + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the state set up by calling setHints() previously. Continuous scan + clients will get a large speed increase by using this instead of decode(). + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + + resets all specific readers + + + + This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls + to decodeWithState(image) can reuse the same set of readers without reallocating memory. This + is important for performance in continuous scan clients. + + + + + This is a factory class which finds the appropriate Writer subclass for the BarcodeFormat + requested and encodes the barcode with the supplied contents. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + encode the given data + + + + + + + + + + encode the given data + + + + + + + + + + + Gets the collection of supported writers. + + + + + This class attempts to decode a barcode from an image, not by scanning the whole image, + but by scanning subsets of the image. This is important when there may be multiple barcodes in + an image, and detecting a barcode may find parts of multiple barcode and fail to decode + (e.g. QR Codes). Instead this scans the four quadrants of the image -- and also the center + 'quadrant' to cover the case where a barcode is found in the center. + + + + + + Initializes a new instance of the class. + + The @delegate. + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Attempts to locate multiple barcodes in an image by repeatedly decoding portion of the image. + After one barcode is found, the areas left, above, right and below the barcode's + {@link com.google.zxing.ResultPoint}s are scanned, recursively.

+

A caller may want to also employ {@link ByQuadrantReader} when attempting to find multiple + 2D barcodes, like QR Codes, in an image, where the presence of multiple barcodes might prevent + detecting any one of them.

+

That is, instead of passing a {@link Reader} a caller might pass + new ByQuadrantReader(reader).

+ Sean Owen +
+
+ + + Implementation of this interface attempt to read several barcodes from one image. + Sean Owen + + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Initializes a new instance of the class. + + The @delegate. + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Encapsulates logic that can detect one or more QR Codes in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+ + Sean Owen + Hannes Erven +
+
+ + +

Encapsulates logic that can detect a QR Code in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + +

Detects a QR Code in an image.

+
+ + encapsulating results of detecting a QR Code + +
+ + +

Detects a QR Code in an image.

+
+ optional hints to detector + + encapsulating results of detecting a QR Code + +
+ + + Processes the finder pattern info. + + The info. + + + +

Computes the dimension (number of modules on a size) of the QR Code based on the position + of the finder patterns and estimated module size.

+
+
+ + +

Computes an average estimated module size based on estimated derived from the positions + of the three finder patterns.

+
+ detected top-left finder pattern center + detected top-right finder pattern center + detected bottom-left finder pattern center + estimated module size +
+ +

Estimates module size based on two finder patterns -- it uses + {@link #sizeOfBlackWhiteBlackRunBothWays(int, int, int, int)} to figure the + width of each, measuring along the axis between their centers.

+
+
+ + See {@link #sizeOfBlackWhiteBlackRun(int, int, int, int)}; computes the total width of + a finder pattern by looking for a black-white-black run from the center in the direction + of another point (another finder pattern center), and in the opposite direction too. + + + +

This method traces a line from a point in the image, in the direction towards another point. + It begins in a black region, and keeps going until it finds white, then black, then white again. + It reports the distance from the start to this point.

+ +

This is used when figuring out how wide a finder pattern is, when the finder pattern + may be skewed or rotated.

+
+
+ + +

Attempts to locate an alignment pattern in a limited region of the image, which is + guessed to contain it. This method uses {@link AlignmentPattern}.

+
+ estimated module size so far + x coordinate of center of area probably containing alignment pattern + y coordinate of above + number of pixels in all directions to search from the center + + if found, or null otherwise + +
+ + + Gets the image. + + + + + Gets the result point callback. + + + + + Initializes a new instance of the class. + + The image. + + + + Detects the multi. + + The hints. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +

In contrast to , this class will return an array of all possible + QR code locations in the image.

+ +

Use the TRY_HARDER hint to ask for a more thorough detection.

+ + Sean Owen + Hannes Erven +
+
+ + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+
+ Sean Owen +
+ + + 1 pixel/module times 3 modules/center + + + + + support up to version 20 for mobile clients + + + + +

Creates a finder that will search the image for three finder patterns.

+
+ image to search +
+ + + Initializes a new instance of the class. + + The image. + The result point callback. + + + Given a count of black/white/black/white/black pixels just seen and an end position, + figures the location of the center of this run. + + + + count of black/white/black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/3/1/1 ratios + used by finder patterns to be considered a match + + + + + + count of black/white/black/white/black pixels just read + true if the proportions of the counts is close enough to the 1/1/3/1/1 ratios + by finder patterns to be considered a match + + + + After a vertical and horizontal scan finds a potential finder pattern, this method + "cross-cross-cross-checks" by scanning down diagonally through the center of the possible + finder pattern to see if the same proportion is detected. + @param maxCount maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + @param originalStateCountTotal The original state count total. + + row where a finder pattern was detected + center of the section that appears to cross a finder pattern + true if proportions are withing expected limits + + + +

After a horizontal scan finds a potential finder pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + finder pattern to see if the same proportion is detected.

+
+ row where a finder pattern was detected + center of the section that appears to cross a finder pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of finder pattern, or null if not found + +
+ +

Like {@link #crossCheckVertical(int, int, int, int)}, and in fact is basically identical, + except it reads horizontally instead of vertically. This is used to cross-cross + check a vertical cross check and locate the real center of the alignment pattern.

+
+
+ + + @see #handlePossibleCenter(int[], int, int) + + reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + ignored + true if a finder pattern candidate was found this time + + + +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will, ah, cross-cross-check + with another horizontal scan. This is needed primarily to locate the real horizontal + center of the pattern in cases of extreme skew. + And then we cross-cross-cross check with another diagonal scan.

+ If that succeeds the finder pattern location is added to a list that tracks + the number of times each location has been nearly-matched as a finder pattern. + Each additional find is more evidence that the location is in fact a finder + pattern center +
+ reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + + true if a finder pattern candidate was found this time + +
+ + number of rows we could safely skip during scanning, based on the first + two finder patterns that have been located. In some cases their position will + allow us to infer that the third pattern must lie below a certain point farther + down in the image. + + + + true iff we have found at least 3 finder patterns that have been detected + at least {@link #CENTER_QUORUM} times each, and, the estimated module size of the + candidates is "pretty similar" + + + + the 3 best {@link FinderPattern}s from our list of candidates. The "best" are + those that have been detected at least {@link #CENTER_QUORUM} times, and whose module + size differs from the average among those patterns the least + + + + + Gets the image. + + + + + Gets the possible centers. + + + + + Orders by furthest from average + + + +

Orders by {@link FinderPattern#getCount()}, descending.

+
+ + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF pixels/module in their + estimated modules sizes. + + + + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF_PERCENT percent in their + estimated modules sizes. + + + + +

Creates a finder that will search the image for three finder patterns.

+ + image to search +
+
+ + + + the 3 best s from our list of candidates. The "best" are + those that have been detected at least CENTER_QUORUM times, and whose module + size differs from the average among those patterns the least + + + + + A comparator that orders FinderPatterns by their estimated module size. + + + + + This implementation can detect and decode multiple QR Codes in an image. + + + + + This implementation can detect and decode QR Codes in an image. + Sean Owen + + + + + Gets the decoder. + + + + + + Locates and decodes a QR code in an image. + + a String representing the content encoded by the QR code + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + +

Decodes Codabar barcodes.

+ + Bas Vijfwinkel +
+
+ + These represent the encodings of characters, as patterns of wide and narrow bars. The 7 least-significant bits of + each int correspond to the pattern of wide and narrow, with 1s representing "wide" and 0s representing narrow. + + + + Records the size of all runs of white and black pixels, starting with white. + This is just like recordPattern, except it records all the counters, and + uses our builtin "counters" member for storage. + + row to count from + + + + This class renders CodaBar as []. + + dsbnatut@gmail.com (Kazuki Nishiura) + + + +

Encapsulates functionality and implementation that is common to one-dimensional barcodes.

+ dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + a byte array of horizontal pixels (0 = white, 1 = black) + + + + Appends the given pattern to the target array starting at pos. + + encode black/white pattern into this array + position to start encoding at in target + lengths of black/white runs to encode + starting color - false for white, true for black + the number of elements added to target. + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + + barcode contents to encode + a bool[] of horizontal pixels (false = white, true = black) + + + + Calculates the checksum digit modulo10. + + The contents. + + + + + Gets the default margin. + + + + + The class holds the available options for the QrCodeWriter + + + + + Initializes a new instance of the class. + + + + + if true, don't switch to codeset C for numbers + + + + + Gets the data container for all options + + + + + Specifies the height of the barcode image + + + + + Specifies the width of the barcode image + + + + + Don't put the content string into the output image. + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + + + + +

Decodes Code 128 barcodes.

+ + Sean Owen +
+
+ + + This object renders a CODE128 code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + +

Decodes Code 39 barcodes. Supports "Full ASCII Code 39" if USE_CODE_39_EXTENDED_MODE is set.

+ Sean Owen + @see Code93Reader +
+
+ + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. It will not decoded "extended Code 39" sequences. + + + + + Creates a reader that can be configured to check the last character as a check digit. + It will not decoded "extended Code 39" sequences. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + + Creates a reader that can be configured to check the last character as a check digit, + or optionally attempt to decode "extended Code 39" sequences that are used to encode + the full ASCII character set. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + if true, will attempt to decode extended Code 39 sequences in the text. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + Returns a string with all possible characters + + + + + This object renders a CODE39 code as a . + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Decodes Code 93 barcodes.

+ Sean Owen + +
+
+ + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a CODE93 code as a BitMatrix + + + + + + output to append to + start position + pattern to append + unused + 9 + + + +

Implements decoding of the EAN-13 format.

+ + dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Start/end guard pattern. + + + + + Pattern marking the middle of a UPC/EAN pattern, separating the two halves. + + + + + end guard pattern. + + + + + "Odd", or "L" patterns used to encode UPC/EAN digits. + + + + + As above but also including the "even", or "G" patterns used to encode UPC/EAN digits. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + +

Like , but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ row index into the image + encoding of the row of the barcode image + start/end column where the opening start pattern was found + optional hints that influence decoding + encapsulating the result of decoding a barcode in the row +
+ + + + string of digits to check + see + + + + Computes the UPC/EAN checksum on a string of digits, and reports + whether the checksum is correct or not. + + string of digits to check + true iff string of digits passes the UPC/EAN checksum algorithm + + + + Decodes the end. + + The row. + The end start. + + + + + + row of black/white values to search + position to start search + if true, indicates that the pattern specifies white/black/white/... + pixel counts, otherwise, it is interpreted as black/white/black/... + pattern of counts of number of black and white pixels that are being + searched for as a pattern + array of counters, as long as pattern, to re-use + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a single UPC/EAN-encoded digit. + + row of black/white values to decode + the counts of runs of observed black/white/black/... values + horizontal offset to start decoding from + the set of patterns to use to decode -- sometimes different encodings + for the digits 0-9 are used, and this indicates the encodings for 0 to 9 that should + be used + horizontal offset of first pixel beyond the decoded digit + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + Get the format of this decoder. + + The 1D format. + + + + Initializes a new instance of the class. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + Based on pattern of odd-even ('L' and 'G') patterns used to encoded the explicitly-encoded + digits in a barcode, determines the implicitly encoded first digit and adds it to the + result string. + + string to insert decoded first digit into + int whose bits indicates the pattern of odd/even L/G patterns used to + encode digits + -1 if first digit cannot be determined + + + + Get the format of this decoder. + The 1D format. + + + + + This object renders an EAN13 code as a . + aripollak@gmail.com (Ari Pollak) + + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ aripollak@gmail.com (Ari Pollak) + dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Gets the default margin. + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Implements decoding of the EAN-8 format.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Get the format of this decoder. + The 1D format. + + + + + This object renders an EAN8 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + + + a byte array of horizontal pixels (false = white, true = black) + + + + + Records EAN prefix to GS1 Member Organization, where the member organization + correlates strongly with a country. This is an imperfect means of identifying + a country of origin by EAN-13 barcode value. See + + http://en.wikipedia.org/wiki/List_of_GS1_country_codes. + + Sean Owen + + + + +

Implements decoding of the ITF format, or Interleaved Two of Five.

+ +

This Reader will scan ITF barcodes of certain lengths only. + At the moment it reads length 6, 8, 10, 12, 14, 16, 18, 20, 24, 44 and 48 as these have appeared "in the wild". Not all + lengths are scanned, especially shorter ones, to avoid false positives. This in turn is due to a lack of + required checksum function.

+ +

The checksum is optional and is not applied by this Reader. The consumer of the decoded + value will have to apply a checksum if required.

+ +

http://en.wikipedia.org/wiki/Interleaved_2_of_5 + is a great reference for Interleaved 2 of 5 information.

+ + kevin.osullivan@sita.aero, SITA Lab. +
+
+ + + Valid ITF lengths. Anything longer than the largest value is also allowed. + + + + + Start/end guard pattern. + + Note: The end pattern is reversed because the row is reversed before + searching for the END_PATTERN + + + + + Patterns of Wide / Narrow lines to indicate each digit + + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + + row of black/white values to search + offset of start pattern + The payload end. + to append decoded chars to + + false, if decoding could not complete successfully + + + + + Identify where the start of the middle / payload section starts. + + row of black/white values to search + Array, containing index of start of 'start block' and end of 'start block' + + + + The start & end patterns must be pre/post fixed by a quiet zone. This + zone must be at least 10 times the width of a narrow line. Scan back until + we either get to the start of the barcode or match the necessary number of + quiet zone pixels. + + Note: Its assumed the row is reversed when using this method to find + quiet zone after the end pattern. + + ref: http://www.barcode-1.net/i25code.html + + bit array representing the scanned barcode. + index into row of the start or end pattern. + false, if the quiet zone cannot be found + + + + Skip all whitespace until we get to the first black line. + + row of black/white values to search + index of the first black line or -1 if no black lines are found in the row. + + + + Identify where the end of the middle / payload section ends. + + row of black/white values to search + Array, containing index of start of 'end block' and end of 'end + block' or null, if nothing found + + + + + row of black/white values to search + position to start search + pattern of counts of number of black and white pixels that are being searched for as a pattern + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a sequence of ITF black/white lines into single + digit. + + the counts of runs of observed black/white/black/... values + The decoded digit + + false, if digit cannot be decoded + + + + + This object renders a ITF code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code bool[]} of horizontal pixels (false = white, true = black) + + + + + + + Decodes MSI barcodes. + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. + + + + + Creates a reader that can be configured to check the last character as a check digit, + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a MSI code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

A reader that can read all available UPC/EAN formats. If a caller wants to try to + read all such formats, it is most efficient to use this implementation rather than invoke + individual readers.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + This object renders a Plessey code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + Superclass of implementations that read barcodes in the RSS family of formats. + + + + + Initializes a new instance of the class. + + + + + Gets the decode finder counters. + + + + + + Gets the data character counters. + + + + + + Gets the odd rounding errors. + + + + + + Gets the even rounding errors. + + + + + + Gets the odd counts. + + + + + + Gets the even counts. + + + + + + Parses the finder value. + + The counters. + The finder patterns. + The value. + + + + + Counts the specified array. + + The array. + + + + + Increments the specified array. + + The array. + The errors. + + + + Decrements the specified array. + + The array. + The errors. + + + + Determines whether [is finder pattern] [the specified counters]. + + The counters. + + true if [is finder pattern] [the specified counters]; otherwise, false. + + + + + Encapsulates a since character value in an RSS barcode, including its checksum information. + + + + + Initializes a new instance of the class. + + The value. + The checksum portion. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Gets the value. + + + + + Gets the checksum portion. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Gets the information. + + + + + + Parses the information. + + + + + + Creates the decoder. + + The information. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + One row of an RSS Expanded Stacked symbol, consisting of 1+ expanded pairs. + + + + + Two rows are equal if they contain the same pairs in the same order. + + + + + Did this row of the image have to be reversed (mirrored) to recognize the pairs? + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Encapsulates an RSS barcode finder pattern, including its start/end position and row. + + + + + Initializes a new instance of the class. + + The value. + The start end. + The start. + The end. + The row number. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Gets the value. + + + + + Gets the start end. + + + + + Gets the result points. + + + + + Decodes RSS-14, including truncated and stacked variants. See ISO/IEC 24724:2006. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Adapted from listings in ISO/IEC 24724 Appendix B and Appendix G. + + + + + Gets the RS svalue. + + The widths. + Width of the max. + if set to true [no narrow]. + + + + +

Implements decoding of the UPC-A format.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen +
+
+ + +

Like decodeRow(int, BitArray, java.util.Map), but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ + + + + +
+ + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Decodes the specified image. + + The image. + The hints. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + Get the format of this decoder. + The 1D format. + + + + + This object renders a UPC-A code as a . + qwandor@google.com (Andrew Walbran) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + @see UPCEANExtension5Support + + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + + + @see UPCEANExtension2Support + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + one {@link ResultMetadataType} to appropriate value, or {@code null} if not known + + + +

Implements decoding of the UPC-E format.

+

Thisis a great reference for + UPC-E information.

+ Sean Owen +
+
+ + + The pattern that marks the middle, and end, of a UPC-E pattern. + There is no "second half" to a UPC-E barcode. + + + + + See L_AND_G_PATTERNS these values similarly represent patterns of + even-odd parity encodings of digits that imply both the number system (0 or 1) + used, and the check digit. + + + + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Decodes the end. + + The row. + The end start. + + + + + see checkStandardUPCEANChecksum(String) + + + + + + + Determines the num sys and check digit. + + The result string. + The lg pattern found. + + + + + Expands a UPC-E value back into its full, equivalent UPC-A code value. + + UPC-E code as string of digits + equivalent UPC-A code as string of digits + + + + + Get the format of this decoder. + The 1D format. + + + + + This object renders an UPC-E code as a {@link BitMatrix}. + @author 0979097955s@gmail.com (RX) + + + + + Metadata about a PDF417 Barcode + + Guenther Grau + + + + A Barcode Value for the PDF417 barcode. + The scanner will iterate through the bitmatrix, + and given the different methods or iterations + will increment a given barcode value's confidence. + + When done, this will return the values of highest confidence. + + Guenther Grau + + + + Incremenets the Confidence for a given value. (Adds an occurance of a value) + + + Value. + + + + Determines the maximum occurrence of a set value and returns all values which were set with this occurrence. + + an array of int, containing the values with the highest occurrence, or null, if no value was set. + + + + Returns the confience value for a given barcode value + + Barcode value. + + + + A Bounding Box helper class + + Guenther Grau + + + + Initializes a new instance of the class. + returns null if the corner points don't match up correctly + + The image. + The top left. + The bottom left. + The top right. + The bottom right. + + + + + Creates the specified box. + + The box. + + + + + Initializes a new instance of the class. + Will throw an exception if the corner points don't match up correctly + + Image. + Top left. + Top right. + Bottom left. + Bottom right. + + + + Merge two Bounding Boxes, getting the left corners of left, and the right corners of right + (Images should be the same) + + Left. + Right. + + + + Adds the missing rows. + + The missing rows. + Missing start rows. + Missing end rows. + If set to true is left. + + + + Calculates the minimum and maximum X & Y values based on the corner points. + + + + + If we adjust the width, set a new right corner coordinate and recalculate + + Bottom right. + + + + A Codeword in the PDF417 barcode + + Guenther Grau + + + + Default value for the RowNumber (-1 being an invalid real number) + + + + + Initializes a new instance of the class. + + Start x. + End x. + Bucket. + Value. + + + + Determines whether this instance is valid row number the specified rowNumber. + + true if this instance is valid row number the specified rowNumber; otherwise, false. + Row number. + + + + Sets the row number as the row's indicator column. + + + + + Returns a that represents the current . + + A that represents the current . + + + + Gets the width. + + The width. + + + + Gets a value indicating whether this instance has valid row number. + + true if this instance has valid row number; otherwise, false. + + + +

This class contains the methods for decoding the PDF417 codewords.

+ + SITA Lab (kevin.osullivan@sita.aero) +
+
+ + + Table containing values for the exponent of 900. + This is used in the numeric compaction decode algorithm. + + + + + Text Compaction mode (see 5.4.1.5) permits all printable ASCII characters to be + encoded, i.e. values 32 - 126 inclusive in accordance with ISO/IEC 646 (IRV), as + well as selected control characters. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + The Text Compaction mode includes all the printable ASCII characters + (i.e. values from 32 to 126) and three ASCII control characters: HT or tab + (ASCII value 9), LF or line feed (ASCII value 10), and CR or carriage + return (ASCII value 13). The Text Compaction mode also includes various latch + and shift characters which are used exclusively within the mode. The Text + Compaction mode encodes up to 2 characters per codeword. The compaction rules + for converting data into PDF417 codewords are defined in 5.4.2.2. The sub-mode + switches are defined in 5.4.2.3. + + The text compaction data. + The byte compaction data if there + was a mode shift. + The size of the text compaction and byte compaction data. + The decoded data is appended to the result. + + + + + Byte Compaction mode (see 5.4.3) permits all 256 possible 8-bit byte values to be encoded. + This includes all ASCII characters value 0 to 127 inclusive and provides for international + character set support. + + The byte compaction mode i.e. 901 or 924 + The array of codewords (data + error) + Currently active character encoding + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Numeric Compaction mode (see 5.4.4) permits efficient encoding of numeric data strings. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Convert a list of Numeric Compacted codewords from Base 900 to Base 10. + EXAMPLE + Encode the fifteen digit numeric string 000213298174000 + Prefix the numeric string with a 1 and set the initial value of + t = 1 000 213 298 174 000 + Calculate codeword 0 + d0 = 1 000 213 298 174 000 mod 900 = 200 + + t = 1 000 213 298 174 000 div 900 = 1 111 348 109 082 + Calculate codeword 1 + d1 = 1 111 348 109 082 mod 900 = 282 + + t = 1 111 348 109 082 div 900 = 1 234 831 232 + Calculate codeword 2 + d2 = 1 234 831 232 mod 900 = 632 + + t = 1 234 831 232 div 900 = 1 372 034 + Calculate codeword 3 + d3 = 1 372 034 mod 900 = 434 + + t = 1 372 034 div 900 = 1 524 + Calculate codeword 4 + d4 = 1 524 mod 900 = 624 + + t = 1 524 div 900 = 1 + Calculate codeword 5 + d5 = 1 mod 900 = 1 + t = 1 div 900 = 0 + Codeword sequence is: 1, 624, 434, 632, 282, 200 + + Decode the above codewords involves + 1 x 900 power of 5 + 624 x 900 power of 4 + 434 x 900 power of 3 + + 632 x 900 power of 2 + 282 x 900 power of 1 + 200 x 900 power of 0 = 1000213298174000 + + Remove leading 1 => Result is 000213298174000 + The array of codewords + The number of codewords + The decoded string representing the Numeric data. + + + + + + + Guenther Grau + + + + Returns the DetectionResult Columns. This does a fair bit of calculation, so call it sparingly. + + The detection result columns. + + + + Adjusts the indicator column row numbers. + + Detection result column. + + + + return number of codewords which don't have a valid row number. Note that the count is not accurate as codewords . + will be counted several times. It just serves as an indicator to see when we can stop adjusting row numbers + + The row numbers. + + + + Adjusts the row numbers by row. + + The row numbers by row. + + + + Adjusts the row numbers from both Row Indicators + + zero + + + + Adjusts the row numbers from Right Row Indicator. + + The unadjusted row count. + + + + Adjusts the row numbers from Left Row Indicator. + + Unadjusted row Count. + + + + Adjusts the row number if valid. + + The invalid rows + Row indicator row number. + Invalid row counts. + Codeword. + + + + Adjusts the row numbers. + + Barcode column. + Codewords row. + Codewords. + + + + Adjusts the row number. + + true, if row number was adjusted, false otherwise. + Codeword. + Other codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + The maximum distance to search in the codeword array in both the positive and negative directions + + + + + Initializes a new instance of the class. + + The Bounding Box around the column (in the BitMatrix) + + + + Converts the Image's Row to the index in the Codewords array + + The Codeword Index. + Image row. + + + + Converts the Codeword array index into a Row in the Image (BitMatrix) + + The Image Row. + Codeword index. + + + + Gets the codeword for a given row + + The codeword. + Image row. + + + + Gets the codeword closest to the specified row in the image + + Image row. + + + + Sets the codeword for an image row + + Image row. + Codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + The Bounding Box around the column (in the BitMatrix) + + The box. + + + + The Codewords the Box encodes for, offset by the Box minY. + Remember to Access this ONLY through GetCodeword(imageRow) if you're accessing it in that manner. + + The codewords. + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + Initializes a new instance of the class. + + Box. + If set to true is left. + + + + Sets the Row Numbers as Inidicator Columns + + + + + TODO implement properly + TODO maybe we should add missing codewords to store the correct row number to make + finding row numbers for other columns easier + use row height count to make detection of invalid row numbers more reliable + + The indicator column row numbers. + Metadata. + + + + Gets the row heights. + + The row heights. + + + + Adjusts the in omplete indicator column row numbers. + + Metadata. + + + + Gets the barcode metadata. + + The barcode metadata. + + + + Prune the codewords which do not match the metadata + TODO Maybe we should keep the incorrect codewords for the start and end positions? + + Codewords. + Metadata. + + + + Returns a that represents the current . + + A that represents the current . + + + + Gets or sets a value indicating whether this instance is the left indicator + + true if this instance is left; otherwise, false. + + + +

PDF417 error correction implementation.

+

This example + is quite useful in understanding the algorithm.

+ Sean Owen + +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the specified received. + + received codewords + number of those codewords used for EC + location of erasures + The error locations count. + + + + + Runs the euclidean algorithm (Greatest Common Divisor) until r's degree is less than R/2 + + The euclidean algorithm. + + + + Finds the error locations as a direct application of Chien's search + + The error locations. + Error locator. + + + + Finds the error magnitudes by directly applying Forney's Formula + + The error magnitudes. + Error evaluator. + Error locator. + Error locations. + + + +

A field based on powers of a generator integer, modulo some modulus.

+ +
+ Sean Owen +
+ + + + + Sean Owen + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + + + Adds another Modulus + + Other. + + + + Subtract another Modulus + + Other. + + + + Multiply by another Modulus + + Other. + + + + Returns a Negative version of this instance + + + + + Multiply by a Scalar. + + Scalar. + + + + Multiplies by a Monomial + + The by monomial. + Degree. + Coefficient. + + + + Returns a that represents the current . + + A that represents the current . + + + + Gets the coefficients. + + The coefficients. + + + + degree of this polynomial + + + + + Gets a value indicating whether this instance is zero. + + true if this polynomial is the monomial "0" + + + + + + + Guenther Grau + creatale GmbH (christoph.schulz@creatale.de) + + + + The ratios table + + + + + Initializes the class & Pre-computes the symbol ratio table. + + + + + Gets the decoded value. + + The decoded value. + Module bit count. + + + + Samples the bit counts. + + The bit counts. + Module bit count. + + + + Gets the decoded codeword value. + + The decoded codeword value. + Module bit count. + + + + Gets the bit value. + + The bit value. + Module bit count. + + + + Gets the closest decoded value. + + The closest decoded value. + Module bit count. + + + + + + Guenther Grau + + + + Decode the specified image, imageTopLeft, imageBottomLeft, imageTopRight, imageBottomRight, minCodewordWidth + and maxCodewordWidth. + TODO: don't pass in minCodewordWidth and maxCodewordWidth, pass in barcode columns for start and stop pattern + columns. That way width can be deducted from the pattern column. + This approach also allows to detect more details about the barcode, e.g. if a bar type (white or black) is wider + than it should be. This can happen if the scanner used a bad blackpoint. + + Image. + Image top left. + Image bottom left. + Image top right. + Image bottom right. + Minimum codeword width. + Max codeword width. + + + + Merge the specified leftRowIndicatorColumn and rightRowIndicatorColumn. + + Left row indicator column. + Right row indicator column. + + + + Adjusts the bounding box. + + The bounding box. + Row indicator column. + + + + Gets the barcode metadata. + + The barcode metadata. + Left row indicator column. + Right row indicator column. + + + + Gets the row indicator column. + + The row indicator column. + Image. + Bounding box. + Start point. + If set to true left to right. + Minimum codeword width. + Max codeword width. + + + + Adjusts the codeword count. + + Detection result. + Barcode matrix. + + + + Creates the decoder result. + + The decoder result. + Detection result. + + + + This method deals with the fact, that the decoding process doesn't always yield a single most likely value. The + current error correction implementation doesn't deal with erasures very well, so it's better to provide a value + for these ambiguous codewords instead of treating it as an erasure. The problem is that we don't know which of + the ambiguous values to choose. We try decode using the first value, and if that fails, we use another of the + ambiguous values and try to decode again. This usually only happens on very hard to read and decode barcodes, + so decoding the normal barcodes is not affected by this. + + The decoder result from ambiguous values. + Ec level. + Codewords. + contains the indexes of erasures. + array with the indexes that have more than one most likely value. + two dimensional array that contains the ambiguous values. The first dimension must + be the same Length as the ambiguousIndexes array. + + + + Creates the barcode matrix. + + The barcode matrix. + Detection result. + + + + Tests to see if the Barcode Column is Valid + + true, if barcode column is valid, false otherwise. + Detection result. + Barcode column. + + + + Gets the start column. + + The start column. + Detection result. + Barcode column. + Image row. + If set to true left to right. + + + + Detects the codeword. + + The codeword. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + Minimum codeword width. + Max codeword width. + + + + Gets the module bit count. + + The module bit count. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + + + + Gets the number of EC code words. + + The number of EC code words. + Barcode EC level. + + + + Adjusts the codeword start column. + + The codeword start column. + Image. + Minimum column. + Max column. + If set to true left to right. + Codeword start column. + Image row. + + + + Checks the codeword for any skew. + + true, if codeword is within the skew, false otherwise. + Codeword size. + Minimum codeword width. + Max codeword width. + + + + Decodes the codewords. + + The codewords. + Codewords. + Ec level. + Erasures. + + + + Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place. + + The errors. + data and error correction codewords. + positions of any known erasures. + number of error correction codewords that are available in codewords. + + + + Verifies that all is well with the the codeword array. + + Codewords. + Number EC codewords. + + + + Gets the bit count for codeword. + + The bit count for codeword. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Module bit count. + + + + Returns a that represents the jagged array. + + A that represents the jagged array. + Barcode matrix as a jagged array. + + + +

Encapsulates logic that can detect a PDF417 Code in an image, even if the + PDF417 Code is rotated or skewed, or partially obscured.

+ + SITA Lab (kevin.osullivan@sita.aero) + dswitkin@google.com (Daniel Switkin) + Guenther Grau +
+
+ + + if we set the value too low, then we don't detect the correct height of the bar if the start patterns are damaged. + if we set the value too high, then we might detect the start pattern from a neighbor barcode. + + + + + A PDF471 barcode should have at least 3 rows, with each row being >= 3 times the module width. Therefore it should be at least + 9 pixels tall. To be conservative, we use about half the size to ensure we don't miss it. + + + + + B S B S B S B S Bar/Space pattern + 11111111 0 1 0 1 0 1 000. + + + + + 1111111 0 1 000 1 0 1 00 1 + + + + +

Detects a PDF417 Code in an image. Only checks 0 and 180 degree rotations.

+
+ barcode image to decode + optional hints to detector + if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned + + encapsulating results of detecting a PDF417 code + +
+ + + Detects PDF417 codes in an image. Only checks 0 degree rotation (so rotate the matrix and check again outside of this method) + + multiple if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned. + bit matrix to detect barcodes in. + List of ResultPoint arrays containing the coordinates of found barcodes + + + + Locate the vertices and the codewords area of a black blob using the Start and Stop patterns as locators. + + Matrix. + Start row. + Start column. + an array containing the vertices: + vertices[0] x, y top left barcode + vertices[1] x, y bottom left barcode + vertices[2] x, y top right barcode + vertices[3] x, y bottom right barcode + vertices[4] x, y top left codeword area + vertices[5] x, y bottom left codeword area + vertices[6] x, y top right codeword area + vertices[7] x, y bottom right codeword area + + + + + Copies the temp data to the final result + + Result. + Temp result. + Destination indexes. + + + + Finds the rows with the given pattern. + + The rows with pattern. + Matrix. + Height. + Width. + Start row. + Start column. + Pattern. + + + + Finds the guard pattern. Uses System.Linq.Enumerable.Repeat to fill in counters. This might be a performance issue? + + start/end horizontal offset of guard pattern, as an array of two ints. + matrix row of black/white values to search + column x position to start search. + row y position to start search. + width the number of pixels to search on this row. + If set to true search the white patterns first. + pattern of counts of number of black and white pixels that are being searched for as a pattern. + counters array of counters, as long as pattern, to re-use . + + + + Determines how closely a set of observed counts of runs of black/white. + values matches a given target pattern. This is reported as the ratio of + the total variance from the expected pattern proportions across all + pattern elements, to the length of the pattern. + + + ratio of total variance between counters and pattern compared to + total pattern size, where the ratio has been multiplied by 256. + So, 0 means no variance (perfect match); 256 means the total + variance between counters and patterns equals the pattern length, + higher values mean even more variance + + observed counters. + expected pattern. + The most any counter can differ before we give up. + + + + PDF 417 Detector Result class. Skipped private backing stores. + Guenther Grau + + + + + Initializes a new instance of the class. + + Bits. + Points. + + + + Holds all of the information for a barcode in a format where it can be easily accessible + + Jacob Haynes + + + + + the height of the matrix (Rows) + the width of the matrix (Cols) + + + + + Jacob Haynes + + + + + Creates a Barcode row of the width + + The width. + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + A boolean which is true if the bar black false if it is white + How many spots wide the bar is. + + + + + This function scales the row + + How much you want the image to be scaled, must be greater than or equal to 1. + the scaled row + + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + Represents possible PDF417 barcode compaction types. + + + + + + + + + + + + + + + + + + + + + + + + + Data object to specify the minimum and maximum number of rows and columns for a PDF417 barcode. + @author qwandor@google.com (Andrew Walbran) + + + + + Initializes a new instance of the class. + + The min cols. + The max cols. + The min rows. + The max rows. + + + + Gets the min cols. + + + + + Gets the max cols. + + + + + Gets the min rows. + + + + + Gets the max rows. + + + + + Top-level class for the logic part of the PDF417 implementation. + + + + + The start pattern (17 bits) + + + + + The stop pattern (18 bits) + + + + + The codeword table from the Annex A of ISO/IEC 15438:2001(E). + + + + + Calculates the necessary number of rows as described in annex Q of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol (r) + + + + Calculates the number of pad codewords as described in 4.9.2 of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol + the number of pad codewords + + + + Generates the barcode logic. + + the message to encode + PDF417 error correction level to use + + + + Determine optimal nr of columns and rows for the specified number of + codewords. + + number of code words + number of error correction code words + The longest dimension of the barcode, used for columns + The short dimension of the barcode, used for rows + The height of a row, will alter this parameter if aspectRatio>4 (aspectRatio==AUTO) + dimension object containing cols as width and rows as height + + + + Sets max/min row/col values + + maximum allowed columns + minimum allowed columns + maximum allowed rows + minimum allowed rows + + + + Sets compaction to values stored in enum + + compaction mode to use + + + + Sets compact to be true or false + + if true, enables compaction + + + + Sets output encoding. + + sets character encoding to use + + + + Sets the disable eci. + + if set to true don't add an ECI segment for different encodings than default. + + + + defines the level of the error correction / count of error correction codewords + + + + + The class holds the available options for the + + + + + Initializes a new instance of the class. + + + + + Specifies whether to use compact mode for PDF417 (type ). + + + + + Specifies what compaction mode to use for PDF417 (type + ). + + + + + Specifies the minimum and maximum number of rows and columns for PDF417 (type + ). + + + + + Specifies what degree of error correction to use + + + + + Specifies what degree of error correction to use + + + + + Specifies what character encoding to use where applicable (type {@link String}) + + + + + Explicitly disables ECI segment when generating PDF417 Code + That is against the specification but some + readers have problems if the charset is switched from + CP437 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use different encodings + and the ECI segment is omitted. + + + + + Gets the data container for all options + + + + + Specifies the height of the barcode image + + + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + + + + + PDF417 error correction code following the algorithm described in ISO/IEC 15438:2001(E) in + chapter 4.10. + + + + + Tables of coefficients for calculating error correction words + (see annex F, ISO/IEC 15438:2001(E)) + + + + + Determines the number of error correction codewords for a specified error correction + level. + + the error correction level (0-8) + the number of codewords generated for error correction + + + + Determines the error correction level for AUTO + + The error correction level (0-9) + The number of codewords for AUTO errorCorrectionLevel + the number of codewords generated for error correction + + + + Returns the recommended minimum error correction level as described in annex E of + ISO/IEC 15438:2001(E). + + the number of data codewords + the recommended minimum error correction level + + + + Generates the error correction codewords according to 4.10 in ISO/IEC 15438:2001(E). + + the data codewords + the error correction level (0-8) + the String representing the error correction codewords + + + + defines the level of the error correction / count of error correction codewords + + + + + PDF417 high-level encoder following the algorithm described in ISO/IEC 15438:2001(E) in + annex P. + + + + + code for Text compaction + + + + + code for Byte compaction + + + + + code for Numeric compaction + + + + + Text compaction submode Alpha + + + + + Text compaction submode Lower + + + + + Text compaction submode Mixed + + + + + Text compaction submode Punctuation + + + + + mode latch to Text Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters NOT a multiple of 6) + + + + + mode latch to Numeric Compaction mode + + + + + mode shift to Byte Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters a multiple of 6) + + + + + identifier for a user defined Extended Channel Interpretation (ECI) + + + + + identifier for a general purpose ECO format + + + + + identifier for an ECI of a character set of code page + + + + + Raw code table for text compaction Mixed sub-mode + + + + + Raw code table for text compaction: Punctuation sub-mode + + + + + Performs high-level encoding of a PDF417 message using the algorithm described in annex P + of ISO/IEC 15438:2001(E). If byte compaction has been selected, then only byte compaction + is used. + + the message + compaction mode to use + character encoding used to encode in default or byte compaction + or null for default / not applicable + if true, don't add an ECI segment for different encodings than default + the encoded message (the char values range from 0 to 928) + + + + Encode parts of the message using Text Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.2. + + the message + the start position within the message + the number of characters to encode + receives the encoded codewords + should normally be SUBMODE_ALPHA + the text submode in which this method ends + + + + + Encode parts of the message using Byte Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.3. The Unicode characters will be converted to binary using the cp437 + codepage. + + the message converted to a byte array + the start position within the message + the number of bytes to encode + the mode from which this method starts + receives the encoded codewords + + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using text compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using binary compaction. + + the message + the message converted to a byte array + the start position within the message + + the requested character count + + + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Maximum Codewords (Data + Error). + + + + + Gets the bit count sum. + + The bit count sum. + Module bit count. + + + + Converts an ICollection<int> to an int[] + Carry-over from Java. Will likely remove and replace with the Generic .ToArray() method. + + The int array. + List. + + + + Translate the symbol into a codeword + + the codeword corresponding to the symbol. + encoded symbol to translate to a codeword + + + + The sorted table of all possible symbols. Extracted from the PDF417 + specification. The index of a symbol in this table corresponds to the + index into the codeword table. + + + + + This table contains to codewords for all symbols. + + + + + This implementation can detect and decode PDF417 codes in an image. + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Locates and decodes a PDF417 code in an image. + + a String representing the content encoded by the PDF417 code + if a PDF417 cannot be decoded + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + **Note** this will return the FIRST barcode discovered if there are many. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Locates and decodes Multiple PDF417 codes in an image. + + an array of Strings representing the content encoded by the PDF417 codes + + + + + Locates and decodes multiple barcodes in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcodes encode + + + + + Decode the specified image, with the hints and optionally multiple barcodes. + Based on Owen's Comments in , this method has been modified to continue silently + if a barcode was not decoded where it was detected instead of throwing a new exception object. + + Image. + Hints. + If set to true multiple. + + + + Gets the maximum width of the barcode + + The max width. + P1. + P2. + + + + Gets the minimum width of the barcode + + The minimum width. + P1. + P2. + + + + Gets the maximum width of the codeword. + + The max codeword width. + P. + + + + Gets the minimum width of the codeword. + + The minimum codeword width. + P. + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + PDF 417 result meta data. + Guenther Grau + + + + + The Segment ID represents the segment of the whole file distributed over different symbols. + + + + + Is the same for each related PDF417 symbol + + + + + always null + + + + + true if it is the last segment + + + + + count of segments, -1 if not set + + + + + Filename of the encoded file + + + + + filesize in bytes of the encoded file + returns filesize in bytes, -1 if not set + + + + + 16-bit CRC checksum using CCITT-16 + returns crc checksum, -1 if not set + + + + + unix epock timestamp, elapsed seconds since 1970-01-01 + returns elapsed seconds, -1 if not set + + + + + Jacob Haynes + qwandor@google.com (Andrew Walbran) + + + + + default white space (margin) around the code + + + + + default error correction level + + + + + default aspect ratio + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The height of a row in the barcode + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Takes encoder, accounts for width/height, and retrieves bit matrix + + + + + This takes an array holding the values of the PDF 417 + + a byte array of information with 0 is black, and 1 is white + border around the barcode + BitMatrix of the input + + + + Takes and rotates the it 90 degrees + + + + + This object extends LuminanceSource around an array of YUV data returned from the camera driver, + with the option to crop to a rectangle within the full data. This can be used to exclude + superfluous pixels around the perimeter and speed up decoding. + It works for any pixel format where the Y channel is planar and appears first, including + YCbCr_420_SP and YCbCr_422_SP. + @author dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The yuv data. + Width of the data. + Height of the data. + The left. + The top. + The width. + The height. + if set to true [reverse horiz]. + + + + Initializes a new instance of the class. + + The luminances. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Renders the cropped greyscale bitmap. + + + + + + creates a new instance + + + + + + + + + + + + + + + Whether this subclass supports cropping. + + + + width of image from {@link #renderThumbnail()} + + + + + height of image from {@link #renderThumbnail()} + + + + Sean Owen + + + {@link BitMatrix} to parse + ReaderException if dimension is not >= 21 and 1 mod 4 + + +

Reads format information from one of its two locations within the QR Code.

+ +
+ {@link FormatInformation} encapsulating the QR Code's format info + + ReaderException if both format information locations cannot be parsed as + the valid encoding of format information + +
+ +

Reads version information from one of its two locations within the QR Code.

+ +
+ {@link Version} encapsulating the QR Code's version + + ReaderException if both version information locations cannot be parsed as + the valid encoding of version information + +
+ +

Reads the bits in the {@link BitMatrix} representing the finder pattern in the + correct order in order to reconstruct the codewords bytes contained within the + QR Code.

+ +
+ bytes encoded within the QR Code + + ReaderException if the exact number of bytes expected is not read +
+ + Revert the mask removal done while reading the code words. The bit matrix should revert to its original state. + + + Prepare the parser for a mirrored operation. + This flag has effect only on the {@link #readFormatInformation()} and the + {@link #readVersion()}. Before proceeding with {@link #readCodewords()} the + {@link #mirror()} method should be called. + + @param mirror Whether to read version and format information mirrored. + + + Mirror the bit matrix in order to attempt a second reading. + + +

Encapsulates a block of data within a QR Code. QR Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

When QR Codes use multiple data blocks, they are actually interleaved. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ +
+ bytes as read directly from the QR Code + + version of the QR Code + + error-correction level of the QR Code + + {@link DataBlock}s containing original bytes, "de-interleaved" from representation in the + QR Code + +
+ +

Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations + of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix, + including areas used for finder patterns, timing patterns, etc. These areas should be unused + after the point they are unmasked anyway.

+ +

Note that the diagram in section 6.8.1 is misleading since it indicates that i is column position + and j is row position. In fact, as the text says, i is row position and j is column position.

+ +
+ Sean Owen +
+ + See ISO 18004:2006 6.8.1 + + +

Implementations of this method reverse the data masking process applied to a QR Code and + make its bits ready to read.

+
+ + representation of QR Code bits + dimension of QR Code, represented by bits, being unmasked +
+ +

QR Codes can encode text as bits in one of several modes, and can use multiple modes + in one QR Code. This class decodes the bits back into text.

+ +

See ISO 18004:2006, 6.4.3 - 6.4.7

+ Sean Owen +
+
+ + + See ISO 18004:2006, 6.4.4 Table 5 + + + + + See specification GBT 18284-2000 + + The bits. + The result. + The count. + + + + +

The main class which implements QR Code decoding -- as opposed to locating and extracting + the QR Code from an image.

+
+ + Sean Owen + +
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a QR Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Decodes a QR Code represented as a {@link BitMatrix}. A 1 or "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+
+ data and error correction codewords + number of codewords that are data bytes + +
+ + +

See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels + defined by the QR code standard.

+
+ Sean Owen +
+ + L = ~7% correction + + + M = ~15% correction + + + Q = ~25% correction + + + H = ~30% correction + + + + Ordinals this instance. + + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Fors the bits. + + int containing the two bits encoding a QR Code's error correction level + + representing the encoded error correction level + + + + L = ~7% correction + + + M = ~15% correction + + + Q = ~25% correction + + + H = ~30% correction + + + + Gets the bits. + + + + + Gets the name. + + + +

Encapsulates a QR Code's format information, including the data mask used and + error correction level.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + +
+ + See ISO 18004:2006, Annex C, Table C.1 + + + Offset i holds the number of 1 bits in the binary representation of i + + + + Decodes the format information. + + format info indicator, with mask still applied + The masked format info2. + + information about the format it specifies, or null + if doesn't seem to match any known pattern + + + + +

See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which + data can be encoded to bits in the QR code standard.

+
+ Sean Owen +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See GBT 18284-2000; "Hanzi" is a transliteration of this mode name. + + + + Fors the bits. + + four bits encoding a QR Code data mode + + encoded by these bits + + if bits do not correspond to a known mode + + + version in question + + number of bits used, in this QR Code symbol {@link Version}, to encode the + count of characters that will follow encoded in this {@link Mode} + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Gets the name. + + + + + Gets the bits. + + + + + enumeration for encoding modes + + + + + + + + + + numeric encoding + + + + + alpha-numeric encoding + + + + + structured append + + + + + byte mode encoding + + + + + ECI segment + + + + + Kanji mode + + + + + FNC1 char, first position + + + + + FNC1 char, second position + + + + + Hanzi mode + + + + + Meta-data container for QR Code decoding. Instances of this class may be used to convey information back to the + decoding caller. Callers are expected to process this. + + + + + Initializes a new instance of the class. + + if set to true [mirrored]. + + + + Apply the result points' order correction due to mirroring. + + Array of points to apply mirror correction to. + + + + true if the QR Code was mirrored. + + + + + See ISO 18004:2006 Annex D + + Sean Owen + + + See ISO 18004:2006 Annex D. + Element i represents the raw version bits that specify version i + 7 + + + + + Gets the EC blocks for level. + + The ec level. + + + +

Deduces version information purely from QR Code dimensions.

+ +
+ dimension in modules + + for a QR Code of that dimension or null +
+ + + Gets the version for number. + + The version number. + + + + See ISO 18004:2006 Annex E + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + See ISO 18004:2006 6.5.1 Table 9 + + + + Gets the version number. + + + + + Gets the alignment pattern centers. + + + + + Gets the total codewords. + + + + + Gets the dimension for version. + + + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + + Gets the EC blocks. + + + + + + Gets the EC codewords per block. + + + + + Gets the num blocks. + + + + + Gets the total EC codewords. + + + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the QR code version's format.

+
+
+ + + Gets the count. + + + + + Gets the data codewords. + + + +

Encapsulates an alignment pattern, which are the smaller square patterns found in + all but the simplest QR Codes.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + +

Determines if this alignment pattern "about equals" an alignment pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing an average of the two. + + The i. + The j. + New size of the module. + + + + + Gets the X. + + + + + Gets the Y. + + + +

This class attempts to find alignment patterns in a QR Code. Alignment patterns look like finder + patterns but are smaller and appear at regular intervals throughout the image.

+ +

At the moment this only looks for the bottom-right alignment pattern.

+ +

This is mostly a simplified copy of {@link FinderPatternFinder}. It is copied, + pasted and stripped down here for maximum performance but does unfortunately duplicate + some code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Creates a finder that will look in a portion of the whole image.

+ +
+ image to search + + left column from which to start searching + + top row from which to start searching + + width of region to search + + height of region to search + + estimated module size so far + + callback function which is called, when a result point is found +
+ +

This method attempts to find the bottom-right alignment pattern in the image. It is a bit messy since + it's pretty performance-critical and so is written to be fast foremost.

+ +
+ if found +
+ + Given a count of black/white/black pixels just seen and an end position, + figures the location of the center of this black/white/black run. + + + + count of black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/1 ratios + used by alignment patterns to be considered a match + + + + +

After a horizontal scan finds a potential alignment pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + alignment pattern to see if the same proportion is detected.

+
+ row where an alignment pattern was detected + center of the section that appears to cross an alignment pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of alignment pattern, or null if not found + +
+ +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will see if this pattern had been + found on a previous horizontal scan. If so, we consider it confirmed and conclude we have + found the alignment pattern.

+ +
+ reading state module counts from horizontal scan + + row where alignment pattern may be found + + end of possible alignment pattern in row + + {@link AlignmentPattern} if we have found the same pattern twice, or null if not + +
+ + +

Encapsulates a finder pattern, which are the three square patterns found in + the corners of QR Codes. It also encapsulates a count of similar finder patterns, + as a convenience to the finder's bookkeeping.

+
+ Sean Owen +
+ + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + +

Determines if this finder pattern "about equals" a finder pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing a weighted average + based on count. + + The i. + The j. + New size of the module. + + + + + distance between two points + + + + + Orders an array of three ResultPoints in an order [A,B,C] such that AB < AC and + BC < AC and the angle between BC and BA is less than 180 degrees. + + + + + Returns the z component of the cross product between vectors BC and BA. + + + + + Gets the X. + + + + + Gets the Y. + + + + + Gets the size of the estimated module. + + + The size of the estimated module. + + + + +

Encapsulates information about finder patterns in an image, including the location of + the three finder patterns, and their estimated module size.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The pattern centers. + + + + Gets the bottom left. + + + + + Gets the top left. + + + + + Gets the top right. + + + + + JAVAPORT: The original code was a 2D array of ints, but since it only ever gets assigned + 0, 1 and 2 I'm going to use less memory and go with bytes. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Sets the specified x. + + The x. + The y. + The value. + + + + Sets the specified x. + + The x. + The y. + if set to true [value]. + + + + Clears the specified value. + + The value. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Gets the height. + + + + + Gets the width. + + + + + Gets or sets the with the specified x. + + + + + an internal representation as bytes, in row-major order. array[y][x] represents point (x,y) + + + + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + Encode "bytes" with the error correction level "ecLevel". The encoding mode will be chosen + internally by chooseMode(). On success, store the result in "qrCode". + We recommend you to use QRCode.EC_LEVEL_L (the lowest level) for + "getECLevel" since our primary use is to show QR code on desktop screens. We don't need very + strong error correction for this purpose. + Note that there is no way to encode bytes in MODE_KANJI. We might want to add EncodeWithMode() + with which clients can specify the encoding mode. For now, we don't need the functionality. + + text to encode + error correction level to use + representing the encoded QR code + + + + Encodes the specified content. + + The content. + The ec level. + The hints. + + + + + Decides the smallest version of QR code that will contain all of the provided data. + + if the data cannot fit in any version + + + + Gets the alphanumeric code. + + The code. + the code point of the table used in alphanumeric mode or + -1 if there is no corresponding code in the table. + + + + Chooses the mode. + + The content. + + + + + Choose the best mode by examining the content. Note that 'encoding' is used as a hint; + if it is Shift_JIS, and the input is only double-byte Kanji, then we return {@link Mode#KANJI}. + + The content. + The encoding. + + + + + true if the number of input bits will fit in a code with the specified version and error correction level. + + + + Terminate bits as described in 8.4.8 and 8.4.9 of JISX0510:2004 (p.24). + + The num data bytes. + The bits. + + + + Get number of data bytes and number of error correction bytes for block id "blockID". Store + the result in "numDataBytesInBlock", and "numECBytesInBlock". See table 12 in 8.5.1 of + JISX0510:2004 (p.30) + + The num total bytes. + The num data bytes. + The num RS blocks. + The block ID. + The num data bytes in block. + The num EC bytes in block. + + + + Interleave "bits" with corresponding error correction bytes. On success, store the result in + "result". The interleave rule is complicated. See 8.6 of JISX0510:2004 (p.37) for details. + + The bits. + The num total bytes. + The num data bytes. + The num RS blocks. + + + + + Append mode info. On success, store the result in "bits". + + The mode. + The bits. + + + + Append length info. On success, store the result in "bits". + + The num letters. + The version. + The mode. + The bits. + + + + Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits". + + The content. + The mode. + The bits. + The encoding. + + + + + + Satoru Takabayashi + Daniel Switkin + Sean Owen + + + + Apply mask penalty rule 1 and return the penalty. Find repetitive cells with the same color and + give penalty to them. Example: 00000 or 11111. + + The matrix. + + + + + Apply mask penalty rule 2 and return the penalty. Find 2x2 blocks with the same color and give + penalty to them. This is actually equivalent to the spec's rule, which is to find MxN blocks and give a + penalty proportional to (M-1)x(N-1), because this is the number of 2x2 blocks inside such a block. + + The matrix. + + + + + Apply mask penalty rule 3 and return the penalty. Find consecutive cells of 00001011101 or + 10111010000, and give penalty to them. If we find patterns like 000010111010000, we give + penalties twice (i.e. 40 * 2). + + The matrix. + + + + + Apply mask penalty rule 4 and return the penalty. Calculate the ratio of dark cells and give + penalty if the ratio is far from 50%. It gives 10 penalty for 5% distance. + + The matrix. + + + + + Return the mask bit for "getMaskPattern" at "x" and "y". See 8.8 of JISX0510:2004 for mask + pattern conditions. + + The mask pattern. + The x. + The y. + + + + + Helper function for applyMaskPenaltyRule1. We need this for doing this calculation in both + vertical and horizontal orders respectively. + + The matrix. + if set to true [is horizontal]. + + + + + + + + satorux@google.com (Satoru Takabayashi) - creator + + + + + Set all cells to 2. 2 means that the cell is empty (not set yet). + + JAVAPORT: We shouldn't need to do this at all. The code should be rewritten to begin encoding + with the ByteMatrix initialized all to zero. + + The matrix. + + + + Build 2D matrix of QR Code from "dataBits" with "ecLevel", "version" and "getMaskPattern". On + success, store the result in "matrix" and return true. + + The data bits. + The ec level. + The version. + The mask pattern. + The matrix. + + + + Embed basic patterns. On success, modify the matrix and return true. + The basic patterns are: + - Position detection patterns + - Timing patterns + - Dark dot at the left bottom corner + - Position adjustment patterns, if need be + + The version. + The matrix. + + + + Embed type information. On success, modify the matrix. + + The ec level. + The mask pattern. + The matrix. + + + + Embed version information if need be. On success, modify the matrix and return true. + See 8.10 of JISX0510:2004 (p.47) for how to embed version information. + + The version. + The matrix. + + + + Embed "dataBits" using "getMaskPattern". On success, modify the matrix and return true. + For debugging purposes, it skips masking process if "getMaskPattern" is -1. + See 8.7 of JISX0510:2004 (p.38) for how to embed data bits. + + The data bits. + The mask pattern. + The matrix. + + + + Return the position of the most significant bit set (to one) in the "value". The most + significant bit is position 32. If there is no bit set, return 0. Examples: + - findMSBSet(0) => 0 + - findMSBSet(1) => 1 + - findMSBSet(255) => 8 + + The value_ renamed. + + + + + Calculate BCH (Bose-Chaudhuri-Hocquenghem) code for "value" using polynomial "poly". The BCH + code is used for encoding type information and version information. + Example: Calculation of version information of 7. + f(x) is created from 7. + - 7 = 000111 in 6 bits + - f(x) = x^2 + x^2 + x^1 + g(x) is given by the standard (p. 67) + - g(x) = x^12 + x^11 + x^10 + x^9 + x^8 + x^5 + x^2 + 1 + Multiply f(x) by x^(18 - 6) + - f'(x) = f(x) * x^(18 - 6) + - f'(x) = x^14 + x^13 + x^12 + Calculate the remainder of f'(x) / g(x) + x^2 + __________________________________________________ + g(x) )x^14 + x^13 + x^12 + x^14 + x^13 + x^12 + x^11 + x^10 + x^7 + x^4 + x^2 + -------------------------------------------------- + x^11 + x^10 + x^7 + x^4 + x^2 + + The remainder is x^11 + x^10 + x^7 + x^4 + x^2 + Encode it in binary: 110010010100 + The return value is 0xc94 (1100 1001 0100) + + Since all coefficients in the polynomials are 1 or 0, we can do the calculation by bit + operations. We don't care if coefficients are positive or negative. + + The value. + The poly. + + + + + Make bit vector of type information. On success, store the result in "bits" and return true. + Encode error correction level and mask pattern. See 8.9 of + JISX0510:2004 (p.45) for details. + + The ec level. + The mask pattern. + The bits. + + + + Make bit vector of version information. On success, store the result in "bits" and return true. + See 8.10 of JISX0510:2004 (p.45) for details. + + The version. + The bits. + + + + Check if "value" is empty. + + The value. + + true if the specified value is empty; otherwise, false. + + + + + Embed the lonely dark dot at left bottom corner. JISX0510:2004 (p.46) + + The matrix. + + + + + + The x start. + The y start. + The matrix. + + + + Embed position detection patterns and surrounding vertical/horizontal separators. + + The matrix. + + + + Embed position adjustment patterns if need be. + + The version. + The matrix. + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + + + + + + Initializes a new instance of the class. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Check if "mask_pattern" is valid. + + The mask pattern. + + true if [is valid mask pattern] [the specified mask pattern]; otherwise, false. + + + + + Gets or sets the mode. + + + The mode. + + + + + Gets or sets the EC level. + + + The EC level. + + + + + Gets or sets the version. + + + The version. + + + + + Gets or sets the mask pattern. + + + The mask pattern. + + + + + Gets or sets the matrix. + + + The matrix. + + + + + The class holds the available options for the QrCodeWriter + + + + + Initializes a new instance of the class. + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + . + + + + + Specifies what character encoding to use where applicable (type ) + + + + + Explicitly disables ECI segment when generating QR Code + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + + + + + Specifies the exact version of QR code to be encoded. An integer, range 1 to 40. If the data specified + cannot fit within the required version, a WriterException will be thrown. + + + + + Gets the data container for all options + + + + + Specifies the height of the barcode image + + + + + Specifies the width of the barcode image + + + + + Don't put the content string into the output image. + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + + + + + This object renders a QR Code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Interface for a class to convert a BitMatrix to an output image format + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + The options. + + + + + Interface for a class to convert a BitMatrix to an output image format + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + The options. + + + + + Represents a barcode as a Svg image + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The content. + + + + Gives the XML representation of the SVG image + + + + + Gets or sets the content. + + + The content. + + + + + The original height of the bitmatrix for the barcode + + + + + The original width of the bitmatrix for the barcode + + + + + Interface for a class to convert a BitMatrix to an output image format + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + The options. + + + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + + + converts the pixel data to a bitmap object + + + + + + the generated code as byte array of BGRA pixels + + + + + the width of the image + + + + + the height of the image + + + + + Renders a to an byte array with pixel data (4 byte per pixel, BGRA) + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + + Renders a barcode into a Svg image + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Gets or sets the foreground color. + + The foreground color. + + + + Gets or sets the background color. + + The background color. + + + + Gets or sets the font family name + + The font family name. + + + + Gets or sets the font size in pixel + + The font size in pixel. + + + + Renders a to a + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + + Gets or sets the font family. + + + The font family. + + + + + Gets or sets the size of the font. + + + The size of the font. + + + + + Encapsulates the result of decoding a barcode within an image. + + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + The timestamp. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + The timestamp. + + + + Adds one metadata to the result + + The type. + The value. + + + + Adds a list of metadata to the result + + The metadata. + + + + Adds the result points. + + The new points. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + raw text encoded by the barcode, if applicable, otherwise null + + + raw bytes encoded by the barcode, if applicable, otherwise null + + + + points related to the barcode in the image. These are typically points + identifying finder patterns or the corners of the barcode. The exact meaning is + specific to the type of barcode that was decoded. + + + + {@link BarcodeFormat} representing the format of the barcode that was decoded + + + + {@link Hashtable} mapping {@link ResultMetadataType} keys to values. May be + null. This contains optional metadata about what was detected about the barcode, + like orientation. + + + + + Gets the timestamp. + + + + + how many bits of are valid; typically 8 times its length + + + + + Represents some type of metadata about the result of the decoding that the decoder + wishes to communicate back to the caller. + + Sean Owen + + + + Unspecified, application-specific metadata. Maps to an unspecified {@link Object}. + + + + + Denotes the likely approximate orientation of the barcode in the image. This value + is given as degrees rotated clockwise from the normal, upright orientation. + For example a 1D barcode which was found by reading top-to-bottom would be + said to have orientation "90". This key maps to an {@link Integer} whose + value is in the range [0,360). + + + + +

2D barcode formats typically encode text, but allow for a sort of 'byte mode' + which is sometimes used to encode binary data. While {@link Result} makes available + the complete raw bytes in the barcode for these formats, it does not offer the bytes + from the byte segments alone.

+

This maps to a {@link java.util.List} of byte arrays corresponding to the + raw bytes in the byte segments in the barcode, in order.

+
+
+ + + Error correction level used, if applicable. The value type depends on the + format, but is typically a String. + + + + + For some periodicals, indicates the issue number as an {@link Integer}. + + + + + For some products, indicates the suggested retail price in the barcode as a + formatted {@link String}. + + + + + For some products, the possible country of manufacture as a {@link String} denoting the + ISO country code. Some map to multiple possible countries, like "US/CA". + + + + + For some products, the extension text + + + + + If the code format supports structured append and + the current scanned code is part of one then the + sequence number is given with it. + + + + + If the code format supports structured append and + the current scanned code is part of one then the + parity is given with it. + + + + + PDF417-specific metadata + + + + + Aztec-specific metadata + + + + + Encapsulates a point of interest in an image containing a barcode. Typically, this + would be the location of a finder pattern or the corner of the barcode, for example. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The x. + The y. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC and + BC is less than AC and the angle between BC and BA is less than 180 degrees. + + array of three to order + + + + calculates the distance between two points + + first pattern + second pattern + + distance between two points + + + + + Returns the z component of the cross product between vectors BC and BA. + + + + + Gets the X. + + + + + Gets the Y. + + + + Callback which is invoked when a possible result point (significant + point in the barcode image such as a corner) is found. + + + + + + + + enumeration of supported bitmap format which the RGBLuminanceSource can process + + + + + format of the byte[] isn't known. RGBLuminanceSource tries to determine the best possible value + + + + + grayscale array, the byte array is a luminance array with 1 byte per pixel + + + + + grayscale array, the byte array is a luminance array with 2 bytes per pixel + + + + + 3 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels alpha, red, green and blue + + + + + 3 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green, red and alpha + + + + + 2 bytes per pixel, 5 bit red, 6 bits green and 5 bits blue + + + + + 4 bytes per pixel with the channels red, green, blue and alpha + + + + + 4 bytes for two pixels, UYVY formatted + + + + + 4 bytes for two pixels, YUYV formatted + + + + + Luminance source class which support different formats of images. + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 1 byte per pixel (Gray8). + That means the whole array consists of the luminance values (grayscale). + + The luminance array. + The width. + The height. + if set to true [is8 bit]. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + The bitmap format. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + calculates the luminance values for the given byte array and bitmap format + + + + + + + Attribute is only for compatibility issues + + + + + Attribute is only for source code compatibility issues + + + + + Attribute is only for compatibility issues + + + + + Contains conversion support elements such as classes, interfaces and static methods. + + + + + Copies an array of chars obtained from a String into a specified array of chars + + The String to get the chars from + Position of the String to start getting the chars + Position of the String to end getting the chars + Array to return the chars + Position of the destination array of chars to start storing the chars + An array of chars + + + + Sets the capacity for the specified List + + The List which capacity will be set + The new capacity value + + + + Converts a string-Collection to an array + + The strings. + + + + + Joins all elements to one string. + + + The separator. + The values. + + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The value. + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The start index. + The end index. + The value. + + + + + + + + + + + + + + + + + + Savely gets the value of a decoding hint + if hints is null the default is returned + + + The hints. + Type of the hint. + The @default. + + + + + A base class which covers the range of exceptions which may occur when encoding a barcode using + the Writer framework. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner exc. + +
+
diff --git a/packages/ZXing.Net.0.16.4/lib/windows8/zxing.pri b/packages/ZXing.Net.0.16.4/lib/windows8/zxing.pri new file mode 100644 index 0000000..7d187a1 Binary files /dev/null and b/packages/ZXing.Net.0.16.4/lib/windows8/zxing.pri differ diff --git a/packages/ZXing.Net.0.16.4/lib/windows8/zxing.winmd b/packages/ZXing.Net.0.16.4/lib/windows8/zxing.winmd new file mode 100644 index 0000000..e701968 Binary files /dev/null and b/packages/ZXing.Net.0.16.4/lib/windows8/zxing.winmd differ diff --git a/packages/ZXing.Net.0.16.4/lib/wp8/zxing.wp8.0.XML b/packages/ZXing.Net.0.16.4/lib/wp8/zxing.wp8.0.XML new file mode 100644 index 0000000..900a8d0 --- /dev/null +++ b/packages/ZXing.Net.0.16.4/lib/wp8/zxing.wp8.0.XML @@ -0,0 +1,11713 @@ + + + + zxing.wp8.0 + + + + + Extends with more information specific to the Aztec format, + like the number of layers and whether it's compact. + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + Initializes a new instance of the class. + + The bits. + The points. + if set to true [compact]. + The nb datablocks. + The nb layers. + + + + The main class which implements Aztec Code decoding -- as opposed to locating and extracting + the Aztec Code from an image. + + David Olivier + + + + Decodes the specified detector result. + + The detector result. + + + + + This method is used for testing the high-level encoder + + + + + + + Gets the string encoded in the aztec code bits + + The corrected bits. + the decoded string + + + + gets the table corresponding to the char passed + + The t. + + + + + Gets the character (or string) corresponding to the passed code in the given table + + the table used + the code of the character + + + + + Performs RS error correction on an array of bits. + + The rawbits. + the corrected array + + + + Gets the array of bits from an Aztec Code matrix + + The matrix. + the array of bits + + + + Reads a code of given length and at given index in an array of bits + + The rawbits. + The start index. + The length. + + + + + Reads a code of length 8 in an array of bits, padding with zeros + + + + + + + + Packs a bit array into bytes, most significant bit first + + + + + + + Encapsulates logic that can detect an Aztec Code in an image, even if the Aztec Code + is rotated or skewed, or partially obscured. + + David Olivier + + + + Initializes a new instance of the class. + + The image. + + + + Detects an Aztec Code in an image. + + + + + Detects an Aztec Code in an image. + + if true, image is a mirror-image of original. + + encapsulating results of detecting an Aztec Code + + + + + Extracts the number of data layers and data blocks from the layer around the bull's eye + + bullEyeCornerPoints the array of bull's eye corners + + + + + Corrects the parameter bits using Reed-Solomon algorithm + + paremeter bits + compact true if this is a compact Aztec code + + + + + Finds the corners of a bull-eye centered on the passed point + This returns the centers of the diagonal points just outside the bull's eye + Returns [topRight, bottomRight, bottomLeft, topLeft] + + Center point + The corners of the bull-eye + + + + Finds a candidate center point of an Aztec code from an image + + the center point + + + + Gets the Aztec code corners from the bull's eye corners and the parameters. + + the array of bull's eye corners + the array of aztec code corners + + + + Creates a BitMatrix by sampling the provided image. + topLeft, topRight, bottomRight, and bottomLeft are the centers of the squares on the + diagonal just outside the bull's eye. + + The image. + The top left. + The bottom left. + The bottom right. + The top right. + + + + + Samples a line + + start point (inclusive) + end point (exclusive) + number of bits + the array of bits as an int (first bit is high-order bit of result) + + + + Determines whether [is white or black rectangle] [the specified p1]. + + The p1. + The p2. + The p3. + The p4. + true if the border of the rectangle passed in parameter is compound of white points only + or black points only + + + + Gets the color of a segment + + The p1. + The p2. + 1 if segment more than 90% black, -1 if segment is more than 90% white, 0 else + + + + Gets the coordinate of the first point with a different color in the given direction + + The init. + if set to true [color]. + The dx. + The dy. + + + + + Expand the square represented by the corner points by pushing out equally in all directions + + the corners of the square, which has the bull's eye at its center + the original length of the side of the square in the target bit matrix + the new length of the size of the square in the target bit matrix + the corners of the expanded square + + + + Aztec 2D code representation + + Rustam Abdullaev + + + + Compact or full symbol indicator + + + + + Size in pixels (width and height) + + + + + Number of levels + + + + + Number of data codewords + + + + + The symbol image + + + + + represents a token for a binary shift + + + + + initializing constructor + + + + + + + + appends the byte array to the BitArray + + + + + + + string representation + + + + + + Generates Aztec 2D barcodes. + + Rustam Abdullaev + + + + Encodes the given binary content as an Aztec symbol + + input data string + Aztec symbol matrix with metadata + + + + Encodes the given binary content as an Aztec symbol + + input data string + minimal percentage of error check words (According to ISO/IEC 24778:2008, + a minimum of 23% + 3 words is recommended) + if non-zero, a user-specified value for the number of layers + + Aztec symbol matrix with metadata + + + + + This produces nearly optimal encodings of text into the first-level of + encoding used by Aztec code. + It uses a dynamic algorithm. For each prefix of the string, it determines + a set of encodings that could lead to this prefix. We repeatedly add a + character and generate a new set of optimal encodings until we have read + through the entire input. + @author Frank Yellin + @author Rustam Abdullaev + + + + + + + + + + + Convert the text represented by this High Level Encoder into a BitArray. + + text represented by this encoder encoded as a + + + + State represents all information about a sequence necessary to generate the current output. + Note that a state is immutable. + + + + + Create a new state representing this state with a latch to a (not + necessary different) mode, and then a code. + + + + + Create a new state representing this state, with a temporary shift + to a different mode to output a single value. + + + + + Create a new state representing this state, but an additional character + output in Binary Shift mode. + + + + + Create the state identical to this one, but we are no longer in + Binary Shift mode. + + + + + Returns true if "this" state is better (or equal) to be in than "that" + state under all possible circumstances. + + + + + This implementation can detect and decode Aztec codes in an image. + + David Olivier + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + a String representing the content encoded by the Data Matrix code + + + + + Locates and decodes a Data Matrix code in an image. + + image of barcode to decode + passed as a {@link java.util.Hashtable} from {@link com.google.zxing.DecodeHintType} + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Aztec result meta data. + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + + + + + + + + + Renders an Aztec code as a + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + The class holds the available options for the + + + + + Representing the minimal percentage of error correction words. + Note: an Aztec symbol should have a minimum of 25% EC words. + + + + + Specifies the required number of layers for an Aztec code: + a negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + a positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + + + + + Enumerates barcode formats known to this package. + + Sean Owen + + + Aztec 2D barcode format. + + + CODABAR 1D format. + + + Code 39 1D format. + + + Code 93 1D format. + + + Code 128 1D format. + + + Data Matrix 2D barcode format. + + + EAN-8 1D format. + + + EAN-13 1D format. + + + ITF (Interleaved Two of Five) 1D format. + + + MaxiCode 2D barcode format. + + + PDF417 format. + + + QR Code 2D barcode format. + + + RSS 14 + + + RSS EXPANDED + + + UPC-A 1D format. + + + UPC-E 1D format. + + + UPC/EAN extension format. Not a stand-alone format. + + + MSI + + + Plessey + + + Intelligent Mail barcode + + + + UPC_A | UPC_E | EAN_13 | EAN_8 | CODABAR | CODE_39 | CODE_93 | CODE_128 | ITF | RSS_14 | RSS_EXPANDED + without MSI (to many false-positives) and IMB (not enough tested, and it looks more like a 2D) + + + + + A smart class to decode the barcode inside a bitmap object + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + A smart class to decode the barcode inside a bitmap object + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Constructor for additional image formats for one BarcodeReader class + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Optional: Gets or sets the function to create a luminance source object for a bitmap. + If null a platform specific default LuminanceSource is used + + + The function to create a luminance source object. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + A smart class to decode the barcode inside a bitmap object + + + + + represents the default function which is called to get a instance from a raw byte array + + + + + Gets or sets the options. + + + The options. + + + + + Gets the reader which should be used to find and decode the barcode. + + + The reader. + + + + + Gets or sets a method which is called if an important point is found + + + The result point callback. + + + + + event is executed if a result was found via decode + + + + + Gets or sets a value indicating whether the image should be automatically rotated. + Rotation is supported for 90, 180 and 270 degrees + + + true if image should be rotated; otherwise, false. + + + + + Gets or sets a value indicating whether the image should be automatically inverted + if no result is found in the original image. + ATTENTION: Please be carefully because it slows down the decoding process if it is used + + + true if image should be inverted; otherwise, false. + + + + + Optional: Gets or sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + The function to create a binarizer object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb array. + If null the RGBLuminanceSource is used. The handler is only called when Decode with a byte[] array is called. + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + raises the ResultFound event + + + + + + raises the ResultFound event + + + + + + calls the explicitResultPointFound action + + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + A smart class to encode some content to raw pixel data + + + + + Initializes a new instance of the class. + + + + + A smart class to encode some content to a svg barcode image + + + + + Initializes a new instance of the class. + + + + + A smart class to encode some content to a barcode image + + + + + Initializes a new instance of the class. + + + + + A base class for specific barcode writers with specific formats of barcode images. + + The type of the output. + + + + Gets or sets the renderer which should be used to render the encoded BitMatrix. + + + + + Encodes the specified contents and returns a rendered instance of the barcode. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The matrix. + + + + + A base class for specific barcode writers with specific formats of barcode images. + + + + + Gets or sets the barcode format. + The value is only suitable if the MultiFormatWriter is used. + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + + + + + + + + + + + + Encodes the specified contents and returns a BitMatrix array. + That array has to be rendered manually or with a IBarcodeRenderer. + + The contents. + + + + + The base class for luminance sources which supports + cropping and rotating based upon the luminance values. + + + + + weight of the red channel for calculating a gray scale image + + + + + weight of the green channel for calculating a gray scale image + + + + + weight of the blue channel for calculating a gray scale image + + + + + numbers of bits which for right shifting + + + + + + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + + The luminance array. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + gets the luminance matrix + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + TODO: not implemented yet + + + A rotated version of this object. + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + + Whether this subclass supports cropping. + + + + + Whether this subclass supports invertion. + + + + Inverts the luminance values (newValue = 255 - oldValue) + + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + This class hierarchy provides a set of methods to convert luminance data to 1 bit data. + It allows the algorithm to vary polymorphically, for example allowing a very expensive + thresholding technique for servers and a fast one for mobile. It also permits the implementation + to vary, e.g. a JNI version for Android and a Java fallback version for other platforms. + + dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The source. + + + + Gets the luminance source object. + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + For callers which only examine one row of pixels at a time, the same BitArray should be reused + and passed in with each call for performance. However it is legal to keep more than one row + at a time if needed. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + Converts a 2D array of luminance data to 1 bit data. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + A new concrete Binarizer implementation object. + + + + Gets the width of the luminance source object. + + + + + Gets the height of the luminance source object. + + + + + This class is the core bitmap class used by ZXing to represent 1 bit data. Reader objects + accept a BinaryBitmap and attempt to decode it. + + dswitkin@google.com (Daniel Switkin) + + + + + + + + + + The width of the bitmap. + + + + + The height of the bitmap. + + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + + The row to fetch, which must be in [0, bitmap height). + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + + Converts a 2D array of luminance data to 1 bit. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + + Whether this bitmap can be cropped. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if isCropSupported() is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + + Whether this bitmap supports counter-clockwise rotation. + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + class which represents the luminance values for a bitmap object of a WriteableBitmap class + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + initializing constructor + + + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + +

See + + DoCoMo's documentation about the result types represented by subclasses of this class.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + Implements KDDI AU's address book format. See + + http://www.au.kddi.com/ezfactory/tec/two_dimensions/index.html. + (Thanks to Yuzo for translating!) + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Implements the "MECARD" address book entry format. + + Supported keys: N, SOUND, TEL, EMAIL, NOTE, ADR, BDAY, URL, plus ORG + Unsupported keys: TEL-AV, NICKNAME + + Except for TEL, multiple values for keys are also not supported; + the first one found takes precedence. + + Our understanding of the MECARD format is based on this document: + + http://www.mobicode.org.tw/files/OMIA%20Mobile%20Bar%20Code%20Standard%20v3.2.1.doc + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes contact information, like that in an address book entry. + + Sean Owen + + + + initializing constructor + + + + + + + + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + the names + + + + + the nicknames + + + + + In Japanese, the name is written in kanji, which can have multiple readings. Therefore a hint + is often provided, called furigana, which spells the name phonetically. + + The pronunciation of the getNames() field, often in hiragana or katakana. + + + + the phone numbers + + + + optional descriptions of the type of each phone number. It could be like "HOME", but, + there is no guaranteed or standard format. + + + + the e-mail addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the instant messenger addresses + + + + + the note field + + + + + the addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the title + + + + + the urls + + + + birthday formatted as yyyyMMdd (e.g. 19780917) + + + a location as a latitude/longitude pair + + + Implements the "BIZCARD" address book entry format, though this has been + largely reverse-engineered from examples observed in the wild -- still + looking for a definitive reference. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a calendar event at a certain time, optionally with attendees and a location. + + Sean Owen + + + + Gets the start. + + + + + Determines whether [is start all day]. + + if start time was specified as a whole day + + + + event end , or null if event has no duration + + + + + Gets a value indicating whether this instance is end all day. + + true if end time was specified as a whole day + + + + Parses a string as a date. RFC 2445 allows the start and end fields to be of type DATE (e.g. 20081021) + or DATE-TIME (e.g. 20081021T123000 for local time, or 20081021T123000Z for UTC). + + The string to parse + + if not a date formatted string + + + + Represents a parsed result that encodes an email message including recipients, subject and body text. + + Sean Owen + + + + the email address + + + + + the TOs + + + + + the CCs + + + + + the BCCs + + + + + the subject + + + + + the body + + + + + the mailto: uri + + + + + Represents a result that encodes an e-mail address, either as a plain address + like "joe@example.org" or a mailto: URL like "mailto:joe@example.org". + + Sean Owen + + + + Implements the "MATMSG" email message entry format. + + Supported keys: TO, SUB, BODY + + Sean Owen + + + + This implements only the most basic checking for an email address's validity -- that it contains + an '@' and contains no characters disallowed by RFC 2822. This is an overly lenient definition of + validity. We want to generally be lenient here since this class is only intended to encapsulate what's + in a barcode, not "judge" it. + + The email. + + true if it is basically a valid email address; otherwise, false. + + + + + Represents a parsed result that encodes extended product information as encoded by the RSS format, like weight, price, dates, etc. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + extension for kilogram weight type + + + + + extension for pounds weight type + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the raw text + + + + + the product id + + + + + the sscc + + + + + the lot number + + + + + the production date + + + + + the packaging date + + + + + the best before date + + + + + the expiration date + + + + + the weight + + + + + the weight type + + + + + the weight increment + + + + + the price + + + + + the price increment + + + + + the price currency + + + + + the uncommon AIs + + + + + the display representation (raw text) + + + + + Parses strings of digits that represent a RSS Extended code. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + tries to parse a text representation to a specific result object + + + + + + + Represents a parsed result that encodes a geographic coordinate, with latitude, longitude and altitude. + + Sean Owen + + + latitude in degrees + + + + longitude in degrees + + + + altitude in meters. If not specified, in the geo URI, returns 0.0 + + + + query string associated with geo URI or null if none exists + + + + the geo URI + + + + a URI link to Google Maps which display the point on the Earth described + by this instance, and sets the zoom level in a way that roughly reflects the + altitude, if specified + + + + Parses a "geo:" URI result, which specifies a location on the surface of + the Earth as well as an optional altitude above the surface. See + + http://tools.ietf.org/html/draft-mayrhofer-geo-uri-00. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a product ISBN number. + + jbreiden@google.com (Jeff Breidenbach) + + + + the ISBN number + + + + Parses strings of digits that represent a ISBN. + + + jbreiden@google.com (Jeff Breidenbach) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + See ISBN-13 For Dummies + + The result. + + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link ResultParser#parseResult(Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Represents the type of data encoded by a barcode -- from plain text, to a + URI, to an e-mail address, etc. + + Sean Owen + + + + Represents a parsed result that encodes a product by an identifier of some kind. + + dswitkin@google.com (Daniel Switkin) + + + + Parses strings of digits that represent a UPC code. + + dswitkin@google.com (Daniel Switkin) + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link #parseResult(com.google.zxing.Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Attempts to parse the raw {@link Result}'s contents as a particular type + of information (email, URL, etc.) and return a {@link ParsedResult} encapsulating + the result of parsing. + + the raw to parse + encapsulating the parsing result + + + + Parses the result. + + The result. + + + +

Parses an "sms:" URI result, which specifies a number to SMS and optional + "via" number. See + the IETF draft on this.

+ +

This actually also parses URIs starting with "mms:", "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + + Represents a parsed result that encodes an SMS message, including recipients, subject and body text. + + Sean Owen + + + +

Parses an "smsto:" URI result, whose format is not standardized but appears to be like: + {@code smsto:number(:body)}.

+

This actually also parses URIs starting with "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+
+ Sean Owen +
+ + +

Parses an "smtp:" URI result, whose format is not standardized but appears to be like: + smtp[:subject[:body]]}.

+

See http://code.google.com/p/zxing/issues/detail?id=536

+
+ Sean Owen +
+ + + Represents a parsed result that encodes a telephone number. + + Sean Owen + + + + Parses a "tel:" URI result, which specifies a phone number. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + A simple result type encapsulating a string that has no further interpretation. + + Sean Owen + + + + A simple result type encapsulating a URI that has no further interpretation. + + Sean Owen + + + true if the URI contains suspicious patterns that may suggest it intends to + mislead the user about its true nature. At the moment this looks for the presence + of user/password syntax in the host/authority portion of a URI which may be used + in attempts to make the URI's host appear to be other than it is. Example: + http://yourbank.com@phisher.com This URI connects to phisher.com but may appear + to connect to yourbank.com at first glance. + + + + Transforms a string that represents a URI into something more proper, by adding or canonicalizing + the protocol. + + + + + Tries to parse results that are a URI of some kind. + + Sean Owen + + + Parses the "URLTO" result format, which is of the form "URLTO:[title]:[url]". + This seems to be used sometimes, but I am not able to find documentation + on its origin or official format? + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Parses contact information formatted according to the VCard (2.1) format. This is not a complete + implementation but should parse information as commonly encoded in 2D barcodes. + + Sean Owen + + + Formats name fields of the form "Public;John;Q.;Reverend;III" into a form like + "Reverend John Q. Public III". + + @param names name values to format, in place + + + + Partially implements the iCalendar format's "VEVENT" format for specifying a + calendar event. See RFC 2445. This supports SUMMARY, DTSTART and DTEND fields. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a Vehicle Identification Number (VIN). + + + + + Detects a result that is likely a vehicle identification number. + @author Sean Owen + + + + + Represents a parsed result that encodes wifi network information, like SSID and password. + + Vikram Aggarwal + + + + + A simple, fast array of bits, represented compactly by an array of ints internally. + + Sean Owen + + + + size of the array, number of elements + + + + + size of the array in bytes + + + + + index accessor + + + + + + + default constructor + + + + + initializing constructor + + desired size of the array + + + + Flips bit i. + + bit to set + + + + + Gets the next set. + + first bit to check + index of first bit that is set, starting from the given index, or size if none are set + at or beyond this given index + + + + see getNextSet(int) + + index to start looking for unset bit + index of next unset bit, or if none are unset until the end + + + Sets a block of 32 bits, starting at bit i. + + + first bit to set + + the new value of the next 32 bits. Note again that the least-significant bit + corresponds to bit i, the next-least-significant to i+1, and so on. + + + + + Sets a range of bits. + + start of range, inclusive. + end of range, exclusive + + + Clears all bits (sets to false). + + + Efficient method to check if a range of bits is set, or not set. + + + start of range, inclusive. + + end of range, exclusive + + if true, checks that bits in range are set, otherwise checks that they are not set + + true iff all bits are set or not set in range, according to value argument + if end is less than start or the range is not contained in the array + + + + Appends the bit. + + The bit. + + + underlying array of ints. The first element holds the first 32 bits, and the least + significant bit is bit 0. + + + + + Appends the least-significant bits, from value, in order from most-significant to + least-significant. For example, appending 6 bits from 0x000001E will append the bits + 0, 1, 1, 1, 1, 0 in that order. + + containing bits to append + bits from value to append + + + + adds the array to the end + + + + + + XOR operation + + + + + + converts to bytes. + + first bit to start writing + array to write into. Bytes are written most-significant byte first. This is the opposite + of the internal representation, which is exposed by BitArray + position in array to start writing + how many bytes to write + + + Reverses all bits in the array. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Erstellt ein neues Objekt, das eine Kopie der aktuellen Instanz darstellt. + + + Ein neues Objekt, das eine Kopie dieser Instanz darstellt. + + + + +

Represents a 2D matrix of bits. In function arguments below, and throughout the common + module, x is the column position, and y is the row position. The ordering is always x, y. + The origin is at the top-left.

+

Internally the bits are represented in a 1-D array of 32-bit ints. However, each row begins + with a new int. This is done intentionally so that we can copy out a row into a BitArray very + efficiently.

+

The ordering of bits is row-major. Within each int, the least significant bits are used first, + meaning they represent lower x values. This is compatible with BitArray's implementation.

+
+ Sean Owen + dswitkin@google.com (Daniel Switkin) +
+ + The width of the matrix + + + + The height of the matrix + + + + This method is for compatibility with older code. It's only logical to call if the matrix + is square, so I'm throwing if that's not the case. + + + row/column dimension of this matrix + + + + + The rowsize of the matrix + + + + + Creates an empty square . + + height and width + + + + Creates an empty square . + + bit matrix width + bit matrix height + + + + Interprets a 2D array of booleans as a , where "true" means an "on" bit. + + bits of the image, as a row-major 2D array. Elements are arrays representing rows + representation of image + + +

Gets the requested bit, where true means black.

+ +
+ The horizontal component (i.e. which column) + + The vertical component (i.e. which row) + + value of given bit in matrix + +
+ + +

Flips the given bit.

+
+ The horizontal component (i.e. which column) + The vertical component (i.e. which row) +
+ + + flip all of the bits, if shouldBeFlipped is true for the coordinates + + should return true, if the bit at a given coordinate should be flipped + + + + Exclusive-or (XOR): Flip the bit in this {@code BitMatrix} if the corresponding + mask bit is set. + + The mask. + + + Clears all bits (sets to false). + + +

Sets a square region of the bit matrix to true.

+ +
+ The horizontal position to begin at (inclusive) + + The vertical position to begin at (inclusive) + + The width of the region + + The height of the region + +
+ + A fast method to retrieve one row of data from the matrix as a BitArray. + + + The row to retrieve + + An optional caller-allocated BitArray, will be allocated if null or too small + + The resulting BitArray - this reference should always be used even when passing + your own row + + + + + Sets the row. + + row to set + {@link BitArray} to copy from + + + + Modifies this {@code BitMatrix} to represent the same but rotated 180 degrees + + + + + This is useful in detecting the enclosing rectangle of a 'pure' barcode. + + {left,top,width,height} enclosing rectangle of all 1 bits, or null if it is all white + + + + This is useful in detecting a corner of a 'pure' barcode. + + {x,y} coordinate of top-left-most 1 bit, or null if it is all white + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + The line separator. + + A that represents this instance. + + + + + Clones this instance. + + + + + + Converts this ByteMatrix to a black and white bitmap. + + A black and white bitmap converted from this ByteMatrix. + + +

This provides an easy abstraction to read bits at a time from a sequence of bytes, where the + number of bits read is not often a multiple of 8.

+ +

This class is thread-safe but not reentrant. Unless the caller modifies the bytes array + it passed in, in which case all bets are off.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + bytes from which this will read bits. Bits will be read from the first byte first. + Bits are read within a byte from most-significant to least-significant bit. + + + + + index of next bit in current byte which would be read by the next call to {@link #readBits(int)}. + + + + + index of next byte in input byte array which would be read by the next call to {@link #readBits(int)}. + + + + number of bits to read + + int representing the bits read. The bits will appear as the least-significant + bits of the int + + if numBits isn't in [1,32] or more than is available + + + number of bits that can be read successfully + + + + Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1 + of ISO 18004. + + + Sean Owen + + + character set ECI value + representing ECI of given value, or null if it is legal but unsupported + + + character set ECI encoding name + representing ECI for character encoding, or null if it is legalbut unsupported + + + + Encapsulates the result of decoding a matrix of bits. This typically + applies to 2D barcode formats. For now it contains the raw bytes obtained, + as well as a String interpretation of those bytes, if applicable. + Sean Owen + + + + + raw bytes representing the result, or null if not applicable + + + + + how many bits of are valid; typically 8 times its length + + + + + text representation of the result + + + + + list of byte segments in the result, or null if not applicable + + + + + name of error correction level used, or null if not applicable + + + + + gets a value which describe if structure append data was found + + + + + number of errors corrected, or null if not applicable + + + + + gives the sequence number of the result if structured append was found + + + + + number of erasures corrected, or null if not applicable + + + + + gives the parity information if structured append was found + + + + + Miscellanseous data value for the various decoders + + The other. + + + + initializing constructor + + + + + + + + + initializing constructor + + + + + + + + + + + initializing constructor + + + + + + + + + + initializing constructor + + + + + + + + + + + + Defines an container for encoder options + + + + + Gets the data container for all options + + + + + event is raised when a value is changed + + + + + Gets or sets a flag which cause a deeper look into the bitmap + + + true if [try harder]; otherwise, false. + + + + + Image is a pure monochrome image of a barcode. + + + true if monochrome image of a barcode; otherwise, false. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + The character set. + + + + + Image is known to be of one of a few possible formats. + Maps to a {@link java.util.List} of {@link BarcodeFormat}s. + + + The possible formats. + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + true if it should assume a Code 39 check digit; otherwise, false. + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). + + + true if it should assume GS1; otherwise, false. + + + + + Assume MSI codes employ a check digit. Maps to . + + + true if it should assume a MSI check digit; otherwise, false. + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Initializes a new instance of the class. + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Encapsulates the result of detecting a barcode in an image. This includes the raw + matrix of black/white pixels corresponding to the barcode, and possibly points of interest + in the image, like the location of finder patterns or corners of the barcode in the image.

+
+ Sean Owen +
+ + + the detected bits + + + + + the pixel points where the result is found + + + + + initializing constructor + + + + + + + General math-related and numeric utility functions. + + + + + Ends up being a bit faster than {@link Math#round(float)}. This merely rounds its + argument to the nearest int, where x.5 rounds up to x+1. Semantics of this shortcut + differ slightly from {@link Math#round(float)} in that half rounds down for negative + values. -2.5 rounds to -3, not -2. For purposes here it makes no difference. + + real value to round + nearest int + + + + + + + + + + Euclidean distance between points A and B + + + + + + + + + + Euclidean distance between points A and B + + + + + values to sum + sum of values in array + + +

A somewhat generic detector that looks for a barcode-like rectangular region within an image. + It looks within a mostly white region of an image for a region of black and white, but mostly + black. It returns the four corners of the region, as best it can determine.

+ +
+ Sean Owen +
+ + + initializing constructor + + + + + +

Detects a rectangular region of black and white -- mostly black -- with a region of mostly + white, in an image.

+
+ [] describing the corners of the rectangular region. The first and + last points are opposed on the diagonal, as are the second and third. The first point will be + the topmost point and the last, the bottommost. The second point will be leftmost and the + third, the rightmost + +
+ + Attempts to locate a corner of the barcode by scanning up, down, left or right from a center + point which should be within the barcode. + + + center's x component (horizontal) + + same as deltaY but change in x per step instead + + minimum value of x + + maximum value of x + + center's y component (vertical) + + change in y per step. If scanning up this is negative; down, positive; + left or right, 0 + + minimum value of y to search through (meaningless when di == 0) + + maximum value of y + + maximum run of white pixels that can still be considered to be within + the barcode + + a encapsulating the corner that was found + + + + Computes the start and end of a region of pixels, either horizontally or vertically, that could + be part of a Data Matrix barcode. + + + if scanning horizontally, this is the row (the fixed vertical location) + where we are scanning. If scanning vertically it's the column, the fixed horizontal location + + largest run of white pixels that can still be considered part of the + barcode region + + minimum pixel location, horizontally or vertically, to consider + + maximum pixel location, horizontally or vertically, to consider + + if true, we're scanning left-right, instead of up-down + + int[] with start and end of found range, or null if no such range is found + (e.g. only white was found) + + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. By keeping track of the + last black points it encountered, it determines the corners of the barcode. + + David Olivier + + + + Creates a WhiteRectangleDetector instance + + The image. + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + Creates a WhiteRectangleDetector instance + + barcode image to find a rectangle in + initial size of search area around center + x position of search center + y position of search center + + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + + Initializes a new instance of the class. + + The image. + if image is too small + + + + Initializes a new instance of the class. + + The image. + Size of the init. + The x. + The y. + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. + + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + recenters the points of a constant distance towards the center + + bottom most point + left most point + right most point + top most point + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + Determines whether a segment contains a black point + + min value of the scanned coordinate + max value of the scanned coordinate + value of fixed coordinate + set to true if scan must be horizontal, false if vertical + + true if a black point has been found, else false. + + + + + Superclass of classes encapsulating types ECIs, according to "Extended Channel Interpretations" + 5.3 of ISO 18004. + + Sean Owen + + + + the ECI value + + + + ECI value + representing ECI of given value, or null if it is legal but unsupported + ArgumentException if ECI value is invalid + + + + Defines an container for encoder options + + + + + Gets the data container for all options + + + + + Specifies the height of the barcode image + + + + + Specifies the width of the barcode image + + + + + Don't put the content string into the output image. + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + + + + + Specifies whether the data should be encoded to the GS1 standard; + FNC1 character is added in front of the data + + + + + Initializes a new instance of the class. + + + + This Binarizer implementation uses the old ZXing global histogram approach. It is suitable + for low-end mobile devices which don't have enough CPU or memory to use a local thresholding + algorithm. However, because it picks a global black point, it cannot handle difficult shadows + and gradients. + + Faster mobile devices and all desktop applications should probably use HybridBinarizer instead. + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The source. + + + + Applies simple sharpening to the row data to improve performance of the 1D Readers. + + + + + + + + Does not sharpen the data, as this call is intended to only be used by 2D Readers. + + + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + + A new concrete Binarizer implementation object. + + + + Implementations of this class can, given locations of finder patterns for a QR code in an + image, sample the right points in the image to reconstruct the QR code, accounting for + perspective distortion. It is abstracted since it is relatively expensive and should be allowed + to take advantage of platform-specific optimized implementations, like Sun's Java Advanced + Imaging library, but which may not be available in other environments such as J2ME, and vice + versa. + + The implementation used can be controlled by calling {@link #setGridSampler(GridSampler)} + with an instance of a class which implements this interface. + + Sean Owen + + + the current implementation of + + + + Sets the implementation of used by the library. One global + instance is stored, which may sound problematic. But, the implementation provided + ought to be appropriate for the entire platform, and all uses of this library + in the whole lifetime of the JVM. For instance, an Android activity can swap in + an implementation that takes advantage of native platform libraries. + + The platform-specific object to install. + + + +

Samples an image for a square matrix of bits of the given dimension. This is used to extract + the black/white modules of a 2D barcode like a QR Code found in an image. Because this barcode + may be rotated or perspective-distorted, the caller supplies four points in the source image + that define known points in the barcode, so that the image may be sampled appropriately.

+

The last eight "from" parameters are four X/Y coordinate pairs of locations of points in + the image that define some significant points in the image to be sample. For example, + these may be the location of finder pattern in a QR Code.

+

The first eight "to" parameters are four X/Y coordinate pairs measured in the destination + , from the top left, where the known points in the image given by the "from" + parameters map to.

+

These 16 parameters define the transformation needed to sample the image.

+
+ image to sample + The dimension X. + The dimension Y. + The p1 preimage X. + The p1 preimage Y. + The p2 preimage X. + The p2 preimage Y. + The p3 preimage X. + The p3 preimage Y. + The p4 preimage X. + The p4 preimage Y. + The p1 image X. + The p1 image Y. + The p2 image X. + The p2 image Y. + The p3 image X. + The p3 image Y. + The p4 image X. + The p4 image Y. + + representing a grid of points sampled from the image within a region + defined by the "from" parameters + + ReaderException if image can't be sampled, for example, if the transformation defined +
+ + + + + + + + + + + +

Checks a set of points that have been transformed to sample points on an image against + the image's dimensions to see if the point are even within the image.

+ +

This method will actually "nudge" the endpoints back onto the image if they are found to be + barely (less than 1 pixel) off the image. This accounts for imperfect detection of finder + patterns in an image where the QR Code runs all the way to the image border.

+ +

For efficiency, the method will check points from either end of the line until one is found + to be within the image. Because the set of points are assumed to be linear, this is valid.

+ +
+ image into which the points should map + + actual points in x1,y1,...,xn,yn form + +
+ + This class implements a local thresholding algorithm, which while slower than the + GlobalHistogramBinarizer, is fairly efficient for what it does. It is designed for + high frequency images of barcodes with black data on white backgrounds. For this application, + it does a much better job than a global blackpoint with severe shadows and gradients. + However it tends to produce artifacts on lower frequency images and is therefore not + a good general purpose binarizer for uses outside ZXing. + + This class extends GlobalHistogramBinarizer, using the older histogram approach for 1D readers, + and the newer local approach for 2D readers. 1D decoding using a per-row histogram is already + inherently local, and only fails for horizontal gradients. We can revisit that problem later, + but for now it was not a win to use local blocks for 1D. + + This Binarizer is the default for the unit tests and the recommended class for library users. + dswitkin@google.com (Daniel Switkin) + + + + + gives the black matrix + + + + + initializing constructor + + + + + + creates a new instance + + + + + + + Calculates the final BitMatrix once for all requests. This could be called once from the + constructor instead, but there are some advantages to doing it lazily, such as making + profiling easier, and not doing heavy lifting when callers don't expect it. + + + + + For each 8x8 block in the image, calculate the average black point using a 5x5 grid + of the blocks around it. Also handles the corner cases (fractional blocks are computed based + on the last 8 pixels in the row/column which are also used in the previous block). + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + The black points. + The matrix. + + + + Applies a single threshold to an 8x8 block of pixels. + + The luminances. + The xoffset. + The yoffset. + The threshold. + The stride. + The matrix. + + + + Calculates a single black point for each 8x8 block of pixels and saves it away. + See the following thread for a discussion of this algorithm: + http://groups.google.com/group/zxing/browse_thread/thread/d06efa2c35a7ddc0 + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + + + +

This class implements a perspective transform in two dimensions. Given four source and four + destination points, it will compute the transformation implied between them. The code is based + directly upon section 3.4.2 of George Wolberg's "Digital Image Warping"; see pages 54-56.

+
+ Sean Owen +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Convenience method, not optimized for performance. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

This class contains utility methods for performing mathematical operations over + the Galois Fields. Operations use a given primitive polynomial in calculations.

+

Throughout this package, elements of the GF are represented as an {@code int} + for convenience and speed (but at the cost of memory). +

+
+ Sean Owen +
+ + + Create a representation of GF(size) using the given primitive polynomial. + + irreducible polynomial whose coefficients are represented by + * the bits of an int, where the least-significant bit represents the constant + * coefficient + the size of the field + the factor b in the generator polynomial can be 0- or 1-based + * (g(x) = (x+a^b)(x+a^(b+1))...(x+a^(b+2t-1))). + * In most cases it should be 1, but for QR code it is 0. + + + + Builds the monomial. + + The degree. + The coefficient. + the monomial representing coefficient * x^degree + + + + Implements both addition and subtraction -- they are the same in GF(size). + + sum/difference of a and b + + + + Exps the specified a. + + 2 to the power of a in GF(size) + + + + Logs the specified a. + + A. + base 2 log of a in GF(size) + + + + Inverses the specified a. + + multiplicative inverse of a + + + + Multiplies the specified a with b. + + A. + The b. + product of a and b in GF(size) + + + + Gets the size. + + + + + Gets the generator base. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + +

Represents a polynomial whose coefficients are elements of a GF. + Instances of this class are immutable.

+

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + the {@link GenericGF} instance representing the field to use + to perform computations + coefficients as ints representing elements of GF(size), arranged + from most significant (highest-power term) coefficient to least significant + if argument is null or empty, + or if leading coefficient is 0 and this is not a + constant polynomial (that is, it is not the monomial "0") + + + + degree of this polynomial + + + + + Gets a value indicating whether this is zero. + + true iff this polynomial is the monomial "0" + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + +

Implements Reed-Solomon decoding, as the name implies.

+ +

The algorithm will not be explained here, but the following references were helpful + in creating this implementation:

+ + + +

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+ +
+ Sean Owen + William Rucklidge + sanfordsquires +
+ + +

Decodes given set of received codewords, which include both data and error-correction + codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place, + in the input.

+
+ data and error-correction codewords + number of error-correction codewords available + false: decoding fails +
+ + + Implements Reed-Solomon encoding, as the name implies. + + Sean Owen + William Rucklidge + + + + Common string-related functions. + + Sean Owen + Alex Dupre + + + + SJIS + + + + + GB2312 + + + + + Guesses the encoding. + + bytes encoding a string, whose encoding should be guessed + decode hints if applicable + name of guessed encoding; at the moment will only guess one of: + {@link #SHIFT_JIS}, {@link #UTF8}, {@link #ISO88591}, or the platform + default encoding if none of these can possibly be correct + + + + This implementation can detect and decode Data Matrix codes in an image. + + bbrown@google.com (Brian Brown) + + + + + Locates and decodes a Data Matrix code in an image. + + + a String representing the content encoded by the Data Matrix code + + + + Locates and decodes a Data Matrix code in an image. + + + + a String representing the content encoded by the Data Matrix code + + + + does nothing here + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a Data Matrix code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + Guillaume Le Biller Added to zxing lib. + + + + encodes the content to a BitMatrix + + + + + + + + + + encodes the content to a BitMatrix + + + + + + + + + + + Encode the given symbol info to a bit matrix. + + The DataMatrix placement. + The symbol info to encode. + + + The bit matrix generated. + + + + Convert the ByteMatrix to BitMatrix. + + The input matrix. + The requested width of the image (in pixels) with the Datamatrix code + The requested height of the image (in pixels) with the Datamatrix code + The output matrix. + + + + bbrown@google.com (Brian Brown) + + + + + to parse + if dimension is < 8 or > 144 or not 0 mod 2 + + + + +

Creates the version object based on the dimension of the original bit matrix from + the datamatrix code.

+ +

See ISO 16022:2006 Table 7 - ECC 200 symbol attributes

+ + Original including alignment patterns + encapsulating the Data Matrix Code's "version" + if the dimensions of the mapping matrix are not valid + Data Matrix dimensions. +
+
+ + +

Reads the bits in the representing the mapping matrix (No alignment patterns) + in the correct order in order to reconstitute the codewords bytes contained within the + Data Matrix Code.

+ + bytes encoded within the Data Matrix Code + if the exact number of bytes expected is not read +
+
+ + +

Reads a bit of the mapping matrix accounting for boundary wrapping.

+ + Row to read in the mapping matrix + Column to read in the mapping matrix + Number of rows in the mapping matrix + Number of columns in the mapping matrix + value of the given bit in the mapping matrix +
+
+ + +

Reads the 8 bits of the standard Utah-shaped pattern.

+ +

See ISO 16022:2006, 5.8.1 Figure 6

+ + Current row in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Current column in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the utah shape +
+
+ + +

Reads the 8 bits of the special corner condition 1.

+ +

See ISO 16022:2006, Figure F.3

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 1 +
+
+ + +

Reads the 8 bits of the special corner condition 2.

+ +

See ISO 16022:2006, Figure F.4

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 2 +
+
+ + +

Reads the 8 bits of the special corner condition 3.

+ +

See ISO 16022:2006, Figure F.5

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 3 +
+
+ + +

Reads the 8 bits of the special corner condition 4.

+ +

See ISO 16022:2006, Figure F.6

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 4 +
+
+ + +

Extracts the data region from a that contains + alignment patterns.

+ + Original with alignment patterns + BitMatrix that has the alignment patterns removed +
+
+ + +

Encapsulates a block of data within a Data Matrix Code. Data Matrix Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ + bbrown@google.com (Brian Brown) +
+
+ + +

When Data Matrix Codes use multiple data blocks, they actually interleave the bytes of each of them. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ + bytes as read directly from the Data Matrix Code + version of the Data Matrix Code + DataBlocks containing original bytes, "de-interleaved" from representation in the + Data Matrix Code +
+
+ + +

Data Matrix Codes can encode text as bits in one of several modes, and can use multiple modes + in one Data Matrix Code. This class decodes the bits back into text.

+ +

See ISO 16022:2006, 5.2.1 - 5.2.9.2

+ + bbrown@google.com (Brian Brown) + Sean Owen +
+
+ + + See ISO 16022:2006, Annex C Table C.1 + The C40 Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, Annex C Table C.2 + The Text Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, 5.2.3 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.5 and Annex C, Table C.1 + + + + + See ISO 16022:2006, 5.2.6 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.7 + + + + + See ISO 16022:2006, 5.2.8 and Annex C Table C.3 + + + + + See ISO 16022:2006, 5.2.9 and Annex B, B.2 + + + + + See ISO 16022:2006, Annex B, B.2 + + + + +

The main class which implements Data Matrix Code decoding -- as opposed to locating and extracting + the Data Matrix Code from an image.

+ + bbrown@google.com (Brian Brown) +
+
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a Data Matrix Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+ + booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code + if the Data Matrix Code cannot be decoded +
+
+ + +

Decodes a Data Matrix Code represented as a . A 1 or "true" is taken + to mean a black module.

+
+ booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+ + data and error correction codewords + number of codewords that are data bytes +
+
+ + + The Version object encapsulates attributes about a particular + size Data Matrix Code. + + bbrown@google.com (Brian Brown) + + + + + returns the version numer + + + + + + returns the symbol size rows + + + + + + returns the symbols size columns + + + + + + retursn the data region size rows + + + + + + returns the data region size columns + + + + + + returns the total codewords count + + + + + +

Deduces version information from Data Matrix dimensions.

+ + Number of rows in modules + Number of columns in modules + Version for a Data Matrix Code of those dimensions + if dimensions do correspond to a valid Data Matrix size +
+
+ + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the Data Matrix code version's format.

+
+
+ + + returns the version number as string + + + + + + See ISO 16022:2006 5.5.1 Table 7 + + + + +

Encapsulates logic that can detect a Data Matrix Code in an image, even if the Data Matrix Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + +

Detects a Data Matrix Code in an image.

+
+ encapsulating results of detecting a Data Matrix Code or null +
+ + + Calculates the position of the white top right module using the output of the rectangle detector + for a rectangular matrix + + + + + Calculates the position of the white top right module using the output of the rectangle detector + for a square matrix + + + + + Increments the Integer associated with a key by one. + + + + + Counts the number of black/white transitions between two points, using something like Bresenham's algorithm. + + + + + Simply encapsulates two points and a number of transitions between them. + + + + + Orders ResultPointsAndTransitions by number of transitions, ascending. + + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Symbol Character Placement Program. Adapted from Annex M.1 in ISO/IEC 16022:2000(E). + + + + + Main constructor + + the codewords to place + the number of columns + the number of rows + + + + Places the 8 bits of a utah-shaped symbol character in ECC200. + + The row. + The col. + character position + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Enumeration for encodation types + + + + + Error Correction Code for ECC200. + + + + + Lookup table which factors to use for which number of error correction codewords. + See FACTORS. + + + + + Precomputed polynomial factors for ECC 200. + + + + + Creates the ECC200 error correction for an encoded message. + + The codewords. + information about the symbol to be encoded + the codewords with interleaved error correction. + + + + DataMatrix ECC 200 data encoder following the algorithm described in ISO/IEC 16022:200(E) in + annex S. + + + + + Padding character + + + + + mode latch to C40 encodation mode + + + + + mode latch to Base 256 encodation mode + + + + + FNC1 Codeword + + + + + Structured Append Codeword + + + + + Reader Programming + + + + + Upper Shift + + + + + 05 Macro + + + + + 06 Macro + + + + + mode latch to ANSI X.12 encodation mode + + + + + mode latch to Text encodation mode + + + + + mode latch to EDIFACT encodation mode + + + + + ECI character (Extended Channel Interpretation) + + + + + Unlatch from C40 encodation + + + + + Unlatch from X12 encodation + + + + + 05 Macro header + + + + + 06 Macro header + + + + + Macro trailer + + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + the encoded message (the char values range from 0 to 255) + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + requested shape. May be {@code SymbolShapeHint.FORCE_NONE},{@code SymbolShapeHint.FORCE_SQUARE} or {@code SymbolShapeHint.FORCE_RECTANGLE}. + the minimum symbol size constraint or null for no constraint + the maximum symbol size constraint or null for no constraint + encoding mode to start with + the encoded message (the char values range from 0 to 255) + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + Symbol info table for DataMatrix. + + + + Overrides the symbol info set used by this class. Used for testing purposes. + + @param override the symbol info set to use + + + + Enumeration for DataMatrix symbol shape hint. It can be used to force square or rectangular + symbols. + + + + + The class holds the available options for the DatamatrixWriter + + + + + Specifies the matrix shape for Data Matrix + + + + + Specifies a minimum barcode size + + + + + Specifies a maximum barcode size + + + + + Specifies the default encodation + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Encapsulates a type of hint that a caller may pass to a barcode reader to help it + more quickly or accurately decode it. It is up to implementations to decide what, + if anything, to do with the information that is supplied. + + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Unspecified, application-specific hint. Maps to an unspecified . + + + + + Image is a pure monochrome image of a barcode. Doesn't matter what it maps to; + use = true. + + + + + Image is known to be of one of a few possible formats. + Maps to a of s. + + + + + Spend more time to try to find a barcode; optimize for accuracy, not speed. + Doesn't matter what it maps to; use = true. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + + + The caller needs to be notified via callback when a possible + is found. Maps to a . + + + + + Assume MSI codes employ a check digit. Maps to . + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + Maps to . + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + 1D readers supporting rotation with TRY_HARDER enabled. + But BarcodeReader class can do auto-rotating for 1D and 2D codes. + Enabling that option prevents 1D readers doing double rotation. + BarcodeReader enables that option automatically if "global" auto-rotation is enabled. + Maps to . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to; + use . + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Simply encapsulates a width and height. + + + + + initializing constructor + + + + + + + the width + + + + + the height + + + + + + + + + + + + + + + + + + + + + + + + These are a set of hints that you may pass to Writers to specify their behavior. + + dswitkin@google.com (Daniel Switkin) + + + + Specifies the width of the barcode image + type: + + + + + Specifies the height of the barcode image + type: + + + + + Don't put the content string into the output image. + type: + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + + For Aztec it is of type , representing the minimal percentage of error correction words. + In all cases, it can also be a representation of the desired value as well. + Note: an Aztec symbol should have a minimum of 25% EC words. + For PDF417 it is of type or (between 0 and 8), + + + + + Specifies what character encoding to use where applicable. + type: + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + type: , or representation of the integer value + + + + + Specifies the aspect ratio to use. Default is 4. + type: , or 1-4. + + + + + Specifies whether to use compact mode for PDF417 + type: , or "true" or "false" + value + + + + + Specifies what compaction mode to use for PDF417. + type: or value of one of its + enum values + + + + + Specifies the minimum and maximum number of rows and columns for PDF417. + type: + + + + + Don't append ECI segment. + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + type: + + + + + Specifies the matrix shape for Data Matrix (type ) + + + + + Specifies a minimum barcode size (type ). Only applicable to Data Matrix now. + + + + + Specifies a maximum barcode size (type ). Only applicable to Data Matrix now. + + + + + if true, don't switch to codeset C for numbers + + + + + Specifies the default encodation for Data Matrix (type ) + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Specifies the required number of layers for an Aztec code. + A negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + type: , or representation of the integer value + + + + + Specifies the exact version of QR code to be encoded. + (Type , or representation of the integer value). + + + + + Specifies whether the data should be encoded to the GS1 standard + type: , or "true" or "false" + value + + + + + Thrown when a barcode was successfully detected, but some aspect of + the content did not conform to the barcode's format rules. This could have + been due to a mis-detection. + Sean Owen + + + + + + + + + + + + + + + + + + + + + + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + Interface for a smart class to decode the barcode inside a bitmap object + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Decodes the specified barcode bitmap which is given by a generic byte array. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Interface for a smart class to encode some content into a barcode + + + Interface for a smart class to encode some content into a barcode + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents. + + The contents. + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + The matrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents. + + The contents. + + + + + implements an Intelligent Mail barcode + Rishabh Hatgadkar + + + + + A wrapper implementation of {@link LuminanceSource} which inverts the luminances it returns -- black becomes + white and vice versa, and each value becomes (255-value). + + Sean Owen + + + + Initializes a new instance of the class. + + The @delegate. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff; + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Inverts this instance. + + original delegate {@link LuminanceSource} since invert undoes itself + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + The purpose of this class hierarchy is to abstract different bitmap implementations across + platforms into a standard interface for requesting greyscale luminance values. The interface + only provides immutable methods; therefore crop and rotation create copies. This is to ensure + that one Reader does not modify the original luminance source and leave it in an unknown state + for other Readers in the chain. + + dswitkin@google.com (Daniel Switkin) + + + + initializing constructor + + + + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff + + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + The width of the bitmap. + + + The height of the bitmap. + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + Whether this subclass supports counter-clockwise rotation. + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + + Whether this subclass supports invertion. + + + + inverts the luminance values, not supported here. has to implemented in sub classes + + + + + + + + + + + + mike32767 + Manuel Kasten + + + + + to parse + + + + +

MaxiCodes can encode text or structured information as bits in one of several modes, + with multiple character sets in one code. This class decodes the bits back into text.

+ + mike32767 + Manuel Kasten +
+
+ + +

The main class which implements MaxiCode decoding -- as opposed to locating and extracting + the MaxiCode from an image.

+ + Manuel Kasten +
+
+ + + This implementation can detect and decode a MaxiCode in an image. + + + + + Locates and decodes a MaxiCode in an image. + + a String representing the content encoded by the MaxiCode + if a MaxiCode cannot be decoded + + + + + Locates and decodes a MaxiCode within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + + MultiFormatReader is a convenience class and the main entry point into the library for most uses. + By default it attempts to decode all barcode formats that the library supports. Optionally, you + can provide a hints object to request different behavior, for example only decoding QR codes. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + This version of decode honors the intent of Reader.decode(BinaryBitmap) in that it + passes null as a hint to the decoders. However, that makes it inefficient to call repeatedly. + Use setHints() followed by decodeWithState() for continuous scan applications. + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the hints provided. Does not honor existing state. + + + The pixel data to decode + + The hints to use, clearing the previous state. + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the state set up by calling setHints() previously. Continuous scan + clients will get a large speed increase by using this instead of decode(). + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls + to decodeWithState(image) can reuse the same set of readers without reallocating memory. This + is important for performance in continuous scan clients. + + + + + + resets all specific readers + + + + This is a factory class which finds the appropriate Writer subclass for the BarcodeFormat + requested and encodes the barcode with the supplied contents. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Gets the collection of supported writers. + + + + + encode the given data + + + + + + + + + + encode the given data + + + + + + + + + + + This class attempts to decode a barcode from an image, not by scanning the whole image, + but by scanning subsets of the image. This is important when there may be multiple barcodes in + an image, and detecting a barcode may find parts of multiple barcode and fail to decode + (e.g. QR Codes). Instead this scans the four quadrants of the image -- and also the center + 'quadrant' to cover the case where a barcode is found in the center. + + + + + + Initializes a new instance of the class. + + The @delegate. + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Attempts to locate multiple barcodes in an image by repeatedly decoding portion of the image. + After one barcode is found, the areas left, above, right and below the barcode's + {@link com.google.zxing.ResultPoint}s are scanned, recursively.

+

A caller may want to also employ {@link ByQuadrantReader} when attempting to find multiple + 2D barcodes, like QR Codes, in an image, where the presence of multiple barcodes might prevent + detecting any one of them.

+

That is, instead of passing a {@link Reader} a caller might pass + new ByQuadrantReader(reader).

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The @delegate. + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Implementation of this interface attempt to read several barcodes from one image. + Sean Owen + + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + +

Encapsulates logic that can detect one or more QR Codes in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+ + Sean Owen + Hannes Erven +
+
+ + + Initializes a new instance of the class. + + The image. + + + + Detects the multi. + + The hints. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +

In contrast to , this class will return an array of all possible + QR code locations in the image.

+ +

Use the TRY_HARDER hint to ask for a more thorough detection.

+ + Sean Owen + Hannes Erven +
+
+ + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF_PERCENT percent in their + estimated modules sizes. + + + + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF pixels/module in their + estimated modules sizes. + + + + + A comparator that orders FinderPatterns by their estimated module size. + + + + +

Creates a finder that will search the image for three finder patterns.

+ + image to search +
+
+ + + + the 3 best s from our list of candidates. The "best" are + those that have been detected at least CENTER_QUORUM times, and whose module + size differs from the average among those patterns the least + + + + + This implementation can detect and decode multiple QR Codes in an image. + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + +

Decodes Codabar barcodes.

+ + Bas Vijfwinkel +
+
+ + These represent the encodings of characters, as patterns of wide and narrow bars. The 7 least-significant bits of + each int correspond to the pattern of wide and narrow, with 1s representing "wide" and 0s representing narrow. + + + + Records the size of all runs of white and black pixels, starting with white. + This is just like recordPattern, except it records all the counters, and + uses our builtin "counters" member for storage. + + row to count from + + + + This class renders CodaBar as []. + + dsbnatut@gmail.com (Kazuki Nishiura) + + + + The class holds the available options for the QrCodeWriter + + + + + if true, don't switch to codeset C for numbers + + + + +

Decodes Code 128 barcodes.

+ + Sean Owen +
+
+ + + This object renders a CODE128 code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + +

Decodes Code 39 barcodes. Supports "Full ASCII Code 39" if USE_CODE_39_EXTENDED_MODE is set.

+ Sean Owen + @see Code93Reader +
+
+ + + Returns a string with all possible characters + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. It will not decoded "extended Code 39" sequences. + + + + + Creates a reader that can be configured to check the last character as a check digit. + It will not decoded "extended Code 39" sequences. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + + Creates a reader that can be configured to check the last character as a check digit, + or optionally attempt to decode "extended Code 39" sequences that are used to encode + the full ASCII character set. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + if true, will attempt to decode extended Code 39 sequences in the text. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a CODE39 code as a . + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Decodes Code 93 barcodes.

+ Sean Owen + +
+
+ + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a CODE93 code as a BitMatrix + + + + + + output to append to + start position + pattern to append + unused + 9 + + + +

Implements decoding of the EAN-13 format.

+ + dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Initializes a new instance of the class. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + Get the format of this decoder. + The 1D format. + + + + + Based on pattern of odd-even ('L' and 'G') patterns used to encoded the explicitly-encoded + digits in a barcode, determines the implicitly encoded first digit and adds it to the + result string. + + string to insert decoded first digit into + int whose bits indicates the pattern of odd/even L/G patterns used to + encode digits + -1 if first digit cannot be determined + + + + This object renders an EAN13 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Implements decoding of the EAN-8 format.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Get the format of this decoder. + The 1D format. + + + + + This object renders an EAN8 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + + + a byte array of horizontal pixels (false = white, true = black) + + + + + Records EAN prefix to GS1 Member Organization, where the member organization + correlates strongly with a country. This is an imperfect means of identifying + a country of origin by EAN-13 barcode value. See + + http://en.wikipedia.org/wiki/List_of_GS1_country_codes. + + Sean Owen + + + + +

Implements decoding of the ITF format, or Interleaved Two of Five.

+ +

This Reader will scan ITF barcodes of certain lengths only. + At the moment it reads length 6, 8, 10, 12, 14, 16, 18, 20, 24, 44 and 48 as these have appeared "in the wild". Not all + lengths are scanned, especially shorter ones, to avoid false positives. This in turn is due to a lack of + required checksum function.

+ +

The checksum is optional and is not applied by this Reader. The consumer of the decoded + value will have to apply a checksum if required.

+ +

http://en.wikipedia.org/wiki/Interleaved_2_of_5 + is a great reference for Interleaved 2 of 5 information.

+ + kevin.osullivan@sita.aero, SITA Lab. +
+
+ + + Valid ITF lengths. Anything longer than the largest value is also allowed. + + + + + Start/end guard pattern. + + Note: The end pattern is reversed because the row is reversed before + searching for the END_PATTERN + + + + + Patterns of Wide / Narrow lines to indicate each digit + + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + + row of black/white values to search + offset of start pattern + The payload end. + to append decoded chars to + + false, if decoding could not complete successfully + + + + + Identify where the start of the middle / payload section starts. + + row of black/white values to search + Array, containing index of start of 'start block' and end of 'start block' + + + + The start & end patterns must be pre/post fixed by a quiet zone. This + zone must be at least 10 times the width of a narrow line. Scan back until + we either get to the start of the barcode or match the necessary number of + quiet zone pixels. + + Note: Its assumed the row is reversed when using this method to find + quiet zone after the end pattern. + + ref: http://www.barcode-1.net/i25code.html + + bit array representing the scanned barcode. + index into row of the start or end pattern. + false, if the quiet zone cannot be found + + + + Skip all whitespace until we get to the first black line. + + row of black/white values to search + index of the first black line or -1 if no black lines are found in the row. + + + + Identify where the end of the middle / payload section ends. + + row of black/white values to search + Array, containing index of start of 'end block' and end of 'end + block' or null, if nothing found + + + + + row of black/white values to search + position to start search + pattern of counts of number of black and white pixels that are being searched for as a pattern + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a sequence of ITF black/white lines into single + digit. + + the counts of runs of observed black/white/black/... values + The decoded digit + + false, if digit cannot be decoded + + + + + This object renders a ITF code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code bool[]} of horizontal pixels (false = white, true = black) + + + + + + + Decodes MSI barcodes. + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. + + + + + Creates a reader that can be configured to check the last character as a check digit, + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a MSI code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + This object renders a Plessey code as a . + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

A reader that can read all available UPC/EAN formats. If a caller wants to try to + read all such formats, it is most efficient to use this implementation rather than invoke + individual readers.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Encapsulates functionality and implementation that is common to one-dimensional barcodes.

+ dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + a byte array of horizontal pixels (0 = white, 1 = black) + + + + Appends the given pattern to the target array starting at pos. + + encode black/white pattern into this array + position to start encoding at in target + lengths of black/white runs to encode + starting color - false for white, true for black + the number of elements added to target. + + + + Gets the default margin. + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + + barcode contents to encode + a bool[] of horizontal pixels (false = white, true = black) + + + + Calculates the checksum digit modulo10. + + The contents. + + + + + Encapsulates functionality and implementation that is common to all families + of one-dimensional barcodes. + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + + + + + + + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + Note that we don't try rotation without the try harder flag, even if rotation was supported. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + We're going to examine rows from the middle outward, searching alternately above and below the + middle, and farther out each time. rowStep is the number of rows between each successive + attempt above and below the middle. So we'd scan row middle, then middle - rowStep, then + middle + rowStep, then middle - (2 * rowStep), etc. + rowStep is bigger as the image is taller, but is always at least 1. We've somewhat arbitrarily + decided that moving up and down by about 1/16 of the image is pretty good; we try more of the + image if "trying harder". + + The image to decode + Any hints that were requested + The contents of the decoded barcode + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the pattern in reverse. + + The row. + The start. + The counters. + + + + + Determines how closely a set of observed counts of runs of black/white values matches a given + target pattern. This is reported as the ratio of the total variance from the expected pattern + proportions across all pattern elements, to the length of the pattern. + + observed counters + expected pattern + The most any counter can differ before we give up + ratio of total variance between counters and pattern compared to total pattern size, + where the ratio has been multiplied by 256. So, 0 means no variance (perfect match); 256 means + the total variance between counters and patterns equals the pattern length, higher values mean + even more variance + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + Superclass of implementations that read barcodes in the RSS family of formats. + + + + + Initializes a new instance of the class. + + + + + Gets the decode finder counters. + + + + + + Gets the data character counters. + + + + + + Gets the odd rounding errors. + + + + + + Gets the even rounding errors. + + + + + + Gets the odd counts. + + + + + + Gets the even counts. + + + + + + Parses the finder value. + + The counters. + The finder patterns. + The value. + + + + + Counts the specified array. + + The array. + + + + + Increments the specified array. + + The array. + The errors. + + + + Decrements the specified array. + + The array. + The errors. + + + + Determines whether [is finder pattern] [the specified counters]. + + The counters. + + true if [is finder pattern] [the specified counters]; otherwise, false. + + + + + Encapsulates a since character value in an RSS barcode, including its checksum information. + + + + + Gets the value. + + + + + Gets the checksum portion. + + + + + Initializes a new instance of the class. + + The value. + The checksum portion. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Gets the information. + + + + + + Parses the information. + + + + + + Creates the decoder. + + The information. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + One row of an RSS Expanded Stacked symbol, consisting of 1+ expanded pairs. + + + + + Did this row of the image have to be reversed (mirrored) to recognize the pairs? + + + + + Two rows are equal if they contain the same pairs in the same order. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Encapsulates an RSS barcode finder pattern, including its start/end position and row. + + + + + Gets the value. + + + + + Gets the start end. + + + + + Gets the result points. + + + + + Initializes a new instance of the class. + + The value. + The start end. + The start. + The end. + The row number. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Decodes RSS-14, including truncated and stacked variants. See ISO/IEC 24724:2006. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Adapted from listings in ISO/IEC 24724 Appendix B and Appendix G. + + + + + Gets the RS svalue. + + The widths. + Width of the max. + if set to true [no narrow]. + + + + +

Implements decoding of the UPC-A format.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen +
+
+ + +

Like decodeRow(int, BitArray, java.util.Map), but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ + + + + +
+ + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Decodes the specified image. + + The image. + The hints. + + + + + Get the format of this decoder. + The 1D format. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + This object renders a UPC-A code as a . + qwandor@google.com (Andrew Walbran) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + @see UPCEANExtension5Support + + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + + + @see UPCEANExtension2Support + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + one {@link ResultMetadataType} to appropriate value, or {@code null} if not known + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Start/end guard pattern. + + + + + Pattern marking the middle of a UPC/EAN pattern, separating the two halves. + + + + + end guard pattern. + + + + + "Odd", or "L" patterns used to encode UPC/EAN digits. + + + + + As above but also including the "even", or "G" patterns used to encode UPC/EAN digits. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + +

Like , but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ row index into the image + encoding of the row of the barcode image + start/end column where the opening start pattern was found + optional hints that influence decoding + encapsulating the result of decoding a barcode in the row +
+ + + + string of digits to check + see + + + + Computes the UPC/EAN checksum on a string of digits, and reports + whether the checksum is correct or not. + + string of digits to check + true iff string of digits passes the UPC/EAN checksum algorithm + + + + Decodes the end. + + The row. + The end start. + + + + + + row of black/white values to search + position to start search + if true, indicates that the pattern specifies white/black/white/... + pixel counts, otherwise, it is interpreted as black/white/black/... + pattern of counts of number of black and white pixels that are being + searched for as a pattern + array of counters, as long as pattern, to re-use + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a single UPC/EAN-encoded digit. + + row of black/white values to decode + the counts of runs of observed black/white/black/... values + horizontal offset to start decoding from + the set of patterns to use to decode -- sometimes different encodings + for the digits 0-9 are used, and this indicates the encodings for 0 to 9 that should + be used + horizontal offset of first pixel beyond the decoded digit + + + + Get the format of this decoder. + + The 1D format. + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ aripollak@gmail.com (Ari Pollak) + dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Gets the default margin. + + + + +

Implements decoding of the UPC-E format.

+

Thisis a great reference for + UPC-E information.

+ Sean Owen +
+
+ + + The pattern that marks the middle, and end, of a UPC-E pattern. + There is no "second half" to a UPC-E barcode. + + + + + See L_AND_G_PATTERNS these values similarly represent patterns of + even-odd parity encodings of digits that imply both the number system (0 or 1) + used, and the check digit. + + + + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Decodes the end. + + The row. + The end start. + + + + + see checkStandardUPCEANChecksum(String) + + + + + + + Determines the num sys and check digit. + + The result string. + The lg pattern found. + + + + + Get the format of this decoder. + The 1D format. + + + + + Expands a UPC-E value back into its full, equivalent UPC-A code value. + + UPC-E code as string of digits + equivalent UPC-A code as string of digits + + + + + This object renders an UPC-E code as a {@link BitMatrix}. + @author 0979097955s@gmail.com (RX) + + + + + Metadata about a PDF417 Barcode + + Guenther Grau + + + + A Barcode Value for the PDF417 barcode. + The scanner will iterate through the bitmatrix, + and given the different methods or iterations + will increment a given barcode value's confidence. + + When done, this will return the values of highest confidence. + + Guenther Grau + + + + Incremenets the Confidence for a given value. (Adds an occurance of a value) + + + Value. + + + + Determines the maximum occurrence of a set value and returns all values which were set with this occurrence. + + an array of int, containing the values with the highest occurrence, or null, if no value was set. + + + + Returns the confience value for a given barcode value + + Barcode value. + + + + A Bounding Box helper class + + Guenther Grau + + + + Initializes a new instance of the class. + returns null if the corner points don't match up correctly + + The image. + The top left. + The bottom left. + The top right. + The bottom right. + + + + + Creates the specified box. + + The box. + + + + + Initializes a new instance of the class. + Will throw an exception if the corner points don't match up correctly + + Image. + Top left. + Top right. + Bottom left. + Bottom right. + + + + Merge two Bounding Boxes, getting the left corners of left, and the right corners of right + (Images should be the same) + + Left. + Right. + + + + Adds the missing rows. + + The missing rows. + Missing start rows. + Missing end rows. + If set to true is left. + + + + Calculates the minimum and maximum X & Y values based on the corner points. + + + + + If we adjust the width, set a new right corner coordinate and recalculate + + Bottom right. + + + + A Codeword in the PDF417 barcode + + Guenther Grau + + + + Default value for the RowNumber (-1 being an invalid real number) + + + + + Initializes a new instance of the class. + + Start x. + End x. + Bucket. + Value. + + + + Gets the width. + + The width. + + + + Gets a value indicating whether this instance has valid row number. + + true if this instance has valid row number; otherwise, false. + + + + Determines whether this instance is valid row number the specified rowNumber. + + true if this instance is valid row number the specified rowNumber; otherwise, false. + Row number. + + + + Sets the row number as the row's indicator column. + + + + + Returns a that represents the current . + + A that represents the current . + + + +

This class contains the methods for decoding the PDF417 codewords.

+ + SITA Lab (kevin.osullivan@sita.aero) +
+
+ + + Table containing values for the exponent of 900. + This is used in the numeric compaction decode algorithm. + + + + + Text Compaction mode (see 5.4.1.5) permits all printable ASCII characters to be + encoded, i.e. values 32 - 126 inclusive in accordance with ISO/IEC 646 (IRV), as + well as selected control characters. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + The Text Compaction mode includes all the printable ASCII characters + (i.e. values from 32 to 126) and three ASCII control characters: HT or tab + (ASCII value 9), LF or line feed (ASCII value 10), and CR or carriage + return (ASCII value 13). The Text Compaction mode also includes various latch + and shift characters which are used exclusively within the mode. The Text + Compaction mode encodes up to 2 characters per codeword. The compaction rules + for converting data into PDF417 codewords are defined in 5.4.2.2. The sub-mode + switches are defined in 5.4.2.3. + + The text compaction data. + The byte compaction data if there + was a mode shift. + The size of the text compaction and byte compaction data. + The decoded data is appended to the result. + + + + + Byte Compaction mode (see 5.4.3) permits all 256 possible 8-bit byte values to be encoded. + This includes all ASCII characters value 0 to 127 inclusive and provides for international + character set support. + + The byte compaction mode i.e. 901 or 924 + The array of codewords (data + error) + Currently active character encoding + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Numeric Compaction mode (see 5.4.4) permits efficient encoding of numeric data strings. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Convert a list of Numeric Compacted codewords from Base 900 to Base 10. + EXAMPLE + Encode the fifteen digit numeric string 000213298174000 + Prefix the numeric string with a 1 and set the initial value of + t = 1 000 213 298 174 000 + Calculate codeword 0 + d0 = 1 000 213 298 174 000 mod 900 = 200 + + t = 1 000 213 298 174 000 div 900 = 1 111 348 109 082 + Calculate codeword 1 + d1 = 1 111 348 109 082 mod 900 = 282 + + t = 1 111 348 109 082 div 900 = 1 234 831 232 + Calculate codeword 2 + d2 = 1 234 831 232 mod 900 = 632 + + t = 1 234 831 232 div 900 = 1 372 034 + Calculate codeword 3 + d3 = 1 372 034 mod 900 = 434 + + t = 1 372 034 div 900 = 1 524 + Calculate codeword 4 + d4 = 1 524 mod 900 = 624 + + t = 1 524 div 900 = 1 + Calculate codeword 5 + d5 = 1 mod 900 = 1 + t = 1 div 900 = 0 + Codeword sequence is: 1, 624, 434, 632, 282, 200 + + Decode the above codewords involves + 1 x 900 power of 5 + 624 x 900 power of 4 + 434 x 900 power of 3 + + 632 x 900 power of 2 + 282 x 900 power of 1 + 200 x 900 power of 0 = 1000213298174000 + + Remove leading 1 => Result is 000213298174000 + The array of codewords + The number of codewords + The decoded string representing the Numeric data. + + + + + + + Guenther Grau + + + + Returns the DetectionResult Columns. This does a fair bit of calculation, so call it sparingly. + + The detection result columns. + + + + Adjusts the indicator column row numbers. + + Detection result column. + + + + return number of codewords which don't have a valid row number. Note that the count is not accurate as codewords . + will be counted several times. It just serves as an indicator to see when we can stop adjusting row numbers + + The row numbers. + + + + Adjusts the row numbers by row. + + The row numbers by row. + + + + Adjusts the row numbers from both Row Indicators + + zero + + + + Adjusts the row numbers from Right Row Indicator. + + The unadjusted row count. + + + + Adjusts the row numbers from Left Row Indicator. + + Unadjusted row Count. + + + + Adjusts the row number if valid. + + The invalid rows + Row indicator row number. + Invalid row counts. + Codeword. + + + + Adjusts the row numbers. + + Barcode column. + Codewords row. + Codewords. + + + + Adjusts the row number. + + true, if row number was adjusted, false otherwise. + Codeword. + Other codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + The maximum distance to search in the codeword array in both the positive and negative directions + + + + + The Bounding Box around the column (in the BitMatrix) + + The box. + + + + The Codewords the Box encodes for, offset by the Box minY. + Remember to Access this ONLY through GetCodeword(imageRow) if you're accessing it in that manner. + + The codewords. + + + + Initializes a new instance of the class. + + The Bounding Box around the column (in the BitMatrix) + + + + Converts the Image's Row to the index in the Codewords array + + The Codeword Index. + Image row. + + + + Converts the Codeword array index into a Row in the Image (BitMatrix) + + The Image Row. + Codeword index. + + + + Gets the codeword for a given row + + The codeword. + Image row. + + + + Gets the codeword closest to the specified row in the image + + Image row. + + + + Sets the codeword for an image row + + Image row. + Codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + Gets or sets a value indicating whether this instance is the left indicator + + true if this instance is left; otherwise, false. + + + + Initializes a new instance of the class. + + Box. + If set to true is left. + + + + Sets the Row Numbers as Inidicator Columns + + + + + TODO implement properly + TODO maybe we should add missing codewords to store the correct row number to make + finding row numbers for other columns easier + use row height count to make detection of invalid row numbers more reliable + + The indicator column row numbers. + Metadata. + + + + Gets the row heights. + + The row heights. + + + + Adjusts the in omplete indicator column row numbers. + + Metadata. + + + + Gets the barcode metadata. + + The barcode metadata. + + + + Prune the codewords which do not match the metadata + TODO Maybe we should keep the incorrect codewords for the start and end positions? + + Codewords. + Metadata. + + + + Returns a that represents the current . + + A that represents the current . + + + +

PDF417 error correction implementation.

+

This example + is quite useful in understanding the algorithm.

+ Sean Owen + +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the specified received. + + received codewords + number of those codewords used for EC + location of erasures + The error locations count. + + + + + Runs the euclidean algorithm (Greatest Common Divisor) until r's degree is less than R/2 + + The euclidean algorithm. + + + + Finds the error locations as a direct application of Chien's search + + The error locations. + Error locator. + + + + Finds the error magnitudes by directly applying Forney's Formula + + The error magnitudes. + Error evaluator. + Error locator. + Error locations. + + + +

A field based on powers of a generator integer, modulo some modulus.

+ +
+ Sean Owen +
+ + + + + Sean Owen + + + + Gets the coefficients. + + The coefficients. + + + + degree of this polynomial + + + + + Gets a value indicating whether this instance is zero. + + true if this polynomial is the monomial "0" + + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + + + Adds another Modulus + + Other. + + + + Subtract another Modulus + + Other. + + + + Multiply by another Modulus + + Other. + + + + Returns a Negative version of this instance + + + + + Multiply by a Scalar. + + Scalar. + + + + Multiplies by a Monomial + + The by monomial. + Degree. + Coefficient. + + + + Returns a that represents the current . + + A that represents the current . + + + + + + Guenther Grau + creatale GmbH (christoph.schulz@creatale.de) + + + + The ratios table + + + + + Initializes the class & Pre-computes the symbol ratio table. + + + + + Gets the decoded value. + + The decoded value. + Module bit count. + + + + Samples the bit counts. + + The bit counts. + Module bit count. + + + + Gets the decoded codeword value. + + The decoded codeword value. + Module bit count. + + + + Gets the bit value. + + The bit value. + Module bit count. + + + + Gets the closest decoded value. + + The closest decoded value. + Module bit count. + + + + + + Guenther Grau + + + + Decode the specified image, imageTopLeft, imageBottomLeft, imageTopRight, imageBottomRight, minCodewordWidth + and maxCodewordWidth. + TODO: don't pass in minCodewordWidth and maxCodewordWidth, pass in barcode columns for start and stop pattern + columns. That way width can be deducted from the pattern column. + This approach also allows to detect more details about the barcode, e.g. if a bar type (white or black) is wider + than it should be. This can happen if the scanner used a bad blackpoint. + + Image. + Image top left. + Image bottom left. + Image top right. + Image bottom right. + Minimum codeword width. + Max codeword width. + + + + Merge the specified leftRowIndicatorColumn and rightRowIndicatorColumn. + + Left row indicator column. + Right row indicator column. + + + + Adjusts the bounding box. + + The bounding box. + Row indicator column. + + + + Gets the barcode metadata. + + The barcode metadata. + Left row indicator column. + Right row indicator column. + + + + Gets the row indicator column. + + The row indicator column. + Image. + Bounding box. + Start point. + If set to true left to right. + Minimum codeword width. + Max codeword width. + + + + Adjusts the codeword count. + + Detection result. + Barcode matrix. + + + + Creates the decoder result. + + The decoder result. + Detection result. + + + + This method deals with the fact, that the decoding process doesn't always yield a single most likely value. The + current error correction implementation doesn't deal with erasures very well, so it's better to provide a value + for these ambiguous codewords instead of treating it as an erasure. The problem is that we don't know which of + the ambiguous values to choose. We try decode using the first value, and if that fails, we use another of the + ambiguous values and try to decode again. This usually only happens on very hard to read and decode barcodes, + so decoding the normal barcodes is not affected by this. + + The decoder result from ambiguous values. + Ec level. + Codewords. + contains the indexes of erasures. + array with the indexes that have more than one most likely value. + two dimensional array that contains the ambiguous values. The first dimension must + be the same Length as the ambiguousIndexes array. + + + + Creates the barcode matrix. + + The barcode matrix. + Detection result. + + + + Tests to see if the Barcode Column is Valid + + true, if barcode column is valid, false otherwise. + Detection result. + Barcode column. + + + + Gets the start column. + + The start column. + Detection result. + Barcode column. + Image row. + If set to true left to right. + + + + Detects the codeword. + + The codeword. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + Minimum codeword width. + Max codeword width. + + + + Gets the module bit count. + + The module bit count. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + + + + Gets the number of EC code words. + + The number of EC code words. + Barcode EC level. + + + + Adjusts the codeword start column. + + The codeword start column. + Image. + Minimum column. + Max column. + If set to true left to right. + Codeword start column. + Image row. + + + + Checks the codeword for any skew. + + true, if codeword is within the skew, false otherwise. + Codeword size. + Minimum codeword width. + Max codeword width. + + + + Decodes the codewords. + + The codewords. + Codewords. + Ec level. + Erasures. + + + + Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place. + + The errors. + data and error correction codewords. + positions of any known erasures. + number of error correction codewords that are available in codewords. + + + + Verifies that all is well with the the codeword array. + + Codewords. + Number EC codewords. + + + + Gets the bit count for codeword. + + The bit count for codeword. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Module bit count. + + + + Returns a that represents the jagged array. + + A that represents the jagged array. + Barcode matrix as a jagged array. + + + +

Encapsulates logic that can detect a PDF417 Code in an image, even if the + PDF417 Code is rotated or skewed, or partially obscured.

+ + SITA Lab (kevin.osullivan@sita.aero) + dswitkin@google.com (Daniel Switkin) + Guenther Grau +
+
+ + + B S B S B S B S Bar/Space pattern + 11111111 0 1 0 1 0 1 000. + + + + + 1111111 0 1 000 1 0 1 00 1 + + + + + if we set the value too low, then we don't detect the correct height of the bar if the start patterns are damaged. + if we set the value too high, then we might detect the start pattern from a neighbor barcode. + + + + + A PDF471 barcode should have at least 3 rows, with each row being >= 3 times the module width. Therefore it should be at least + 9 pixels tall. To be conservative, we use about half the size to ensure we don't miss it. + + + + +

Detects a PDF417 Code in an image. Only checks 0 and 180 degree rotations.

+
+ barcode image to decode + optional hints to detector + if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned + + encapsulating results of detecting a PDF417 code + +
+ + + Detects PDF417 codes in an image. Only checks 0 degree rotation (so rotate the matrix and check again outside of this method) + + multiple if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned. + bit matrix to detect barcodes in. + List of ResultPoint arrays containing the coordinates of found barcodes + + + + Locate the vertices and the codewords area of a black blob using the Start and Stop patterns as locators. + + Matrix. + Start row. + Start column. + an array containing the vertices: + vertices[0] x, y top left barcode + vertices[1] x, y bottom left barcode + vertices[2] x, y top right barcode + vertices[3] x, y bottom right barcode + vertices[4] x, y top left codeword area + vertices[5] x, y bottom left codeword area + vertices[6] x, y top right codeword area + vertices[7] x, y bottom right codeword area + + + + + Copies the temp data to the final result + + Result. + Temp result. + Destination indexes. + + + + Finds the rows with the given pattern. + + The rows with pattern. + Matrix. + Height. + Width. + Start row. + Start column. + Pattern. + + + + Finds the guard pattern. Uses System.Linq.Enumerable.Repeat to fill in counters. This might be a performance issue? + + start/end horizontal offset of guard pattern, as an array of two ints. + matrix row of black/white values to search + column x position to start search. + row y position to start search. + width the number of pixels to search on this row. + If set to true search the white patterns first. + pattern of counts of number of black and white pixels that are being searched for as a pattern. + counters array of counters, as long as pattern, to re-use . + + + + Determines how closely a set of observed counts of runs of black/white. + values matches a given target pattern. This is reported as the ratio of + the total variance from the expected pattern proportions across all + pattern elements, to the length of the pattern. + + + ratio of total variance between counters and pattern compared to + total pattern size, where the ratio has been multiplied by 256. + So, 0 means no variance (perfect match); 256 means the total + variance between counters and patterns equals the pattern length, + higher values mean even more variance + + observed counters. + expected pattern. + The most any counter can differ before we give up. + + + + PDF 417 Detector Result class. Skipped private backing stores. + Guenther Grau + + + + + Initializes a new instance of the class. + + Bits. + Points. + + + + defines the level of the error correction / count of error correction codewords + + + + + Holds all of the information for a barcode in a format where it can be easily accessible + + Jacob Haynes + + + + + the height of the matrix (Rows) + the width of the matrix (Cols) + + + + + Jacob Haynes + + + + + Creates a Barcode row of the width + + The width. + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + A boolean which is true if the bar black false if it is white + How many spots wide the bar is. + + + + + This function scales the row + + How much you want the image to be scaled, must be greater than or equal to 1. + the scaled row + + + + + Represents possible PDF417 barcode compaction types. + + + + + + + + + + + + + + + + + + + + + + + + + Data object to specify the minimum and maximum number of rows and columns for a PDF417 barcode. + @author qwandor@google.com (Andrew Walbran) + + + + + Initializes a new instance of the class. + + The min cols. + The max cols. + The min rows. + The max rows. + + + + Gets the min cols. + + + + + Gets the max cols. + + + + + Gets the min rows. + + + + + Gets the max rows. + + + + + Top-level class for the logic part of the PDF417 implementation. + + + + + The start pattern (17 bits) + + + + + The stop pattern (18 bits) + + + + + The codeword table from the Annex A of ISO/IEC 15438:2001(E). + + + + + Calculates the necessary number of rows as described in annex Q of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol (r) + + + + Calculates the number of pad codewords as described in 4.9.2 of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol + the number of pad codewords + + + + Generates the barcode logic. + + the message to encode + PDF417 error correction level to use + + + + Determine optimal nr of columns and rows for the specified number of + codewords. + + number of code words + number of error correction code words + The longest dimension of the barcode, used for columns + The short dimension of the barcode, used for rows + The height of a row, will alter this parameter if aspectRatio>4 (aspectRatio==AUTO) + dimension object containing cols as width and rows as height + + + + Sets max/min row/col values + + maximum allowed columns + minimum allowed columns + maximum allowed rows + minimum allowed rows + + + + Sets compaction to values stored in enum + + compaction mode to use + + + + Sets compact to be true or false + + if true, enables compaction + + + + Sets output encoding. + + sets character encoding to use + + + + Sets the disable eci. + + if set to true don't add an ECI segment for different encodings than default. + + + + PDF417 error correction code following the algorithm described in ISO/IEC 15438:2001(E) in + chapter 4.10. + + + + + Tables of coefficients for calculating error correction words + (see annex F, ISO/IEC 15438:2001(E)) + + + + + Determines the number of error correction codewords for a specified error correction + level. + + the error correction level (0-8) + the number of codewords generated for error correction + + + + Determines the error correction level for AUTO + + The error correction level (0-9) + The number of codewords for AUTO errorCorrectionLevel + the number of codewords generated for error correction + + + + Returns the recommended minimum error correction level as described in annex E of + ISO/IEC 15438:2001(E). + + the number of data codewords + the recommended minimum error correction level + + + + Generates the error correction codewords according to 4.10 in ISO/IEC 15438:2001(E). + + the data codewords + the error correction level (0-8) + the String representing the error correction codewords + + + + defines the level of the error correction / count of error correction codewords + + + + + PDF417 high-level encoder following the algorithm described in ISO/IEC 15438:2001(E) in + annex P. + + + + + code for Text compaction + + + + + code for Byte compaction + + + + + code for Numeric compaction + + + + + Text compaction submode Alpha + + + + + Text compaction submode Lower + + + + + Text compaction submode Mixed + + + + + Text compaction submode Punctuation + + + + + mode latch to Text Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters NOT a multiple of 6) + + + + + mode latch to Numeric Compaction mode + + + + + mode shift to Byte Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters a multiple of 6) + + + + + identifier for a user defined Extended Channel Interpretation (ECI) + + + + + identifier for a general purpose ECO format + + + + + identifier for an ECI of a character set of code page + + + + + Raw code table for text compaction Mixed sub-mode + + + + + Raw code table for text compaction: Punctuation sub-mode + + + + + Performs high-level encoding of a PDF417 message using the algorithm described in annex P + of ISO/IEC 15438:2001(E). If byte compaction has been selected, then only byte compaction + is used. + + the message + compaction mode to use + character encoding used to encode in default or byte compaction + or null for default / not applicable + if true, don't add an ECI segment for different encodings than default + the encoded message (the char values range from 0 to 928) + + + + Encode parts of the message using Text Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.2. + + the message + the start position within the message + the number of characters to encode + receives the encoded codewords + should normally be SUBMODE_ALPHA + the text submode in which this method ends + + + + + Encode parts of the message using Byte Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.3. The Unicode characters will be converted to binary using the cp437 + codepage. + + the message converted to a byte array + the start position within the message + the number of bytes to encode + the mode from which this method starts + receives the encoded codewords + + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using text compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using binary compaction. + + the message + the message converted to a byte array + the start position within the message + + the requested character count + + + + The class holds the available options for the + + + + + Specifies whether to use compact mode for PDF417 (type ). + + + + + Specifies what compaction mode to use for PDF417 (type + ). + + + + + Specifies the minimum and maximum number of rows and columns for PDF417 (type + ). + + + + + Specifies what degree of error correction to use + + + + + Specifies what degree of error correction to use + + + + + Specifies what character encoding to use where applicable (type {@link String}) + + + + + Explicitly disables ECI segment when generating PDF417 Code + That is against the specification but some + readers have problems if the charset is switched from + CP437 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use different encodings + and the ECI segment is omitted. + + + + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Maximum Codewords (Data + Error). + + + + + Gets the bit count sum. + + The bit count sum. + Module bit count. + + + + Converts an ICollection<int> to an int[] + Carry-over from Java. Will likely remove and replace with the Generic .ToArray() method. + + The int array. + List. + + + + Translate the symbol into a codeword + + the codeword corresponding to the symbol. + encoded symbol to translate to a codeword + + + + The sorted table of all possible symbols. Extracted from the PDF417 + specification. The index of a symbol in this table corresponds to the + index into the codeword table. + + + + + This table contains to codewords for all symbols. + + + + + This implementation can detect and decode PDF417 codes in an image. + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Locates and decodes a PDF417 code in an image. + + a String representing the content encoded by the PDF417 code + if a PDF417 cannot be decoded + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + **Note** this will return the FIRST barcode discovered if there are many. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Locates and decodes Multiple PDF417 codes in an image. + + an array of Strings representing the content encoded by the PDF417 codes + + + + + Locates and decodes multiple barcodes in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcodes encode + + + + + Decode the specified image, with the hints and optionally multiple barcodes. + Based on Owen's Comments in , this method has been modified to continue silently + if a barcode was not decoded where it was detected instead of throwing a new exception object. + + Image. + Hints. + If set to true multiple. + + + + Gets the maximum width of the barcode + + The max width. + P1. + P2. + + + + Gets the minimum width of the barcode + + The minimum width. + P1. + P2. + + + + Gets the maximum width of the codeword. + + The max codeword width. + P. + + + + Gets the minimum width of the codeword. + + The minimum codeword width. + P. + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + PDF 417 result meta data. + Guenther Grau + + + + + The Segment ID represents the segment of the whole file distributed over different symbols. + + + + + Is the same for each related PDF417 symbol + + + + + always null + + + + + true if it is the last segment + + + + + count of segments, -1 if not set + + + + + Filename of the encoded file + + + + + filesize in bytes of the encoded file + returns filesize in bytes, -1 if not set + + + + + 16-bit CRC checksum using CCITT-16 + returns crc checksum, -1 if not set + + + + + unix epock timestamp, elapsed seconds since 1970-01-01 + returns elapsed seconds, -1 if not set + + + + + Jacob Haynes + qwandor@google.com (Andrew Walbran) + + + + + default white space (margin) around the code + + + + + default error correction level + + + + + default aspect ratio + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The height of a row in the barcode + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Takes encoder, accounts for width/height, and retrieves bit matrix + + + + + This takes an array holding the values of the PDF 417 + + a byte array of information with 0 is black, and 1 is white + border around the barcode + BitMatrix of the input + + + + Takes and rotates the it 90 degrees + + + + + This object extends LuminanceSource around an array of YUV data returned from the camera driver, + with the option to crop to a rectangle within the full data. This can be used to exclude + superfluous pixels around the perimeter and speed up decoding. + It works for any pixel format where the Y channel is planar and appears first, including + YCbCr_420_SP and YCbCr_422_SP. + @author dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The yuv data. + Width of the data. + Height of the data. + The left. + The top. + The width. + The height. + if set to true [reverse horiz]. + + + + Initializes a new instance of the class. + + The luminances. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + + + + + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Renders the cropped greyscale bitmap. + + + + + + width of image from {@link #renderThumbnail()} + + + + + height of image from {@link #renderThumbnail()} + + + + + creates a new instance + + + + + + + + Sean Owen + + + {@link BitMatrix} to parse + ReaderException if dimension is not >= 21 and 1 mod 4 + + +

Reads format information from one of its two locations within the QR Code.

+ +
+ {@link FormatInformation} encapsulating the QR Code's format info + + ReaderException if both format information locations cannot be parsed as + the valid encoding of format information + +
+ +

Reads version information from one of its two locations within the QR Code.

+ +
+ {@link Version} encapsulating the QR Code's version + + ReaderException if both version information locations cannot be parsed as + the valid encoding of version information + +
+ +

Reads the bits in the {@link BitMatrix} representing the finder pattern in the + correct order in order to reconstruct the codewords bytes contained within the + QR Code.

+ +
+ bytes encoded within the QR Code + + ReaderException if the exact number of bytes expected is not read +
+ + Revert the mask removal done while reading the code words. The bit matrix should revert to its original state. + + + Prepare the parser for a mirrored operation. + This flag has effect only on the {@link #readFormatInformation()} and the + {@link #readVersion()}. Before proceeding with {@link #readCodewords()} the + {@link #mirror()} method should be called. + + @param mirror Whether to read version and format information mirrored. + + + Mirror the bit matrix in order to attempt a second reading. + + +

Encapsulates a block of data within a QR Code. QR Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

When QR Codes use multiple data blocks, they are actually interleaved. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ +
+ bytes as read directly from the QR Code + + version of the QR Code + + error-correction level of the QR Code + + {@link DataBlock}s containing original bytes, "de-interleaved" from representation in the + QR Code + +
+ +

Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations + of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix, + including areas used for finder patterns, timing patterns, etc. These areas should be unused + after the point they are unmasked anyway.

+ +

Note that the diagram in section 6.8.1 is misleading since it indicates that i is column position + and j is row position. In fact, as the text says, i is row position and j is column position.

+ +
+ Sean Owen +
+ + See ISO 18004:2006 6.8.1 + + +

Implementations of this method reverse the data masking process applied to a QR Code and + make its bits ready to read.

+
+ + representation of QR Code bits + dimension of QR Code, represented by bits, being unmasked +
+ +

QR Codes can encode text as bits in one of several modes, and can use multiple modes + in one QR Code. This class decodes the bits back into text.

+ +

See ISO 18004:2006, 6.4.3 - 6.4.7

+ Sean Owen +
+
+ + + See ISO 18004:2006, 6.4.4 Table 5 + + + + + See specification GBT 18284-2000 + + The bits. + The result. + The count. + + + + +

The main class which implements QR Code decoding -- as opposed to locating and extracting + the QR Code from an image.

+
+ + Sean Owen + +
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a QR Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Decodes a QR Code represented as a {@link BitMatrix}. A 1 or "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+
+ data and error correction codewords + number of codewords that are data bytes + +
+ + +

See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels + defined by the QR code standard.

+
+ Sean Owen +
+ + L = ~7% correction + + + M = ~15% correction + + + Q = ~25% correction + + + H = ~30% correction + + + + Gets the bits. + + + + + Gets the name. + + + + + Ordinals this instance. + + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Fors the bits. + + int containing the two bits encoding a QR Code's error correction level + + representing the encoded error correction level + + + +

Encapsulates a QR Code's format information, including the data mask used and + error correction level.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + +
+ + See ISO 18004:2006, Annex C, Table C.1 + + + Offset i holds the number of 1 bits in the binary representation of i + + + + Decodes the format information. + + format info indicator, with mask still applied + The masked format info2. + + information about the format it specifies, or null + if doesn't seem to match any known pattern + + + + +

See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which + data can be encoded to bits in the QR code standard.

+
+ Sean Owen +
+ + + Gets the name. + + + + + enumeration for encoding modes + + + + + + + + + + numeric encoding + + + + + alpha-numeric encoding + + + + + structured append + + + + + byte mode encoding + + + + + ECI segment + + + + + Kanji mode + + + + + FNC1 char, first position + + + + + FNC1 char, second position + + + + + Hanzi mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See GBT 18284-2000; "Hanzi" is a transliteration of this mode name. + + + + Fors the bits. + + four bits encoding a QR Code data mode + + encoded by these bits + + if bits do not correspond to a known mode + + + version in question + + number of bits used, in this QR Code symbol {@link Version}, to encode the + count of characters that will follow encoded in this {@link Mode} + + + + + Gets the bits. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Meta-data container for QR Code decoding. Instances of this class may be used to convey information back to the + decoding caller. Callers are expected to process this. + + + + + Initializes a new instance of the class. + + if set to true [mirrored]. + + + + true if the QR Code was mirrored. + + + + + Apply the result points' order correction due to mirroring. + + Array of points to apply mirror correction to. + + + + See ISO 18004:2006 Annex D + + Sean Owen + + + See ISO 18004:2006 Annex D. + Element i represents the raw version bits that specify version i + 7 + + + + + Gets the version number. + + + + + Gets the alignment pattern centers. + + + + + Gets the total codewords. + + + + + Gets the dimension for version. + + + + + Gets the EC blocks for level. + + The ec level. + + + +

Deduces version information purely from QR Code dimensions.

+ +
+ dimension in modules + + for a QR Code of that dimension or null +
+ + + Gets the version for number. + + The version number. + + + + See ISO 18004:2006 Annex E + + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + + Gets the EC codewords per block. + + + + + Gets the num blocks. + + + + + Gets the total EC codewords. + + + + + Gets the EC blocks. + + + + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the QR code version's format.

+
+
+ + + Gets the count. + + + + + Gets the data codewords. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + See ISO 18004:2006 6.5.1 Table 9 + + +

Encapsulates an alignment pattern, which are the smaller square patterns found in + all but the simplest QR Codes.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Determines if this alignment pattern "about equals" an alignment pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing an average of the two. + + The i. + The j. + New size of the module. + + + +

This class attempts to find alignment patterns in a QR Code. Alignment patterns look like finder + patterns but are smaller and appear at regular intervals throughout the image.

+ +

At the moment this only looks for the bottom-right alignment pattern.

+ +

This is mostly a simplified copy of {@link FinderPatternFinder}. It is copied, + pasted and stripped down here for maximum performance but does unfortunately duplicate + some code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Creates a finder that will look in a portion of the whole image.

+ +
+ image to search + + left column from which to start searching + + top row from which to start searching + + width of region to search + + height of region to search + + estimated module size so far + + callback function which is called, when a result point is found +
+ +

This method attempts to find the bottom-right alignment pattern in the image. It is a bit messy since + it's pretty performance-critical and so is written to be fast foremost.

+ +
+ if found +
+ + Given a count of black/white/black pixels just seen and an end position, + figures the location of the center of this black/white/black run. + + + + count of black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/1 ratios + used by alignment patterns to be considered a match + + + + +

After a horizontal scan finds a potential alignment pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + alignment pattern to see if the same proportion is detected.

+
+ row where an alignment pattern was detected + center of the section that appears to cross an alignment pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of alignment pattern, or null if not found + +
+ +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will see if this pattern had been + found on a previous horizontal scan. If so, we consider it confirmed and conclude we have + found the alignment pattern.

+ +
+ reading state module counts from horizontal scan + + row where alignment pattern may be found + + end of possible alignment pattern in row + + {@link AlignmentPattern} if we have found the same pattern twice, or null if not + +
+ + +

Encapsulates logic that can detect a QR Code in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + + Gets the image. + + + + + Gets the result point callback. + + + + +

Detects a QR Code in an image.

+
+ + encapsulating results of detecting a QR Code + +
+ + +

Detects a QR Code in an image.

+
+ optional hints to detector + + encapsulating results of detecting a QR Code + +
+ + + Processes the finder pattern info. + + The info. + + + +

Computes the dimension (number of modules on a size) of the QR Code based on the position + of the finder patterns and estimated module size.

+
+
+ + +

Computes an average estimated module size based on estimated derived from the positions + of the three finder patterns.

+
+ detected top-left finder pattern center + detected top-right finder pattern center + detected bottom-left finder pattern center + estimated module size +
+ +

Estimates module size based on two finder patterns -- it uses + {@link #sizeOfBlackWhiteBlackRunBothWays(int, int, int, int)} to figure the + width of each, measuring along the axis between their centers.

+
+
+ + See {@link #sizeOfBlackWhiteBlackRun(int, int, int, int)}; computes the total width of + a finder pattern by looking for a black-white-black run from the center in the direction + of another point (another finder pattern center), and in the opposite direction too. + + + +

This method traces a line from a point in the image, in the direction towards another point. + It begins in a black region, and keeps going until it finds white, then black, then white again. + It reports the distance from the start to this point.

+ +

This is used when figuring out how wide a finder pattern is, when the finder pattern + may be skewed or rotated.

+
+
+ + +

Attempts to locate an alignment pattern in a limited region of the image, which is + guessed to contain it. This method uses {@link AlignmentPattern}.

+
+ estimated module size so far + x coordinate of center of area probably containing alignment pattern + y coordinate of above + number of pixels in all directions to search from the center + + if found, or null otherwise + +
+ + +

Encapsulates a finder pattern, which are the three square patterns found in + the corners of QR Codes. It also encapsulates a count of similar finder patterns, + as a convenience to the finder's bookkeeping.

+
+ Sean Owen +
+ + + Gets the size of the estimated module. + + + The size of the estimated module. + + + +

Determines if this finder pattern "about equals" a finder pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing a weighted average + based on count. + + The i. + The j. + New size of the module. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+
+ Sean Owen +
+ + + 1 pixel/module times 3 modules/center + + + + + support up to version 20 for mobile clients + + + + +

Creates a finder that will search the image for three finder patterns.

+
+ image to search +
+ + + Initializes a new instance of the class. + + The image. + The result point callback. + + + + Gets the image. + + + + + Gets the possible centers. + + + + Given a count of black/white/black/white/black pixels just seen and an end position, + figures the location of the center of this run. + + + + count of black/white/black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/3/1/1 ratios + used by finder patterns to be considered a match + + + + + + count of black/white/black/white/black pixels just read + true if the proportions of the counts is close enough to the 1/1/3/1/1 ratios + by finder patterns to be considered a match + + + + After a vertical and horizontal scan finds a potential finder pattern, this method + "cross-cross-cross-checks" by scanning down diagonally through the center of the possible + finder pattern to see if the same proportion is detected. + @param maxCount maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + @param originalStateCountTotal The original state count total. + + row where a finder pattern was detected + center of the section that appears to cross a finder pattern + true if proportions are withing expected limits + + + +

After a horizontal scan finds a potential finder pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + finder pattern to see if the same proportion is detected.

+
+ row where a finder pattern was detected + center of the section that appears to cross a finder pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of finder pattern, or null if not found + +
+ +

Like {@link #crossCheckVertical(int, int, int, int)}, and in fact is basically identical, + except it reads horizontally instead of vertically. This is used to cross-cross + check a vertical cross check and locate the real center of the alignment pattern.

+
+
+ + + @see #handlePossibleCenter(int[], int, int) + + reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + ignored + true if a finder pattern candidate was found this time + + + +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will, ah, cross-cross-check + with another horizontal scan. This is needed primarily to locate the real horizontal + center of the pattern in cases of extreme skew. + And then we cross-cross-cross check with another diagonal scan.

+ If that succeeds the finder pattern location is added to a list that tracks + the number of times each location has been nearly-matched as a finder pattern. + Each additional find is more evidence that the location is in fact a finder + pattern center +
+ reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + + true if a finder pattern candidate was found this time + +
+ + number of rows we could safely skip during scanning, based on the first + two finder patterns that have been located. In some cases their position will + allow us to infer that the third pattern must lie below a certain point farther + down in the image. + + + + true iff we have found at least 3 finder patterns that have been detected + at least {@link #CENTER_QUORUM} times each, and, the estimated module size of the + candidates is "pretty similar" + + + + the 3 best {@link FinderPattern}s from our list of candidates. The "best" are + those that have been detected at least {@link #CENTER_QUORUM} times, and whose module + size differs from the average among those patterns the least + + + + + Orders by furthest from average + + + +

Orders by {@link FinderPattern#getCount()}, descending.

+
+ + +

Encapsulates information about finder patterns in an image, including the location of + the three finder patterns, and their estimated module size.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The pattern centers. + + + + Gets the bottom left. + + + + + Gets the top left. + + + + + Gets the top right. + + + + + JAVAPORT: The original code was a 2D array of ints, but since it only ever gets assigned + 0, 1 and 2 I'm going to use less memory and go with bytes. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Gets the height. + + + + + Gets the width. + + + + + Gets or sets the with the specified x. + + + + + an internal representation as bytes, in row-major order. array[y][x] represents point (x,y) + + + + + Sets the specified x. + + The x. + The y. + The value. + + + + Sets the specified x. + + The x. + The y. + if set to true [value]. + + + + Clears the specified value. + + The value. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + Encode "bytes" with the error correction level "ecLevel". The encoding mode will be chosen + internally by chooseMode(). On success, store the result in "qrCode". + We recommend you to use QRCode.EC_LEVEL_L (the lowest level) for + "getECLevel" since our primary use is to show QR code on desktop screens. We don't need very + strong error correction for this purpose. + Note that there is no way to encode bytes in MODE_KANJI. We might want to add EncodeWithMode() + with which clients can specify the encoding mode. For now, we don't need the functionality. + + text to encode + error correction level to use + representing the encoded QR code + + + + Encodes the specified content. + + The content. + The ec level. + The hints. + + + + + Decides the smallest version of QR code that will contain all of the provided data. + + if the data cannot fit in any version + + + + Gets the alphanumeric code. + + The code. + the code point of the table used in alphanumeric mode or + -1 if there is no corresponding code in the table. + + + + Chooses the mode. + + The content. + + + + + Choose the best mode by examining the content. Note that 'encoding' is used as a hint; + if it is Shift_JIS, and the input is only double-byte Kanji, then we return {@link Mode#KANJI}. + + The content. + The encoding. + + + + + true if the number of input bits will fit in a code with the specified version and error correction level. + + + + Terminate bits as described in 8.4.8 and 8.4.9 of JISX0510:2004 (p.24). + + The num data bytes. + The bits. + + + + Get number of data bytes and number of error correction bytes for block id "blockID". Store + the result in "numDataBytesInBlock", and "numECBytesInBlock". See table 12 in 8.5.1 of + JISX0510:2004 (p.30) + + The num total bytes. + The num data bytes. + The num RS blocks. + The block ID. + The num data bytes in block. + The num EC bytes in block. + + + + Interleave "bits" with corresponding error correction bytes. On success, store the result in + "result". The interleave rule is complicated. See 8.6 of JISX0510:2004 (p.37) for details. + + The bits. + The num total bytes. + The num data bytes. + The num RS blocks. + + + + + Append mode info. On success, store the result in "bits". + + The mode. + The bits. + + + + Append length info. On success, store the result in "bits". + + The num letters. + The version. + The mode. + The bits. + + + + Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits". + + The content. + The mode. + The bits. + The encoding. + + + + + + Satoru Takabayashi + Daniel Switkin + Sean Owen + + + + Apply mask penalty rule 1 and return the penalty. Find repetitive cells with the same color and + give penalty to them. Example: 00000 or 11111. + + The matrix. + + + + + Apply mask penalty rule 2 and return the penalty. Find 2x2 blocks with the same color and give + penalty to them. This is actually equivalent to the spec's rule, which is to find MxN blocks and give a + penalty proportional to (M-1)x(N-1), because this is the number of 2x2 blocks inside such a block. + + The matrix. + + + + + Apply mask penalty rule 3 and return the penalty. Find consecutive cells of 00001011101 or + 10111010000, and give penalty to them. If we find patterns like 000010111010000, we give + penalties twice (i.e. 40 * 2). + + The matrix. + + + + + Apply mask penalty rule 4 and return the penalty. Calculate the ratio of dark cells and give + penalty if the ratio is far from 50%. It gives 10 penalty for 5% distance. + + The matrix. + + + + + Return the mask bit for "getMaskPattern" at "x" and "y". See 8.8 of JISX0510:2004 for mask + pattern conditions. + + The mask pattern. + The x. + The y. + + + + + Helper function for applyMaskPenaltyRule1. We need this for doing this calculation in both + vertical and horizontal orders respectively. + + The matrix. + if set to true [is horizontal]. + + + + + + + + satorux@google.com (Satoru Takabayashi) - creator + + + + + Set all cells to 2. 2 means that the cell is empty (not set yet). + + JAVAPORT: We shouldn't need to do this at all. The code should be rewritten to begin encoding + with the ByteMatrix initialized all to zero. + + The matrix. + + + + Build 2D matrix of QR Code from "dataBits" with "ecLevel", "version" and "getMaskPattern". On + success, store the result in "matrix" and return true. + + The data bits. + The ec level. + The version. + The mask pattern. + The matrix. + + + + Embed basic patterns. On success, modify the matrix and return true. + The basic patterns are: + - Position detection patterns + - Timing patterns + - Dark dot at the left bottom corner + - Position adjustment patterns, if need be + + The version. + The matrix. + + + + Embed type information. On success, modify the matrix. + + The ec level. + The mask pattern. + The matrix. + + + + Embed version information if need be. On success, modify the matrix and return true. + See 8.10 of JISX0510:2004 (p.47) for how to embed version information. + + The version. + The matrix. + + + + Embed "dataBits" using "getMaskPattern". On success, modify the matrix and return true. + For debugging purposes, it skips masking process if "getMaskPattern" is -1. + See 8.7 of JISX0510:2004 (p.38) for how to embed data bits. + + The data bits. + The mask pattern. + The matrix. + + + + Return the position of the most significant bit set (to one) in the "value". The most + significant bit is position 32. If there is no bit set, return 0. Examples: + - findMSBSet(0) => 0 + - findMSBSet(1) => 1 + - findMSBSet(255) => 8 + + The value_ renamed. + + + + + Calculate BCH (Bose-Chaudhuri-Hocquenghem) code for "value" using polynomial "poly". The BCH + code is used for encoding type information and version information. + Example: Calculation of version information of 7. + f(x) is created from 7. + - 7 = 000111 in 6 bits + - f(x) = x^2 + x^2 + x^1 + g(x) is given by the standard (p. 67) + - g(x) = x^12 + x^11 + x^10 + x^9 + x^8 + x^5 + x^2 + 1 + Multiply f(x) by x^(18 - 6) + - f'(x) = f(x) * x^(18 - 6) + - f'(x) = x^14 + x^13 + x^12 + Calculate the remainder of f'(x) / g(x) + x^2 + __________________________________________________ + g(x) )x^14 + x^13 + x^12 + x^14 + x^13 + x^12 + x^11 + x^10 + x^7 + x^4 + x^2 + -------------------------------------------------- + x^11 + x^10 + x^7 + x^4 + x^2 + + The remainder is x^11 + x^10 + x^7 + x^4 + x^2 + Encode it in binary: 110010010100 + The return value is 0xc94 (1100 1001 0100) + + Since all coefficients in the polynomials are 1 or 0, we can do the calculation by bit + operations. We don't care if coefficients are positive or negative. + + The value. + The poly. + + + + + Make bit vector of type information. On success, store the result in "bits" and return true. + Encode error correction level and mask pattern. See 8.9 of + JISX0510:2004 (p.45) for details. + + The ec level. + The mask pattern. + The bits. + + + + Make bit vector of version information. On success, store the result in "bits" and return true. + See 8.10 of JISX0510:2004 (p.45) for details. + + The version. + The bits. + + + + Check if "value" is empty. + + The value. + + true if the specified value is empty; otherwise, false. + + + + + Embed the lonely dark dot at left bottom corner. JISX0510:2004 (p.46) + + The matrix. + + + + + + The x start. + The y start. + The matrix. + + + + Embed position detection patterns and surrounding vertical/horizontal separators. + + The matrix. + + + + Embed position adjustment patterns if need be. + + The version. + The matrix. + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + + + + + + Initializes a new instance of the class. + + + + + Gets or sets the mode. + + + The mode. + + + + + Gets or sets the EC level. + + + The EC level. + + + + + Gets or sets the version. + + + The version. + + + + + Gets or sets the mask pattern. + + + The mask pattern. + + + + + Gets or sets the matrix. + + + The matrix. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Check if "mask_pattern" is valid. + + The mask pattern. + + true if [is valid mask pattern] [the specified mask pattern]; otherwise, false. + + + + + The class holds the available options for the QrCodeWriter + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + . + + + + + Specifies what character encoding to use where applicable (type ) + + + + + Explicitly disables ECI segment when generating QR Code + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + + + + + Specifies the exact version of QR code to be encoded. An integer, range 1 to 40. If the data specified + cannot fit within the required version, a WriterException will be thrown. + + + + + This implementation can detect and decode QR Codes in an image. + Sean Owen + + + + + Gets the decoder. + + + + + + Locates and decodes a QR code in an image. + + a String representing the content encoded by the QR code + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a QR Code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Implementations of this interface can decode an image of a barcode in some format into + the String it encodes. For example, can + decode a QR code. The decoder may optionally receive hints from the caller which may help + it decode more quickly or accurately. + + See , which attempts to determine what barcode + format is present within the image as well, and then decodes it accordingly. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + String which the barcode encodes + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + The general exception class throw when something goes wrong during decoding of a barcode. + This includes, but is not limited to, failing checksums / error correction algorithms, being + unable to locate finder timing patterns, and so on. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class. + + The inner exception. + + + + Initializes a new instance of the class. + + The inner exception. + + + + + Interface for a class to convert a BitMatrix to an output image format + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + The options. + + + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + + + the generated code as byte array of BGRA pixels + + + + + the width of the image + + + + + the height of the image + + + + + converts the pixel data to a bitmap object + + + + + + Renders a to an byte array with pixel data (4 byte per pixel, BGRA) + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Renders a barcode into a Svg image + + + + + Gets or sets the foreground color. + + The foreground color. + + + + Gets or sets the background color. + + The background color. + + + + Gets or sets the font family name + + The font family name. + + + + Gets or sets the font size in pixel + + The font size in pixel. + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Represents a barcode as a Svg image + + + + + Gets or sets the content. + + + The content. + + + + + The original height of the bitmatrix for the barcode + + + + + The original width of the bitmatrix for the barcode + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The content. + + + + Gives the XML representation of the SVG image + + + + + Renders a to a + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + + Gets or sets the font family. + + + The font family. + + + + + Gets or sets the size of the font. + + + The size of the font. + + + + + Gets or sets the font stretch. + + + The font stretch. + + + + + Gets or sets the font style. + + + The font style. + + + + + Gets or sets the font weight. + + + The font weight. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Encapsulates the result of decoding a barcode within an image. + + + + raw text encoded by the barcode, if applicable, otherwise null + + + raw bytes encoded by the barcode, if applicable, otherwise null + + + + points related to the barcode in the image. These are typically points + identifying finder patterns or the corners of the barcode. The exact meaning is + specific to the type of barcode that was decoded. + + + + {@link BarcodeFormat} representing the format of the barcode that was decoded + + + + {@link Hashtable} mapping {@link ResultMetadataType} keys to values. May be + null. This contains optional metadata about what was detected about the barcode, + like orientation. + + + + + Gets the timestamp. + + + + + how many bits of are valid; typically 8 times its length + + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + The timestamp. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + The timestamp. + + + + Adds one metadata to the result + + The type. + The value. + + + + Adds a list of metadata to the result + + The metadata. + + + + Adds the result points. + + The new points. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Represents some type of metadata about the result of the decoding that the decoder + wishes to communicate back to the caller. + + Sean Owen + + + + Unspecified, application-specific metadata. Maps to an unspecified {@link Object}. + + + + + Denotes the likely approximate orientation of the barcode in the image. This value + is given as degrees rotated clockwise from the normal, upright orientation. + For example a 1D barcode which was found by reading top-to-bottom would be + said to have orientation "90". This key maps to an {@link Integer} whose + value is in the range [0,360). + + + + +

2D barcode formats typically encode text, but allow for a sort of 'byte mode' + which is sometimes used to encode binary data. While {@link Result} makes available + the complete raw bytes in the barcode for these formats, it does not offer the bytes + from the byte segments alone.

+

This maps to a {@link java.util.List} of byte arrays corresponding to the + raw bytes in the byte segments in the barcode, in order.

+
+
+ + + Error correction level used, if applicable. The value type depends on the + format, but is typically a String. + + + + + For some periodicals, indicates the issue number as an {@link Integer}. + + + + + For some products, indicates the suggested retail price in the barcode as a + formatted {@link String}. + + + + + For some products, the possible country of manufacture as a {@link String} denoting the + ISO country code. Some map to multiple possible countries, like "US/CA". + + + + + For some products, the extension text + + + + + If the code format supports structured append and + the current scanned code is part of one then the + sequence number is given with it. + + + + + If the code format supports structured append and + the current scanned code is part of one then the + parity is given with it. + + + + + PDF417-specific metadata + + + + + Aztec-specific metadata + + + + + Encapsulates a point of interest in an image containing a barcode. Typically, this + would be the location of a finder pattern or the corner of the barcode, for example. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The x. + The y. + + + + Gets the X. + + + + + Gets the Y. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC and + BC is less than AC and the angle between BC and BA is less than 180 degrees. + + array of three to order + + + + calculates the distance between two points + + first pattern + second pattern + + distance between two points + + + + + Returns the z component of the cross product between vectors BC and BA. + + + + Callback which is invoked when a possible result point (significant + point in the barcode image such as a corner) is found. + + + + + + + + Luminance source class which support different formats of images. + + + + + enumeration of supported bitmap format which the RGBLuminanceSource can process + + + + + format of the byte[] isn't known. RGBLuminanceSource tries to determine the best possible value + + + + + grayscale array, the byte array is a luminance array with 1 byte per pixel + + + + + grayscale array, the byte array is a luminance array with 2 bytes per pixel + + + + + 3 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels alpha, red, green and blue + + + + + 3 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green, red and alpha + + + + + 2 bytes per pixel, 5 bit red, 6 bits green and 5 bits blue + + + + + 4 bytes per pixel with the channels red, green, blue and alpha + + + + + 4 bytes for two pixels, UYVY formatted + + + + + 4 bytes for two pixels, YUYV formatted + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 1 byte per pixel (Gray8). + That means the whole array consists of the luminance values (grayscale). + + The luminance array. + The width. + The height. + if set to true [is8 bit]. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + The bitmap format. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + calculates the luminance values for the given byte array and bitmap format + + + + + + + Attribute is only for source code compatibility issues + + + + + Attribute is only for compatibility issues + + + + + Contains conversion support elements such as classes, interfaces and static methods. + + + + + Copies an array of chars obtained from a String into a specified array of chars + + The String to get the chars from + Position of the String to start getting the chars + Position of the String to end getting the chars + Array to return the chars + Position of the destination array of chars to start storing the chars + An array of chars + + + + Sets the capacity for the specified List + + The List which capacity will be set + The new capacity value + + + + Converts a string-Collection to an array + + The strings. + + + + + Joins all elements to one string. + + + The separator. + The values. + + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The value. + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The start index. + The end index. + The value. + + + + + + + + + + + + + + + + + + Savely gets the value of a decoding hint + if hints is null the default is returned + + + The hints. + Type of the hint. + The @default. + + + + The base class for all objects which encode/generate a barcode image. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + A base class which covers the range of exceptions which may occur when encoding a barcode using + the Writer framework. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner exc. + + + + Integer inefficiently represented internally using base-10 digits, in order to allow a + visual representation as a base-10 string. Only for internal use. + + + + + 10 numeration base for string representation, very inefficient for computations. + + + + + Maximum size for numbers is up to 10240 binary digits or approximately (safe to use) 3000 decimal digits. + The maximum size is, in fact, double the previously specified amount, in order to accommodate operations' + overflow. + + + + Integer constants + + + + The array of digits of the number. + + + + + The actual number of digits of the number. + + + + + The number sign. + + + + + Sets the number sign. + + + + + Default constructor, intializing the Base10BigInteger with zero. + + + + + Constructor creating a new Base10BigInteger as a conversion of a regular base-10 long. + + The base-10 long to be converted + + + + Constructor creating a new Base10BigInteger as a copy of an existing Base10BigInteger. + + The Base10BigInteger to be copied + + + + Determines whether the specified Base10BigInteger is equal to the current Base10BigInteger. + + The Base10BigInteger to compare with the current Base10BigInteger + True if the specified Base10BigInteger is equal to the current Base10BigInteger, + false otherwise + + + + Determines whether the specified System.Object is equal to the current Base10BigInteger. + + The System.Object to compare with the current Base10BigInteger + True if the specified System.Object is equal to the current Base10BigInteger, + false otherwise + + + + Serves as a hash function for the Base10BigInteger type. + + A hash code for the current Base10BigInteger + + + + String representation of the current Base10BigInteger, converted to its base-10 representation. + + The string representation of the current Base10BigInteger + + + + Base10BigInteger inverse with respect to addition. + + The Base10BigInteger whose opposite is to be computed + The Base10BigInteger inverse with respect to addition + + + + Greater test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a > b, false otherwise + + + + Greater or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a >= b, false otherwise + + + + Smaller test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a < b, false otherwise + + + + Smaller or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a <= b, false otherwise + + + + Computes the absolute value of a Base10BigInteger. + + The Base10BigInteger whose absolute value is to be computed + The absolute value of the given BigInteger + + + + Addition operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the addition + + + + Subtraction operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the subtraction + + + + Multiplication operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the multiplication + + + + Implicit conversion operator from long to Base10BigInteger. + + The long to be converted to a Base10BigInteger + The Base10BigInteger converted from the given long + + + + Equality test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a == b, false otherwise + + + + Inequality test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a != b, false otherwise + + + + Greater test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a > b, false otherwise + + + + Smaller test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a < b, false otherwise + + + + Greater or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a >= b, false otherwise + + + + Smaller or equal test between two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + True if a <= b, false otherwise + + + + Base10BigInteger inverse with respect to addition. + + The Base10BigInteger whose opposite is to be computed + The Base10BigInteger inverse with respect to addition + + + + Addition operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the addition + + + + Subtraction operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the subtraction + + + + Multiplication operation of two Base10BigIntegers. + + The 1st Base10BigInteger + The 2nd Base10BigInteger + The Base10BigInteger result of the multiplication + + + + Incremetation by one operation of a Base10BigInteger. + + The Base10BigInteger to be incremented by one + The Base10BigInteger result of incrementing by one + + + + Decremetation by one operation of a Base10BigInteger. + + The Base10BigInteger to be decremented by one + The Base10BigInteger result of decrementing by one + + + + Adds two BigNumbers a and b, where a >= b, a, b non-negative. + + + + + Subtracts the Base10BigInteger b from the Base10BigInteger a, where a >= b, a, b non-negative. + + + + + Multiplies two Base10BigIntegers. + + + + + .NET 2.0 class for handling of very large integers, up to 10240 binary digits or + approximately (safe to use) 3000 decimal digits. + + + + + 2^16 numeration base for internal computations, in order to benefit the most from the + 32 bit (or 64 bit) integer processor registers. + + + + + Maximum size for numbers is up to 10240 binary digits or approximately (safe to use) 3000 decimal digits. + The maximum size is, in fact, double the previously specified amount, in order to accommodate operations's + overflow. + + + + + Ratio for the convertion of a BigInteger's size to a binary digits size. + + + + Integer constants + + + + The array of digits of the number. + + + + + The actual number of digits of the number. + + + + + The number sign. + + + + + Default constructor, intializing the BigInteger with zero. + + + + + Constructor creating a new BigInteger as a conversion of a regular base-10 long. + + The base-10 long to be converted + + + + Constructor creating a new BigInteger as a copy of an existing BigInteger. + + The BigInteger to be copied + + + + Constructor creating a BigInteger instance out of a base-10 formatted string. + + The base-10 formatted string. + Invalid numeric string exception + + + + Constructor creating a positive BigInteger by extracting it's digits from a given byte array. + + The byte array + The byte array's content exceeds the maximum size of a BigInteger + exception + + + + Determines whether the specified BigInteger is equal to the current BigInteger. + + The BigInteger to compare with the current BigInteger + True if the specified BigInteger is equal to the current BigInteger, + false otherwise + + + + Determines whether the specified System.Object is equal to the current BigInteger. + + The System.Object to compare with the current BigInteger + True if the specified System.Object is equal to the current BigInteger, + false otherwise + + + + Serves as a hash function for the BigInteger type. + + A hash code for the current BigInteger + + + + String representation of the current BigInteger, converted to its base-10 representation. + + The string representation of the current BigInteger + + + + Parses the number given by a string + + the number as a string + + + + + Compares this instance to a specified BigInteger. + + The BigInteger to compare this instance with + -1 if the current instance is smaller than the given BigInteger, + 0 if the two are equal, 1 otherwise + + + + Compares this instance to a specified object. + + The object to compare this instance with + -1 if the current instance is smaller than the given object, + 0 if the two are equal, 1 otherwise + obj is not a BigInteger exception + + + + Returns a BigInteger's size in binary digits. + + The BigInteger whose size in binary digits is to be determined + The BigInteger's size in binary digits + + + + BigInteger inverse with respect to addition. + + The BigInteger whose opposite is to be computed + The BigInteger inverse with respect to addition + + + + Greater test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a > b, false otherwise + + + + Greater or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a >= b, false otherwise + + + + Smaller test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a < b, false otherwise + + + + Smaller or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a <= b, false otherwise + + + + Computes the absolute value of a BigInteger. + + The BigInteger whose absolute value is to be computed + The absolute value of the given BigInteger + + + + Addition operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the addition + + + + Subtraction operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the subtraction + + + + Multiplication operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the multiplication + + + + Division operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the division + Cannot divide by zero exception + + + + Modulo operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the modulo + Cannot divide by zero exception + + + + Returns the power of a BigInteger base to a non-negative exponent by using the + fast exponentiation algorithm (right to left binary exponentiation). + + The BigInteger base + The non-negative exponent + The power of the BigInteger base to the non-negative exponent + Cannot raise a BigInteger to a negative power exception. + + + + Integer square root of the given BigInteger using Newton's numeric method. + + The BigInteger whose integer square root is to be computed + The integer square root of the given BigInteger + Cannot compute the integer square root of a negative number exception + + + + Euclidean algorithm for computing the greatest common divisor of two non-negative BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The greatest common divisor of the two given BigIntegers + Cannot compute the Gcd of negative BigIntegers exception + + + + Extended Euclidian Gcd algorithm, returning the greatest common divisor of two non-negative BigIntegers, + while also providing u and v, where: a*u + b*v = gcd(a,b). + + The 1st BigInteger + The 2nd BigInteger + Output BigInteger parameter, where a*u + b*v = gcd(a,b) + Output BigInteger parameter, where a*u + b*v = gcd(a,b) + The greatest common divisor of the two given BigIntegers + Cannot compute the Gcd of negative BigIntegers exception + + + + Computes the modular inverse of a given BigInteger. + + The non-zero BigInteger whose inverse is to be computed + The BigInteger modulus, which must be greater than or equal to 2 + The BigInteger equal to a^(-1) mod n + Invalid number or modulus exception + + + + Returns the power of a BigInteger to a non-negative exponent modulo n, by using the + fast exponentiation algorithm (right to left binary exponentiation) and modulo optimizations. + + The BigInteger base + The non-negative exponent + The modulus, which must be greater than or equal to 2 + The power of the BigInteger to the non-negative exponent + Invalid exponent or modulus exception + + + + Implicit conversion operator from long to BigInteger. + + The long to be converted to a BigInteger + The BigInteger converted from the given long + + + + Implicit conversion operator from int to BigInteger. + + The int to be converted to a BigInteger + The BigInteger converted from the given int + + + + Equality test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a == b, false otherwise + + + + Inequality test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a != b, false otherwise + + + + Greater test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a > b, false otherwise + + + + Smaller test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a < b, false otherwise + + + + Greater or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a >= b, false otherwise + + + + Smaller or equal test between two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + True if a <= b, false otherwise + + + + BigInteger inverse with respect to addition. + + The BigInteger whose opposite is to be computed + The BigInteger inverse with respect to addition + + + + Addition operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the addition + + + + Subtraction operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the subtraction + + + + Multiplication operation of two BigIntegers. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the multiplication + + + + Division operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the division + Cannot divide by zero exception + + + + Modulo operation of two BigIntegers a and b, b != 0. + + The 1st BigInteger + The 2nd BigInteger + The BigInteger result of the modulo + Cannot divide by zero exception + + + + Incremetation by one operation of a BigInteger. + + The BigInteger to be incremented by one + The BigInteger result of incrementing by one + + + + Decremetation by one operation of a BigInteger. + + The BigInteger to be decremented by one + The BigInteger result of decrementing by one + + + + Adds two BigNumbers a and b, where a >= b, a, b non-negative. + + + + + Subtracts the BigInteger b from the BigInteger a, where a >= b, a, b non-negative. + + + + + Multiplies two BigIntegers. + + + + + Divides a BigInteger by a one-digit int. + + + + + Divides a BigInteger by another BigInteger. + + + + + DivideByBigNumber auxiliary method. + + + + + DivideByBigNumber auxilary method. + + + + + DivideByBigNumber auxilary method. + + + + + BigInteger-related exception class. + + + + + BigIntegerException constructor. + + The exception message + The inner exception + + + + The number's sign, where Positive also stands for the number zero. + + +
+
diff --git a/packages/ZXing.Net.0.16.4/lib/wp8/zxing.wp8.0.dll b/packages/ZXing.Net.0.16.4/lib/wp8/zxing.wp8.0.dll new file mode 100644 index 0000000..1079fad Binary files /dev/null and b/packages/ZXing.Net.0.16.4/lib/wp8/zxing.wp8.0.dll differ