I was supplied a logo for a website in .ai format, which I cropped and saved as SVG1.1, and placed this on multiple places on a friend's Shopify store.
Image in question (view this in Safari for iOS)
Screenshot of the image fault on the site: i.stack.imgur.com/HmsIB.png
Link to actual page here: bambooboss.com/pages/about-us
The "Panda Head" image under the first photo is half blacked out when viewed with Safari, latest version of iOS on my iPhone 5. While it looks quite cool, it's definitely not anything like my friend's original creative vision...
I tried another answer here on SO, where they tried surrounding all LinearGradient with <defs> tags, which I did to the current image - but to no avail...
Anyone have a clue what's going on? Is it compatibility? or did something go wrong while saving to SVG from .ai?
Change the following line to:
.st38{opacity:.08;fill:url(#XMLID_108_);}
i.e. remove the 8.00000e-02
also ... run this through an optimiser like SVGOMG ... if displayed at the small size this is far too complicated and large. Simplify all the gradients, maybe even merge them all into one. Should be able to get the ungzipped version down an order of magnitude from 35kb. Lovely logo though.
Related
Using Unity2D 2017.1.1f1, Tiled and Tiled2Unity, I exported a tiled map in Unity and there are no problems in the editor. I also tried it played maximised and there are no gaps present.
The problem shows up when the game is ran in iOS specifically iPhone 6s. There are noticeable gaps showing up.
Also, I also got the settings like this:
Any suggestions? Thanks..
(I'm the Tiled2Unity author)
Those gaps you are seeing are seams and they're common in Unity development when using tile or sprite sheets that "touch" each other. There are a number of ways that you can fix them described here.
However, these seams are fixed automatically with SuperTiled2Unity which is still free (or name your price) and is currently under soft release. Just be aware that all your Tiled files (TMX, TSX, textures) will need to be in Unity now (that's a good thing).
Dragging in all your files (with relative paths intact) to Unity should take care of the importing process for you.
I'm trying to write an app that recognize a logo saved in app bundle and readed as UIImage. I have did a search before make this question, the only free solution seems to be OpenCv. I have tried it in a demo i had download from toptal_logo_detector . The demo works and i can find my logo everywhere i place it. Anyway the camera is very slow, too slow to use it in a real app. Maybe there's a way to optimize it, but my question is another.
I have to recognize a vector logo (always the same logo) centered in a white background ,something like this wifi logo:
My only solution is the complex OpenCV? There's a free and simpler way to achive the result: YES here there's your logo/No there isn't ?
I found this tutorial (with project download) that does what you want using OpenCV
I am making the invoice part of an application, and at this moment I am done with the invoice generation (adding products and stuff).
The next step is to have a report displaying the invoice data, ready to print.
That works too. I used Fortes Reports because it is free, easy to work with, and has a free PDF export filter, and a Preview component, so it has everything I need.
Now, my problem is that I must allow my users to Annull an invoice. So when an invoice was emitted, if there was a problem with it, I cannot just delete it later, I must Annull it (I'm not sure that is how you call it - maybe make it void), but basically the invoice stays the same (in printed form) EXCEPT we must write/draw diagonally on top of the entire invoice one word: ANNULLED with RED color.
That means I will make a new report for this case (annulled invoices) and use this one whenever the user wants to print an annulled invoice
So now in Fortes Report there is an RLAngleLabel component that allows me (in theory) to do just that: draw/write the word ANNULLED on the report. But my problem is that I add the label just fine in the btDetail RLBand, only I just can't see it in Preview, and I have no idea what I am doing wrong. If it's not visible in designtime preview, I assume it wont be visible in runtime neither.
Should I place it in a specific way? Should I add it at runtime somehow? I cant seem to be able to access the report's Canvas so I could draw it in some event...
Does anyone have any experience with what I am describing?
In order to reproduce my problem, just add a RLReport control on your form, add bands to it (Titleband, ColumnHeaderBand, DetailBand), and on a detailBand (DetailGridBand)place an AngleLabel, then right click on the report and choose Preview...
If I place the AngleLabel on the TitleBand or on ColumnHeaderBand, then it shows in preview, except that I need to place this Angled label ON TOP of the contents of the invoice, not on the header info.
In the past I used a BMP image as big as the invoice (in order to have it transparent so I would see the contents beneath it), but that made my exported PDF report 5MB in size, and that is a little too much (PNG was not working correctly - I think it would not display it transparent or something like that, so I was stuck to using BMP).
Is there any way of achieving what I want (described above)?
For whoever encounters this dilema, I reached the conclusion that I should still go with displaying an image containing the desired text as background and setting the bands to Transparent.
The angleLabel approach seems to be unknown, so I dropped it.
I use this time a PNG file that is about 30-40 KB in size and that does not bother me to have it added to the size of the final PDF.
A lot better than the previous BMP image I used before (that increased the size of the PDF file with about 5 MB).
The neweest version of RLReports works with PNG images. That saved me
Also if you have any RLDraw objects on your report, you must set it's brush style to bsClear, so it would allow the background to be visible.
I am using the most excellent PHP library ePub to on-the-fly create digital books from HTML stored in my database.
As these are part of a collection, I am including a cover image for every book. Everything works fine in the code but depending upon the device/software interpreting the ePub, the image may get cut off. I have seen 600x800 pixels as a recommended size, but it still cuts it off (for example in Aldiko in Android). Is there a standard size that is recommended in the documentation?
Honestly, I would love a good and readable recommendation for documentation of the ePub format.
So, it seems that Aldiko has the problem, and not the other e-Readers I have tested (Calibre, Overdrive).
After trying various ratios, I found that Aldiko only respects the height:100% style I have called out in the height direction. It doesn't scale the image, only sets the height at 100% of the screen width. I am going to have to go with this being a bug in Aldiko, and keep the recommended 600x800 ratio for maximum resolution.
Another interesting thing I discovered as well; the Aldiko reader didn't recover as well from non-standard HTML. On one of the database entries, a <style> tag inside the <body> disappeared, but the style text did not. This is not the same for the other e-Readers.
The best general advice I found on the internet is Preparing Images for Ebooks Project (PIFEP).
I want to store a bunch of images that are taken while the user uses the app, while making sure that I can view them with decently high resolution later on. And by "store", for now I don't need to store them past the closure of the app. Simply having them available after some point while the app is still alive is all I need.
I first tried simply storing the UIImages in their original size on the app, but then the app would crash after 7 or 8 pics were taken because of memory usage.
I then tried shrinking them (since my app has a grid display wherein I can see all the pictures, but shrunk to fit on a 3x3 grid of images) , and my app stopped crashing. But when I wanted the pictures to be viewed individually on full screen, the quality was terrible because I was enlarging a shrunk photo.
So I figured why not find a way to store the original image through another object in a way that wouldn't eat up too much memory. Searching online lead me to decide to store them in a file, by converting the images into NSData and then writing this into a file. BUT, when I would then load the NSData back into a UIImage, the orientation of my photos taken through the camera were all sideways! And after hours of looking (and failing) through how to transform it back into the proper orientation, I've decided to give up on trying to fix this orientation bug.
Instead, I just want to know if there is any other way for me to store large/high-res UIImages (without hogging up memory) besides using NSData. What ideas do you guys have?
And pardon me for having to write so much for a one-liner question. I just didn't want to get suggestions on doing something I've already tried.
Save it as a jpeg instead of a PNG, that way the image will be rotated for you. See https://stackoverflow.com/a/4868914/96683