how to fast convert bootstrap button into png image file? - html

that I would like to say, there is a good (or maybe not) bootstrap framework that can generate buttons with simple code.
I really like how these buttons look, and I want to use them in another software, but for this I need them in PNG format.
Why is not satisfied with the option "manually" - the buttons need a lot and not always needed, but when needed - they need fast, do not really want to spend a lot of time creating buttons ...
Current process:
Open page (for example https://www.tutorialrepublic.com/twitter-bootstrap-button-generator.hhp) to set the necessary parameters (button name, size, type, color, icon ...)
Copy the whole screen to the buffer
Insert a screenshot from the buffer into an image editor
Make necessary cropping of this picture, leave only the image of the button itself
Save the result in png format
Use the image in your application.
That I would like to receive:
Open (no difference - internet page, any software, etc...)
Specify the required parameters (button text, size, color, icon)
Press the button - save to PNG, without loss of quality.
Use the image in your application
Maybe someone already solved a similar problem and translated it into a semi-automatic mode, share the implementation.
I use Win10 at workstation

The easiest way would be to manually crop them by Snipping Tool. This works great if you have just a few buttons.
But if you want to take them automatically, I think you can use an python/opencv script to idendify buttons, crop and save them.

Ok, solution found - ShareX (https://getsharex.com/) software with 1 hotkey (ctrl + printscreen) - open crop dialog with zoom, after crop - makes the png-file automatic

Related

How to insert a pdf file as an image in HTML?

<img src="img.pdf"> doesn't work due to it being a pdf. I don't like the embed and iframe environments either, since they add the pdf viewer options, the scroll etc. I tried converting the pdf to an image with the convert and pdftoppm commands on Linux, but these result in the image having extra white space on top and bottom to fit A4 format, and/or makes the background black (instead of white or transparent).
Any ideas?
"Img" is in effect an iFrame of an embedded binary object, but it is borderless since it is statically scaled to one non zoomable size. Note the img above this text is framed as https://i.stack.imgur.com/xpw2l.png
Yes there are ways to make it more dynamic but vanilla binary PNG/JPG/ETC are imbedded, and part of the binary HTML viewer renders those fixed areas. You can switch them off if you wish, or they don't display if badly served.
So why is PDF not simply treated like an image as per your question?
The answer is simple they are a different type of binary that requires a different html viewing binary extension. One frequent complaint is why use "menus and scrollbars if not needed for a simple file?"
The answer to that is those controls need to be in the extension, for zoom pan etc. So how comes the FireFox viewer above has none?, that's because as a user I switched them OFF.

HTML & CSS - How to show a .SVG but let end-users click and copy a .PNG when clicking and dragging away (or copying in general)

Imagine you have an image in two versions, one being a .SVG and another one being a .PNG version.
You show the .SVG on a webpage, but when end-users click and drag that image for example into their social media app, you would like them to have copied the .PNG version instead of the .SVG version (since, some of those media apps can't handle .SVGs).
Using only HTML and CSS, is this possible? Many thanks for your help.
Could the same answer be extended to also work when the end-user would copy the presented image in another way (such as through mouse-interaction, by selecting the visible image and then copying through keyboard shortcuts or menu mouse-navigation)?

Extract buttons from PSD file for website

I downloaded a PSD file containing buttons that i want to use on my website. Problem is i don't know how to access them for use on the website. How would i extract these buttons? or is there a better way to do it? here is a screenshot of the psd open in photoshop.
You can use this Slicer application:
http://testslicer.codeborg.com:9080/
I tried it and it works perfect. You must upload .png file and then set the slice lines. You must have clicked on the layer if you want to slice it. Try it, it's really simple.
I tried Nedoma's link and here is output:
First step: I crop your image nad add some lines
Second: I used Split function
It looks there are more functions but they works only when you're using transparent background.
If you want to hide text layers before processing in this tool, there is link to Photoshop script http://slicer.codeborg.com/hide-text-script.html
You could use the rectangular marquee tool, cut out the button you want, then create a image based off the button you just cut out. This will essentially give you the button you want, then in your website just have your button be that image.
If you are having trouble saving the individual button images, you need to learn how to use the slice tool

create a page which contain a flash can be add text dynamiclly

I have to create a web page which can be set to full screen(I mean the real full screen,not like press the F11),in the full screen there should be some words displaying.
Take the http://stackoverflow.com for example:
Normally,it show its contents(the questions),but someday,maybe a VIP come to visit the page,so we want to replace the whole page with a welcome screen.
Of course we can replace the https://stackoverflow.com/index.html (suppose it is the index page) with the welcome text(welcome xxx to our site...) in the server side.
However this is not convenient,and the text can not be full screened.
So I thought the flash,I can add a controller button at the page,when required,I click this button,and set the welcome words,then a flash will start to play with the sepcified words in a full screen model. It would be better if the flash can show the text with a Animation.
I have never did the flash development,so I want to know if this is possible?
BTW,can all the clients change to flash with juse one click?
I mean I click the controller button,then all the client who is visit this page should see the contents replaced by the flash at the same time.
I am not sure if you guys know what I am meaning. If not,I can update more details.
I am really Anxious, Thanks. :)
Since you're starting from scratch with Flash, I made a quick example of what I think you want to do. http://clearmpls.com/temp/fullscreen/ - the source files that I made this example with can be grabbed from here: http://clearmpls.com/temp/xml-loading-fullscreen-thing.zip
I used the Flash IDE to create this. You can grab a 60-day trial from Adobe's site here: https://www.adobe.com/cfusion/tdrc/index.cfm?product=flash
This example shows examples of these functions:
- it loads an XML file with text data
- displays that data in a textfield on the stage
- gives you a button where you can toggle back and forth between fullscreen and regular
- resizes the stage and textfield based on what you have written in your XML file

swing: saving dialog box resize dimensions

I have a dialog box with a bunch of dimensions that a user can change by moving/dragging, including a JTable with resizable/draggable columns.
What I would like to do is to make the state of these resizable columns / dialog boxes / etc. persistent, so the next time my application starts up, the user doesn't have to go through the resizing step all over again.
What's the most convenient way to do this?
You should probably take a look at the code in (the now probably dead) JSR-296. A part of it was focused on persistent session state, and I know for sure that the code for persisting window locations and such was already functional and in the basic framework. It should either already do what you want, or provide a good starting point.
Cfr. dev.java.net site for JSR-296