Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with STag generstor #17

Open
sixer51 opened this issue Apr 25, 2021 · 2 comments
Open

Problem with STag generstor #17

sixer51 opened this issue Apr 25, 2021 · 2 comments

Comments

@sixer51
Copy link

sixer51 commented Apr 25, 2021

I tested the provided tag generator, but the output is something like this:
image

If I stop it before eroding and dilating, the output stag is
image

Could you provide any suggestions on solving this problem?

@bbenligiray
Copy link
Owner

The image on the bottom looks right, this needs to be eroded-dliated a few times to smooth the pattern edges and the top left label needs to be printed.
With the top one, the background seems to have been set to transparent, or maybe it's to do with how the file is being saved. If you're sure that you didn't change those yourself, try saving the image as a JPG.

@sixer51
Copy link
Author

sixer51 commented Apr 26, 2021

Thanks for your suggestion. The bottom image is to show that before eroded-dilated, it still looks fine, but after that, the image isn't shown as expected. I think that there should be something wrong with the eroded-dilated process.

It seems that the value in this line should be 0 instead of 255, but it still cannot solve my problem.

*((byte*)(imgData.Scan0 + k * imgData.Stride + j * 4) + 3) = 255;

I tested saving the image as JPG, but it is still wrong.
00001_jpg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants