Comments (6)
Hi !
I don't see any overload method for GetGraphic()
, which will take icon as svg string and it will generate SVG.
namespace QRCoder
{
public class SvgQRCode : AbstractQRCode, IDisposable
{
public SvgQRCode();
public SvgQRCode(QRCodeData data);
public string GetGraphic(int pixelsPerModule);
public string GetGraphic(int pixelsPerModule, Color darkColor, Color lightColor, bool drawQuietZones = true, SizingMode sizingMode = SizingMode.WidthHeightAttribute);
public string GetGraphic(int pixelsPerModule, string darkColorHex, string lightColorHex, bool drawQuietZones = true, SizingMode sizingMode = SizingMode.WidthHeightAttribute);
public string GetGraphic(Size viewBox, bool drawQuietZones = true, SizingMode sizingMode = SizingMode.WidthHeightAttribute);
public string GetGraphic(Size viewBox, Color darkColor, Color lightColor, bool drawQuietZones = true, SizingMode sizingMode = SizingMode.WidthHeightAttribute);
public string GetGraphic(Size viewBox, string darkColorHex, string lightColorHex, bool drawQuietZones = true, SizingMode sizingMode = SizingMode.WidthHeightAttribute);
public enum SizingMode
{
WidthHeightAttribute = 0,
ViewBoxAttribute = 1
}
}
}
thank you !
from qrcoder.
Hi Simon,
the "QrCode"-class has already an overload which takes a Bitmap-object which will be printed on the QrCode.
public Bitmap GetGraphic(int pixelsPerModule, Color darkColor, Color lightColor, Bitmap icon=null, int iconSizePercent=15, int iconBorderWidth = 6, bool drawQuietZones = true)
By passing the Bitmap icon to the GetGraphics method the icon will be printed. By changing the iconSizePercent parameter you can set up how much percent of the QrCode image will be covered by the icon (Min=1, Max=100). Please keep in mind that the higher this value is, the harder it is for QrCode readers to read out the QrCoder's payload.
from qrcoder.
Hi @iAmBipinPaul ,
the overload with the icon-parameter is only available for the "QRCode" rendering class. The "SvgQRCode"-class doesn't support icons right now. Have a look at this Wiki page to learn more about the different rendering classes: https://github.com/codebude/QRCoder/wiki/Advanced-usage---QR-Code-renderers
If you like to implement icon support for SvgQrCodes feel free to do so and sent a Pull Request later.
from qrcoder.
Hi @codebude ,
Thank you for you the info. I don't know about low level stuff for QR code (Image/SVG )
, I will try this when I will get free time and If it works will definitely send pull request.
from qrcoder.
Are you able to make similar to the starbucks qr code?
Can you share the code to produce that qr
from qrcoder.
Hi , @hermanthotan
I think I was able to place logo on qr code but not the svg.
but now I do not have access to the code so .
from qrcoder.
Related Issues (20)
- Issue was in the last digit of QR Code. It was showing (. * - + and Sometimes X Y A B Z). The String is M*******7202 * is as Character. HOT 3
- Cannot use 5 argument version of QRCode constructor under Windows .net 8.0 with Nuget 1.5.1 HOT 9
- [Feature] Trimmability
- [WIP] How do we split the QRCoder? (NuGet packages) HOT 3
- [WIP/QRCoder2] How do we split the QRCoder? (Github repositories) HOT 1
- [WIP/QRCoder2] Version number handling HOT 1
- [WIP/QRCoder2] Documentation and wiki HOT 2
- [WIP/QRCoder2] How do we handle changes during the 2.0 development? HOT 2
- [WIP/QRCoder2] Coordination of development (VCS) HOT 1
- [WIP/QRCoder2] Coordination of development (Organization) HOT 1
- [WIP/QRCoder2] Communication tools besides Github? HOT 1
- [WIP/QRCoder2] System.Drawing vs X HOT 2
- [WIP/QRCoder2] Use of System.Drawing.Primitives HOT 1
- [WIP/QRCoder2] How do deal with COM-support? HOT 5
- [WIP/QRCoder2] Shall we re-think the Payload Generator? HOT 7
- [WIP/QRCoder2] Consider Removing QRCodeGenerator Instance Methods
- [WIP/QRCoder2] Which frameworks and language version to target HOT 3
- vCard to QRCoder - diacritics problem HOT 8
- [WIP/QRCoder2] Consider Removing Nested Types from Public API Signatures HOT 2
- [WIP/QRCoder2] Consider Updated Abstractions HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qrcoder.