HNHacker News
TopNewBestAskShowJobs

IvanK_net

2,453 karma · joined August 20, 2013

submissionscomments
IvanK_net··on Show HN: Pdf.js Express – PDF annotation, e-signatures, and form filling
You can find a picture of an arrow online and copy-paste it into your document :) or you can draw your arrow with a Brush tool, or with a Pen tool, etc :)
IvanK_net··on Show HN: Pdf.js Express – PDF annotation, e-signatures, and form filling
It is written right when you open Photopea.com :D https://i.imgur.com/zgX380J.png
IvanK_net··on Show HN: Pdf.js Express – PDF annotation, e-signatures, and form filling
The preview in Photopea is always rasterized (pixelated at a certain zoom). But you can increase the resolution in Image - Image Size.
IvanK_net··on Show HN: Pdf.js Express – PDF annotation, e-signatures, and form filling
Yes, the actual values are points, and one point is 1/72 of an inch, which is the same, as if the values were in inches. I just wanted to point out, that the units are physical (unlike "logical" units in an SVG or in a webpage).
IvanK_net··on Show HN: Pdf.js Express – PDF annotation, e-signatures, and form filling
1) In a PDF file, the measure units are Inches. The page size is in inches. Any dimension is in Inches. There can be a bitmap having 200x200 pixels placed at 3x3 inches. Next to it can be a bitmap of 5x5 pixels placed at 5x5 inches.

That means, that PDF does not contain any DPI information. It is not needed at all. PDF rasterizer (e.g. a raster printer) can render it at any DPI. Photopea decodes and saves back bitmaps inside PDF in the original resolution. The rest is vector graphics.

2) For now, Photopea ignores embedded fonts. But it extracts the font name and in 98 % of cases, we already have the required font in our database of fonts, so we can render it identically.

IvanK_net··on Show HN: Pdf.js Express – PDF annotation, e-signatures, and form filling
I spent about three years building the support for PDF into my graphics editor https://www.Photopea.com .

While other editors "add stuff on top of PDF", Photopea "chews through" each byte of a PDF, and tries to make as much sense of it as possible.

You can rewrite the existing text (with the same formatting), edit bézier curves, edit gradient fills. You can edit bitmaps on a pixel level. You can see the parameters as CSS or export it into an SVG.

Also, it is free. People open about 150,000 PDF files a month in it, but I hope it will get more popular in the future.

Demo PDF: https://www.photopea.com/api/img2/WEBSITE-ZLONIN-uprava.pdf

Photopea: https://www.photopea.com#%7B%22files%22:%5B%22https://www.ph... (press T and click into the text to edit it)

IvanK_net··on Show HN: A frame by frame GIF editor with Photoshop vibes
Hi, we licence Photopea to them. They provide it to their customers, together with the access to their stock photos and other features.
IvanK_net··on Show HN: A frame by frame GIF editor with Photoshop vibes
I am working on a photo editor https://www.Photopea.com and I added the GIF capability some time ago :)

Simply put, each layer, whose name starts with "_a_", defines a frame. Layers with other names are visible in all frames.

An example: go here http://photopea.com#iL9sRwekM and press File - Export As - GIF :)

IvanK_net··on Private client-side-only PWAs are hard, but now Apple made them impossible
I disagree. The IndexedDB was introduced as a permanent way to store data (which is not deleted after closing a website). As it is the only available standard for permanent storeage, I think it should be deleted only if the user asks to delete it (the same way you delete any other file in your computer).

Of course, browsers are free to do whatever they want. But the user can (and will) switch to the software, which does what he or she wants.

IvanK_net··on Private client-side-only PWAs are hard, but now Apple made them impossible
So I guess more people will switch from iOS to other devices.

I am the creator of a photo editor www.Photopea.com and I see, that more and more people care about their browsers. They spend a lot of time discussing the issues of their browser with me, because they need to do a serious work in it.

IvanK_net··on Private client-side-only PWAs are hard, but now Apple made them impossible
I have many useful files in my computer, which I don't want to be deleted. You are saying, that it is ok, if the OS deletes all files in my computer from time to time.

A local storage is the only way webapps can store any data in your computer (other than asking you to manually load / save some configuration file). Not all webapps can afford cloud storage for all user.

IvanK_net··on Private client-side-only PWAs are hard, but now Apple made them impossible
It is related only to WebKit (Safari). So I think people will just switch to other browsers.
IvanK_net··on Court outlaws German Weather Service's free weather app
The US is still one of the most rich countries. In many countries with "free healthcare" you usually don't get anything without a bribe.
IvanK_net··on Court outlaws German Weather Service's free weather app
Is it even right to spend tax payers money for running a Weather Service, if it can be handled by private companies?
IvanK_net··on How I made a 3D game in 2 KB of JavaScript
It reminds me my 3D demo in 47 lines of JS (without WebGL) :) https://jsfiddle.net/06L845jx/86/

And 54 lines of JS: https://jsfiddle.net/06L845jx/127/

IvanK_net··on Ask HN: How do I learn JavaScript?
It is not clear, if you want to learn programming, or you alerady know it, and want to learn a new language.

It takes years to become good at programming. Once you know programming, it usually takes hours to learn a new (procedural) programming language.

IvanK_net··on Ask HN: How to donate $1k to open source?
I would recommend to choose one library, that is especially important to you, and that you think could be underpaid, and send it to them directly. If everybody does so, other libs will get paid by other donors.

I would recommend to avoid services, which "redistribute" donations. Such companies need to keep a part of money for themselves as running costs, and it is often not clear, if they keep 1% or 90%. And the way they decide who gets what, also might not be clear. I am not saying they are corrupted. I am just saying the transparency is lost with each "man in the middle".

IvanK_net··on Pointer Compression in V8
It is true, that I could use mimpaps and show only the preview of a scaled-down version of the image.

But the rendering pipeline of PSD documents is extremely complex. There are not just layers, but also layer styles, raster masks, clipping masks, adjustment layers. Folders of layers can have their own layer styles and masks. You need to allocate separate buffers to render "sub-trees". And everything is GPU accelerated (over WebGL).

I am afraid that remaking it to a mip-mapped system would take me like 1 000 hours of work, so I think it is easier to remake V8 (which I guess could be like 100 hours of work). As the usual capacity of RAM will keep growing, they would have to do it at some point anyway.

IvanK_net··on Pointer Compression in V8
"This is fine for browsers, as the heap doesn’t need to be greater than 4 GB anyway."

I develop a photo editor www.Photopea.com , where people often edit e.g. 100-megapixel photos. Then, Chrome may crash (because of 4GB limit) and they lose their work. I have to recommend users to use Firefox for such cases.

IvanK_net··on Waterfalls of the Great Lakes Region and Beyond
I think I wrote the manual about my software in the same manner :) https://www.photopea.com/learn/ It also loads very fast and the HTML code is readable :)
IvanK_net··on The Dark Side of WebAssembly (2018)
All WebAssembly can do, can be done with Javascript (there are no new capabilities). But WASM can do it a bit faster. It is also easier to convert non-JS code to WASM than to JS.

You can still create websites the way you created them 25 years ago. They will work in all browsers. All the web code (HTML, JS, CSS...) is always visible to the browser and the user, nothing can be hidden (otherwise, the browser would not be able to show a website).

I guess you are complaining about authors putting all HTML code on a singe line, or naming JS variables with one letter. But they could do it 25 years ago, too. It does not mean you have to do it.

IvanK_net··on The Dark Side of WebAssembly (2018)
You can make 90% of people afraid of XYZ, if you write a sufficient amount of text "explaining" how dangerous XYZ is.
IvanK_net··on Founder came back after 8 years to rewrite Flash photo editor in Canvas/WebGL
Hi, thanks! I think the JS that I write is quite efficient and I don't expect the WASM version of the same features to be faster. But I do plan to write something in WASM and see for myself (you don't have to write in C, you can write WAST and convert it to WASM :D).

I open-sourced many parts of Photopea: https://github.com/photopea?tab=repositories .

IvanK_net··on Founder came back after 8 years to rewrite Flash photo editor in Canvas/WebGL
Yes, Photopea is only one HTML, one CSS and many JS files. It is about 1.5 MB in total. I pay 40 USD a year for the hosting + 12 USD a year for the .com domain.

I gave a talk about it: https://www.youtube.com/watch?v=IZmaeC_Ma5A

IvanK_net··on Founder came back after 8 years to rewrite Flash photo editor in Canvas/WebGL
I do everything with Javascript. I never liked using native tools / compilers for programming (there are too many of them with too complex configurations). I use only a text editor and a browser for development :)

WASM builds of two C libraries are used in Photopea: Harfbuzz (177 kB) and Fribidi (32 kB). But their authors were kind enough to give me WASM files directly, so I did not have to compile anything.

IvanK_net··on Founder came back after 8 years to rewrite Flash photo editor in Canvas/WebGL
Thanks! BTW. there is Liquify in Photopea, too.https://www.facebook.com/photopea/photos/a.1703140446613703/...
IvanK_net··on Founder came back after 8 years to rewrite Flash photo editor in Canvas/WebGL
I did not use any UI libraries, I wrote my own CSS and JS.
IvanK_net··on Founder came back after 8 years to rewrite Flash photo editor in Canvas/WebGL
You are welcome :) BTW. you can open Pixlr PXD files in Photopea (including text layers, layer styles, save them as PSD, etc)

Actually, it is the 19th most frequent format of files opened in Photopea :) https://twitter.com/photopeacom/status/1172183966125871105

IvanK_net··on Founder came back after 8 years to rewrite Flash photo editor in Canvas/WebGL
Hi, I am the creator of https://www.Photopea.com and I am a bit sad, that you did not start to work on it earlier. Wish you good luck! :)
IvanK_net··on Show HN: Flash replacement
Hi, are you familiar with my library IvanK.js ? It has the "Flash interface", but for scripting.

I used it to port several of my flash games to the web: http://lib.ivank.net/?p=demos&d=spritesheet

← PreviousPage 7 of 14Next →